Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3929782rwb; Mon, 5 Sep 2022 22:51:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR5MO9AEJCVOjUz7UpeTKMySnz721Y5k5cwZoPcfukBBJ5ksh2Dyiqr85pH5UUAIajBg2rmF X-Received: by 2002:a17:902:ced0:b0:172:e189:f709 with SMTP id d16-20020a170902ced000b00172e189f709mr51604177plg.63.1662443496165; Mon, 05 Sep 2022 22:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662443496; cv=none; d=google.com; s=arc-20160816; b=rtl1grLTaywPYptU2CCsPZgwVCsGSqYYBnPdqMmXJCFW5aW65L1T31EYD+rV5bzBi7 uTeYLPfTZIdGgNsmUBC57k485PS8eRM+HvqJMhtmUVTW3zJh0XMYBu6XTbq0j5Noc0DT lYW84SMbPbH3BMWqBgGNYCJFSnKCvavryIT7JpiFhEQzPG+6OVX9ZtWxFjRY9XRCVWDJ FIVYzPyrR7mLx2BqQYdOKWtB1DFwTShx4ta2q2wzjNiy0WTzk2SbxgchfsFo/r8mqoMS GPmqLGfViFlJMnVejEakxl1yZQNoZXxX1zT0Xch8VbWsSCxY4C9X8mkX05O8RPziHf6f aOcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=hYzDirK7xMKoOpJ3iUnY+eoeppnROrVM529dhFmGo4c=; b=GfefzhXY7la4Jn6/D+8AcmacY1np9w7gDaAHlYcdBB9j0K3J13uMYOp1iDMNpzKq86 MKsfkKkIafbk7pWTHdsT81bcXjD/Khk+dxavVIiIpBhAe8kz4Np7MhA0+6T1nDcYDmLR er83XxgPtsFG/TW1F8ho2qAWsLHDDc09s+qr50bnX9glaV006FpZV60jYVyiGZO7XWyd k+YCsHyOzuUdheWv1KKjgd75YhrXO2Qv3GUqM8Uair4eGhzTA1updo8OH3oXr9mzmQm1 wPofNvMHQFvzCGdiGMjRo0CmBym2gxMale8p/RZEe8FV1PU9CyMtHnsB1EZ1JiVkF0Fw b9qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h20-20020a631214000000b00429ea6e9439si12319178pgl.505.2022.09.05.22.51.25; Mon, 05 Sep 2022 22:51:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232045AbiIFFgr (ORCPT + 99 others); Tue, 6 Sep 2022 01:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbiIFFgq (ORCPT ); Tue, 6 Sep 2022 01:36:46 -0400 Received: from out199-8.us.a.mail.aliyun.com (out199-8.us.a.mail.aliyun.com [47.90.199.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A3DD3ECEE for ; Mon, 5 Sep 2022 22:36:43 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0VObYebi_1662442596; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0VObYebi_1662442596) by smtp.aliyun-inc.com; Tue, 06 Sep 2022 13:36:38 +0800 From: Xin Hao To: tglx@linutronix.de Cc: mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, luto@kernel.org, sathyanarayanan.kuppuswamy@linux.intel.com, xhao@linux.alibaba.com, linux-kernel@vger.kernel.org Subject: [PATCH] x86/mm: use resource_size_t parameter in phys_mem_access_encrypted() Date: Tue, 6 Sep 2022 13:36:32 +0800 Message-Id: <20220906053632.43348-1-xhao@linux.alibaba.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As phys_mem_access_encrypted() func calls arch_memremap_can_ram_remap() which use resource_size_t parameter, so there just to be consistent in case to avoid ambiguity. Signed-off-by: Xin Hao --- arch/x86/include/asm/io.h | 4 ++-- arch/x86/mm/ioremap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index e9025640f634..bd10b0979bfa 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -354,10 +354,10 @@ extern bool arch_memremap_can_ram_remap(resource_size_t offset, unsigned long flags); #define arch_memremap_can_ram_remap arch_memremap_can_ram_remap -extern bool phys_mem_access_encrypted(unsigned long phys_addr, +extern bool phys_mem_access_encrypted(resource_size_t phys_addr, unsigned long size); #else -static inline bool phys_mem_access_encrypted(unsigned long phys_addr, +static inline bool phys_mem_access_encrypted(resource_size_t phys_addr, unsigned long size) { return true; diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 1ad0228f8ceb..5832ce84512f 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -792,7 +792,7 @@ pgprot_t __init early_memremap_pgprot_adjust(resource_size_t phys_addr, : pgprot_decrypted(prot); } -bool phys_mem_access_encrypted(unsigned long phys_addr, unsigned long size) +bool phys_mem_access_encrypted(resource_size_t phys_addr, unsigned long size) { return arch_memremap_can_ram_remap(phys_addr, size, 0); } -- 2.31.0