Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5951296rwr; Tue, 9 May 2023 08:18:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6DstOd+TbQ9Wqf31m9alPleauHgrc0TAZlm/sPbge4i0OYi2DMuep4NtO3e9aFHd+dF6iz X-Received: by 2002:a05:6a20:6a0a:b0:f0:b6e3:90f2 with SMTP id p10-20020a056a206a0a00b000f0b6e390f2mr19308686pzk.13.1683645509284; Tue, 09 May 2023 08:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683645509; cv=none; d=google.com; s=arc-20160816; b=RPeDylJKba9BSCMr+kW3dEIvpNbxoRlCr6UxQyPmwMYXl/fZbaE+DE4eLyErcU/Y6Z wuLs6v+9SGURH2jSWkuVZ+0uheZsAc2vHId2CrBUlB6Vut3Bu/op72L6mVpB+PfQHTWu 3MsP+rDcpwcSo0A0/x+8oM+STA7yb0Vb0/+TLmCKu2PE9FxEjvtXOUbk6fhfAtQwA2ut M3x3vjS1dnrFH27iWH/wDRqjweiGKkwpgE1R0q4QMpKzDx/A7hksg7o6QklH7q8a1RGv ldZNuWwkKjcRqITZYDYQ/yQDuw5GuiBF3a8wEmasR4uWBr6EVW89JasGBvQdNINin6t5 GLeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qs40eDrq6EMT5tAo6/3VXBzKdLEcgP1KTfbH56QJ/zk=; b=Wn9nNSKGXN7nhjHcxkjQ26HNqpNG1fJoUstwJkOTDJ1Yzo2WjBhCaZyYc75XfR7UmD 653e3aPVPBFkOV/LZiEKhcsYHepcoWXydiULJ9Cn5Rg07zRwiVSqP31QEqh5lEMTe9WQ SBtQ+d69VIZ6YMKgq5b4gV45/9a4NXpiwCSQtqLknrBX4d+BsgrhE2A5kZjb/vj/Lxx2 CIMtRRgHdKjD08/GKhHBlf0FWFJxnZJ3Q+M04mArqePT4pKWx2Rc8g40i/Mnu4E4DqRC IA8l1Ny0AyV2hHAKUkyrnhAdpJKQZt5T/65ezuPVufdKlbHMG7juyjWSDsX8vLmRIgbJ zbkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cYRH/oxw"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v16-20020a63d550000000b00524f00fee68si1658339pgi.372.2023.05.09.08.18.16; Tue, 09 May 2023 08:18:29 -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=@kernel.org header.s=k20201202 header.b="cYRH/oxw"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235438AbjEIOtI (ORCPT + 99 others); Tue, 9 May 2023 10:49:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbjEIOtG (ORCPT ); Tue, 9 May 2023 10:49:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55661E6A for ; Tue, 9 May 2023 07:49:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E90F2633C4 for ; Tue, 9 May 2023 14:49:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63CCBC433EF; Tue, 9 May 2023 14:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683643744; bh=NBvpZ3SVsEm0RYtMI4MVcyA/5Q5NxM5iMqiiZpuJwog=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cYRH/oxwAZvnUeZPPirZXT7XWphCD4RiogIVrgR0hmbqX2nXQTT24uAmjwk6gbMu7 rdbt7GsjiN/gVpBu9EodkLSk95qo4OzGy32rNn3B4iw3FCYWCG0cOVLC01M/oGpRYK h9suRxfgbB9B1abUln2d3A17GNmKVeEHCCZ+IHbWPiBcrhffOL/OJMB+LVCA208+V0 yNAvnS4TXlvuq/yvOBgxbISxBplraaUTtpPg+cWZUxxCQipC3p++WVhI4ySs4trCW9 YTooyDIqUO4mfR0WhY/yTmgzDQ/hM9yJGIQOnt+qbPHUGgJJKCI0SQZbVzrVmiPhDm JKBXF3mse5wUQ== Date: Tue, 9 May 2023 22:37:56 +0800 From: Jisheng Zhang To: Conor Dooley Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] riscv: enable BUILDTIME_TABLE_SORT for !MMU Message-ID: References: <20230409164306.3801-1-jszhang@kernel.org> <20230411-flier-establish-d3ffd434be28@wendy> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230411-flier-establish-d3ffd434be28@wendy> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Tue, Apr 11, 2023 at 10:37:36AM +0100, Conor Dooley wrote: > Hey Jisheng, > > On Mon, Apr 10, 2023 at 12:43:06AM +0800, Jisheng Zhang wrote: > > BUILDTIME_TABLE_SORT works for !MMU as well, so enable it. > > > > Tested on QEMU and FPGA. > > > > Signed-off-by: Jisheng Zhang > > Fails to build for nommu_k210_defconfig: > > make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- O=build -sk -j30 > no __ex_table in file: vmlinux This failure log makes me carefully go through the ex_table mechanism again. Now I knew where's the failure from and what should be done: Because FUTEX is disabled in nommu_k210_defconfig. However, there's a deeply hidden issue here: there should be no __ex_table section usage at all in NOMMU case, becaue __ex_table usage relies on MMU to do the *fixup*, so I need to patch the risc extable part instead. Thanks > Failed to sort kernel tables > make[2]: *** [../scripts/Makefile.vmlinux:35: vmlinux] Error 1 > make[2]: *** Deleting file 'vmlinux' > make[2]: Target '__default' not remade because of errors. > make[1]: *** [/home/conor/stuff/linux/Makefile:1250: vmlinux] Error 2 > make[1]: Target '__all' not remade because of errors. > make: *** [Makefile:226: __sub-make] Error 2 > make: Target '__all' not remade because of errors. > > :( > > > --- > > arch/riscv/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > index c5e42cc37604..212ea28e346b 100644 > > --- a/arch/riscv/Kconfig > > +++ b/arch/riscv/Kconfig > > @@ -50,7 +50,7 @@ config RISCV > > select ARCH_WANT_LD_ORPHAN_WARN if !XIP_KERNEL > > select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE > > select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU > > - select BUILDTIME_TABLE_SORT if MMU > > + select BUILDTIME_TABLE_SORT > > select CLINT_TIMER if !MMU > > select CLONE_BACKWARDS > > select COMMON_CLK > > -- > > 2.40.0 > >