From: Jisheng Zhang <jszhang@kernel.org>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: enable BUILDTIME_TABLE_SORT for !MMU
Date: Tue, 9 May 2023 22:37:56 +0800 [thread overview]
Message-ID: <ZFpaxItE8TUTXktH@xhacker> (raw)
In-Reply-To: <20230411-flier-establish-d3ffd434be28@wendy>
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 <jszhang@kernel.org>
>
> 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
> >
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Jisheng Zhang <jszhang@kernel.org>
To: Conor Dooley <conor.dooley@microchip.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: enable BUILDTIME_TABLE_SORT for !MMU
Date: Tue, 9 May 2023 22:37:56 +0800 [thread overview]
Message-ID: <ZFpaxItE8TUTXktH@xhacker> (raw)
In-Reply-To: <20230411-flier-establish-d3ffd434be28@wendy>
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 <jszhang@kernel.org>
>
> 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
> >
next prev parent reply other threads:[~2023-05-09 14:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-09 16:43 [PATCH] riscv: enable BUILDTIME_TABLE_SORT for !MMU Jisheng Zhang
2023-04-09 16:43 ` Jisheng Zhang
2023-04-11 9:37 ` Conor Dooley
2023-04-11 9:37 ` Conor Dooley
2023-05-09 14:37 ` Jisheng Zhang [this message]
2023-05-09 14:37 ` Jisheng Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZFpaxItE8TUTXktH@xhacker \
--to=jszhang@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=conor.dooley@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.