Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp540739rwr; Wed, 26 Apr 2023 03:01:40 -0700 (PDT) X-Google-Smtp-Source: AKy350ZIrDdsXuP/4QiGFGNzDXB3/mXTftFBq6oJx7exthFfVtYC/fKK8HQC7CI0yEQMDIDbJFiJ X-Received: by 2002:a05:6a00:14cf:b0:63d:408a:e14 with SMTP id w15-20020a056a0014cf00b0063d408a0e14mr29855714pfu.4.1682503299927; Wed, 26 Apr 2023 03:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682503299; cv=none; d=google.com; s=arc-20160816; b=tW3TG3t0z1qKlUPP+cjQlfor7lKbHH3BcxuFgH6qIGmIYvebq0wQxDRjYa5+cIf+MO W3CI4jYTGrwaxpd0vCnDt2jfYQOUIc+V3T4rrcggKU5Ldk4pmcJfP1fFDSY+DTXI/qJk 18As9rA9UGseGZ68Iw3l6xaM2TQsBe2a4CUy8lRTLiKRv0DclVuhKPdhQ7oIESE4C5pv dcdJ8abM2LHspWaXJ15OPVM0ZX8B/u/yGof+3P34nu9bgX8LyHzNBdxhYS5mJtBUNZcL OEL5X9ZEiucwvSImVwLrw8XWW8gZGGl6pzhoNG7NrRb4uJQYIA6KGri7w3y0t2f0zumy meQA== 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:dkim-signature; bh=OK3qaiVcydKF9XZu8gI/RVWN/3p/t3jhTnRjwV7K8CU=; b=qozlTSq5cIPuIrg6rP/QP3Mt5nKZnFsN9+jIAaB8tBW7X4OUYfIC6ejofBeI78NJVP Q6DznPQJE1ul5SWqKo858L9yOxA+j0Qu9/IvRaLUK96spRtOf9p460yhZVK/r1hD7XUd 4qvj6q1W8YOYN/v0PX7BD5JqaSXgkP5jek80VNJK7TSNU8S8P+ZP69lR1XDbrsb1eVWL LXOXRYH/sFDTRHFdKnNgxJguFZhqe+4sTsUlQ4K0UNpaFRyMHuVL7yYvSjbKuZQnsCUe /ddXE7/gron+l9W+/DycLXL0ZHKi/NHBmPmQkCL1INRr9bYDKBDZUAbrE9/fu/m+Cma1 ZMYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=OHfLmQ6T; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v68-20020a626147000000b00639e52424a6si15286801pfb.146.2023.04.26.03.01.14; Wed, 26 Apr 2023 03:01:39 -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=@gmail.com header.s=20221208 header.b=OHfLmQ6T; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229627AbjDZKBE (ORCPT + 99 others); Wed, 26 Apr 2023 06:01:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240322AbjDZKA7 (ORCPT ); Wed, 26 Apr 2023 06:00:59 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 085D43599 for ; Wed, 26 Apr 2023 03:00:50 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-63b57c49c4cso5693288b3a.3 for ; Wed, 26 Apr 2023 03:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682503250; x=1685095250; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OK3qaiVcydKF9XZu8gI/RVWN/3p/t3jhTnRjwV7K8CU=; b=OHfLmQ6TetIifmiTVR9LyyauRXAcQNU3ERRrcAXiXo5JSu8k8e90/F4LPPPxvhJ5Bq qNc1BsfC7SsE7nke5Fb3nrfLJaBSzgAU/H/ABTcbkHZ9NFDeBwaKH53PjgoEeHy8Jsx2 Ci9Ik49fYzQ+zyEouDCMivUg0zEswhp3zYDlVUJgVjqjpYyWYJFvzDcs3mkzoF9dVWZI IaCp5zjQmirto4Fk/SULtA7lKvU8rtRf5YTXaFg2J+z8gC8e3pRM94hxSkeVLH8yCu1X 9Z3NLJ6A0hU7QyPGbChnho1BtfAlgg1nrRK4IWYQGPgQpry1AoWtfsT5/9NYkdXS8Kaf M1AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682503250; x=1685095250; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OK3qaiVcydKF9XZu8gI/RVWN/3p/t3jhTnRjwV7K8CU=; b=LIl9TOE9Y9e2OC42itcnFS8VlEaRsXZDYmORkqQfxc3uvVFhQ0HqCDSeCjTNjb/SAl VeubumxfLX7WfAULGS200z4+fW19DkkJmBrEzAoh92MLi/hW/mn3i86m3aIXKQnbJoRl mxOJiRI/MGb9e3QMzpahBe5lE1GxfvJ5Js5N68Z3UPjPrKkWE7oMQh8xNH+oJO339TqV MfT2yA3rXSmk9xhF4aB+F0xugbeZD2Cn87ykjXzNc1rchk4aVAQu1WbR7ame6h+sm+Z6 w2FRf7F7ihY4G6yoDEDkMOVjTU9k+2f0Y55TOm3n6ViuH/HlcZCW3XLTZKPgcQY/gSyA OhgA== X-Gm-Message-State: AAQBX9dcQr5CVCnl0A3LjjjHDGm/JKgouudOLQE7u8Nt8/ztEVmudoiz J5mm8WXliFAbBFHy1K0EXAdK82XthFU= X-Received: by 2002:a05:6a21:788e:b0:f0:5a5b:7bea with SMTP id bf14-20020a056a21788e00b000f05a5b7beamr26480987pzc.61.1682503250334; Wed, 26 Apr 2023 03:00:50 -0700 (PDT) Received: from localhost.localdomain ([221.226.144.218]) by smtp.gmail.com with ESMTPSA id u29-20020a056a00099d00b0063d2bb0d107sm10940811pfg.64.2023.04.26.03.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 03:00:48 -0700 (PDT) From: Song Shuai To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, alexghiti@rivosinc.com, heiko@sntech.de, conor.dooley@microchip.com, guoren@kernel.org, anshuman.khandual@arm.com, mick@ics.forth.gr, samuel@sholland.org Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Song Shuai Subject: [PATCH -fixes V2] riscv: mm: remove redundant parameter of create_fdt_early_page_table Date: Wed, 26 Apr 2023 18:00:09 +0800 Message-Id: <20230426100009.685435-1-suagrfillet@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 create_fdt_early_page_table() explicitly uses early_pg_dir for 32-bit fdt mapping and the pgdir parameter is redundant here. So remove it and its caller. Reviewed-by: Alexandre Ghiti Signed-off-by: Song Shuai --- Changes in V1: https://lore.kernel.org/linux-riscv/83540cb1-0c9b-f572-849a-cb100437d049@ghiti.fr/T/#t - fix the typo --- arch/riscv/mm/init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 0f14f4a8d179..6ebb75a9a6b9 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -843,8 +843,7 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early) * this means 2 PMD entries whereas for 32-bit kernel, this is only 1 PGDIR * entry. */ -static void __init create_fdt_early_page_table(pgd_t *pgdir, - uintptr_t fix_fdt_va, +static void __init create_fdt_early_page_table(uintptr_t fix_fdt_va, uintptr_t dtb_pa) { uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1); @@ -1034,8 +1033,7 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa) create_kernel_page_table(early_pg_dir, true); /* Setup early mapping for FDT early scan */ - create_fdt_early_page_table(early_pg_dir, - __fix_to_virt(FIX_FDT), dtb_pa); + create_fdt_early_page_table(__fix_to_virt(FIX_FDT), dtb_pa); /* * Bootime fixmap only can handle PMD_SIZE mapping. Thus, boot-ioremap -- 2.20.1