Skip to content

Commit 946e105

Browse files
rddunlapstffrdhrn
authored andcommitted
openrisc: don't printk() unconditionally
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: 9d02a42 ("OpenRISC: Boot code") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> 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 Signed-off-by: Stafford Horne <shorne@gmail.com>
1 parent c500bee commit 946e105

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎arch/openrisc/kernel/entry.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ EXCEPTION_ENTRY(_external_irq_handler)
547547
l.bnf 1f // ext irq enabled, all ok.
548548
l.nop
549549

550+
#ifdef CONFIG_PRINTK
550551
l.addi r1,r1,-0x8
551552
l.movhi r3,hi(42f)
552553
l.ori r3,r3,lo(42f)
@@ -560,6 +561,7 @@ EXCEPTION_ENTRY(_external_irq_handler)
560561
.string "\n\rESR interrupt bug: in _external_irq_handler (ESR %x)\n\r"
561562
.align 4
562563
.previous
564+
#endif
563565

564566
l.ori r4,r4,SPR_SR_IEE // fix the bug
565567
// l.sw PT_SR(r1),r4

0 commit comments

Comments
 (0)