From 0999533526025a6cdc6acc6b93838149cd913661 Mon Sep 17 00:00:00 2001 From: Sven Luther Date: Wed, 1 Nov 2006 08:00:32 +0000 Subject: [PATCH] Added interrupt alignement patch from Benjamin Herrenschmidt. svn path=/dists/trunk/linux-2.6/; revision=7672 --- debian/changelog | 5 ++- .../bugfix/powerpc/interrupt-alignement.patch | 39 +++++++++++++++++++ debian/patches/series/4 | 1 + 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 debian/patches/bugfix/powerpc/interrupt-alignement.patch diff --git a/debian/changelog b/debian/changelog index bc7f768f3..c44cb4b4b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -38,7 +38,10 @@ linux-2.6 (2.6.18-4) UNRELEASED; urgency=low * r8169: pull revert mac address change support. * [amd64]: Add upstream fix C3 timer test for dual core laptops. - -- maximilian attems Mon, 30 Oct 2006 16:54:29 +0100 + [ Sven Luther ] + * [powerpc] Added exception alignement patch from Benjamin Herrenschmidt. + + -- Sven Luther Wed, 1 Nov 2006 08:57:13 +0100 linux-2.6 (2.6.18-3) unstable; urgency=low diff --git a/debian/patches/bugfix/powerpc/interrupt-alignement.patch b/debian/patches/bugfix/powerpc/interrupt-alignement.patch new file mode 100644 index 000000000..537edc980 --- /dev/null +++ b/debian/patches/bugfix/powerpc/interrupt-alignement.patch @@ -0,0 +1,39 @@ +# Fixes exceptions alignement. +# Author: Benjamin Herrenschmidt benh at kernel.crashing.org +# Reference: http://ozlabs.org/pipermail/linuxppc-dev/2006-October/027374.html +# Upstream: will be pushed upstream. + +Index: linux-work/arch/powerpc/kernel/traps.c +=================================================================== +--- linux-work.orig/arch/powerpc/kernel/traps.c 2006-10-23 14:41:37.000000000 +1000 ++++ linux-work/arch/powerpc/kernel/traps.c 2006-10-30 13:59:41.000000000 +1100 +@@ -843,7 +843,7 @@ void __kprobes program_check_exception(s + + void alignment_exception(struct pt_regs *regs) + { +- int fixed = 0; ++ int sig, fixed = 0; + + /* we don't implement logging of alignment exceptions */ + if (!(current->thread.align_ctl & PR_UNALIGN_SIGBUS)) +@@ -856,15 +856,11 @@ void alignment_exception(struct pt_regs + } + + /* Operand address was bad */ +- if (fixed == -EFAULT) { +- if (user_mode(regs)) +- _exception(SIGSEGV, regs, SEGV_ACCERR, regs->dar); +- else +- /* Search exception table */ +- bad_page_fault(regs, regs->dar, SIGSEGV); +- return; +- } +- _exception(SIGBUS, regs, BUS_ADRALN, regs->dar); ++ sig = fixed == -EFAULT ? SIGSEGV : SIGBUS; ++ if (user_mode(regs)) ++ _exception(sig, regs, SEGV_ACCERR, regs->dar); ++ else ++ bad_page_fault(regs, regs->dar, sig); + } + + void StackOverflow(struct pt_regs *regs) diff --git a/debian/patches/series/4 b/debian/patches/series/4 index ce19f6f59..b83d5b380 100644 --- a/debian/patches/series/4 +++ b/debian/patches/series/4 @@ -20,3 +20,4 @@ + features/arm/ixp4xx-0.2.1-driver.patch + features/arm/ixp4xx-net-driver-fix-qmgr.patch + features/arm/ixp4xx-net-driver-improve-mac-handling.patch ++ bugfix/powerpc/interrupt-alignement.patch