Message ID | 20231122233058.185601-4-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="NFPP9chv" 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 6A01911F; Wed, 22 Nov 2023 15:31:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TJMLfZYayKTr6G4KeNwP/bfwIG80ws8bT71CvMCZuGn3RJyKeHGQGGH9lfCU5Oz+IHY2YlRm+1JOIdo2Jta+KDucOpky3d0gTI5ql2FE87N6j8fP+jet4jrHZypJUw0IeM+uB9cGnsDUJa3UCObJP3zfwzoYyNS2khMej7k9g+7gcs5/8AmGgBR2YhF4ZXJ8wfBK6Wh7XCiTW06OpIxk3R5XTra+/m5QvfqUc2BM2ASVKAlQ6rk/SgtzGwOK9Sg/ZespQlLzPhfgnaAG/iNEhIfrk54OKsgLRIHysjWBgYcccDaZNSVwVTlG11dwlrkuYbV0QFdVLsDsT1tw6oaZqA== 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=MczAU5kb9PIXAeEKJREyPG/jqMAcx5gCCWsH0EkWzIfaA1fbnB66A/pEWrG5ZwX+vem55Q2oKVIXSx1ZhlVgdK+SJg+XVC0qjnuUAPhD9hbbz4bWlQlFvJzT1EH3S9yc4bqkVvzTRKuDx5B5YdRJXNyBa9LBl/QEq4pD4KUaAL4H6tY+4U1AdQtwT7BUf+L4Ol+zCRyDnxaymRK/aUNRZXkfpZxpkGJRLRl7UUp+oluJ9xCrAKeRM18pkAtmuhsbGcAHkWUOhwZfSteYrtxk/o4SV637RbPKgsciwS3iq99j88no2gHkHaes2eZZHa5K+tDHntNptFZxN4o7jQWq/w== 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=NFPP9chvVfP+nB2/OVWAWrRxgh5c8bIx0FkyTNwgHKkK2MHVzZr0ZH5LzMwkVT4bHPnYS1NOh+j1cPernQy87fP94jzy8dN/diqC7uUgJqKVIGdyFmTHhC1VraV6CGd3+BjH5IFhkaADEZjvYehFn5eGGItqpCp8bFkS0tr+ZqU= 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:18 +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:18 +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:48 -0800 Message-Id: <20231122233058.185601-4-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: 98b75b00-f732-4a7a-95a5-08dbebb3208e 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: vS1UzhG/8f1ttObSqTeli1ZwkoHZX+gUOir4RJHPSHSta8qyRc/ndyVDvwy5rmMNv9ivScrSPW/fN0BWRblqsauzWQ1TVhaIO+phuCOQDOnfKtAySS9Ja+YWqYicQ0A8HzwQmOisyjkqliDVPcLinJi/b8yPn89h60T8sI9u3Pnl/RCJJ7WFMv7vz2bUl/h+cSb6G+M706u26VORuWFa4+VY59+iiEF/QXO26/8pmRrp+/l57PnJP6A4X+4125d/ZQAsPZRMwslWVwe8TQuQSrjG8MsL6CH2INWI4uBotitQfNBQxaLaSm5qXkjcp3aErxHRdtAAr6dvKBQItIbOoU1MtWNF5EzruAIKT7eFKQjqGBZ2D0/UwxXPSXQO1GCvhkO4kyDGjvqCAYRctyyne1+G12j8QPNcHNCMtznDdaPlUPaYfj53D73gDYDg0nmgeBoN8OlI+Ql401xa+rJmViNfTapbkkA1u4wafhzGW8Fx8MW/wCLm14ZVTfEan2E/fSwyPEuq9/TKV13yUqA8OG7I8QIb3rcNrvZQNTKxTTAwThMHtX6biFzcWnBk8wmsqf0W9VXX3wCYc4NT1B2y5cCEKaOqlHAlGfzOfTRdc3WNq0GL2YXRDXKu/A9cv9EfqvG8FLJVY0L61SxmKYE++1dFiRpJwjL0gU98CZN2BSWD/qp1y4LoMBtoDTs5D1C2 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: e6+hzPGNOXYwl+1WB4rmrFHy2qOXsnCovcTqY37vuB+0cb6H4d8qQWohyK5iJrtxWYmse1EGL761iUjgc3gD4BeL5X0clPoOpKaU2sPEGgi9/RsN3E6UVXwO1Mw2jcDkZuR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UN99o1KsNvf1Mcagt3HEnM+MAX0jq1oRXYGCgYamSp+uW4qoNPH9lguZeKsT6uByAJVI4hg8wX8b/pqW5Au21UKTz+eQ7RlTmJKc/beJub3twdyQgbxeJOdT+VrK7TAOMb7gho7YhpLGlz2q3YJUFSqEMgLK08Ai8Nk6AWS0R+2zY4SOUz/nRZhBe69jES0p/3DfkmBPQRogJDJVKs5tExteh6JEV/WL21nLLDTWvLfOm2dNu0d+TARpRCTemRDgzQDZPfYEhMjzs/WVzmP6hrbZpybK1XJ+FBd8DIf6H6bQS2a3yf0CaAwOrrSGmjTUw7v9BGxOOXuKwCZIiOpWBCtEzzMlH9lFw6JoDMqKvPreriEGvb+DM/Lt6r4ztPoWbvtYdbKXTCS6u/4 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98b75b00-f732-4a7a-95a5-08dbebb3208e 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:18.3896 (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: JPJWNlHafRHXCYzdfuU89IWdFuKSF27tSBMTG0LYWCbaF3C7VjKQw3O37v4tefvkb5H3lU30kU1GoKQRrkxO1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR05MB8275 |
Series |
VMware hypercalls enhancements
|
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(-)