All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 6/9] powerpc/32s: Remove TAUException wart in traps.c
Date: Fri, 24 Jul 2020 23:17:25 +1000	[thread overview]
Message-ID: <20200724131728.1643966-6-mpe@ellerman.id.au> (raw)
In-Reply-To: <20200724131728.1643966-1-mpe@ellerman.id.au>

All 32 and 64-bit builds that don't have CONFIG_TAU_INT enabled (all
of them), get a definition of TAUException() in traps.c.

On 64-bit it's completely useless, and just wastes ~120 bytes of text.
On 32-bit it allows the kernel to link because head_32.S calls it
unconditionally.

Instead follow the example of altivec_assist_exception(), and if
CONFIG_TAU_INT is not enabled just point it at unknown_exception using
the preprocessor.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---

Can we just remove TAU_INT entirely? It's in zero defconfigs and
doesn't sound like something anyone really wants to enable:

  However, on some cpus it appears that the TAU interrupt hardware
  is buggy and can cause a situation which would lead unexplained hard
  lockups.

  Unless you are extending the TAU driver, or enjoy kernel/hardware
  debugging, leave this option off.
---
 arch/powerpc/kernel/head_32.S | 4 ++++
 arch/powerpc/kernel/traps.c   | 8 --------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index 705c042309d8..dcfb7dceb6d6 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -671,6 +671,10 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_NEED_DTLB_SW_LRU)
 
 #ifndef CONFIG_ALTIVEC
 #define altivec_assist_exception	unknown_exception
+#endif
+
+#ifndef CONFIG_TAU_INT
+#define TAUException	unknown_exception
 #endif
 
 	EXCEPTION(0x1300, Trap_13, instruction_breakpoint_exception, EXC_XFER_STD)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 97413a385720..d1ebe152f210 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -2060,14 +2060,6 @@ void DebugException(struct pt_regs *regs, unsigned long debug_status)
 NOKPROBE_SYMBOL(DebugException);
 #endif /* CONFIG_PPC_ADV_DEBUG_REGS */
 
-#if !defined(CONFIG_TAU_INT)
-void TAUException(struct pt_regs *regs)
-{
-	printk("TAU trap at PC: %lx, MSR: %lx, vector=%lx    %s\n",
-	       regs->nip, regs->msr, regs->trap, print_tainted());
-}
-#endif /* CONFIG_INT_TAU */
-
 #ifdef CONFIG_ALTIVEC
 void altivec_assist_exception(struct pt_regs *regs)
 {
-- 
2.25.1


  parent reply	other threads:[~2020-07-24 13:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24 13:17 [PATCH 1/9] powerpc/configs: Drop old symbols from ppc6xx_defconfig Michael Ellerman
2020-07-24 13:17 ` [PATCH 2/9] powerpc/configs: Remove dead symbols Michael Ellerman
2020-07-24 13:17 ` [PATCH 3/9] powerpc/52xx: Fix comment about CONFIG_BDI* Michael Ellerman
2020-07-24 13:17 ` [PATCH 4/9] powerpc/64e: Drop dead BOOK3E_MMU_TLB_STATS code Michael Ellerman
2020-07-24 13:17 ` [PATCH 5/9] powerpc/32s: Fix CONFIG_BOOK3S_601 uses Michael Ellerman
2020-07-24 18:42   ` Christophe Leroy
2020-07-24 13:17 ` Michael Ellerman [this message]
2020-07-24 13:17 ` [PATCH 7/9] powerpc/boot: Fix CONFIG_PPC_MPC52XX references Michael Ellerman
2020-07-24 13:17 ` [PATCH 8/9] powerpc/kvm: Use correct CONFIG symbol in comment Michael Ellerman
2020-07-24 13:17 ` [PATCH 9/9] powerpc: Drop old comment about CONFIG_POWER Michael Ellerman
2020-07-30 12:50 ` [PATCH 1/9] powerpc/configs: Drop old symbols from ppc6xx_defconfig Michael Ellerman

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=20200724131728.1643966-6-mpe@ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.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.