From: Stafford Horne <shorne@gmail.com>
To: openrisc@lists.librecores.org
Subject: [OpenRISC] [PATCH] openrisc: don't printk() unconditionally
Date: Mon, 19 Jul 2021 13:38:13 +0900 [thread overview]
Message-ID: <YPUBtf2OvD9Y017n@antec> (raw)
In-Reply-To: <20210719023309.15808-1-rdunlap@infradead.org>
On Sun, Jul 18, 2021 at 07:33:09PM -0700, Randy Dunlap wrote:
> Don't call printk() when CONFIG_PRINTK is not set.
> Fixes the following build errors:
>
> or1k-linux-ld: arch/openrisc/kernel/entry.o: in function `_external_irq_handler':
> (.text+0x804): undefined reference to `printk'
> (.text+0x804): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `printk'
>
> Fixes: 9d02a4283e9c ("OpenRISC: Boot code")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Thanks!
This looks OK to me, I will queue it for 5.15 unless anyone thinks it should go
in now.
-Stafford
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Jonas Bonn <jonas@southpole.se>
> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> Cc: Stafford Horne <shorne@gmail.com>
> Cc: openrisc at lists.librecores.org
> ---
> arch/openrisc/kernel/entry.S | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linux-next-20210716.orig/arch/openrisc/kernel/entry.S
> +++ linux-next-20210716/arch/openrisc/kernel/entry.S
> @@ -547,6 +547,7 @@ EXCEPTION_ENTRY(_external_irq_handler)
> l.bnf 1f // ext irq enabled, all ok.
> l.nop
>
> +#ifdef CONFIG_PRINTK
> l.addi r1,r1,-0x8
> l.movhi r3,hi(42f)
> l.ori r3,r3,lo(42f)
> @@ -560,6 +561,7 @@ EXCEPTION_ENTRY(_external_irq_handler)
> .string "\n\rESR interrupt bug: in _external_irq_handler (ESR %x)\n\r"
> .align 4
> .previous
> +#endif
>
> l.ori r4,r4,SPR_SR_IEE // fix the bug
> // l.sw PT_SR(r1),r4
WARNING: multiple messages have this Message-ID (diff)
From: Stafford Horne <shorne@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>,
Jonas Bonn <jonas@southpole.se>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
openrisc@lists.librecores.org
Subject: Re: [PATCH] openrisc: don't printk() unconditionally
Date: Mon, 19 Jul 2021 13:38:13 +0900 [thread overview]
Message-ID: <YPUBtf2OvD9Y017n@antec> (raw)
In-Reply-To: <20210719023309.15808-1-rdunlap@infradead.org>
On Sun, Jul 18, 2021 at 07:33:09PM -0700, Randy Dunlap wrote:
> Don't call printk() when CONFIG_PRINTK is not set.
> Fixes the following build errors:
>
> or1k-linux-ld: arch/openrisc/kernel/entry.o: in function `_external_irq_handler':
> (.text+0x804): undefined reference to `printk'
> (.text+0x804): relocation truncated to fit: R_OR1K_INSN_REL_26 against undefined symbol `printk'
>
> Fixes: 9d02a4283e9c ("OpenRISC: Boot code")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Thanks!
This looks OK to me, I will queue it for 5.15 unless anyone thinks it should go
in now.
-Stafford
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Jonas Bonn <jonas@southpole.se>
> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
> Cc: Stafford Horne <shorne@gmail.com>
> Cc: openrisc@lists.librecores.org
> ---
> arch/openrisc/kernel/entry.S | 2 ++
> 1 file changed, 2 insertions(+)
>
> --- linux-next-20210716.orig/arch/openrisc/kernel/entry.S
> +++ linux-next-20210716/arch/openrisc/kernel/entry.S
> @@ -547,6 +547,7 @@ EXCEPTION_ENTRY(_external_irq_handler)
> l.bnf 1f // ext irq enabled, all ok.
> l.nop
>
> +#ifdef CONFIG_PRINTK
> l.addi r1,r1,-0x8
> l.movhi r3,hi(42f)
> l.ori r3,r3,lo(42f)
> @@ -560,6 +561,7 @@ EXCEPTION_ENTRY(_external_irq_handler)
> .string "\n\rESR interrupt bug: in _external_irq_handler (ESR %x)\n\r"
> .align 4
> .previous
> +#endif
>
> l.ori r4,r4,SPR_SR_IEE // fix the bug
> // l.sw PT_SR(r1),r4
next prev parent reply other threads:[~2021-07-19 4:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 2:33 [OpenRISC] [PATCH] openrisc: don't printk() unconditionally Randy Dunlap
2021-07-19 2:33 ` Randy Dunlap
2021-07-19 4:38 ` Stafford Horne [this message]
2021-07-19 4:38 ` Stafford Horne
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=YPUBtf2OvD9Y017n@antec \
--to=shorne@gmail.com \
--cc=openrisc@lists.librecores.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 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.