From patchwork Fri Jun 16 18:50:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9793213 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 6896D60325 for ; Fri, 16 Jun 2017 18:53:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BC742865B for ; Fri, 16 Jun 2017 18:53:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4ECA528672; Fri, 16 Jun 2017 18:53: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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 644622865B for ; Fri, 16 Jun 2017 18:53:03 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwKN-0001CY-4x; Fri, 16 Jun 2017 18:50:39 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwKL-0001Bz-91 for xen-devel@lists.xen.org; Fri, 16 Jun 2017 18:50:37 +0000 Received: from [85.158.143.35] by server-5.bemta-6.messagelabs.com id 70/32-03371-C7824495; Fri, 16 Jun 2017 18:50:36 +0000 X-Brightmail-Tracker: H4sIAAAAAAAA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.Lendacky@amd.com X-Msg-Ref: server-4.tower-21.messagelabs.com!1497639033!68098959!1 X-Originating-IP: [104.47.34.87] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 58458 invoked from network); 16 Jun 2017 18:50:34 -0000 Received: from mail-by2nam01on0087.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) (104.47.34.87) by server-4.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Jun 2017 18:50:34 -0000 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=9YiDlTmidpiYdMKCOrcF9rp65LwzHBPdZcm56oaGsnI=; b=CnrQG9YOr6TqLbcAjHBtkxAZh4ZtCK6HfXc56ZijlSpiOWMJUqmXmVf7z0fq+4dkfGZA9QNQuTRHiSH2N+toOKkk/nXfM4FaSFGf+EP5yU8aQrgB7UraXR52IGii1tFmmF6od4u8YYdRIpLqXXecYvNO27IXwOs1S9dxXyEElWE= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by BN6PR12MB1139.namprd12.prod.outlook.com (10.168.226.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Fri, 16 Jun 2017 18:50:26 +0000 From: Tom Lendacky To: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org Date: Fri, 16 Jun 2017 13:50:23 -0500 Message-ID: <20170616185023.18967.72831.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN1PR19CA0005.namprd19.prod.outlook.com (10.163.220.15) To BN6PR12MB1139.namprd12.prod.outlook.com (10.168.226.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6e33493a-6fe3-471f-f6c1-08d4b4e88eae X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:BN6PR12MB1139; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 3:/2l31SEOKOGK975xGzhHLvT3Znr57iJvxxYSHrWDN/rJk+FNx+a7Pl+0phNwca/fVu8N2LqomvVqbQ8wlI/thznQGEh40+kbS2FrumLtd9qD8eGdC4XYlluwXRxUmkAVRl4daog6/H63pakM9LomSriPiajKfAoKTOBk0ik9sbq7Raq2AdPiBN6awVjIMhNNO+1WXfbgAek3oRXy5J5HRFuhD/Flp/OBw4RLAxlNg6ijK5a8F3lsaGrafz5J68ptmxMKBAjWapt9G6yHX4vqQR7LusCnXP3hopB/7XFOvpntD5Itih/gQkQVrLeaMpUstX7BKeQK/3V5I/s7XYIp2Vx5/lZobqk9s2c90tnC2vA=; 25:Qt7EMSQSU9kHKHrvHi+LTxHHZse4AP6L5JscI6SXz29PalHH8cSIE0Pik4mbiGdU1ssoiQDRLO0055fw3U6yGxOfsDu7WY6zu9b1+/oGq7Y4gNMew62doTmVQlD27vz2aziwSz5BrMrQlkWY/d1gNgVgqBdU4Idz0T33PxegJaboRANfDF0BSdLopXQdT0W70iJ1XnNqzfq0kcoM/4uRy1vxWnm1tbg0MRDYEsgLd/DHxG+uQjdB038i9zTcBKhzOa7T2p5hYPmOQLsEK2GIcRbv8c4wVtfDlcVz0b2kpltRWsuVAz8aAUzJjKCassN+p7xKWrpfmVvEmKoyz2UAMejiiw9hOfyo4PYreMlaWispmMWGNcUpEzM7AW/ZyqSPzv0juht60nN3ziK6xriraI6bjR5NHpU3knz37NjD4jRXBCjND7lSM5DxjVLeWRlTLVm/AYv/+pv8R7uzfVDww/vWQv37x7Lm4gXc9DXqRmY= X-MS-TrafficTypeDiagnostic: BN6PR12MB1139: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 31:CzxpLkU7hz6HPcN2+fSql2WMm5tziOvPPcT1Whiqxqv/vr3fck+Uhp3LLFXhjOjzT5zwS3jJNYOHtQjsEi/Jhzqj6vd1LCU+zwr2lA8CRjCtBacvm3wbZjlzMJa5G+Ga5DVNYGm5GCp5pkrStIvZfSUJsabZtUyEjFuvRQMDasf55LQW7RAUoScq5D7VHVsIxIZJwkePUpJgHuCJWYk63uaasE4iFgHQFBxhjv1UsRk=; 20:gmZ0Anxm9Z5vTnSH6lpaNAGW7pjZtzAwGhsZwGa9lOb3vrdPSls1H8tMep5LpMF1satePpLZmYDJ0W1Mm0H8y1FnAGtJEupS/HTD8KarkRxitodmNQHY0ocskJyWuT7LrBQMMp/qWctnwiNBa6OoRBQUfV2vW74dDDG5vU1zljQSxPSs1QNi/RfEKnqrwQ5DIYEic8S25QGaiziDlXEIpqwEI6PHFArEC2NDUC1hTAEHfzcLCJYHJ88lX7z5ZeGkFpIwcV6Lh3B6eYhplDzCseuw2AfW2OsiMinD/LtwU1nPD3wEdGAzf3Rqm8MdG83AiIT2wYj7Ar/2RFY0yOJ4JZdd7xkNMs/gBhjODZBxPUNHKCNRaughmlFc2BF+UQFI5mqGxydzg4zNBbrxjOPzoPLH5qZdWqt46oFIuCiUA319VFztV29opMWu6xeraJIA6si+qz1UrjWhi/qUuBB7soDUKcFnAuwF0X/U/ZulJ8reOvNZ0Lm/qR0klBD5gzSd X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1139; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1139; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM5OzQ6dWFJb3pQM0pMNXVNMm9RYlR1Q2w4UkhldnVq?= =?utf-8?B?R3ZIVWVVN0RlL3F5a096UFRDQzZRYlJJc1J0THZPbkNyUEdZWERsQW9LbHRl?= =?utf-8?B?T1p6OWIvU3lMMjVvdUVVeGl4VGQwdkpKUUo1c1JtajdKaGdPUWYxSWZ2Z3kz?= =?utf-8?B?MjNYMG9VVktxWU5JbEFCQkgvOUljQVg2SUhyaStXK1Nib1VLdEQvdDFCLzFa?= =?utf-8?B?UmxIaTVLZkczZzlxc1hZWkRld0ROY2toM2F2WVFMWXdKanFldnhVZWRtRDJP?= =?utf-8?B?SzZONk81bGExeWVZa0s2MnhhTjBGMU9vS0YwRUJnaGdObXhHZURUU0xhenpC?= =?utf-8?B?ZlhPbm1wdHFUemU3OWV0ZHRKa013VkVpWHVuc1R0cjI2T1ZvQlcrT3JaeExY?= =?utf-8?B?WFR3d204SGk5S3BEMkhsMFgyWWpwQzJzdHp2ZFFYWS91NGJQN0ppM1hJUThM?= =?utf-8?B?aTcyTDQ4U3pmM1MyS3M3MnVINks2UmE1SjNDVkE1ZXlnaDFhMTlScGRSNlZh?= =?utf-8?B?RUcwQUNHcjVReEdabUR6WVpZaUpwM1NGcDh1T1U3d084VGdkYi95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ZNmFYQkU2R2ZHVHlD?= =?utf-8?B?RWloekdRNkROU29qV0lsTFVzTWpHKzRVU3VESnBURFI0eXk1OTZ4VGU2emlF?= =?utf-8?B?K21ra3BiL2NlYkRoR3VhUGpjUEtpQmxpSUtPMEh4RFFJWG5wZEdUaFRhSUlB?= =?utf-8?Q?LQR5Af5UIvscMaJCMy5?= X-Forefront-PRVS: 0340850FCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39400400002)(39450400003)(39860400002)(39850400002)(39840400002)(7736002)(42186005)(6666003)(47776003)(4001350100001)(66066001)(54356999)(7406005)(8676002)(81166006)(2950100002)(83506001)(50986999)(5660300001)(53416004)(305945005)(189998001)(25786009)(33646002)(2906002)(7416002)(110136004)(38730400002)(53936002)(54906002)(4326008)(9686003)(76176999)(50466002)(478600001)(86362001)(72206003)(3846002)(1076002)(6506006)(6116002)(23676002)(230700001)(55016002)(103116003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1139; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM5OzIzOlZ2eXVUK21QaEgvTEp4dEpKd1RINUF0LzJC?= =?utf-8?B?TkxhR25vd0FyM2RvVXRDdE95UmZMMWE2RmN2ek0xb1BrWDJxOEtFUHFlSWl0?= =?utf-8?B?L0N1YldvbDhBMmxCazRIckdDUit6U21jbUU4c0NMdHJaRGFvNmU5ZVBvenUr?= =?utf-8?B?d1czanJZWENSeEpFZ2FqZlFRRVJLa3hjWm9ZcUM0bVJRUE5TN3Q1UENDV0R4?= =?utf-8?B?NDE3S25HWXREeWhrakdhNTM1UEhsekxUMFVDYXN6QmFzR2U0cndQSG1Yc0Yw?= =?utf-8?B?aUZrUU0rRGxtOURYbGJjMENsNjQ1UlBPZEUwMzFWVWF6a2UrZ2NrSTVxcmhP?= =?utf-8?B?cEJ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ZVlTZ3phUXN2N2RyVGRISTlQdWQwUUtrOXN4QmsybG5PRFU1SzlZZ0VYeGFI?= =?utf-8?Q?L4w9ZwY?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 5:6YfvvAOLO8sSXrC67yh8559P5LFxDWPonr/bBpuQce/0yDPR8IMyj0Jw8hhuH+kyvUUc8Jx0B3tzm5ejtP5ZUWrknT/VENhdILpha9R4+LWRSnOrbtBs/OC0GaDQfOa6jyGFc6rHgzZPr1542HaOSIETiUjCVrfpAGqRV9nxebgQG3WSqHFQwMYUUqLEc7hvy7UcF5a5SgM33ctX7VCRHYmWFtKUB04jGlpForZrHA+nTPMDl4r/8IHQGFYuwt6pZ1yKybORdEhnvxIPmf/DHukUg7oAWfMhKlag0kVXxOrV81GAgVIiFCazWZOFG03ws8SBUsW7tOHbyyoJG7x2nPgunOj0U4+yDez7LgSoGmk7C1vd5dW7XYsTlE/QdlvAw+ZORaCjPM9Hovx39FtGp4aYCU/oxFKQ9iA9VffDSGOzaQLfdF7cTbwgsgW9iMS8+FrZnhUvojRwPUKR8QJy19LN5blWpINsK9SwdnnRKYPKR00RqLTFhoUUHLy5HK9l; 24:Tscs0l+AO1e+k8eA+dq5J+YldT9nljOUnuU1hufl1n7JKPOypT4YWshZyUIAE7B8sNS3EZZpqIyhGNWNlFpccsjg9WvhgRJOWLuGBOzp+eI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 7:zAZaNrMLj9MRB3m1xUP3ybQTYud83LcU0/56T5LQJ/ER2RtV+sPKSHwKjZjhH5aQxzKGru5o8Qn8LjbcBNQOQgto8wom5+caQSdwp0e8GbDyxLws/oXqxsYKLdQ5uryDNgUVuNCzyWseuPLVPdNPWqivNLeJr8ryLBQBbYC+ymo9SDQpx7aqqphoP1PF15ZIdRICJyb+cWSAIztJP95te+BpPCJOuDJVML5T1Va+RnQAnnPl3O73MQ19yrT8VS77pyOId8yg5chO0TwZRyWfFOmBye9j1DwqlfcMBzoG7Q730g8KZI2tZCxwK95fJdYalKZrmG10gZSfheBo3SL9MiYYcwil8/gZ9iGYX6doZEawGNU3Um+wVpieW1NISOhxnuSSlkIDOwnDGkr7Vgu4cMf1j9FGL6iTKkJK2pPYxi/OnlHivPAPfQNj32Gwh6sSeq8va1J8SC7FLbLuH9mPD/5oBt7SWdFsXY8OHxqkSYfTCU/pJLuRkM0iv1/I0lCv95vdDFfOQaIvQZzLYpAFNkETDZqGcIpyGwqs9PPlg9EoWhF8ZGcia/PAb+4SEHUvk1gkIfL5PFurQhHBI+YFR06Tm5b1Nldfp4Ss/Z8bV6grKR8eIUgewbVJZIucmBRgxjCuHeO2ZHmxm6wjeMV46k0r8oa1WIVbJkINrziMA0zZtAsYkuR/Y8mP2eXE0xyq21kbH3ZKTj5U5e/gQLduqj6YsohdbaEO3QmwoLpuB5kAqG1/bgE26Fyx2150XUC9dOnxgwMhNVpN6tkx36IwlgcB12MEx7dj7k0+faGij0w= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 20:zLpUcHx4XODlxSwzw2MJkr56yuoz2R5OeDGpoBAgU0h1Qw2kxcPiFOPPCzTd1v8OTsx11V0rLQ9CCqv7dmnWkb9xwivXIYpSf84RgN2YGUgy2vLRp4HGQE7kkpSxCMGUkiKuJ7XV77h1rhBfMQuZjTB8rBp9+tw6mmMs30i0TXxJgLa+Lo4Y7b7ISgFF2JMeZk01YWl833u0rY9pNVg79TqW1rT4bTAFMlPAleZ0PYumGGGXqni7Vtg1yBCghtFR X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 18:50:26.8919 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1139 Cc: Brijesh Singh , Toshimitsu Kani , "Michael S. Tsirkin" , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Boris Ostrovsky , Jonathan Corbet , Joerg Roedel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Larry Woodman , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , Juergen Gross , Paolo Bonzini Subject: [Xen-devel] [PATCH v7 03/36] x86, mpparse, x86/acpi, x86/PCI, x86/dmi, SFI: Use memremap for RAM mappings X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The ioremap() function is intended for mapping MMIO. For RAM, the memremap() function should be used. Convert calls from ioremap() to memremap() when re-mapping RAM. This will be used later by SME to control how the encryption mask is applied to memory mappings, with certain memory locations being mapped decrypted vs encrypted. Signed-off-by: Tom Lendacky Reviewed-by: Borislav Petkov --- arch/x86/include/asm/dmi.h | 8 ++++---- arch/x86/kernel/acpi/boot.c | 6 +++--- arch/x86/kernel/kdebugfs.c | 34 +++++++++++----------------------- arch/x86/kernel/ksysfs.c | 28 ++++++++++++++-------------- arch/x86/kernel/mpparse.c | 10 +++++----- arch/x86/pci/common.c | 4 ++-- drivers/firmware/dmi-sysfs.c | 5 +++-- drivers/firmware/pcdp.c | 4 ++-- drivers/sfi/sfi_core.c | 22 +++++++++++----------- 9 files changed, 55 insertions(+), 66 deletions(-) diff --git a/arch/x86/include/asm/dmi.h b/arch/x86/include/asm/dmi.h index 3c69fed..a8e15b0 100644 --- a/arch/x86/include/asm/dmi.h +++ b/arch/x86/include/asm/dmi.h @@ -13,9 +13,9 @@ static __always_inline __init void *dmi_alloc(unsigned len) } /* Use early IO mappings for DMI because it's initialized early */ -#define dmi_early_remap early_ioremap -#define dmi_early_unmap early_iounmap -#define dmi_remap ioremap_cache -#define dmi_unmap iounmap +#define dmi_early_remap early_memremap +#define dmi_early_unmap early_memunmap +#define dmi_remap(_x, _l) memremap(_x, _l, MEMREMAP_WB) +#define dmi_unmap(_x) memunmap(_x) #endif /* _ASM_X86_DMI_H */ diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 6bb6806..850160a 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -115,7 +115,7 @@ #define ACPI_INVALID_GSI INT_MIN /* - * This is just a simple wrapper around early_ioremap(), + * This is just a simple wrapper around early_memremap(), * with sanity checks for phys == 0 and size == 0. */ char *__init __acpi_map_table(unsigned long phys, unsigned long size) @@ -124,7 +124,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); } void __init __acpi_unmap_table(char *map, unsigned long size) @@ -132,7 +132,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/kdebugfs.c b/arch/x86/kernel/kdebugfs.c index 38b6458..fd6f8fb 100644 --- a/arch/x86/kernel/kdebugfs.c +++ b/arch/x86/kernel/kdebugfs.c @@ -33,7 +33,6 @@ static ssize_t setup_data_read(struct file *file, char __user *user_buf, struct setup_data_node *node = file->private_data; unsigned long remain; loff_t pos = *ppos; - struct page *pg; void *p; u64 pa; @@ -47,18 +46,13 @@ static ssize_t setup_data_read(struct file *file, char __user *user_buf, count = node->len - pos; pa = node->paddr + sizeof(struct setup_data) + pos; - pg = pfn_to_page((pa + count - 1) >> PAGE_SHIFT); - if (PageHighMem(pg)) { - p = ioremap_cache(pa, count); - if (!p) - return -ENXIO; - } else - p = __va(pa); + p = memremap(pa, count, MEMREMAP_WB); + if (!p) + return -ENOMEM; remain = copy_to_user(user_buf, p, count); - if (PageHighMem(pg)) - iounmap(p); + memunmap(p); if (remain) return -EFAULT; @@ -109,7 +103,6 @@ static int __init create_setup_data_nodes(struct dentry *parent) struct setup_data *data; int error; struct dentry *d; - struct page *pg; u64 pa_data; int no = 0; @@ -126,16 +119,12 @@ static int __init create_setup_data_nodes(struct dentry *parent) goto err_dir; } - pg = pfn_to_page((pa_data+sizeof(*data)-1) >> PAGE_SHIFT); - if (PageHighMem(pg)) { - data = ioremap_cache(pa_data, sizeof(*data)); - if (!data) { - kfree(node); - error = -ENXIO; - goto err_dir; - } - } else - data = __va(pa_data); + data = memremap(pa_data, sizeof(*data), MEMREMAP_WB); + if (!data) { + kfree(node); + error = -ENOMEM; + goto err_dir; + } node->paddr = pa_data; node->type = data->type; @@ -143,8 +132,7 @@ static int __init create_setup_data_nodes(struct dentry *parent) error = create_setup_data_node(d, no, node); pa_data = data->next; - if (PageHighMem(pg)) - iounmap(data); + memunmap(data); if (error) goto err_dir; no++; diff --git a/arch/x86/kernel/ksysfs.c b/arch/x86/kernel/ksysfs.c index 4afc67f..ee51db9 100644 --- a/arch/x86/kernel/ksysfs.c +++ b/arch/x86/kernel/ksysfs.c @@ -16,8 +16,8 @@ #include #include #include +#include -#include #include static ssize_t version_show(struct kobject *kobj, @@ -79,12 +79,12 @@ static int get_setup_data_paddr(int nr, u64 *paddr) *paddr = pa_data; return 0; } - data = ioremap_cache(pa_data, sizeof(*data)); + data = memremap(pa_data, sizeof(*data), MEMREMAP_WB); if (!data) return -ENOMEM; pa_data = data->next; - iounmap(data); + memunmap(data); i++; } return -EINVAL; @@ -97,17 +97,17 @@ static int __init get_setup_data_size(int nr, size_t *size) u64 pa_data = boot_params.hdr.setup_data; while (pa_data) { - data = ioremap_cache(pa_data, sizeof(*data)); + data = memremap(pa_data, sizeof(*data), MEMREMAP_WB); if (!data) return -ENOMEM; if (nr == i) { *size = data->len; - iounmap(data); + memunmap(data); return 0; } pa_data = data->next; - iounmap(data); + memunmap(data); i++; } return -EINVAL; @@ -127,12 +127,12 @@ static ssize_t type_show(struct kobject *kobj, ret = get_setup_data_paddr(nr, &paddr); if (ret) return ret; - data = ioremap_cache(paddr, sizeof(*data)); + data = memremap(paddr, sizeof(*data), MEMREMAP_WB); if (!data) return -ENOMEM; ret = sprintf(buf, "0x%x\n", data->type); - iounmap(data); + memunmap(data); return ret; } @@ -154,7 +154,7 @@ static ssize_t setup_data_data_read(struct file *fp, ret = get_setup_data_paddr(nr, &paddr); if (ret) return ret; - data = ioremap_cache(paddr, sizeof(*data)); + data = memremap(paddr, sizeof(*data), MEMREMAP_WB); if (!data) return -ENOMEM; @@ -170,15 +170,15 @@ static ssize_t setup_data_data_read(struct file *fp, goto out; ret = count; - p = ioremap_cache(paddr + sizeof(*data), data->len); + p = memremap(paddr + sizeof(*data), data->len, MEMREMAP_WB); if (!p) { ret = -ENOMEM; goto out; } memcpy(buf, p + off, count); - iounmap(p); + memunmap(p); out: - iounmap(data); + memunmap(data); return ret; } @@ -250,13 +250,13 @@ static int __init get_setup_data_total_num(u64 pa_data, int *nr) *nr = 0; while (pa_data) { *nr += 1; - data = ioremap_cache(pa_data, sizeof(*data)); + data = memremap(pa_data, sizeof(*data), MEMREMAP_WB); if (!data) { ret = -ENOMEM; goto out; } pa_data = data->next; - iounmap(data); + memunmap(data); } out: diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 0d904d7..fd37f39 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); 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); /* * 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/arch/x86/pci/common.c b/arch/x86/pci/common.c index 190e718..08cf71c 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -691,7 +691,7 @@ int pcibios_add_device(struct pci_dev *dev) pa_data = boot_params.hdr.setup_data; while (pa_data) { - data = ioremap(pa_data, sizeof(*rom)); + data = memremap(pa_data, sizeof(*rom), MEMREMAP_WB); if (!data) return -ENOMEM; @@ -710,7 +710,7 @@ int pcibios_add_device(struct pci_dev *dev) } } pa_data = data->next; - iounmap(data); + memunmap(data); } set_dma_domain_ops(dev); set_dev_domain_options(dev); diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c index ef76e5e..d5de6ee 100644 --- a/drivers/firmware/dmi-sysfs.c +++ b/drivers/firmware/dmi-sysfs.c @@ -25,6 +25,7 @@ #include #include #include +#include #define MAX_ENTRY_TYPE 255 /* Most of these aren't used, but we consider the top entry type is only 8 bits */ @@ -380,7 +381,7 @@ static ssize_t dmi_sel_raw_read_phys32(struct dmi_sysfs_entry *entry, u8 __iomem *mapped; ssize_t wrote = 0; - mapped = ioremap(sel->access_method_address, sel->area_length); + mapped = dmi_remap(sel->access_method_address, sel->area_length); if (!mapped) return -EIO; @@ -390,7 +391,7 @@ static ssize_t dmi_sel_raw_read_phys32(struct dmi_sysfs_entry *entry, wrote++; } - iounmap(mapped); + dmi_unmap(mapped); return wrote; } diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c index 75273a25..e83d6ae 100644 --- a/drivers/firmware/pcdp.c +++ b/drivers/firmware/pcdp.c @@ -95,7 +95,7 @@ if (efi.hcdp == EFI_INVALID_TABLE_ADDR) return -ENODEV; - pcdp = early_ioremap(efi.hcdp, 4096); + pcdp = early_memremap(efi.hcdp, 4096); printk(KERN_INFO "PCDP: v%d at 0x%lx\n", pcdp->rev, efi.hcdp); if (strstr(cmdline, "console=hcdp")) { @@ -131,6 +131,6 @@ } out: - early_iounmap(pcdp, 4096); + early_memunmap(pcdp, 4096); return rc; } diff --git a/drivers/sfi/sfi_core.c b/drivers/sfi/sfi_core.c index 296db7a..d5ce534 100644 --- a/drivers/sfi/sfi_core.c +++ b/drivers/sfi/sfi_core.c @@ -86,13 +86,13 @@ /* * FW creates and saves the SFI tables in memory. When these tables get * used, they may need to be mapped to virtual address space, and the mapping - * can happen before or after the ioremap() is ready, so a flag is needed + * can happen before or after the memremap() is ready, so a flag is needed * to indicating this */ -static u32 sfi_use_ioremap __read_mostly; +static u32 sfi_use_memremap __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) @@ -100,10 +100,10 @@ static void __iomem * __ref sfi_map_memory(u64 phys, u32 size) if (!phys || !size) return NULL; - if (sfi_use_ioremap) - return ioremap_cache(phys, size); + if (sfi_use_memremap) + return memremap(phys, size, MEMREMAP_WB); else - return early_ioremap(phys, size); + return early_memremap(phys, size); } static void __ref sfi_unmap_memory(void __iomem *virt, u32 size) @@ -111,10 +111,10 @@ static void __ref sfi_unmap_memory(void __iomem *virt, u32 size) if (!virt || !size) return; - if (sfi_use_ioremap) - iounmap(virt); + if (sfi_use_memremap) + memunmap(virt); else - early_iounmap(virt, size); + early_memunmap(virt, size); } static void sfi_print_table_header(unsigned long long pa, @@ -507,8 +507,8 @@ void __init sfi_init_late(void) length = syst_va->header.len; sfi_unmap_memory(syst_va, sizeof(struct sfi_table_simple)); - /* Use ioremap now after it is ready */ - sfi_use_ioremap = 1; + /* Use memremap now after it is ready */ + sfi_use_memremap = 1; syst_va = sfi_map_memory(syst_pa, length); sfi_acpi_init();