From 587ab61051a44a2738a9532724753c95e77caa4f Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Tue, 7 Nov 2006 11:01:17 +0000 Subject: [PATCH] [alpha] new asm-subarchs patch: tell the compiler that we're deliberately emitting ev56 or ev6 instructions, so that this code will still compile without having to cripple gcc-4.1's checking of whether the correct instruction set is used. Closes: #397139. svn path=/dists/trunk/linux-2.6/; revision=7710 --- debian/changelog | 8 +++- .../patches/bugfix/alpha/asm-subarchs.patch | 40 +++++++++++++++++++ debian/patches/series/5 | 1 + 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 debian/patches/bugfix/alpha/asm-subarchs.patch diff --git a/debian/changelog b/debian/changelog index 45647242d..e12c93736 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,7 +20,13 @@ linux-2.6 (2.6.18-5) UNRELEASED; urgency=low [ Frederik Schüler ] * [i386] Acticate CONFIG_SX for all flavours. (closes: #391275) - -- Frederik Schüler Tue, 7 Nov 2006 01:00:34 +0100 + [ Steve Langasek ] + * [alpha] new asm-subarchs patch: tell the compiler that we're + deliberately emitting ev56 or ev6 instructions, so that this code + will still compile without having to cripple gcc-4.1's checking of + whether the correct instruction set is used. Closes: #397139. + + -- Steve Langasek Tue, 7 Nov 2006 02:57:56 -0800 linux-2.6 (2.6.18-4) unstable; urgency=low diff --git a/debian/patches/bugfix/alpha/asm-subarchs.patch b/debian/patches/bugfix/alpha/asm-subarchs.patch new file mode 100644 index 000000000..60ffe2019 --- /dev/null +++ b/debian/patches/bugfix/alpha/asm-subarchs.patch @@ -0,0 +1,40 @@ +--- source/include/asm-alpha/compiler.h.orig 2006-09-19 20:42:06.000000000 -0700 ++++ source/include/asm-alpha/compiler.h 2006-11-06 17:10:00.000000000 -0800 +@@ -78,16 +78,20 @@ + #else + #define __kernel_ldbu(mem) \ + ({ unsigned char __kir; \ +- __asm__("ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \ ++ __asm__(".arch ev56; \ ++ ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \ + __kir; }) + #define __kernel_ldwu(mem) \ + ({ unsigned short __kir; \ +- __asm__("ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \ ++ __asm__(".arch ev56; \ ++ ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \ + __kir; }) +-#define __kernel_stb(val,mem) \ +- __asm__("stb %1,%0" : "=m"(mem) : "r"(val)) +-#define __kernel_stw(val,mem) \ +- __asm__("stw %1,%0" : "=m"(mem) : "r"(val)) ++#define __kernel_stb(val,mem) \ ++ __asm__(".arch ev56; \ ++ stb %1,%0" : "=m"(mem) : "r"(val)) ++#define __kernel_stw(val,mem) \ ++ __asm__(".arch ev56; \ ++ stw %1,%0" : "=m"(mem) : "r"(val)) + #endif + + #ifdef __KERNEL__ +--- source/arch/alpha/kernel/sys_titan.c.orig 2006-11-06 23:17:50.000000000 -0800 ++++ source/arch/alpha/kernel/sys_titan.c 2006-11-06 23:17:04.000000000 -0800 +@@ -257,7 +257,7 @@ + */ + while (mask) { + /* convert to SRM vector... priority is <63> -> <0> */ +- __asm__("ctlz %1, %0" : "=r"(vector) : "r"(mask)); ++ __asm__(".arch ev6; ctlz %1, %0" : "=r"(vector) : "r"(mask)); + vector = 63 - vector; + mask &= ~(1UL << vector); /* clear it out */ + vector = 0x900 + (vector << 4); /* convert to SRM vector */ diff --git a/debian/patches/series/5 b/debian/patches/series/5 index 4e27c714c..7134977d6 100644 --- a/debian/patches/series/5 +++ b/debian/patches/series/5 @@ -3,3 +3,4 @@ + bugfix/copy-user-highpage-2.patch - bugfix/ia64/sal-flush-fix.patch + bugfix/ia64/sal-flush-fix-upstream.patch ++ bugfix/alpha/asm-subarchs.patch