From: Nick Desaulniers <ndesaulniers@google.com>
To: Helge Deller <deller@gmx.de>
Cc: John David Anglin <dave.anglin@bell.net>,
James Bottomley <James.Bottomley@hansenpartnership.com>,
linux-parisc@vger.kernel.org, kbuild-all@lists.01.org,
LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>, Kees Cook <keescook@chromium.org>,
kernel test robot <lkp@intel.com>,
Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: hppa64-linux-ld: mm/hugetlb.o(.text+0x50dc): cannot reach printk
Date: Mon, 25 Jan 2021 12:58:35 -0800 [thread overview]
Message-ID: <CAKwvOd=RHb5yQj5kKuvt9BnywNUmRtivPu_qebLG8XXDyr8cCA@mail.gmail.com> (raw)
In-Reply-To: <20210125204720.GA28462@ls3530.fritz.box>
On Mon, Jan 25, 2021 at 12:47 PM Helge Deller <deller@gmx.de> wrote:
>
> > >> On Sat, Jan 16, 2021 at 6:37 AM kernel test robot <lkp@intel.com> wrote:
> > >>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > >>> head: 1d94330a437a573cfdf848f6743b1ed169242c8a
> > >>> commit: eff8728fe69880d3f7983bec3fb6cea4c306261f vmlinux.lds.h: Add PGO and AutoFDO input sections
> > >>> date: 5 months ago
> > >>> config: parisc-randconfig-r032-20210116 (attached as .config)
> > >>> compiler: hppa64-linux-gcc (GCC) 9.3.0
> > >>> reproduce (this is a W=1 build):
> > >>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> > >>> chmod +x ~/bin/make.cross
> > >>> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eff8728fe69880d3f7983bec3fb6cea4c306261f
> > >>> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > >>> git fetch --no-tags linus master
> > >>> git checkout eff8728fe69880d3f7983bec3fb6cea4c306261f
> > >>> # save the attached .config to linux build tree
> > >>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
> > >>>
> > >>> If you fix the issue, kindly add following tag as appropriate
> > >>> Reported-by: kernel test robot <lkp@intel.com>
> > >>>
> > >>> All errors (new ones prefixed by >>):
> > >>>
> > >>> hppa64-linux-ld: mm/page_alloc.o(.ref.text+0x110): cannot reach unknown
> > >>> hppa64-linux-ld: mm/memblock.o(.text+0x27c): cannot reach __warn_printk
> > >>> hppa64-linux-ld: mm/memblock.o(.meminit.text+0xc4): cannot reach printk
> ....
>
> The problem with this .config is, that both CONFIG_MODULES and
> CONFIG_MLONGCALLS are set to "n".
> The Kconfig autodetection needs fixing to enable CONFIG_MLONGCALLS in
> this case.
>
>
> This patch fixes it for me:
>
> [PATCH] Require -mlong-calls gcc option for !CONFIG_MODULES
>
> When building a kernel without module support, the CONFIG_MLONGCALL
> option needs to be enabled. This patch fixes the autodetection in the
> Kconfig script and uses a far call to preempt_schedule_irq() in
> intr_do_preempt().
>
> Signed-off-by: Helge Deller <deller@gmx.de>
> Reported-by: kernel test robot <lkp@intel.com>
>
> ---
>
> diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
> index 78b17621ee4a..278462186ac4 100644
> --- a/arch/parisc/Kconfig
> +++ b/arch/parisc/Kconfig
> @@ -202,9 +202,8 @@ config PREFETCH
> depends on PA8X00 || PA7200
>
> config MLONGCALLS
> - bool "Enable the -mlong-calls compiler option for big kernels"
> - default y if !MODULES || UBSAN || FTRACE
> - default n
> + def_bool y if !MODULES || UBSAN || FTRACE
> + bool "Enable the -mlong-calls compiler option for big kernels" if MODULES && !UBSAN && !FTRACE
^ this looks like the same constraints specified twice? Am I
understanding that correctly? (I don't understand why this isn't
specified _once_).
> depends on PA8X00
> help
> If you configure the kernel to include many drivers built-in instead
> diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
> index beba9816cc6c..6320f6a8397c 100644
> --- a/arch/parisc/kernel/entry.S
> +++ b/arch/parisc/kernel/entry.S
> @@ -997,10 +997,19 @@ intr_do_preempt:
> bb,<,n %r20, 31 - PSW_SM_I, intr_restore
> nop
>
> - BL preempt_schedule_irq, %r2
> - nop
> + /* ssm PSW_SM_I done later in intr_restore */
> +#ifdef CONFIG_MLONGCALLS
> + ldil L%intr_restore, %r2
> + load32 preempt_schedule_irq, %r1
> + bv %r0(%r1)
> + ldo R%intr_restore(%r2), %r2
> +#else
> + ldil L%intr_restore, %r2
> + BL preempt_schedule_irq
> + ldo R%intr_restore(%r2), %r2
> +#endif
> +
>
> - b,n intr_restore /* ssm PSW_SM_I done by intr_restore */
> #endif /* CONFIG_PREEMPTION */
>
> /*
>
>
--
Thanks,
~Nick Desaulniers
next prev parent reply other threads:[~2021-01-25 21:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-16 14:36 hppa64-linux-ld: mm/hugetlb.o(.text+0x50dc): cannot reach printk kernel test robot
2021-01-25 17:54 ` Nick Desaulniers
2021-01-25 18:34 ` John David Anglin
2021-01-25 19:25 ` Helge Deller
2021-01-25 20:47 ` Helge Deller
2021-01-25 20:58 ` Nick Desaulniers [this message]
2021-01-25 21:05 ` Helge Deller
2021-01-25 20:59 ` Helge Deller
2021-01-25 21:08 ` John David Anglin
2021-01-25 21:13 ` Helge Deller
2021-01-25 21:17 ` John David Anglin
2021-01-25 21:37 ` Helge Deller
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='CAKwvOd=RHb5yQj5kKuvt9BnywNUmRtivPu_qebLG8XXDyr8cCA@mail.gmail.com' \
--to=ndesaulniers@google.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=dave.anglin@bell.net \
--cc=deller@gmx.de \
--cc=kbuild-all@lists.01.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=lkp@intel.com \
--cc=masahiroy@kernel.org \
--cc=mingo@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).