Message ID | 20230503-virt-to-pfn-v6-4-rc1-v1-3-6c4698dcf9c8@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp4310676vqo; Thu, 11 May 2023 05:01:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4N7cajxMaA2yLamdUFqITu/Tgc/Fi9pJmGnet7giSrLEK+qz6CSA3rk1sTSosnnyRvY3BA X-Received: by 2002:a17:90b:85:b0:247:a3ed:63b3 with SMTP id bb5-20020a17090b008500b00247a3ed63b3mr20932303pjb.31.1683806481434; Thu, 11 May 2023 05:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683806481; cv=none; d=google.com; s=arc-20160816; b=OAqTzCk5aDGlX6IOLmsmeHBdPaUe51Whtmrw9alq6njGlQFq+IsoG/KYnCS6EK0s+M UYkdSclf6XWFfNbv6kSkTMkLD8qnrADeOusBk8RqEg8xQudxTSPHYOQ6aJo64DteIyMK My8fCmhjxg5nOdLuC4/z009JlHqTgKnxOfiVIhPCHbsrq919rpgEf9oEc9QLT6E2NyQ0 DLfvfTahcPO9EA4vCnyNa+QXDohOO4LiCGBMikeVlEPOfyGsq3RUOmUcuoouZXCAb8ym m70A2XfMZ8KnOQuCJD0Dtgtm8MYaNDaUyHG6Ms7onfm4Zk9hIPWrRYma1lE6sPu308ze APNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=2CPc/Vm/Ur0JOy8kF/L6fs0qWXc+VKBrwCqiZQE3hiQ=; b=d0dxgWJjfFps1gZ3c4Bd9oMOshFWlsT4Zinu8+CPiMhZkuRDD4fPNXWT05NZ83NOi+ 6oMO+i8zt7JPKzLVw6y4bKhhXrmJs75wjLZ9TmRe+WcrURE/2U8VhrnAu21EEYoQqphb /gnl/5vd+Ban1wZgVDOPlwr2GK9eIocOZxF/jHD2ts6C5rRGYN6nwd9fXOPrXCn+iPTO eKoX+b7Jh6PwtrHB2yHCtNSlraBFN6VrlyDo+3/nDRZZZl24daVlqWtUI3PiZRPtebn9 VbQuY36ImPXrIr5RyZWl5VrEdOYFTZw6XhI6W95BgxeP0acCqpmxj/iVERzA4Q/Atv5B KGew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=us1qr2gp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a17090ade9100b002476173727fsi19913463pjv.26.2023.05.11.05.01.05; Thu, 11 May 2023 05:01:21 -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; dkim=pass header.i=@linaro.org header.s=google header.b=us1qr2gp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237882AbjEKMAS (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Thu, 11 May 2023 08:00:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237901AbjEKL74 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 11 May 2023 07:59:56 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56C378A6F for <linux-kernel@vger.kernel.org>; Thu, 11 May 2023 04:59:51 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4f14468ef54so9688794e87.0 for <linux-kernel@vger.kernel.org>; Thu, 11 May 2023 04:59:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683806389; x=1686398389; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=2CPc/Vm/Ur0JOy8kF/L6fs0qWXc+VKBrwCqiZQE3hiQ=; b=us1qr2gpwQ3bBAky0xvbHlSTRCtb1nydasm8z39XkazIJzESLaqNzEYvSDrqWvBqBX 4xcES64hit/N9fYugYwoV5W3g4eBVSitwsbnnifZ0lNM9KhPgKlQsFulFvXvE2t+KR4U ORQ5OFqloYcfrHKwTO12OVVscWtd5hVcDmECRKCgjTthI9wyAS5zhkAj5RdT8DId2mTE 5+ejX9H2q5kq1KWIA7iOUhoaa7GyZwuQHvQ3gEGe/NTiXYuogO2QROPtUakEjm0CnwbK kvsZHLKeUbzU9xoleFgHTrQZPpPyif74SXwCAcrOuKmxwemz6uMXGapYyPfo5nL/aCgI pNdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683806389; x=1686398389; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2CPc/Vm/Ur0JOy8kF/L6fs0qWXc+VKBrwCqiZQE3hiQ=; b=L6OEaPZWVS2WiLXNBWqUdrZCi5JlESztfAGwRq8vikKLk1TXY3u4CqyAdkXrVG4z62 1S/ZoePl94Kgq0ECRLHleslMuk6rUezzkmpVgiQrnw1j315ZtlxrLGcgRRJeTdVa6JpY F1pobVh3S3Ie8yKOh5vEyb5pS4sztSRrtXTo13gMDrtRt5cdV31iaaNX378ZbGrPpk35 SXdxbjaopE8sFSQeq/cB2JQ45TrGiO+ZgWvGMJEpoNt96CmEpYbKEbR5EQil9HrEmV1E eqn5/jNOKNspWydWaJ8+JdfNn9pc8ln3+Jvj7l8VCEbswmZ4rpVNLt/E97tsF0gKujGY vx1g== X-Gm-Message-State: AC+VfDxMupbD1km/BdUUA/ZLsTGnly7MBlRKwylNbnXuC7SsN8omJnMf t4lgUYlaNGZnBxbHlimtImfcIw== X-Received: by 2002:ac2:5fae:0:b0:4ea:fa07:1182 with SMTP id s14-20020ac25fae000000b004eafa071182mr2670102lfe.14.1683806389365; Thu, 11 May 2023 04:59:49 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id f16-20020ac25090000000b004cb23904bd9sm1100841lfm.144.2023.05.11.04.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 May 2023 04:59:49 -0700 (PDT) From: Linus Walleij <linus.walleij@linaro.org> Date: Thu, 11 May 2023 13:59:20 +0200 Subject: [PATCH 03/12] ARC: init: Pass a pointer to virt_to_pfn() in init MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230503-virt-to-pfn-v6-4-rc1-v1-3-6c4698dcf9c8@linaro.org> References: <20230503-virt-to-pfn-v6-4-rc1-v1-0-6c4698dcf9c8@linaro.org> In-Reply-To: <20230503-virt-to-pfn-v6-4-rc1-v1-0-6c4698dcf9c8@linaro.org> To: Geert Uytterhoeven <geert@linux-m68k.org>, Vineet Gupta <vgupta@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Russell King <linux@armlinux.org.uk>, Greg Ungerer <gerg@linux-m68k.org> Cc: linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-snps-arc@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org> X-Mailer: b4 0.12.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765599065327157474?= X-GMAIL-MSGID: =?utf-8?q?1765599065327157474?= |
Series |
arch: Make virt_to_pfn into a static inline
|
|
Commit Message
Linus Walleij
May 11, 2023, 11:59 a.m. UTC
Functions that work on a pointer to virtual memory such as
virt_to_pfn() and users of that function such as
virt_to_page() are supposed to pass a pointer to virtual
memory, ideally a (void *) or other pointer. However since
many architectures implement virt_to_pfn() as a macro,
this function becomes polymorphic and accepts both a
(unsigned long) and a (void *).
Fix up the offending call in arch/arc with an explicit cast.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
arch/arc/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index 2b89b6c53801..9f64d729c9f8 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c @@ -87,7 +87,7 @@ void __init setup_arch_memory(void) setup_initial_init_mm(_text, _etext, _edata, _end); /* first page of system - kernel .vector starts here */ - min_low_pfn = virt_to_pfn(CONFIG_LINUX_RAM_BASE); + min_low_pfn = virt_to_pfn((void *)CONFIG_LINUX_RAM_BASE); /* Last usable page of low mem */ max_low_pfn = max_pfn = PFN_DOWN(low_mem_start + low_mem_sz);