RE: [PATCH/2.6.17-rc4 7/10] Powerpc: workaround for tsi108 pci c onfi g read exception

From: Zang Roy-r61911 <hidden>
Date: 2006-05-18 09:45:39

On Wed, 2006-05-17 at 18:14 +0800, Zang Roy-r61911 wrote:
quoted
Workaround for Tundra Semiconductor tsi108 host bridge pci 
config read
quoted
exception
Use ppc_md.machine_check_exception instead of modifying the generic
traps.c. Also make sure you can't configure your chip not to issue
machine checks on target/master aborts on config space accesses....

Ben.
I will try ppc_md.machine_check_exception.  I am sure this machine check is 
needed. I can not pass the pci probe, if I comment off this code.
Roy.

quoted
Signed-off-by: Alexandre Bounine <redacted>
Signed-off-by: Roy Zang	<redacted>

---

 arch/powerpc/kernel/traps.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

0575fbe21e4f1045528bb91ec4b34bb7955c4a92
diff --git a/arch/powerpc/kernel/traps.c 
b/arch/powerpc/kernel/traps.c
quoted
index 064a525..7468d76 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -262,6 +262,19 @@ #if defined(CONFIG_PPC_PMAC) && defined(
 		}
 	}
 #endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */
+
+#ifdef CONFIG_TSI108_BRIDGE
+	extern void tsi108_clear_pci_cfg_error(void);
+	const struct exception_table_entry *entry;
+
+	/* Are we prepared to handle this fault?  */
+	if ((entry = search_exception_tables(regs->nip)) != NULL) {
+		tsi108_clear_pci_cfg_error();
+		regs->msr |= MSR_RI;
+		regs->nip = entry->fixup;
+		return 1;
+	}
+#endif /* CONFIG_TSI108_BRIDGE */
 	return 0;
 }
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help