Message ID | 20231122233058.185601-11-amakhalov@vmware.com |
---|---|
State | Superseded |
Headers | show
Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=vmware.com header.i=@vmware.com header.b="qvxFxZLX" Received: from DM4PR02CU002.outbound.protection.outlook.com (mail-centralusazon11013021.outbound.protection.outlook.com [52.101.64.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AC2CD71; Wed, 22 Nov 2023 15:31:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nCacTArm+WRteu4CskXJbY+5axyfCe2XoNyrr1ji6THb8VeXi3J7yRJ1ZAjxJRCqtGdEAQn5IcarGlN1PrC+9ojqpdaalEhh5xBFb2ykAD2hN2EubuDmDvTHkmZrKrIk7/gZ/eivly2KZkrJ4YyLs8t6KWA/zDgS5rSDll5vnnoUfZnFLLL/SnjyKi3QkMe1B+JbmbCCHjC/ATn7UTAvfV/X5ATemWBkUhbOKsxkSpoQY27YZhZlRJuwHFqbqgfEUeSXdv9fLoQgBVBD3JrkvkMZo/0eLvkev314VdSIB5dcHi3gfnJtr2pIETbdC7LJpZu44Ukjcp6qRrLnRzU5bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mYs7K700gBSzwO+6j/TEg+wWDBD31/tUc3OwiVR/muA=; b=K56V7LcYqfl1JrWOd29C1L3AiDrVQIRT6tcQyBQ3/RafSoCig/0cQWu9RUTBvbfoR4EQVF5mPwimyiKqEEvAesGgkHGVKjMn61zVhNX9gEZSdiOAXHxSMdnm/DT6oA4NbUEJ02OjoXNvrqVOYVkoBQGqJ2+paAyZzURb8FjNdiZLapCZtuscV0OTHZBqwb6g15c9QnBIUi500GGgs/xoWuhiCxq7gWHloFjD1KfUSnqZBsnINFMpZFXVLUTmZ/7kHpW5EywL6BVyzpo5HOh99pZKByK/GgeWw3tlL3pMjXeBHGOu1r+SyD1lSIR1+THrFdFPr314usT/LYk9SPgTxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mYs7K700gBSzwO+6j/TEg+wWDBD31/tUc3OwiVR/muA=; b=qvxFxZLXm6V9akRtEnhjzRJJ4Hx/orOJBcr7EMBnsWWL8rxKDDMUuK+oyuM+MVpFnngk1D58it7AmK5VAq8hwH93p7TtnwlD6Dlmh0qc+eDEj2Jvfd2FpVJrKnz1TQLeEo6JIm97s7vXtRO39Ok6JcwC0ITyx483QPL9N6mNG8M= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vmware.com; Received: from MWHPR05MB3648.namprd05.prod.outlook.com (2603:10b6:301:45::23) by BY3PR05MB8275.namprd05.prod.outlook.com (2603:10b6:a03:3b6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.18; Wed, 22 Nov 2023 23:31:26 +0000 Received: from MWHPR05MB3648.namprd05.prod.outlook.com ([fe80::10f0:590a:708:4ad7]) by MWHPR05MB3648.namprd05.prod.outlook.com ([fe80::10f0:590a:708:4ad7%2]) with mapi id 15.20.7025.019; Wed, 22 Nov 2023 23:31:26 +0000 From: Alexey Makhalov <amakhalov@vmware.com> To: linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, hpa@zytor.com, x86@kernel.org, dave.hansen@linux.intel.co, bp@alien8.d, mingo@redhat.com, tglx@linutronix.de, zackr@vmware.com, timothym@vmware.com, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, airlied@gmail.com, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com Cc: netdev@vger.kernel.org, richardcochran@gmail.com, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, linux-graphics-maintainer@vmware.com, pv-drivers@vmware.com, namit@vmware.com, akaher@vmware.com, jsipek@vmware.com, Alexey Makhalov <amakhalov@vmware.com> Subject: [PATCH 3/6] ptp/vmware: Use vmware_hypercall API Date: Wed, 22 Nov 2023 15:30:55 -0800 Message-Id: <20231122233058.185601-11-amakhalov@vmware.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231122233058.185601-1-amakhalov@vmware.com> References: <20231122233058.185601-1-amakhalov@vmware.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR05CA0039.namprd05.prod.outlook.com (2603:10b6:a03:74::16) To MWHPR05MB3648.namprd05.prod.outlook.com (2603:10b6:301:45::23) Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: <linux-input.vger.kernel.org> List-Subscribe: <mailto:linux-input+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-input+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR05MB3648:EE_|BY3PR05MB8275:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c01e94b-30ae-4d1c-fa37-08dbebb32544 X-LD-Processed: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DIfP242+jRcm6uWK9t21PQ++by4xujmkLIGtfd1tm4tDFIu/jt1uCrkn5yylr7UGVuxSTApJb5p6XFf/S8GE19iTo8uAcxIL1MBonld7f25kJD9IkkENVntV+cLAADBmfGUvtCq/5DgjLtaivf62Y0F1exekPrIjMsIJ3AYtsa0Hyd6fomy+PeYgTdy+T001NMNuT2NZacc2eTgIWq0wmJfh34PywKT6oT1r8cXXQQTUyr2RPUSW1Zq2AIaGNOMdZn5eWSTK1RPJYr26EFP7VHB4ZITh1PY46I+OHiRW9g7FU123a7/fPPa73nmz3n5nTwyHE3gnWJoen3RqfhKXaiI9PwHVWRxcFPJHTLyZud5DwCgvbpw3WBdej8SHFRaezUEKgII4lkUi3eRIDpPCkWUHmxwx3ECOamyWRkneVBot5HAeqEWBkVIDgzBOyAU7rxD7axv4SWLH9LgpG0sSXBWTA6j2I/1NvftvJi5efZd5Rk+bzCCDRZKZjoUE3FxxyfoRbaBgAtB8CfVgmRfSrCOt/R5alHmge6twtF+YvUx+vF0wQUBF3XYLUb2jEksgEUwiSfkrQSuG2z/+Uu+/yRrj3LFZ4LMeZ0OMIH+3ISYRObrCQnoz8Agh6cu5VM43UaoRsncSvjj1/yb2PG89gikTRH+9UjXdK6XubR6xdmH9bFyaInq02BavBp3Sx0FB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR05MB3648.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(376002)(136003)(39860400002)(346002)(230922051799003)(1800799012)(186009)(451199024)(64100799003)(6486002)(4326008)(8676002)(8936002)(5660300002)(7416002)(2616005)(107886003)(478600001)(83380400001)(38350700005)(6666004)(2906002)(66946007)(66556008)(66476007)(38100700002)(316002)(41300700001)(6506007)(6512007)(52116002)(26005)(36756003)(86362001)(921008)(1076003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0ADu/phnqPtetqDsPlFxART3aF1ghnqvZeen9BlWe2MUwPq4i6JoPzPB6fDtHL4vmP4YEmlEbhwuikMUrzUPJ6bR7Z+cJfkL054nLdNFfrsgWFA3eXPNKfM3j1ouPn3TciYH9zKeyn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Dk+8L2zraDxYMrJ6SiTvYLJpvXibK2Q1hMyq8yYSaXLESce7GcZGyNIpVNTqXv6TAxwQsvZvDDoL6MDXFoRyUKjW7XN1Rrx1gYTno/tmhLOXwJzATZ7QJOYsNLy4MdQb+1cQ+8cmrU2iKadvcBBsEbJ0lOt17N7zUwnEwTfqLn+ZE5X6zKapE827KGCZbI4RPARF79Q1iBlOMUrBm+yiGVZuB2B+dFN/mZfUpBKR8iQNp1IoAeLthymYyvYeAdKANmJew+spQ1y3tcw4b8BCIW+uLc73+brndhyWTaIRBFK7FNjEyOEvQjA5x1RMjmS0+xkbo5cXnFI++4AjLUjoBk4arlCi1wZ7oNFaJp25VHrDbLo6 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c01e94b-30ae-4d1c-fa37-08dbebb32544 X-MS-Exchange-CrossTenant-AuthSource: MWHPR05MB3648.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2023 23:31:26.4005 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tle+smzcxXq1bZbHF988NhkwQJD+MX+tTM27jlWTrqDWyPz+ICIsgmJzsHolKmp3juY/3j65fUMpDd9GcZY+1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR05MB8275 |
Series |
None
|
expand
|
diff --git a/drivers/ptp/ptp_vmw.c b/drivers/ptp/ptp_vmw.c index 27c5547aa8a9..e5bb521b9b82 100644 --- a/drivers/ptp/ptp_vmw.c +++ b/drivers/ptp/ptp_vmw.c @@ -14,7 +14,6 @@ #include <asm/hypervisor.h> #include <asm/vmware.h> -#define VMWARE_MAGIC 0x564D5868 #define VMWARE_CMD_PCLK(nr) ((nr << 16) | 97) #define VMWARE_CMD_PCLK_GETTIME VMWARE_CMD_PCLK(0) @@ -24,15 +23,10 @@ static struct ptp_clock *ptp_vmw_clock; static int ptp_vmw_pclk_read(u64 *ns) { - u32 ret, nsec_hi, nsec_lo, unused1, unused2, unused3; - - asm volatile (VMWARE_HYPERCALL : - "=a"(ret), "=b"(nsec_hi), "=c"(nsec_lo), "=d"(unused1), - "=S"(unused2), "=D"(unused3) : - "a"(VMWARE_MAGIC), "b"(0), - "c"(VMWARE_CMD_PCLK_GETTIME), "d"(0) : - "memory"); + u32 ret, nsec_hi, nsec_lo; + ret = vmware_hypercall3(VMWARE_CMD_PCLK_GETTIME, 0, + &nsec_hi, &nsec_lo); if (ret == 0) *ns = ((u64)nsec_hi << 32) | nsec_lo; return ret;
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov <amakhalov@vmware.com> --- drivers/ptp/ptp_vmw.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)