From patchwork Mon May 22 07:00:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 97104 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1261440vqo; Mon, 22 May 2023 00:15:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5UlPajbcDaKnDf9jZoG0xKRZdBHtn+BxWnLPZQRGGTDI98CbldU1R6pPZHTvNLgwtMtECF X-Received: by 2002:a05:6a00:845:b0:64d:1585:fff2 with SMTP id q5-20020a056a00084500b0064d1585fff2mr14333389pfk.29.1684739759070; Mon, 22 May 2023 00:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684739759; cv=none; d=google.com; s=arc-20160816; b=LDspnJQebjHhEF7Ij2uKccH7J1sgngfokpd/bwmhF87fuyapaGXIsJ5b3L4M5HYF9x PbexseaJZ4JdLRymTqyOVDFfeCysWikVHfkIAAD6V4C9VZm5+4M5OWjuGASzluZNnK9v wYoAi+Rxi+63R8i/Ymh5x3nwML3fmbA3qRZ/PoJllx8HWjZ/dH/GQ09WSzKe7sHoAzey dYNu8/XFT4xhtw3jt5QvdPnAIoM4sG1oxphv5872MntCiBx2BDUUH6wE4BXxh479mIq6 6E474+ndZIGi+WZHXevlIP9bS40xX+LANYfqF6A1m3Ef1FdkKH+zcBDF6pc00e5XBgSv Wqcg== 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=x2dAotP4DLlyxPx8wW12fq1xZOmgOGCjbCOFSmTy5ZNXaKK8dzcQIJCEUCXplzmc1o owZO55WCym3WTGcZiuyR0XrYge+AobkKzIpjH4MRQwkUeorunqxYP4rN2+73c3YirXKf c8LQwVq+y16IP1hwYI0Uaeat5T3ZOdDx7s0Z1oBZrgkFMpcvqiwa53Rnud81ThoFnRw5 PqWgq5VOzqaHqIpAwQ1yjRGKkPNE7DHeRj2pcOwowVxG3J5Vtw2pTV+GXx/TQYsc9BRs bGZCakqV2f3Kb2CixU+QDo6CoT4L0jWlHxVYGmWShE54M9nAxsa65D3gdLiXGIjpRz5P 4YKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NrzO6oCP; 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 e28-20020aa798dc000000b0064672de37cesi4416666pfm.192.2023.05.22.00.15.45; Mon, 22 May 2023 00:15:59 -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=NrzO6oCP; 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 S232211AbjEVHBP (ORCPT + 99 others); Mon, 22 May 2023 03:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230486AbjEVHAr (ORCPT ); Mon, 22 May 2023 03:00:47 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16B7594 for ; Mon, 22 May 2023 00:00:43 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2af2602848aso34470391fa.2 for ; Mon, 22 May 2023 00:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684738841; x=1687330841; 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=NrzO6oCPjwihy/7NbpJ3YcgsArRc78cEfJMpT9F0OLcbOW2y8Fl22oTOY/WH+QouJU 4sULmDBFIIZPjR6Mx3pJe8TZEIahkyyb7WkWsNTDeKsKYKrPJekLb/gD1GgHaIpqlCsj 6QSKMiFR3KohhV92qLpgW0jRCS603xx3WtBCfv+WNRiPUwpuMiR+QiKd4LB4eBXFxrTl iNaMwVqg/f8wzqRqyYInLs1GFw2HsoBArqyOCLOOOtgD3dLXhiOQx5YrwSt21rFQERmE n4MTcZbVb2/vJmHdtmzbg4g68dyWgt0y911Ry3rDmEQOUhiC9fxEWLl1Lpop3daP//x6 ClCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684738841; x=1687330841; 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=FmX5bHvs4cL9//ArMtTDal/bpa9l5t8KcQA5RRqnWubbQrjGFA36cZzFe0ZphqzLaF NxiNuTBV7dlMKGInQ7x0EF34+ji3LuJDcSE4J5F7uNMwriWWEYI7q05YPpZh6iTr0uIV x1n+DMEsrjTTehNZTIfrBRi7R1+FLmfXBp0n4ZndI4aN8McexpEF6toumjyeXwXnu2Gp oYAvXnzlFl/3R8Se5qnr9GNAT39/EAumU/jiJRghFJSMaF/nCC96mg2wbEO66t+rh+7H fxXCbG4yhKyN+hzRZARVM1lYSagYaRHfUWDcxjWvUcP+NDExiIi2N7mCnIDBjQ4UIOZP B5fg== X-Gm-Message-State: AC+VfDxObcBoopTzgCDLVGPLr5G4zpJWnj4H1aHXx1KrFC6hPT2EZ+dg wiqcFyi3czFAC+k+jUbYYpfGAg== X-Received: by 2002:a2e:9115:0:b0:2a8:c42f:6913 with SMTP id m21-20020a2e9115000000b002a8c42f6913mr3287059ljg.36.1684738841185; Mon, 22 May 2023 00:00:41 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q4-20020a2e8744000000b002adb98fdf81sm1010187ljj.7.2023.05.22.00.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 00:00:40 -0700 (PDT) From: Linus Walleij Date: Mon, 22 May 2023 09:00:38 +0200 Subject: [PATCH v2 03/12] ARC: init: Pass a pointer to virt_to_pfn() in init MIME-Version: 1.0 Message-Id: <20230503-virt-to-pfn-v6-4-rc1-v2-3-0948d38bddab@linaro.org> References: <20230503-virt-to-pfn-v6-4-rc1-v2-0-0948d38bddab@linaro.org> In-Reply-To: <20230503-virt-to-pfn-v6-4-rc1-v2-0-0948d38bddab@linaro.org> To: Andrew Morton , Geert Uytterhoeven , Vineet Gupta , Catalin Marinas , Will Deacon , Arnd Bergmann , Russell King , Greg Ungerer Cc: linux-mm@vger.kernel.org, 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 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=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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766577677485939751?= X-GMAIL-MSGID: =?utf-8?q?1766577677485939751?= 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 --- 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);