From patchwork Tue Mar 12 21:42:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael Kelley (LINUX)" X-Patchwork-Id: 10850919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5D9D1390 for ; Wed, 13 Mar 2019 10:31:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA99429B58 for ; Wed, 13 Mar 2019 10:31:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A887A29B68; Wed, 13 Mar 2019 10:31:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2E1202998F for ; Wed, 13 Mar 2019 10:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=uPr28RFLLyRTxRRYq2zYXVe9UmlMFTFib8k7xP7C/ZE=; b=QmpQT+V1y8Ouva 3/Wvl0YoUjt4quMN8HySPts5AO4bALXY0FGmGu6yH9HpLufZ6xLAQvLhCKOLFwJ4NdebwHnSaN8n/ NiBzNfVuacLi29X0e8LGwouYQjVPqboMjWMgYD4aLcXz7s9TtuNxwNkckHDT0DOMLjidPU0Z43xmb oJKGu+GUo7JB9eYJbFVTdBSLnPiw0Cx5v++hPBhQEx62ewwBvZ6RprqkiydZmoGwpawPCCF0ZW0k3 1jG7ZemqjfkTVBQg29Bgz4tjOPeQfvCcgoHHHJ0WyqyuP+MoatpstI/t9ppHPCVS8et4XAOMKE5dl x1dzGj9Dx7vlPgI5Sggw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h41Av-0002Ty-0c; Wed, 13 Mar 2019 10:31:53 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h41A8-0001eR-BF for linux-arm-kernel@bombadil.infradead.org; Wed, 13 Mar 2019 10:31:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3/xwWFzCTm8zs4Zm/kIDvgC3JrogRPd3uctWK3j2PwU=; b=e3AHbe2UJr4a1q9jlrIdWY1iL/ MMci4pWAPSvyJ8AQJ/py+MZnG8h5nNbJeysQhodprgNHsQoqyBEfUQDhlyhOeDyXOOPK5saSpmIsS dVGSl8oX0vS72/GSnJWRma4ozO3/7dyywUE1UiaFgoF2CFRxcCwUtGyqivTpbFfHIbSfdYmYKEBwp GY99KUqdftHGnCa7+pS23nWCdX0e5OxZ/rKRqxAD4TusLM3n1PQQiyQ3SKcO5YuwTmGVExqSd0VBh ZWqL4hFtWouXF/pjld9v/l8o45W9LInY6+ZQhUpJhT0FcC+fZOkh0EbM6Hkm5c8lGzqFI1cHSFzWH nILQBUOA==; Received: from mail-eopbgr730123.outbound.protection.outlook.com ([40.107.73.123] helo=NAM05-DM3-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h40Wf-00086V-22 for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2019 09:50:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3/xwWFzCTm8zs4Zm/kIDvgC3JrogRPd3uctWK3j2PwU=; b=Rv815nABS9C0EFOtZCcAeqQI45E5YtwhwGQuOKGsfT0htozWPIm6DJsWzP5Oqcv43MpxOWh0Xi6vedBuCMN9vcpItlqA6xPfYECNzuX4MPBLs+F6v8pD095FjvkyPwrGFBEPor0zHP+QeVe8BLSscfG5kkZ73OJL+07cyCq0euQ= Received: from BN6PR21MB0466.namprd21.prod.outlook.com (10.172.111.144) by BN6PR21MB0689.namprd21.prod.outlook.com (10.175.131.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.0; Tue, 12 Mar 2019 21:42:10 +0000 Received: from BN6PR21MB0466.namprd21.prod.outlook.com ([fe80::f458:691d:54a:b05c]) by BN6PR21MB0466.namprd21.prod.outlook.com ([fe80::f458:691d:54a:b05c%13]) with mapi id 15.20.1730.000; Tue, 12 Mar 2019 21:42:09 +0000 From: Michael Kelley To: "will.deacon@arm.com" , "marc.zyngier@arm.com" , "linux-arm-kernel@lists.infradead.org" , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "olaf@aepfle.de" , "apw@canonical.com" , vkuznets , "jasowang@redhat.com" , "marcelo.cerri@canonical.com" , Sunil Muthuswamy , KY Srinivasan Subject: [PATCH 0/2] Drivers: hv: Move Hyper-V clock/timer code to separate clocksource driver Thread-Topic: [PATCH 0/2] Drivers: hv: Move Hyper-V clock/timer code to separate clocksource driver Thread-Index: AQHU2RxyOTq1l4uiQEScYNos9n0rug== Date: Tue, 12 Mar 2019 21:42:09 +0000 Message-ID: <1552426813-9568-1-git-send-email-mikelley@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR22CA0002.namprd22.prod.outlook.com (2603:10b6:300:ef::12) To BN6PR21MB0466.namprd21.prod.outlook.com (2603:10b6:404:b2::16) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.8.3.1 x-originating-ip: [131.107.147.136] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ae98febe-2844-4567-14eb-08d6a733943f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:BN6PR21MB0689; x-ms-traffictypediagnostic: BN6PR21MB0689: x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 09749A275C x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(376002)(366004)(136003)(396003)(39860400002)(189003)(199004)(2906002)(6506007)(6346003)(7736002)(305945005)(110136005)(99286004)(6636002)(105586002)(52116002)(25786009)(4326008)(3846002)(6116002)(22452003)(2501003)(10090500001)(316002)(106356001)(386003)(4720700003)(50226002)(8936002)(7416002)(5660300002)(14454004)(53936002)(66066001)(71200400001)(71190400001)(54906003)(8676002)(68736007)(1511001)(102836004)(2616005)(476003)(81166006)(26005)(486006)(86612001)(81156014)(478600001)(86362001)(97736004)(36756003)(6512007)(256004)(2201001)(10290500003)(6486002)(6436002)(186003)(921003)(1121003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR21MB0689; H:BN6PR21MB0466.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=mikelley@microsoft.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: KnbdOnCgC2mUGbCv7u/f5ThRUkHwye5GIwoYKNzooxX68zJazJ0mjDZ0iKmiBdvERYdvzeG9d43yha0TjuhrtRQMkLPfd0e5SumUxToIW5rtC/FKe7jHrnvaRjGlY3XUKb2qtsKrksA0ebEANZupBDN2ySE4PRNdKF0FN9fB7LIoBR23mbh56bVeHnGyDPTSorVsIodpVoWlTcM0GW7VuB4GguhwZujRH1ACBSTXE6nnDv9deOt80Upsf1mIWeTqtEdxU9WL8zdaozgK9G3yTAfq4EZL9Lj9/5Yl5V1YtZeqJs1G/+PabjsVLtWX1VuwNxreWePnmxzaPmLaH+kRpZpwA71sm1FL/VThNUJ2BWpxQdoG1/TCo7YRnH7b+SDkNMx3RYGnFli7gTE3X8ohc1EqRNySrZOYgnu1Il/7t/M= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae98febe-2844-4567-14eb-08d6a733943f X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Mar 2019 21:42:09.8182 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR21MB0689 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190313_055017_379305_69D64966 X-CRM114-Status: GOOD ( 13.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mark.rutland@arm.com" , "catalin.marinas@arm.com" , Michael Kelley Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch series moves Hyper-V clock/timer code to a separate Hyper-V clocksource driver. Previously, Hyper-V clock/timer code and data structures were mixed in with other Hyper-V code in the ISA independent drivers/hv code as well as in arch dependent code. The new Hyper-V clocksource driver is ISA independent, with a just few dependencies on arch specific functions. The patch series does not change any behavior or functionality -- it only reorganizes the existing code and fixes up the linkages. A few places outside of Hyper-V code are fixed up to use the new #include file structure. This restructuring is in response to Marc Zyngier's review comments on supporting Hyper-V running on ARM64, and is a good idea in general. It increases the amount of code shared between the x86 and ARM64 architectures, and reduces the size of the new code for supporting Hyper-V on ARM64. A new version of the Hyper-V on ARM64 patches will follow once this clocksource restructuring is accepted. The code is currently diff'ed against Linux 5.0. I'll rebase to linux-next once 5.1-rc1 is available. Michael Kelley (2): Drivers: hv: Move Hyper-V clockevents code to new clocksource driver Drivers: hv: Move Hyper-V clocksource code to new clocksource driver MAINTAINERS | 2 + arch/x86/entry/vdso/vclock_gettime.c | 1 + arch/x86/entry/vdso/vma.c | 2 +- arch/x86/hyperv/hv_init.c | 91 +--------- arch/x86/include/asm/hyperv-tlfs.h | 6 + arch/x86/include/asm/mshyperv.h | 80 ++------- arch/x86/kernel/cpu/mshyperv.c | 2 + arch/x86/kvm/x86.c | 1 + drivers/clocksource/Makefile | 1 + drivers/clocksource/hyperv_syntimer.c | 328 ++++++++++++++++++++++++++++++++++ drivers/hv/hv.c | 154 ---------------- drivers/hv/hyperv_vmbus.h | 3 - drivers/hv/vmbus_drv.c | 39 ++-- include/clocksource/hyperv_syntimer.h | 104 +++++++++++ 14 files changed, 482 insertions(+), 332 deletions(-) create mode 100644 drivers/clocksource/hyperv_syntimer.c create mode 100644 include/clocksource/hyperv_syntimer.h