From patchwork Mon Aug 22 23:25:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9294805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 99A86607FF for ; Tue, 23 Aug 2016 00:01:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88AAD28A9B for ; Tue, 23 Aug 2016 00:01:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B74C28AA0; Tue, 23 Aug 2016 00:01:04 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0312D28A9B for ; Tue, 23 Aug 2016 00:01:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757265AbcHWAAh (ORCPT ); Mon, 22 Aug 2016 20:00:37 -0400 Received: from mail-by2nam01on0044.outbound.protection.outlook.com ([104.47.34.44]:60832 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756458AbcHVX7y (ORCPT ); Mon, 22 Aug 2016 19:59:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ipx8qXJBmFaYAcDSHi2/BEdFZ1BBWzhBvFjOyNn2SiQ=; b=kYkvIe3mg1D0XcKFeUG/PabK6771+b3KPHMlt9mbyPj3RjMkqrXHxoQonEleJ6J4elepjVEm58bABKgTQgPoo9YJoQYpAoRE6NX4q6oTaN8+tTdrQRTf8an4Pcqb71tTeJ6R4t18SiUTx4uxg7ka9uQo8nVQyKz5pLDM7QDGQHY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by BLUPR12MB0657.namprd12.prod.outlook.com (10.163.217.27) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.9; Mon, 22 Aug 2016 23:25:41 +0000 Subject: [RFC PATCH v1 10/28] x86: Change early_ioremap to early_memremap for BOOT data From: Brijesh Singh To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Date: Mon, 22 Aug 2016 19:25:38 -0400 Message-ID: <147190833861.9523.18034166650487702869.stgit@brijesh-build-machine> In-Reply-To: <147190820782.9523.4967724730957229273.stgit@brijesh-build-machine> References: <147190820782.9523.4967724730957229273.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR09CA0039.namprd09.prod.outlook.com (10.172.184.153) To BLUPR12MB0657.namprd12.prod.outlook.com (10.163.217.27) X-MS-Office365-Filtering-Correlation-Id: b34f692d-237a-4354-e00f-08d3cae3a406 X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0657; 2:ogzMqV+3veC0aaQDppXv3NwvhqG78/x5IXkhB++nYm0cuLXnMKaa5JSR9zExuhiA2qinG0C6wyhbgCGP9FYY2XUozVcsnF10CK+sbXec2UTykI5X7ym9mAlSIbgAJR3r31LvO/3zVDTVjjudMXXBQwHYTYZE5Fqhv8BlPBWMLm9JiMtDC0Liv88Ay28rDJCC; 3:/DrMxS66td0SxxKTMfWdR3bx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3mOSPVi7Y4Sr6F2hPFqsc+b8X3TUXtrCztGeo7xkCBIOmkSdEXv+mvUPRoj0YZlGfHCD6d0ZvOAL9vL01wj9VZPwwn+u8QJjfOKTMGbln3peSqFT0OHIT1KNzjXkZGe4mcKiDRqFZlBwE135XbUJogx2P7bQWMnkikAuuIfuAzuXnFwe1Lv0WiwamJicAqLZKlOMf1l+++aOvX6ShqHSa5Ee9jKmEhTOQBu5IKz1Cxvgf9dT+DHD39nR1GZtOYfOk7sCsgYmYdInEdnCZiMR/HJYCeL+Uin56f6S0YK1VON X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BLUPR12MB0657; BCL:0; PCL:0; RULEID:; SRVR:BLUPR12MB0657; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0657; 4:7mbsxNdhwD/1mDWwBqwyZcX+3FRdGeIE17c7kZn/+cXoqlur+L0iqiGBku/IZI7nKZp60vD1Lch1iaWuoQhnNojOriQamQOuNb22CLCrmF+pzyF91cOihsP4tWm30KyV0iZc2MI9HrdXXwHPQfNKzVSXakfP51gjhMuTmA7K4Dt2MW7rkpL2qKsm756GDO2sBlCo3te9ZW6LpocHVe8FM3ZGhuVxX4iESVg3XWwiBEWf8R+93OdbX8JHsFK8DMVDC5ssJojKc2bN4MQ/X18wMtBuT0vggh8Z3W5pMNl36OfVe8hgVgwqBOGTfXzv/DeduXhZPGWyZduCCCQ4PxYtiMccUcw6tOrXWobE32JR30weQfyYghx786gB5WAdHe8jTWUgqfnjfHP2N+BC9IjtjlhSNUpTHYitV6jFd1ugPVhMa8xSLyT2Ra3bGGpMH8UI X-Forefront-PRVS: 00429279BA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(189002)(199003)(47776003)(86362001)(6116002)(92566002)(101416001)(586003)(3846002)(2950100001)(230700001)(77096005)(50466002)(106356001)(9686002)(81156014)(81166006)(66066001)(2906002)(189998001)(54356999)(42186005)(105586002)(76176999)(229853001)(83506001)(33646002)(50986999)(33716001)(68736007)(103116003)(7406005)(8676002)(7736002)(23676002)(107886002)(97736004)(305945005)(4001350100001)(5001770100001)(7416002)(7846002)(19580405001)(2201001)(19580395003)(5660300001)(921003)(217873001)(2101003)(83996005)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0657; H:[127.0.1.1]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjEyTUIwNjU3OzIzOjczWHhxTFBRaEo4TDVJZHdaZllYVnA5Tjdz?= =?utf-8?B?NzhTT3VITnhKNUxja0Z6eE5ZTUdsSDF5cU5QL21SNnRjczQzYjZzK1B3MW5H?= =?utf-8?B?cXV4aW9qd3BIQmRoS01OQWVNSjRNeHd1WTcrNlJoemFQdm1QZnMyaW5ub1dM?= =?utf-8?B?UmFqYXhLOVlmbml3RTdYRHlRaE1VNmVrQ2szeVV2a1dOS3RnV2pTL0Uwa1Ir?= =?utf-8?B?UWpjVldKNjNlU3lWYzMzTm1MRVQrOFhFVC9YNFpjVmJTTVF0VjkyVFN5V3F4?= =?utf-8?B?RGlVUUlTUTFsWDd4d3UzcXAyRlVmeUxZWHAzT3lPWjJnRUlhOGZSdVpEWW4y?= =?utf-8?B?M1g5bENQa05EN1FBOERoMlhxN2tadG1BZnErYmNCV2RVQU1hVjZMV1d1UFY3?= =?utf-8?B?L1NReGRYSm40Ly9FanhvbjlLTUdiRDV3UkJjVVVrM2I5ZDhnYkp5cW9QbTd1?= =?utf-8?B?cGZkbWhyWkcxOVBFVlZuazkza290L1crbGJ4VHkvRWRLQ3RQSDlFclJGZkh3?= =?utf-8?B?WWU4M2JFbW0zeFZI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v07X50kg=; 7:kVyaAPTWc5dgv69/wVPuHtlpVFZb2PsjX/MIkGAN0tb2yAbU603duPuluQ9LPc0H/UdE/JQymjQX1kB0i3zLZ8GRtf5aMp6mVqhxyHe4S+1pgZv52hPukmwZU5APoTEtmmc4BEsiEFtjNBuNkzkRhsyepVSA99oVj7UxzBaPRZ8SYtHzk7EmoCEBxoP1gXh54vwZBRBO1Rqb0wwdus9kcm19Ide/hNwEFui+nFFz3sJ9r2Lylwx6M/29GaZ05DCJ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0657; 20:GslRu/lhwPF351urLwi9S6sEHta2HOhzykj+/43S8srgrzBqClybzdoUummGu9uA65WQna2oM1HcZ31Iakl2lvvQYmijXCP800ezzmfV42HMXe8m2M+kIRa+mYElr/BOyoeP4Rt27z7de0WfUg38NsalO9NDtwYmEZJm59tQHoRMaTDdb4YnWqsx7aF6tfUWke3sMkUsfwzAuZQgKs822TdqVBBkDmj4yH4qqKn67tjcyAyld6UUJZtf+0KZmuuz X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2016 23:25:41.8008 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0657 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tom Lendacky Signed-off-by: Tom Lendacky --- arch/x86/kernel/acpi/boot.c | 4 ++-- arch/x86/kernel/mpparse.c | 10 +++++----- drivers/sfi/sfi_core.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 1ad5fe2..4622ea2 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -120,7 +120,7 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size) if (!phys || !size) return NULL; - return early_ioremap(phys, size); + return early_memremap(phys, size, BOOT_DATA); } void __init __acpi_unmap_table(char *map, unsigned long size) @@ -128,7 +128,7 @@ void __init __acpi_unmap_table(char *map, unsigned long size) if (!map || !size) return; - early_iounmap(map, size); + early_memunmap(map, size); } #ifdef CONFIG_X86_LOCAL_APIC diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 0f8d204..04def9f 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -436,9 +436,9 @@ static unsigned long __init get_mpc_size(unsigned long physptr) struct mpc_table *mpc; unsigned long size; - mpc = early_ioremap(physptr, PAGE_SIZE); + mpc = early_memremap(physptr, PAGE_SIZE, BOOT_DATA); size = mpc->length; - early_iounmap(mpc, PAGE_SIZE); + early_memunmap(mpc, PAGE_SIZE); apic_printk(APIC_VERBOSE, " mpc: %lx-%lx\n", physptr, physptr + size); return size; @@ -450,7 +450,7 @@ static int __init check_physptr(struct mpf_intel *mpf, unsigned int early) unsigned long size; size = get_mpc_size(mpf->physptr); - mpc = early_ioremap(mpf->physptr, size); + mpc = early_memremap(mpf->physptr, size, BOOT_DATA); /* * Read the physical hardware table. Anything here will * override the defaults. @@ -461,10 +461,10 @@ static int __init check_physptr(struct mpf_intel *mpf, unsigned int early) #endif pr_err("BIOS bug, MP table errors detected!...\n"); pr_cont("... disabling SMP support. (tell your hw vendor)\n"); - early_iounmap(mpc, size); + early_memunmap(mpc, size); return -1; } - early_iounmap(mpc, size); + early_memunmap(mpc, size); if (early) return -1; diff --git a/drivers/sfi/sfi_core.c b/drivers/sfi/sfi_core.c index 296db7a..3078d35 100644 --- a/drivers/sfi/sfi_core.c +++ b/drivers/sfi/sfi_core.c @@ -92,7 +92,7 @@ static struct sfi_table_simple *syst_va __read_mostly; static u32 sfi_use_ioremap __read_mostly; /* - * sfi_un/map_memory calls early_ioremap/iounmap which is a __init function + * sfi_un/map_memory calls early_memremap/memunmap which is a __init function * and introduces section mismatch. So use __ref to make it calm. */ static void __iomem * __ref sfi_map_memory(u64 phys, u32 size) @@ -103,7 +103,7 @@ static void __iomem * __ref sfi_map_memory(u64 phys, u32 size) if (sfi_use_ioremap) return ioremap_cache(phys, size); else - return early_ioremap(phys, size); + return early_memremap(phys, size, BOOT_DATA); } static void __ref sfi_unmap_memory(void __iomem *virt, u32 size) @@ -114,7 +114,7 @@ static void __ref sfi_unmap_memory(void __iomem *virt, u32 size) if (sfi_use_ioremap) iounmap(virt); else - early_iounmap(virt, size); + early_memunmap(virt, size); } static void sfi_print_table_header(unsigned long long pa,