Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp823524pxb; Fri, 22 Apr 2022 11:58:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFvOCAXmuwbGDHPAKN+yOSbH3dmdY+y7vznXMFEBiL1bPXDZqVmX/m2Q88VZ1/tkwYQToD X-Received: by 2002:a17:90b:2305:b0:1d2:812e:8279 with SMTP id mt5-20020a17090b230500b001d2812e8279mr6970122pjb.47.1650653909956; Fri, 22 Apr 2022 11:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650653909; cv=none; d=google.com; s=arc-20160816; b=PNutxyFpbknwT6etluETN37A/IFNAcJX4vsIJ/+aPIcF/CSFFfzGyLWBsh8AqW2N9Z Dln9EQfmswUoIkcpzvxeHRK3iQgtfVuTwfmbFUx9Ib1vpwgZrV2gWwFgSlPg5W0nwovv Sqt61LiRyBoZUtrnYspWKtdt9WHEKbNAIff36LCdN68mCB0C3OBuyBPoEjzb1XU3uzs2 wZTTvzKEJSSdE6J8Fcm+htuiUNI4nOhoaYF3ZWPWePdIfnsPUJ0ki8wt7+5IWFqgMIZF OKqzvY4prYe6Seph0VyT/u+qUB1aXAUh5+fkKeEv3za+Fp1gIQ2roOK3foEaTIYXm6ma BirA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:cc:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject :dkim-signature; bh=dGeAOCT6r5MCsaaONz+vK0DLEKteGUlMarNKYZRrUPE=; b=O/L4HwFi7bsMbA1denia+19LpTyBDS9Eh9ZamEgOqqLH5YaQE8Oj5bZ4uB5JlIbWLA +ZXx+k0U3p05eflbBgjYXM0L6Op9qv6Dl9WhClr6bjrm3E6kEF8GbQJtezdujHrQWWRv nfIe7kJREhU99PwEQZT0Xk3uYMqXc3+QPKH1tcWK3vWVd6M1gyVdcW3A0VCHsaJ6Ygn0 5GvUuKoh9Any+IIdg7EQC0oMmvbqc4OMwe4h+bSF00UOdAuRFV7/1T1YOH1E89FL4NFq E6ZDofhAMfn7/s+TULeKXboJ1R5NSRWFmvhH1JLf8mzmD55t/Kd2lIDjMRbKsGTt3o7t ajMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=3DPUa2Vp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 205-20020a6304d6000000b003821d32f04csi8874520pge.116.2022.04.22.11.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:58:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b=3DPUa2Vp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 22A06189BCC; Fri, 22 Apr 2022 11:21:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381593AbiDTSvC (ORCPT + 99 others); Wed, 20 Apr 2022 14:51:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350681AbiDTSu7 (ORCPT ); Wed, 20 Apr 2022 14:50:59 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB33243484 for ; Wed, 20 Apr 2022 11:48:12 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id s14so2603238plk.8 for ; Wed, 20 Apr 2022 11:48:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding:cc:from:to; bh=dGeAOCT6r5MCsaaONz+vK0DLEKteGUlMarNKYZRrUPE=; b=3DPUa2Vpp9GY71EMMBzT6vukuP1h7Mh1qSwctxVlOMqU2UrCl9zuFahzP1szIXX6JP +oGAyKYhhah/seZxnMyfudLk7ktQMOGReYKJAwqGSiWJomCJ6tV1k3jMPmrpTlPOtdQW kJRC/sx8oC23TRYHOJxOV0QJoQrwmZ0nlCC7vOzpxq3sjENQOgDOxC9U8MlJRYCijp3X XkACjOJY/fWnJpMHcU5hiv/g6rX4WMuwoudIiCd7VVJOnrLNQvI3lOfJlQ7+mItlv0ou VvWCbxS3lmCJH69vxwECf49ur9p2gkktQCU/g3ezMq4gFJAtIgzB5/OFWA4IP12tcw8N Apsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:cc:from:to; bh=dGeAOCT6r5MCsaaONz+vK0DLEKteGUlMarNKYZRrUPE=; b=2ijMcWsVNsqnwoJtF5O/fRwv5qPpTr5+RwyImrywrpQjj5svYdfU9bXNlqWV2HSOGG DBx3GvKE0weQPKOiNOzSkCYJNAE+7fTKvOj5xmcEClL2sn+FXm4qOCkpFsZkNeE+WtR8 A7s4vpvt8HOUbmvS5XpaWvR02JMiVXKOCW/GYh7xRGF/nAmalE6PLIRw/CjlmOUBwZzb YSSD9nOy9gkcAd9fHroGR/KNKm+i8tlVAVHinbBvgtxdwm4AkYTI1XSmbSqT75avmc5r gfeyRzgntyDiTc0pQBllkSjODIFOfojH07iDMxdVf+lBpEoyt1SVAGLsHvRt/zZcUKqR aU/w== X-Gm-Message-State: AOAM531Bs02+Ir7fO7KcwNICtrB92iuclfShF/7WEgt/VROte3mpkoyo qavtOWhapE+Bfr9aDDwm6aPlag== X-Received: by 2002:a17:90b:4f82:b0:1d1:b8fd:7e36 with SMTP id qe2-20020a17090b4f8200b001d1b8fd7e36mr6060236pjb.194.1650480492240; Wed, 20 Apr 2022 11:48:12 -0700 (PDT) Received: from localhost ([12.3.194.138]) by smtp.gmail.com with ESMTPSA id bc11-20020a656d8b000000b0039cc4dbb295sm19485492pgb.60.2022.04.20.11.48.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Apr 2022 11:48:11 -0700 (PDT) Subject: [PATCH v2 1/4] RISC-V: Avoid empty create_*_mapping definitions Date: Wed, 20 Apr 2022 11:40:53 -0700 Message-Id: <20220420184056.7886-2-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220420184056.7886-1-palmer@rivosinc.com> References: <20220420184056.7886-1-palmer@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Paul Walmsley , Palmer Dabbelt , aou@eecs.berkeley.edu, anup@brainfault.org, vincent.chen@sifive.com, guoren@kernel.org, Atish Patra , alexandre.ghiti@canonical.com, jszhang@kernel.org, vitaly.wool@konsulko.com, gatecat@ds0.me, wangkefeng.wang@huawei.com, mick@ics.forth.gr, panqinglin2020@iscas.ac.cn, rppt@kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux@rivosinc.com, Palmer Dabbelt , kernel test robot From: Palmer Dabbelt To: linux-riscv@lists.infradead.org, rdunlap@infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 From: Palmer Dabbelt At least one use of these, that in create_fdt_early_page_table(), triggers warnings and should cause a real error (create_pmd_mpping() ends up skipped on XIP_KERNEL). Reported-by: kernel test robot Fixes: 677b9eb8810e ("riscv: mm: Prepare pt_ops helper functions for sv57") Signed-off-by: Palmer Dabbelt --- arch/riscv/mm/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 9535bea8688c..7bc9a21e29fb 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -567,9 +567,9 @@ static void __init create_p4d_mapping(p4d_t *p4dp, create_pte_mapping(__nextp, __va, __pa, __sz, __prot) #define fixmap_pgd_next ((uintptr_t)fixmap_pte) #define early_dtb_pgd_next ((uintptr_t)early_dtb_pmd) -#define create_p4d_mapping(__pmdp, __va, __pa, __sz, __prot) -#define create_pud_mapping(__pmdp, __va, __pa, __sz, __prot) -#define create_pmd_mapping(__pmdp, __va, __pa, __sz, __prot) +#define create_p4d_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0) +#define create_pud_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0) +#define create_pmd_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0) #endif /* __PAGETABLE_PMD_FOLDED */ void __init create_pgd_mapping(pgd_t *pgdp, -- 2.34.1