LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: Reminder: removal of APUS and Gemini still pending
From: Christoph Hellwig @ 2005-09-19  9:10 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: ppc-dev list
In-Reply-To: <17197.58312.715169.991104@cargo.ozlabs.ibm.com>

On Mon, Sep 19, 2005 at 08:01:44AM +1000, Paul Mackerras wrote:
> That sounds like a mistake to me...
> 
> > get proper changesets with attribution instead of a big patch (the plan 
> > is to forward-merge the changes until after the transition, then turn 
> > them back into a diff and apply them step by step).
> 
> One of the things I particularly want to do is to remove the special
> cases in the virtual<->physical address translations for APUS.
> Perhaps the sparsemem or discontigmem code could be used instead?

The apus codedrop Sven put into the Debian Kernel SVN repo has this
removed, see:

http://svn.debian.org/wsvn/kernel/dists/trunk/linux-2.6/debian/patches-debian/powerpc-apus.patch?op=file&rev=0&sc=0

even if apus folks don't want to merge now all the core touching parts
of that patch should go in as they clanup the ifdef APUS mess quite a
lot.

^ permalink raw reply

* ATI Radeon M6-C16h for PPC 440GX
From: Roberto Pavon Sierra @ 2005-09-19  8:56 UTC (permalink / raw)
  To: linuxppc-embedded

Hello,

i´m using on my custom board with PPC 440GX a ATI M6 Mobility Radeon with
kernel 2.6.12.
Now i have to initialize the ati and configure the kernel to support it.
I don´t have the BIOS of ATI for PPC and i like to simulate this BIOS with
U-boot. How can i configure the U-boot for ATI to initialize or how can i
write the programm for ATI- EEPROM BIOS?
must i install a XF86-Simulator on my board?

^ permalink raw reply

* [PATCH] powerpc: Merge include/asm-ppc*/a.out.h into include/asm-powerpc
From: Stephen Rothwell @ 2005-09-19  7:50 UTC (permalink / raw)
  To: paulus; +Cc: ppc64-dev, ppc-dev


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---

 include/asm-powerpc/a.out.h |   36 ++++++++++++++++++++++++++++++++++++
 include/asm-ppc/a.out.h     |   26 --------------------------
 include/asm-ppc64/a.out.h   |   39 ---------------------------------------
 3 files changed, 36 insertions(+), 65 deletions(-)
 create mode 100644 include/asm-powerpc/a.out.h
 delete mode 100644 include/asm-ppc/a.out.h
 delete mode 100644 include/asm-ppc64/a.out.h

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

e4be8c960725725bccb547e84104e3fefca27f1
diff --git a/include/asm-powerpc/a.out.h b/include/asm-powerpc/a.out.h
new file mode 100644
--- /dev/null
+++ b/include/asm-powerpc/a.out.h
@@ -0,0 +1,36 @@
+#ifndef _ASM_POWERPC_A_OUT_H
+#define _ASM_POWERPC_A_OUT_H
+
+struct exec
+{
+	unsigned long a_info;	/* Use macros N_MAGIC, etc for access */
+	unsigned a_text;	/* length of text, in bytes */
+	unsigned a_data;	/* length of data, in bytes */
+	unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
+	unsigned a_syms;	/* length of symbol table data in file, in bytes */
+	unsigned a_entry;	/* start address */
+	unsigned a_trsize;	/* length of relocation info for text, in bytes */
+	unsigned a_drsize;	/* length of relocation info for data, in bytes */
+};
+
+#define N_TRSIZE(a)	((a).a_trsize)
+#define N_DRSIZE(a)	((a).a_drsize)
+#define N_SYMSIZE(a)	((a).a_syms)
+
+#ifdef __KERNEL__
+#ifdef __powerpc64__
+
+#define STACK_TOP_USER64 TASK_SIZE_USER64
+#define STACK_TOP_USER32 TASK_SIZE_USER32
+
+#define STACK_TOP (test_thread_flag(TIF_32BIT) ? \
+		   STACK_TOP_USER32 : STACK_TOP_USER64)
+
+#else /* __powerpc64__ */
+
+#define STACK_TOP TASK_SIZE
+
+#endif /* __powerpc64__ */
+#endif /* __KERNEL__ */
+
+#endif /* _ASM_POWERPC_A_OUT_H */
diff --git a/include/asm-ppc/a.out.h b/include/asm-ppc/a.out.h
deleted file mode 100644
--- a/include/asm-ppc/a.out.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef __PPC_A_OUT_H__
-#define __PPC_A_OUT_H__
-
-/* grabbed from the intel stuff  */
-#define STACK_TOP TASK_SIZE
-
-
-struct exec
-{
-  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
-  unsigned a_text;		/* length of text, in bytes */
-  unsigned a_data;		/* length of data, in bytes */
-  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-  unsigned a_syms;		/* length of symbol table data in file, in bytes */
-  unsigned a_entry;		/* start address */
-  unsigned a_trsize;		/* length of relocation info for text, in bytes */
-  unsigned a_drsize;		/* length of relocation info for data, in bytes */
-};
-
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-
-#endif
diff --git a/include/asm-ppc64/a.out.h b/include/asm-ppc64/a.out.h
deleted file mode 100644
--- a/include/asm-ppc64/a.out.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef __PPC64_A_OUT_H__
-#define __PPC64_A_OUT_H__
-
-/*
- * c 2001 PPC 64 Team, IBM Corp
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-struct exec
-{
-	unsigned long a_info;	/* Use macros N_MAGIC, etc for access */
-	unsigned a_text;	/* length of text, in bytes */
-	unsigned a_data;	/* length of data, in bytes */
-	unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
-	unsigned a_syms;	/* length of symbol table data in file, in bytes */
-	unsigned a_entry;	/* start address */
-	unsigned a_trsize;	/* length of relocation info for text, in bytes */
-	unsigned a_drsize;	/* length of relocation info for data, in bytes */
-};
-
-#define N_TRSIZE(a)	((a).a_trsize)
-#define N_DRSIZE(a)	((a).a_drsize)
-#define N_SYMSIZE(a)	((a).a_syms)
-
-#ifdef __KERNEL__
-
-#define STACK_TOP_USER64 TASK_SIZE_USER64
-#define STACK_TOP_USER32 TASK_SIZE_USER32
-
-#define STACK_TOP (test_thread_flag(TIF_32BIT) ? \
-		   STACK_TOP_USER32 : STACK_TOP_USER64)
-
-#endif /* __KERNEL__ */
-
-#endif /* __PPC64_A_OUT_H__ */

^ permalink raw reply

* [PATCH] powerpc: Move arch/ppc*/kernel/vecemu.c to arch/powerpc
From: Stephen Rothwell @ 2005-09-19  7:33 UTC (permalink / raw)
  To: paulus; +Cc: ppc64-dev, ppc-dev

This file is the same in both architectures so create arch/powerpc/kernel
and move it there.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---

 arch/powerpc/kernel/vecemu.c |  345 ++++++++++++++++++++++++++++++++++++++++++
 arch/ppc/kernel/Makefile     |    2 
 arch/ppc/kernel/vecemu.c     |  345 ------------------------------------------
 arch/ppc64/kernel/Makefile   |    3 
 arch/ppc64/kernel/vecemu.c   |  346 ------------------------------------------
 5 files changed, 350 insertions(+), 691 deletions(-)
 create mode 100644 arch/powerpc/kernel/vecemu.c
 delete mode 100644 arch/ppc/kernel/vecemu.c
 delete mode 100644 arch/ppc64/kernel/vecemu.c

Compiled for ppc defconfig, iSeries (almost defconfig), pSeries defconfig and g5 defconfig.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

672ea98fe3cd3ce7371198fc000d37808667f64c
diff --git a/arch/powerpc/kernel/vecemu.c b/arch/powerpc/kernel/vecemu.c
new file mode 100644
--- /dev/null
+++ b/arch/powerpc/kernel/vecemu.c
@@ -0,0 +1,345 @@
+/*
+ * Routines to emulate some Altivec/VMX instructions, specifically
+ * those that can trap when given denormalized operands in Java mode.
+ */
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <asm/ptrace.h>
+#include <asm/processor.h>
+#include <asm/uaccess.h>
+
+/* Functions in vector.S */
+extern void vaddfp(vector128 *dst, vector128 *a, vector128 *b);
+extern void vsubfp(vector128 *dst, vector128 *a, vector128 *b);
+extern void vmaddfp(vector128 *dst, vector128 *a, vector128 *b, vector128 *c);
+extern void vnmsubfp(vector128 *dst, vector128 *a, vector128 *b, vector128 *c);
+extern void vrefp(vector128 *dst, vector128 *src);
+extern void vrsqrtefp(vector128 *dst, vector128 *src);
+extern void vexptep(vector128 *dst, vector128 *src);
+
+static unsigned int exp2s[8] = {
+	0x800000,
+	0x8b95c2,
+	0x9837f0,
+	0xa5fed7,
+	0xb504f3,
+	0xc5672a,
+	0xd744fd,
+	0xeac0c7
+};
+
+/*
+ * Computes an estimate of 2^x.  The `s' argument is the 32-bit
+ * single-precision floating-point representation of x.
+ */
+static unsigned int eexp2(unsigned int s)
+{
+	int exp, pwr;
+	unsigned int mant, frac;
+
+	/* extract exponent field from input */
+	exp = ((s >> 23) & 0xff) - 127;
+	if (exp > 7) {
+		/* check for NaN input */
+		if (exp == 128 && (s & 0x7fffff) != 0)
+			return s | 0x400000;	/* return QNaN */
+		/* 2^-big = 0, 2^+big = +Inf */
+		return (s & 0x80000000)? 0: 0x7f800000;	/* 0 or +Inf */
+	}
+	if (exp < -23)
+		return 0x3f800000;	/* 1.0 */
+
+	/* convert to fixed point integer in 9.23 representation */
+	pwr = (s & 0x7fffff) | 0x800000;
+	if (exp > 0)
+		pwr <<= exp;
+	else
+		pwr >>= -exp;
+	if (s & 0x80000000)
+		pwr = -pwr;
+
+	/* extract integer part, which becomes exponent part of result */
+	exp = (pwr >> 23) + 126;
+	if (exp >= 254)
+		return 0x7f800000;
+	if (exp < -23)
+		return 0;
+
+	/* table lookup on top 3 bits of fraction to get mantissa */
+	mant = exp2s[(pwr >> 20) & 7];
+
+	/* linear interpolation using remaining 20 bits of fraction */
+	asm("mulhwu %0,%1,%2" : "=r" (frac)
+	    : "r" (pwr << 12), "r" (0x172b83ff));
+	asm("mulhwu %0,%1,%2" : "=r" (frac) : "r" (frac), "r" (mant));
+	mant += frac;
+
+	if (exp >= 0)
+		return mant + (exp << 23);
+
+	/* denormalized result */
+	exp = -exp;
+	mant += 1 << (exp - 1);
+	return mant >> exp;
+}
+
+/*
+ * Computes an estimate of log_2(x).  The `s' argument is the 32-bit
+ * single-precision floating-point representation of x.
+ */
+static unsigned int elog2(unsigned int s)
+{
+	int exp, mant, lz, frac;
+
+	exp = s & 0x7f800000;
+	mant = s & 0x7fffff;
+	if (exp == 0x7f800000) {	/* Inf or NaN */
+		if (mant != 0)
+			s |= 0x400000;	/* turn NaN into QNaN */
+		return s;
+	}
+	if ((exp | mant) == 0)		/* +0 or -0 */
+		return 0xff800000;	/* return -Inf */
+
+	if (exp == 0) {
+		/* denormalized */
+		asm("cntlzw %0,%1" : "=r" (lz) : "r" (mant));
+		mant <<= lz - 8;
+		exp = (-118 - lz) << 23;
+	} else {
+		mant |= 0x800000;
+		exp -= 127 << 23;
+	}
+
+	if (mant >= 0xb504f3) {				/* 2^0.5 * 2^23 */
+		exp |= 0x400000;			/* 0.5 * 2^23 */
+		asm("mulhwu %0,%1,%2" : "=r" (mant)
+		    : "r" (mant), "r" (0xb504f334));	/* 2^-0.5 * 2^32 */
+	}
+	if (mant >= 0x9837f0) {				/* 2^0.25 * 2^23 */
+		exp |= 0x200000;			/* 0.25 * 2^23 */
+		asm("mulhwu %0,%1,%2" : "=r" (mant)
+		    : "r" (mant), "r" (0xd744fccb));	/* 2^-0.25 * 2^32 */
+	}
+	if (mant >= 0x8b95c2) {				/* 2^0.125 * 2^23 */
+		exp |= 0x100000;			/* 0.125 * 2^23 */
+		asm("mulhwu %0,%1,%2" : "=r" (mant)
+		    : "r" (mant), "r" (0xeac0c6e8));	/* 2^-0.125 * 2^32 */
+	}
+	if (mant > 0x800000) {				/* 1.0 * 2^23 */
+		/* calculate (mant - 1) * 1.381097463 */
+		/* 1.381097463 == 0.125 / (2^0.125 - 1) */
+		asm("mulhwu %0,%1,%2" : "=r" (frac)
+		    : "r" ((mant - 0x800000) << 1), "r" (0xb0c7cd3a));
+		exp += frac;
+	}
+	s = exp & 0x80000000;
+	if (exp != 0) {
+		if (s)
+			exp = -exp;
+		asm("cntlzw %0,%1" : "=r" (lz) : "r" (exp));
+		lz = 8 - lz;
+		if (lz > 0)
+			exp >>= lz;
+		else if (lz < 0)
+			exp <<= -lz;
+		s += ((lz + 126) << 23) + exp;
+	}
+	return s;
+}
+
+#define VSCR_SAT	1
+
+static int ctsxs(unsigned int x, int scale, unsigned int *vscrp)
+{
+	int exp, mant;
+
+	exp = (x >> 23) & 0xff;
+	mant = x & 0x7fffff;
+	if (exp == 255 && mant != 0)
+		return 0;		/* NaN -> 0 */
+	exp = exp - 127 + scale;
+	if (exp < 0)
+		return 0;		/* round towards zero */
+	if (exp >= 31) {
+		/* saturate, unless the result would be -2^31 */
+		if (x + (scale << 23) != 0xcf000000)
+			*vscrp |= VSCR_SAT;
+		return (x & 0x80000000)? 0x80000000: 0x7fffffff;
+	}
+	mant |= 0x800000;
+	mant = (mant << 7) >> (30 - exp);
+	return (x & 0x80000000)? -mant: mant;
+}
+
+static unsigned int ctuxs(unsigned int x, int scale, unsigned int *vscrp)
+{
+	int exp;
+	unsigned int mant;
+
+	exp = (x >> 23) & 0xff;
+	mant = x & 0x7fffff;
+	if (exp == 255 && mant != 0)
+		return 0;		/* NaN -> 0 */
+	exp = exp - 127 + scale;
+	if (exp < 0)
+		return 0;		/* round towards zero */
+	if (x & 0x80000000) {
+		/* negative => saturate to 0 */
+		*vscrp |= VSCR_SAT;
+		return 0;
+	}
+	if (exp >= 32) {
+		/* saturate */
+		*vscrp |= VSCR_SAT;
+		return 0xffffffff;
+	}
+	mant |= 0x800000;
+	mant = (mant << 8) >> (31 - exp);
+	return mant;
+}
+
+/* Round to floating integer, towards 0 */
+static unsigned int rfiz(unsigned int x)
+{
+	int exp;
+
+	exp = ((x >> 23) & 0xff) - 127;
+	if (exp == 128 && (x & 0x7fffff) != 0)
+		return x | 0x400000;	/* NaN -> make it a QNaN */
+	if (exp >= 23)
+		return x;		/* it's an integer already (or Inf) */
+	if (exp < 0)
+		return x & 0x80000000;	/* |x| < 1.0 rounds to 0 */
+	return x & ~(0x7fffff >> exp);
+}
+
+/* Round to floating integer, towards +/- Inf */
+static unsigned int rfii(unsigned int x)
+{
+	int exp, mask;
+
+	exp = ((x >> 23) & 0xff) - 127;
+	if (exp == 128 && (x & 0x7fffff) != 0)
+		return x | 0x400000;	/* NaN -> make it a QNaN */
+	if (exp >= 23)
+		return x;		/* it's an integer already (or Inf) */
+	if ((x & 0x7fffffff) == 0)
+		return x;		/* +/-0 -> +/-0 */
+	if (exp < 0)
+		/* 0 < |x| < 1.0 rounds to +/- 1.0 */
+		return (x & 0x80000000) | 0x3f800000;
+	mask = 0x7fffff >> exp;
+	/* mantissa overflows into exponent - that's OK,
+	   it can't overflow into the sign bit */
+	return (x + mask) & ~mask;
+}
+
+/* Round to floating integer, to nearest */
+static unsigned int rfin(unsigned int x)
+{
+	int exp, half;
+
+	exp = ((x >> 23) & 0xff) - 127;
+	if (exp == 128 && (x & 0x7fffff) != 0)
+		return x | 0x400000;	/* NaN -> make it a QNaN */
+	if (exp >= 23)
+		return x;		/* it's an integer already (or Inf) */
+	if (exp < -1)
+		return x & 0x80000000;	/* |x| < 0.5 -> +/-0 */
+	if (exp == -1)
+		/* 0.5 <= |x| < 1.0 rounds to +/- 1.0 */
+		return (x & 0x80000000) | 0x3f800000;
+	half = 0x400000 >> exp;
+	/* add 0.5 to the magnitude and chop off the fraction bits */
+	return (x + half) & ~(0x7fffff >> exp);
+}
+
+int emulate_altivec(struct pt_regs *regs)
+{
+	unsigned int instr, i;
+	unsigned int va, vb, vc, vd;
+	vector128 *vrs;
+
+	if (get_user(instr, (unsigned int __user *) regs->nip))
+		return -EFAULT;
+	if ((instr >> 26) != 4)
+		return -EINVAL;		/* not an altivec instruction */
+	vd = (instr >> 21) & 0x1f;
+	va = (instr >> 16) & 0x1f;
+	vb = (instr >> 11) & 0x1f;
+	vc = (instr >> 6) & 0x1f;
+
+	vrs = current->thread.vr;
+	switch (instr & 0x3f) {
+	case 10:
+		switch (vc) {
+		case 0:	/* vaddfp */
+			vaddfp(&vrs[vd], &vrs[va], &vrs[vb]);
+			break;
+		case 1:	/* vsubfp */
+			vsubfp(&vrs[vd], &vrs[va], &vrs[vb]);
+			break;
+		case 4:	/* vrefp */
+			vrefp(&vrs[vd], &vrs[vb]);
+			break;
+		case 5:	/* vrsqrtefp */
+			vrsqrtefp(&vrs[vd], &vrs[vb]);
+			break;
+		case 6:	/* vexptefp */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = eexp2(vrs[vb].u[i]);
+			break;
+		case 7:	/* vlogefp */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = elog2(vrs[vb].u[i]);
+			break;
+		case 8:		/* vrfin */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = rfin(vrs[vb].u[i]);
+			break;
+		case 9:		/* vrfiz */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = rfiz(vrs[vb].u[i]);
+			break;
+		case 10:	/* vrfip */
+			for (i = 0; i < 4; ++i) {
+				u32 x = vrs[vb].u[i];
+				x = (x & 0x80000000)? rfiz(x): rfii(x);
+				vrs[vd].u[i] = x;
+			}
+			break;
+		case 11:	/* vrfim */
+			for (i = 0; i < 4; ++i) {
+				u32 x = vrs[vb].u[i];
+				x = (x & 0x80000000)? rfii(x): rfiz(x);
+				vrs[vd].u[i] = x;
+			}
+			break;
+		case 14:	/* vctuxs */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = ctuxs(vrs[vb].u[i], va,
+						&current->thread.vscr.u[3]);
+			break;
+		case 15:	/* vctsxs */
+			for (i = 0; i < 4; ++i)
+				vrs[vd].u[i] = ctsxs(vrs[vb].u[i], va,
+						&current->thread.vscr.u[3]);
+			break;
+		default:
+			return -EINVAL;
+		}
+		break;
+	case 46:	/* vmaddfp */
+		vmaddfp(&vrs[vd], &vrs[va], &vrs[vb], &vrs[vc]);
+		break;
+	case 47:	/* vnmsubfp */
+		vnmsubfp(&vrs[vd], &vrs[va], &vrs[vb], &vrs[vc]);
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return 0;
+}
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
--- a/arch/ppc/kernel/Makefile
+++ b/arch/ppc/kernel/Makefile
@@ -36,3 +36,5 @@ ifndef CONFIG_MATH_EMULATION
 obj-$(CONFIG_8xx)		+= softemu8xx.o
 endif
 
+# These are here while we do the architecture merge
+vecemu-y			+= ../../powerpc/kernel/vecemu.o
diff --git a/arch/ppc/kernel/vecemu.c b/arch/ppc/kernel/vecemu.c
deleted file mode 100644
--- a/arch/ppc/kernel/vecemu.c
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Routines to emulate some Altivec/VMX instructions, specifically
- * those that can trap when given denormalized operands in Java mode.
- */
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <asm/ptrace.h>
-#include <asm/processor.h>
-#include <asm/uaccess.h>
-
-/* Functions in vector.S */
-extern void vaddfp(vector128 *dst, vector128 *a, vector128 *b);
-extern void vsubfp(vector128 *dst, vector128 *a, vector128 *b);
-extern void vmaddfp(vector128 *dst, vector128 *a, vector128 *b, vector128 *c);
-extern void vnmsubfp(vector128 *dst, vector128 *a, vector128 *b, vector128 *c);
-extern void vrefp(vector128 *dst, vector128 *src);
-extern void vrsqrtefp(vector128 *dst, vector128 *src);
-extern void vexptep(vector128 *dst, vector128 *src);
-
-static unsigned int exp2s[8] = {
-	0x800000,
-	0x8b95c2,
-	0x9837f0,
-	0xa5fed7,
-	0xb504f3,
-	0xc5672a,
-	0xd744fd,
-	0xeac0c7
-};
-
-/*
- * Computes an estimate of 2^x.  The `s' argument is the 32-bit
- * single-precision floating-point representation of x.
- */
-static unsigned int eexp2(unsigned int s)
-{
-	int exp, pwr;
-	unsigned int mant, frac;
-
-	/* extract exponent field from input */
-	exp = ((s >> 23) & 0xff) - 127;
-	if (exp > 7) {
-		/* check for NaN input */
-		if (exp == 128 && (s & 0x7fffff) != 0)
-			return s | 0x400000;	/* return QNaN */
-		/* 2^-big = 0, 2^+big = +Inf */
-		return (s & 0x80000000)? 0: 0x7f800000;	/* 0 or +Inf */
-	}
-	if (exp < -23)
-		return 0x3f800000;	/* 1.0 */
-
-	/* convert to fixed point integer in 9.23 representation */
-	pwr = (s & 0x7fffff) | 0x800000;
-	if (exp > 0)
-		pwr <<= exp;
-	else
-		pwr >>= -exp;
-	if (s & 0x80000000)
-		pwr = -pwr;
-
-	/* extract integer part, which becomes exponent part of result */
-	exp = (pwr >> 23) + 126;
-	if (exp >= 254)
-		return 0x7f800000;
-	if (exp < -23)
-		return 0;
-
-	/* table lookup on top 3 bits of fraction to get mantissa */
-	mant = exp2s[(pwr >> 20) & 7];
-
-	/* linear interpolation using remaining 20 bits of fraction */
-	asm("mulhwu %0,%1,%2" : "=r" (frac)
-	    : "r" (pwr << 12), "r" (0x172b83ff));
-	asm("mulhwu %0,%1,%2" : "=r" (frac) : "r" (frac), "r" (mant));
-	mant += frac;
-
-	if (exp >= 0)
-		return mant + (exp << 23);
-
-	/* denormalized result */
-	exp = -exp;
-	mant += 1 << (exp - 1);
-	return mant >> exp;
-}
-
-/*
- * Computes an estimate of log_2(x).  The `s' argument is the 32-bit
- * single-precision floating-point representation of x.
- */
-static unsigned int elog2(unsigned int s)
-{
-	int exp, mant, lz, frac;
-
-	exp = s & 0x7f800000;
-	mant = s & 0x7fffff;
-	if (exp == 0x7f800000) {	/* Inf or NaN */
-		if (mant != 0)
-			s |= 0x400000;	/* turn NaN into QNaN */
-		return s;
-	}
-	if ((exp | mant) == 0)		/* +0 or -0 */
-		return 0xff800000;	/* return -Inf */
-
-	if (exp == 0) {
-		/* denormalized */
-		asm("cntlzw %0,%1" : "=r" (lz) : "r" (mant));
-		mant <<= lz - 8;
-		exp = (-118 - lz) << 23;
-	} else {
-		mant |= 0x800000;
-		exp -= 127 << 23;
-	}
-
-	if (mant >= 0xb504f3) {				/* 2^0.5 * 2^23 */
-		exp |= 0x400000;			/* 0.5 * 2^23 */
-		asm("mulhwu %0,%1,%2" : "=r" (mant)
-		    : "r" (mant), "r" (0xb504f334));	/* 2^-0.5 * 2^32 */
-	}
-	if (mant >= 0x9837f0) {				/* 2^0.25 * 2^23 */
-		exp |= 0x200000;			/* 0.25 * 2^23 */
-		asm("mulhwu %0,%1,%2" : "=r" (mant)
-		    : "r" (mant), "r" (0xd744fccb));	/* 2^-0.25 * 2^32 */
-	}
-	if (mant >= 0x8b95c2) {				/* 2^0.125 * 2^23 */
-		exp |= 0x100000;			/* 0.125 * 2^23 */
-		asm("mulhwu %0,%1,%2" : "=r" (mant)
-		    : "r" (mant), "r" (0xeac0c6e8));	/* 2^-0.125 * 2^32 */
-	}
-	if (mant > 0x800000) {				/* 1.0 * 2^23 */
-		/* calculate (mant - 1) * 1.381097463 */
-		/* 1.381097463 == 0.125 / (2^0.125 - 1) */
-		asm("mulhwu %0,%1,%2" : "=r" (frac)
-		    : "r" ((mant - 0x800000) << 1), "r" (0xb0c7cd3a));
-		exp += frac;
-	}
-	s = exp & 0x80000000;
-	if (exp != 0) {
-		if (s)
-			exp = -exp;
-		asm("cntlzw %0,%1" : "=r" (lz) : "r" (exp));
-		lz = 8 - lz;
-		if (lz > 0)
-			exp >>= lz;
-		else if (lz < 0)
-			exp <<= -lz;
-		s += ((lz + 126) << 23) + exp;
-	}
-	return s;
-}
-
-#define VSCR_SAT	1
-
-static int ctsxs(unsigned int x, int scale, unsigned int *vscrp)
-{
-	int exp, mant;
-
-	exp = (x >> 23) & 0xff;
-	mant = x & 0x7fffff;
-	if (exp == 255 && mant != 0)
-		return 0;		/* NaN -> 0 */
-	exp = exp - 127 + scale;
-	if (exp < 0)
-		return 0;		/* round towards zero */
-	if (exp >= 31) {
-		/* saturate, unless the result would be -2^31 */
-		if (x + (scale << 23) != 0xcf000000)
-			*vscrp |= VSCR_SAT;
-		return (x & 0x80000000)? 0x80000000: 0x7fffffff;
-	}
-	mant |= 0x800000;
-	mant = (mant << 7) >> (30 - exp);
-	return (x & 0x80000000)? -mant: mant;
-}
-
-static unsigned int ctuxs(unsigned int x, int scale, unsigned int *vscrp)
-{
-	int exp;
-	unsigned int mant;
-
-	exp = (x >> 23) & 0xff;
-	mant = x & 0x7fffff;
-	if (exp == 255 && mant != 0)
-		return 0;		/* NaN -> 0 */
-	exp = exp - 127 + scale;
-	if (exp < 0)
-		return 0;		/* round towards zero */
-	if (x & 0x80000000) {
-		/* negative => saturate to 0 */
-		*vscrp |= VSCR_SAT;
-		return 0;
-	}
-	if (exp >= 32) {
-		/* saturate */
-		*vscrp |= VSCR_SAT;
-		return 0xffffffff;
-	}
-	mant |= 0x800000;
-	mant = (mant << 8) >> (31 - exp);
-	return mant;
-}
-
-/* Round to floating integer, towards 0 */
-static unsigned int rfiz(unsigned int x)
-{
-	int exp;
-
-	exp = ((x >> 23) & 0xff) - 127;
-	if (exp == 128 && (x & 0x7fffff) != 0)
-		return x | 0x400000;	/* NaN -> make it a QNaN */
-	if (exp >= 23)
-		return x;		/* it's an integer already (or Inf) */
-	if (exp < 0)
-		return x & 0x80000000;	/* |x| < 1.0 rounds to 0 */
-	return x & ~(0x7fffff >> exp);
-}
-
-/* Round to floating integer, towards +/- Inf */
-static unsigned int rfii(unsigned int x)
-{
-	int exp, mask;
-
-	exp = ((x >> 23) & 0xff) - 127;
-	if (exp == 128 && (x & 0x7fffff) != 0)
-		return x | 0x400000;	/* NaN -> make it a QNaN */
-	if (exp >= 23)
-		return x;		/* it's an integer already (or Inf) */
-	if ((x & 0x7fffffff) == 0)
-		return x;		/* +/-0 -> +/-0 */
-	if (exp < 0)
-		/* 0 < |x| < 1.0 rounds to +/- 1.0 */
-		return (x & 0x80000000) | 0x3f800000;
-	mask = 0x7fffff >> exp;
-	/* mantissa overflows into exponent - that's OK,
-	   it can't overflow into the sign bit */
-	return (x + mask) & ~mask;
-}
-
-/* Round to floating integer, to nearest */
-static unsigned int rfin(unsigned int x)
-{
-	int exp, half;
-
-	exp = ((x >> 23) & 0xff) - 127;
-	if (exp == 128 && (x & 0x7fffff) != 0)
-		return x | 0x400000;	/* NaN -> make it a QNaN */
-	if (exp >= 23)
-		return x;		/* it's an integer already (or Inf) */
-	if (exp < -1)
-		return x & 0x80000000;	/* |x| < 0.5 -> +/-0 */
-	if (exp == -1)
-		/* 0.5 <= |x| < 1.0 rounds to +/- 1.0 */
-		return (x & 0x80000000) | 0x3f800000;
-	half = 0x400000 >> exp;
-	/* add 0.5 to the magnitude and chop off the fraction bits */
-	return (x + half) & ~(0x7fffff >> exp);
-}
-
-int emulate_altivec(struct pt_regs *regs)
-{
-	unsigned int instr, i;
-	unsigned int va, vb, vc, vd;
-	vector128 *vrs;
-
-	if (get_user(instr, (unsigned int __user *) regs->nip))
-		return -EFAULT;
-	if ((instr >> 26) != 4)
-		return -EINVAL;		/* not an altivec instruction */
-	vd = (instr >> 21) & 0x1f;
-	va = (instr >> 16) & 0x1f;
-	vb = (instr >> 11) & 0x1f;
-	vc = (instr >> 6) & 0x1f;
-
-	vrs = current->thread.vr;
-	switch (instr & 0x3f) {
-	case 10:
-		switch (vc) {
-		case 0:	/* vaddfp */
-			vaddfp(&vrs[vd], &vrs[va], &vrs[vb]);
-			break;
-		case 1:	/* vsubfp */
-			vsubfp(&vrs[vd], &vrs[va], &vrs[vb]);
-			break;
-		case 4:	/* vrefp */
-			vrefp(&vrs[vd], &vrs[vb]);
-			break;
-		case 5:	/* vrsqrtefp */
-			vrsqrtefp(&vrs[vd], &vrs[vb]);
-			break;
-		case 6:	/* vexptefp */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = eexp2(vrs[vb].u[i]);
-			break;
-		case 7:	/* vlogefp */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = elog2(vrs[vb].u[i]);
-			break;
-		case 8:		/* vrfin */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = rfin(vrs[vb].u[i]);
-			break;
-		case 9:		/* vrfiz */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = rfiz(vrs[vb].u[i]);
-			break;
-		case 10:	/* vrfip */
-			for (i = 0; i < 4; ++i) {
-				u32 x = vrs[vb].u[i];
-				x = (x & 0x80000000)? rfiz(x): rfii(x);
-				vrs[vd].u[i] = x;
-			}
-			break;
-		case 11:	/* vrfim */
-			for (i = 0; i < 4; ++i) {
-				u32 x = vrs[vb].u[i];
-				x = (x & 0x80000000)? rfii(x): rfiz(x);
-				vrs[vd].u[i] = x;
-			}
-			break;
-		case 14:	/* vctuxs */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = ctuxs(vrs[vb].u[i], va,
-						&current->thread.vscr.u[3]);
-			break;
-		case 15:	/* vctsxs */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = ctsxs(vrs[vb].u[i], va,
-						&current->thread.vscr.u[3]);
-			break;
-		default:
-			return -EINVAL;
-		}
-		break;
-	case 46:	/* vmaddfp */
-		vmaddfp(&vrs[vd], &vrs[va], &vrs[vb], &vrs[vc]);
-		break;
-	case 47:	/* vnmsubfp */
-		vnmsubfp(&vrs[vd], &vrs[va], &vrs[vb], &vrs[vc]);
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	return 0;
-}
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
--- a/arch/ppc64/kernel/Makefile
+++ b/arch/ppc64/kernel/Makefile
@@ -83,3 +83,6 @@ ifeq ($(CONFIG_PPC_ISERIES),y)
 arch/ppc64/kernel/head.o: arch/ppc64/kernel/lparmap.s
 AFLAGS_head.o += -Iarch/ppc64/kernel
 endif
+
+# These are here while we do the architecture merge
+vecemu-y			+= ../../powerpc/kernel/vecemu.o
diff --git a/arch/ppc64/kernel/vecemu.c b/arch/ppc64/kernel/vecemu.c
deleted file mode 100644
--- a/arch/ppc64/kernel/vecemu.c
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Routines to emulate some Altivec/VMX instructions, specifically
- * those that can trap when given denormalized operands in Java mode.
- */
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <asm/ptrace.h>
-#include <asm/processor.h>
-#include <asm/uaccess.h>
-
-/* Functions in vector.S */
-extern void vaddfp(vector128 *dst, vector128 *a, vector128 *b);
-extern void vsubfp(vector128 *dst, vector128 *a, vector128 *b);
-extern void vmaddfp(vector128 *dst, vector128 *a, vector128 *b, vector128 *c);
-extern void vnmsubfp(vector128 *dst, vector128 *a, vector128 *b, vector128 *c);
-extern void vrefp(vector128 *dst, vector128 *src);
-extern void vrsqrtefp(vector128 *dst, vector128 *src);
-extern void vexptep(vector128 *dst, vector128 *src);
-
-static unsigned int exp2s[8] = {
-	0x800000,
-	0x8b95c2,
-	0x9837f0,
-	0xa5fed7,
-	0xb504f3,
-	0xc5672a,
-	0xd744fd,
-	0xeac0c7
-};
-
-/*
- * Computes an estimate of 2^x.  The `s' argument is the 32-bit
- * single-precision floating-point representation of x.
- */
-static unsigned int eexp2(unsigned int s)
-{
-	int exp, pwr;
-	unsigned int mant, frac;
-
-	/* extract exponent field from input */
-	exp = ((s >> 23) & 0xff) - 127;
-	if (exp > 7) {
-		/* check for NaN input */
-		if (exp == 128 && (s & 0x7fffff) != 0)
-			return s | 0x400000;	/* return QNaN */
-		/* 2^-big = 0, 2^+big = +Inf */
-		return (s & 0x80000000)? 0: 0x7f800000;	/* 0 or +Inf */
-	}
-	if (exp < -23)
-		return 0x3f800000;	/* 1.0 */
-
-	/* convert to fixed point integer in 9.23 representation */
-	pwr = (s & 0x7fffff) | 0x800000;
-	if (exp > 0)
-		pwr <<= exp;
-	else
-		pwr >>= -exp;
-	if (s & 0x80000000)
-		pwr = -pwr;
-
-	/* extract integer part, which becomes exponent part of result */
-	exp = (pwr >> 23) + 126;
-	if (exp >= 254)
-		return 0x7f800000;
-	if (exp < -23)
-		return 0;
-
-	/* table lookup on top 3 bits of fraction to get mantissa */
-	mant = exp2s[(pwr >> 20) & 7];
-
-	/* linear interpolation using remaining 20 bits of fraction */
-	asm("mulhwu %0,%1,%2" : "=r" (frac)
-	    : "r" (pwr << 12), "r" (0x172b83ff));
-	asm("mulhwu %0,%1,%2" : "=r" (frac) : "r" (frac), "r" (mant));
-	mant += frac;
-
-	if (exp >= 0)
-		return mant + (exp << 23);
-
-	/* denormalized result */
-	exp = -exp;
-	mant += 1 << (exp - 1);
-	return mant >> exp;
-}
-
-/*
- * Computes an estimate of log_2(x).  The `s' argument is the 32-bit
- * single-precision floating-point representation of x.
- */
-static unsigned int elog2(unsigned int s)
-{
-	int exp, mant, lz, frac;
-
-	exp = s & 0x7f800000;
-	mant = s & 0x7fffff;
-	if (exp == 0x7f800000) {	/* Inf or NaN */
-		if (mant != 0)
-			s |= 0x400000;	/* turn NaN into QNaN */
-		return s;
-	}
-	if ((exp | mant) == 0)		/* +0 or -0 */
-		return 0xff800000;	/* return -Inf */
-
-	if (exp == 0) {
-		/* denormalized */
-		asm("cntlzw %0,%1" : "=r" (lz) : "r" (mant));
-		mant <<= lz - 8;
-		exp = (-118 - lz) << 23;
-	} else {
-		mant |= 0x800000;
-		exp -= 127 << 23;
-	}
-
-	if (mant >= 0xb504f3) {				/* 2^0.5 * 2^23 */
-		exp |= 0x400000;			/* 0.5 * 2^23 */
-		asm("mulhwu %0,%1,%2" : "=r" (mant)
-		    : "r" (mant), "r" (0xb504f334));	/* 2^-0.5 * 2^32 */
-	}
-	if (mant >= 0x9837f0) {				/* 2^0.25 * 2^23 */
-		exp |= 0x200000;			/* 0.25 * 2^23 */
-		asm("mulhwu %0,%1,%2" : "=r" (mant)
-		    : "r" (mant), "r" (0xd744fccb));	/* 2^-0.25 * 2^32 */
-	}
-	if (mant >= 0x8b95c2) {				/* 2^0.125 * 2^23 */
-		exp |= 0x100000;			/* 0.125 * 2^23 */
-		asm("mulhwu %0,%1,%2" : "=r" (mant)
-		    : "r" (mant), "r" (0xeac0c6e8));	/* 2^-0.125 * 2^32 */
-	}
-	if (mant > 0x800000) {				/* 1.0 * 2^23 */
-		/* calculate (mant - 1) * 1.381097463 */
-		/* 1.381097463 == 0.125 / (2^0.125 - 1) */
-		asm("mulhwu %0,%1,%2" : "=r" (frac)
-		    : "r" ((mant - 0x800000) << 1), "r" (0xb0c7cd3a));
-		exp += frac;
-	}
-	s = exp & 0x80000000;
-	if (exp != 0) {
-		if (s)
-			exp = -exp;
-		asm("cntlzw %0,%1" : "=r" (lz) : "r" (exp));
-		lz = 8 - lz;
-		if (lz > 0)
-			exp >>= lz;
-		else if (lz < 0)
-			exp <<= -lz;
-		s += ((lz + 126) << 23) + exp;
-	}
-	return s;
-}
-
-#define VSCR_SAT	1
-
-static int ctsxs(unsigned int x, int scale, unsigned int *vscrp)
-{
-	int exp, mant;
-
-	exp = (x >> 23) & 0xff;
-	mant = x & 0x7fffff;
-	if (exp == 255 && mant != 0)
-		return 0;		/* NaN -> 0 */
-	exp = exp - 127 + scale;
-	if (exp < 0)
-		return 0;		/* round towards zero */
-	if (exp >= 31) {
-		/* saturate, unless the result would be -2^31 */
-		if (x + (scale << 23) != 0xcf000000)
-			*vscrp |= VSCR_SAT;
-		return (x & 0x80000000)? 0x80000000: 0x7fffffff;
-	}
-	mant |= 0x800000;
-	mant = (mant << 7) >> (30 - exp);
-	return (x & 0x80000000)? -mant: mant;
-}
-
-static unsigned int ctuxs(unsigned int x, int scale, unsigned int *vscrp)
-{
-	int exp;
-	unsigned int mant;
-
-	exp = (x >> 23) & 0xff;
-	mant = x & 0x7fffff;
-	if (exp == 255 && mant != 0)
-		return 0;		/* NaN -> 0 */
-	exp = exp - 127 + scale;
-	if (exp < 0)
-		return 0;		/* round towards zero */
-	if (x & 0x80000000) {
-		/* negative => saturate to 0 */
-		*vscrp |= VSCR_SAT;
-		return 0;
-	}
-	if (exp >= 32) {
-		/* saturate */
-		*vscrp |= VSCR_SAT;
-		return 0xffffffff;
-	}
-	mant |= 0x800000;
-	mant = (mant << 8) >> (31 - exp);
-	return mant;
-}
-
-/* Round to floating integer, towards 0 */
-static unsigned int rfiz(unsigned int x)
-{
-	int exp;
-
-	exp = ((x >> 23) & 0xff) - 127;
-	if (exp == 128 && (x & 0x7fffff) != 0)
-		return x | 0x400000;	/* NaN -> make it a QNaN */
-	if (exp >= 23)
-		return x;		/* it's an integer already (or Inf) */
-	if (exp < 0)
-		return x & 0x80000000;	/* |x| < 1.0 rounds to 0 */
-	return x & ~(0x7fffff >> exp);
-}
-
-/* Round to floating integer, towards +/- Inf */
-static unsigned int rfii(unsigned int x)
-{
-	int exp, mask;
-
-	exp = ((x >> 23) & 0xff) - 127;
-	if (exp == 128 && (x & 0x7fffff) != 0)
-		return x | 0x400000;	/* NaN -> make it a QNaN */
-	if (exp >= 23)
-		return x;		/* it's an integer already (or Inf) */
-	if ((x & 0x7fffffff) == 0)
-		return x;		/* +/-0 -> +/-0 */
-	if (exp < 0)
-		/* 0 < |x| < 1.0 rounds to +/- 1.0 */
-		return (x & 0x80000000) | 0x3f800000;
-	mask = 0x7fffff >> exp;
-	/* mantissa overflows into exponent - that's OK,
-	   it can't overflow into the sign bit */
-	return (x + mask) & ~mask;
-}
-
-/* Round to floating integer, to nearest */
-static unsigned int rfin(unsigned int x)
-{
-	int exp, half;
-
-	exp = ((x >> 23) & 0xff) - 127;
-	if (exp == 128 && (x & 0x7fffff) != 0)
-		return x | 0x400000;	/* NaN -> make it a QNaN */
-	if (exp >= 23)
-		return x;		/* it's an integer already (or Inf) */
-	if (exp < -1)
-		return x & 0x80000000;	/* |x| < 0.5 -> +/-0 */
-	if (exp == -1)
-		/* 0.5 <= |x| < 1.0 rounds to +/- 1.0 */
-		return (x & 0x80000000) | 0x3f800000;
-	half = 0x400000 >> exp;
-	/* add 0.5 to the magnitude and chop off the fraction bits */
-	return (x + half) & ~(0x7fffff >> exp);
-}
-
-int
-emulate_altivec(struct pt_regs *regs)
-{
-	unsigned int instr, i;
-	unsigned int va, vb, vc, vd;
-	vector128 *vrs;
-
-	if (get_user(instr, (unsigned int __user *) regs->nip))
-		return -EFAULT;
-	if ((instr >> 26) != 4)
-		return -EINVAL;		/* not an altivec instruction */
-	vd = (instr >> 21) & 0x1f;
-	va = (instr >> 16) & 0x1f;
-	vb = (instr >> 11) & 0x1f;
-	vc = (instr >> 6) & 0x1f;
-
-	vrs = current->thread.vr;
-	switch (instr & 0x3f) {
-	case 10:
-		switch (vc) {
-		case 0:	/* vaddfp */
-			vaddfp(&vrs[vd], &vrs[va], &vrs[vb]);
-			break;
-		case 1:	/* vsubfp */
-			vsubfp(&vrs[vd], &vrs[va], &vrs[vb]);
-			break;
-		case 4:	/* vrefp */
-			vrefp(&vrs[vd], &vrs[vb]);
-			break;
-		case 5:	/* vrsqrtefp */
-			vrsqrtefp(&vrs[vd], &vrs[vb]);
-			break;
-		case 6:	/* vexptefp */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = eexp2(vrs[vb].u[i]);
-			break;
-		case 7:	/* vlogefp */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = elog2(vrs[vb].u[i]);
-			break;
-		case 8:		/* vrfin */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = rfin(vrs[vb].u[i]);
-			break;
-		case 9:		/* vrfiz */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = rfiz(vrs[vb].u[i]);
-			break;
-		case 10:	/* vrfip */
-			for (i = 0; i < 4; ++i) {
-				u32 x = vrs[vb].u[i];
-				x = (x & 0x80000000)? rfiz(x): rfii(x);
-				vrs[vd].u[i] = x;
-			}
-			break;
-		case 11:	/* vrfim */
-			for (i = 0; i < 4; ++i) {
-				u32 x = vrs[vb].u[i];
-				x = (x & 0x80000000)? rfii(x): rfiz(x);
-				vrs[vd].u[i] = x;
-			}
-			break;
-		case 14:	/* vctuxs */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = ctuxs(vrs[vb].u[i], va,
-						&current->thread.vscr.u[3]);
-			break;
-		case 15:	/* vctsxs */
-			for (i = 0; i < 4; ++i)
-				vrs[vd].u[i] = ctsxs(vrs[vb].u[i], va,
-						&current->thread.vscr.u[3]);
-			break;
-		default:
-			return -EINVAL;
-		}
-		break;
-	case 46:	/* vmaddfp */
-		vmaddfp(&vrs[vd], &vrs[va], &vrs[vb], &vrs[vc]);
-		break;
-	case 47:	/* vnmsubfp */
-		vnmsubfp(&vrs[vd], &vrs[va], &vrs[vb], &vrs[vc]);
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	return 0;
-}

^ permalink raw reply

* Cartoes UOL
From: cartoes @ 2005-09-19  4:41 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/html, Size: 6105 bytes --]

^ permalink raw reply

* System RAM requirement for PBX - Router Application product
From: ganeshkumar @ 2005-09-19  4:33 UTC (permalink / raw)
  To: Linuxppc-dev

Dear All,

    I'm working on MPC860P with 8MB of FLash ROM and 16MB of RAM
on our system running Mvista Linux. Our Product is an Integrated Access
Device
with the following features built in:
        1)    ISDN PRI on E1 interface with 15 channels for Voice & 15
                Channels for Data
        2)    LAN to WAN Router and vice versa, serving Internet users on
the LAN side.
        3)    Built in PABx functionality serving upto 60 extensions
        4)    Embedded mySQL database for Call details and Records,
        5)    An IDE interface supporting a 80GB HDD
        6)    Web server for configuration (Boa)

So for a product with the above configuration/features , what is the minimum
amount memory that is needed to run without any flaws?
Currently we have 8MB Flash, 16MB SD-RAM with MPC860P running @ 40MHz
Is 16MB SD-RAM enough for this type of an Application? or we need to
increase our SD-RAM size?
Thanks in Advance!

Thanks & Best regards,
Ganesh

^ permalink raw reply

* Re: Git tree for the 32/64 merge
From: Jon Loeliger @ 2005-09-19  3:27 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, linuxppc64-dev
In-Reply-To: <17197.65270.548340.377011@cargo.ozlabs.ibm.com>

So, like, the other day Paul Mackerras mumbled:
> 
> This tree contains all the patches I found in a scan through my inbox
> that relate to the merge and haven't already gone to Linus.  If you
> have a patch that should go in, please resend it.

I think you might have missed my posix_types.h merge
patch of Sep 10.  Would you like a repost?

Thanks,
jdl

^ permalink raw reply

* Re: Git tree for the 32/64 merge
From: Kumar Gala @ 2005-09-19  2:36 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, linuxppc64-dev
In-Reply-To: <17197.65270.548340.377011@cargo.ozlabs.ibm.com>

Can you get this tree added to gitweb on kernel.org

- kumar

On Sep 18, 2005, at 6:57 PM, Paul Mackerras wrote:

> I have created a git tree on kernel.org as a place to accumulate the
> patches for the ppc32/ppc64 merge.  It is at:
>
> rsync://rsync.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc- 
> merge.g
> it
>
> It doesn't include the objects in Linus' tree; instead it has an
> objects/info/alternates file pointing to Linus' tree.
>
> This tree contains all the patches I found in a scan through my inbox
> that relate to the merge and haven't already gone to Linus.  If you
> have a patch that should go in, please resend it.
>
> Paul.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>

^ permalink raw reply

* [PATCH][UPDATE] ppc32: Allow user to individual select CHRP/PMAC/PREP config
From: Kumar Gala @ 2005-09-19  2:33 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev

Made the CHRP/PMAC/PREP config options selectable by the user.
This allows us to build kernels specifically for one of the
platforms thus reducing code size.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>

---
commit f827bdb6363b826d34ede1790d37dd27c28d19b5
tree 40219a80fd22a02f292b5366d6209f3f57aa1c6c
parent 6c0741fbdee5bd0f8ed13ac287c4ab18e8ba7d83
author Kumar K. Gala <kumar.gala@freescale.com> Sun, 18 Sep 2005 21:31:54 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Sun, 18 Sep 2005 21:31:54 -0500

 arch/ppc/Kconfig |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -747,12 +747,12 @@ config CPM2
 	  on it (826x, 827x, 8560).
 
 config PPC_CHRP
-	bool
+	bool "  Common Hardware Reference Platform (CHRP) based machines"
 	depends on PPC_MULTIPLATFORM
 	default y
 
 config PPC_PMAC
-	bool
+	bool "  Apple PowerMac based machines"
 	depends on PPC_MULTIPLATFORM
 	default y
 
@@ -762,7 +762,7 @@ config PPC_PMAC64
 	default y
 
 config PPC_PREP
-	bool
+	bool "  PowerPC Reference Platform (PReP) based machines"
 	depends on PPC_MULTIPLATFORM
 	default y
 

^ permalink raw reply

* Re: [PATCH] ppc32: Allow user to individual select CHRP/PMAC/PREP config
From: Kumar Gala @ 2005-09-19  2:24 UTC (permalink / raw)
  To: <a.othieno@bluewin.ch>; +Cc: linuxppc-dev
In-Reply-To: <20050918224955.GA5739@mars>

Oops, good catch.  I'll send an updated patch that gets ride of the  
duplicated 'bool's.

- kumar

On Sep 18, 2005, at 5:49 PM, <a.othieno@bluewin.ch>  
<a.othieno@bluewin.ch> wrote:

> On Sun, Sep 18, 2005 at 01:02:03PM -0500, Kumar Gala wrote:
>
>> Made the CHRP/PMAC/PREP config options selectable by the user.
>> This allows us to build kernels specifically for one of the
>> platforms thus reducing code size.
>>
>> Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
>>
>> ---
>> commit 41bfc892910fa820db2dfcaf876b2cbc2e3c4e56
>> tree 2f77679b39af1f36174ada8338ad267858e46024
>> parent e08f933110ff9e7d1a4b4e0ccead28e47c6840ea
>> author Kumar K. Gala <kumar.gala@freescale.com> Sun, 18 Sep 2005
>>
> 13:01:02 -0500
>
>> committer Kumar K. Gala <kumar.gala@freescale.com> Sun, 18 Sep 2005
>>
> 13:01:02 -0500
>
>>
>>  arch/ppc/Kconfig |    4 +++-
>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
>> --- a/arch/ppc/Kconfig
>> +++ b/arch/ppc/Kconfig
>> @@ -747,12 +747,13 @@ config CPM2
>>        on it (826x, 827x, 8560).
>>
>>  config PPC_CHRP
>> +    bool "  Common Hardware Reference Platform (CHRP) based
>>
> machines"
>
>>      bool
>>
>
> Forgot to knock off that extra `bool' ?
>
>
>>      depends on PPC_MULTIPLATFORM
>>      default y
>>
>>  config PPC_PMAC
>> -    bool
>> +    bool "  Apple PowerMac based machines"
>>      depends on PPC_MULTIPLATFORM
>>      default y
>>
>> @@ -762,6 +763,7 @@ config PPC_PMAC64
>>      default y
>>
>>  config PPC_PREP
>> +    bool "  PowerPC Reference Platform (PREP) based machines"
>>      bool
>>
>
> Ditto.
>
>
>>      depends on PPC_MULTIPLATFORM
>>      default y
>

^ permalink raw reply

* Re: Merge Question on asm-ppc*/rwsem.h
From: Jon Loeliger @ 2005-09-19  2:20 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev@ozlabs.org, linuxppc64-dev
In-Reply-To: <17197.63153.78371.490616@cargo.ozlabs.ibm.com>

So sprach Paul Mackerras:
> 
> I think the difference is that the atomic ops that return a value also
> have include a barrier on ppc64, but don't on ppc32 (although they
> probably should).  IOW I think the merged case should follow ppc64
> here.

Excellent!

I will submit that patch in the style of ppc64 early this week.

Thanks for the feedback,
jdl

^ permalink raw reply

* Re: AC Power handling broken for desktops
From: Benjamin Herrenschmidt @ 2005-09-19  0:44 UTC (permalink / raw)
  To: Olaf Hering; +Cc: linuxppc-dev
In-Reply-To: <20050826113827.GA25134@suse.de>

On Fri, 2005-08-26 at 13:38 +0200, Olaf Hering wrote:
>  On Thu, Aug 25, Benjamin Herrenschmidt wrote:
> 
> > On Thu, 2005-08-25 at 07:15 +0200, Olaf Hering wrote:
> > >  On Thu, Aug 25, Benjamin Herrenschmidt wrote:
> > > 
> > > > Not sure :) I don't fully know how to decode those power things in the
> > > > device-tree... There are bits in darwin tho.
> > > 
> > > Maybe just check for !PowerBook and force PMU_PWR_AC_PRESENT in this case.
> > 
> > Yah, you can check that with pmac_feature, there is a "mobile" flag.
> 
> Its not obvious how to get to that flag. Is this patch acceptable?
> No batteries present should mean AC Power == 1.
> 
>  drivers/macintosh/apm_emu.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)

Looks good to me.

Ben

^ permalink raw reply

* Git tree for the 32/64 merge
From: Paul Mackerras @ 2005-09-18 23:57 UTC (permalink / raw)
  To: linuxppc-dev, linuxppc64-dev

I have created a git tree on kernel.org as a place to accumulate the
patches for the ppc32/ppc64 merge.  It is at:

rsync://rsync.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge.git

It doesn't include the objects in Linus' tree; instead it has an
objects/info/alternates file pointing to Linus' tree.

This tree contains all the patches I found in a scan through my inbox
that relate to the merge and haven't already gone to Linus.  If you
have a patch that should go in, please resend it.

Paul.

^ permalink raw reply

* Re: Repeated corruption of file->f_ep_lock
From: Gabriel Paubert @ 2005-09-18 23:23 UTC (permalink / raw)
  To: David Woodhouse; +Cc: ppc-dev list, Davide Libenzi, viro
In-Reply-To: <1126956437.4171.20.camel@baythorne.infradead.org>

On Sat, Sep 17, 2005 at 12:27:17PM +0100, David Woodhouse wrote:
> For a while I've been seeing occasional deadlocks on one CPU of a PPC
> SMP machine:
> 
> _spin_lock(c8cbf250) CPU#1 NIP c02bb740 holder: cpu 2305 pc 00000000 (lock 24000484)
> 
> Further debugging shows that it's always due to file->f_ep_lock being
> corrupted, and the deadlock happens when epoll is used on such a file.
> The owner_cpu field is almost always 2305. However, it's not due to the
> epoll code itself -- I've turned all three of the epoll syscalls into
> sys_ni_syscall and it's still happening. I also added sanity checks for
> (file->f_ep_lock.owner_cpu > 1) throughout fs/file_table.c, and I see it
> happen ten or twenty times during a kernel compile.
> 
> The previous and next members of 'struct file', which are f_ep_list and
> f_mapping respectively, are always fine. It's just f_ep_lock which is
> scribbled upon, and the scribble is fairly repeatable: 'owner_cpu' is
> almost always set to 0x901 but occasionally 0x501, and the 'lock' field
> has values like 20282484, 24042884, 28022484, 24042084, 22000424 (hex).
> Do those numbers seem meaningful to anyone? Any clues as to where they
> might be coming from?

As Paul mentioned, these ones furiously look like the contents of 
a condition register, which is not saved and restored very often:
- on every exception/interrupt
- in some stack frames, when GCC decides that it needs to use some
of the 3 CR fields (out of 8) that must be preserved across function
calls. This is rather infrequent.

> 
> During a kernel compile, the corruption is mostly detected in fget()
> from vfs_fstat(), but also I've seen it once or twice in vfs_read() from
> do_execve():
> 
>  File cb2f5b40 (fops d107c980) has corrupted f_epoll_lock!
>  lock 24002484, owner_pc 0, owner_cpu 901
>  f->private_data 00000000, f->f_ep_links (cb2f5bc8, cb2f5bc8), f->f_mapping cc21c1c8
>  f->f_mapping->a_ops d107cad8
>  Pid 16648, comm gcc
>  File is /usr/bin/gcc
>  Badness in dumpbadfile at fs/file_table.c:133
>  Call trace:
>   [c00059b8] check_bug_trap+0xa8/0x120
>   [c0005c94] ProgramCheckException+0x264/0x4e0
>   [c00050a8] ret_from_except_full+0x0/0x4c
>   [c0080bb4] dumpbadfile+0x114/0x160
>   [c007f9f0] vfs_read+0xa0/0x1c0
>   [c008ef7c] kernel_read+0x3c/0x60
>   [c0091810] do_execve+0x1e0/0x280
>   [c0008594] sys_execve+0x64/0xd0
>   [c0004980] ret_from_syscall+0x0/0x44

It's hard to imagine a stack overflow on such a short
call chain. The other idea I have is a backlink chain
corruption, but GCC generated code is not very sensitive
to it unless you use alloca()...

In this case, it would be very useful to also have the 
value of the stack pointer (r1) on each line in the call
backtrace. (The PPC ABI makes the call backtrace much more 
reliable than on x86, where the backtrace without frame pointer
is an educated guess at best).

	Regards,
	Gabriel

^ permalink raw reply

* Re: Merge Question on asm-ppc*/rwsem.h
From: Paul Mackerras @ 2005-09-18 23:22 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev@ozlabs.org, linuxppc64-dev
In-Reply-To: <1126631205.11056.15.camel@cashmere.sps.mot.com>

Jon Loeliger writes:

> Which begs the question, what is the "else smp_wmb();" clause
> really doing for us in the ppc32 case, and can we either
> get rid of it, or is it safe to add to the ppc64 case?

I think the difference is that the atomic ops that return a value also
have include a barrier on ppc64, but don't on ppc32 (although they
probably should).  IOW I think the merged case should follow ppc64
here.

Paul.

^ permalink raw reply

* Re: [PATCH] ppc32: Allow user to individual select CHRP/PMAC/PREP config
From: Arthur Othieno @ 2005-09-18 22:49 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.61.0509181301340.19087@nylon.am.freescale.net>

On Sun, Sep 18, 2005 at 01:02:03PM -0500, Kumar Gala wrote:
> Made the CHRP/PMAC/PREP config options selectable by the user.
> This allows us to build kernels specifically for one of the
> platforms thus reducing code size.
> 
> Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
> 
> ---
> commit 41bfc892910fa820db2dfcaf876b2cbc2e3c4e56
> tree 2f77679b39af1f36174ada8338ad267858e46024
> parent e08f933110ff9e7d1a4b4e0ccead28e47c6840ea
> author Kumar K. Gala <kumar.gala@freescale.com> Sun, 18 Sep 2005 13:01:02 -0500
> committer Kumar K. Gala <kumar.gala@freescale.com> Sun, 18 Sep 2005 13:01:02 -0500
> 
>  arch/ppc/Kconfig |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
> --- a/arch/ppc/Kconfig
> +++ b/arch/ppc/Kconfig
> @@ -747,12 +747,13 @@ config CPM2
>  	  on it (826x, 827x, 8560).
>  
>  config PPC_CHRP
> +	bool "  Common Hardware Reference Platform (CHRP) based machines"
>  	bool

Forgot to knock off that extra `bool' ?

>  	depends on PPC_MULTIPLATFORM
>  	default y
>  
>  config PPC_PMAC
> -	bool
> +	bool "  Apple PowerMac based machines"
>  	depends on PPC_MULTIPLATFORM
>  	default y
>  
> @@ -762,6 +763,7 @@ config PPC_PMAC64
>  	default y
>  
>  config PPC_PREP
> +	bool "  PowerPC Reference Platform (PREP) based machines"
>  	bool

Ditto.

>  	depends on PPC_MULTIPLATFORM
>  	default y

^ permalink raw reply

* Re: PATCH powerpc: 00/04 Remove __pmac, etc, sections, merge sections.h
From: Benjamin Herrenschmidt @ 2005-09-18 22:13 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, linuxppc64-dev
In-Reply-To: <216D7B09-CC72-482D-9C06-3416D5E02DBE@freescale.com>


> I think the discussion earlier in this week lead us to believe this  
> was the way to go.  We can provide a simple patch to allow selecting  
> CHRP/PMAC/PREP specifically in addition to MUTLIPLATFORM.

It should be done like ppc64, that is MULTIPLATFORM can be built with an
aribtrary "set" of platforms. In fact, I think the merged arch should
trash if possible all "exclusive" CONFIG_MYBOARD stuff, but only ever do
what ppc64 does, that is any combination of platforms for the same CPU
family can be built at the same time.

Ben.

^ permalink raw reply

* Re: Reminder: removal of APUS and Gemini still pending
From: Paul Mackerras @ 2005-09-18 22:01 UTC (permalink / raw)
  To: Simon Richter; +Cc: ppc-dev list
In-Reply-To: <432C23AE.6020800@hogyros.de>

Simon Richter writes:

> I have a tree that builds an APUS kernel (with Roman Zippel's patches 
> forwarded to HEAD), however I wanted to hold back with merging it until 
> the ppc/ppc64 -> powerpc transition is finished; also, I would like to 

That sounds like a mistake to me...

> get proper changesets with attribution instead of a big patch (the plan 
> is to forward-merge the changes until after the transition, then turn 
> them back into a diff and apply them step by step).

One of the things I particularly want to do is to remove the special
cases in the virtual<->physical address translations for APUS.
Perhaps the sparsemem or discontigmem code could be used instead?

Paul.

^ permalink raw reply

* [PATCH] ppc32: Allow user to individual select CHRP/PMAC/PREP config
From: Kumar Gala @ 2005-09-18 18:02 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev

Made the CHRP/PMAC/PREP config options selectable by the user.
This allows us to build kernels specifically for one of the
platforms thus reducing code size.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>

---
commit 41bfc892910fa820db2dfcaf876b2cbc2e3c4e56
tree 2f77679b39af1f36174ada8338ad267858e46024
parent e08f933110ff9e7d1a4b4e0ccead28e47c6840ea
author Kumar K. Gala <kumar.gala@freescale.com> Sun, 18 Sep 2005 13:01:02 -0500
committer Kumar K. Gala <kumar.gala@freescale.com> Sun, 18 Sep 2005 13:01:02 -0500

 arch/ppc/Kconfig |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -747,12 +747,13 @@ config CPM2
 	  on it (826x, 827x, 8560).
 
 config PPC_CHRP
+	bool "  Common Hardware Reference Platform (CHRP) based machines"
 	bool
 	depends on PPC_MULTIPLATFORM
 	default y
 
 config PPC_PMAC
-	bool
+	bool "  Apple PowerMac based machines"
 	depends on PPC_MULTIPLATFORM
 	default y
 
@@ -762,6 +763,7 @@ config PPC_PMAC64
 	default y
 
 config PPC_PREP
+	bool "  PowerPC Reference Platform (PREP) based machines"
 	bool
 	depends on PPC_MULTIPLATFORM
 	default y

^ permalink raw reply

* Re: PATCH powerpc: 00/04 Remove __pmac, etc, sections, merge sections.h
From: Kumar Gala @ 2005-09-18 17:50 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, linuxppc64-dev
In-Reply-To: <1127006735.23095.4.camel@gaston>


On Sep 17, 2005, at 8:25 PM, Benjamin Herrenschmidt wrote:

> On Sat, 2005-09-17 at 10:31 -0500, Jon Loeliger wrote:
>
>> Here is a new patch that removes all notion of the pmac, prep,
>> chrp and openfirmware initialization sections, and then unifies
>> the sections.h files without those __pmac, etc, sections identifiers
>> cluttering things up.
>>
>
> When did we decide to do that ? Some people are still using ppc  
> machines
> with rather small memory footprint (old ones), it's handy to get  
> rid of
> the code you don't need... It would make sense if we could compile
> CHRP/PMAC/PREP in/out (like we can do with platforms on ppc64) so that
> people who have tight memory requirements can build a PReP or CHRP
> kernel without all of the pmac code.

I think the discussion earlier in this week lead us to believe this  
was the way to go.  We can provide a simple patch to allow selecting  
CHRP/PMAC/PREP specifically in addition to MUTLIPLATFORM.

- kumar

^ permalink raw reply

* Re: Reminder: removal of APUS and Gemini still pending
From: Simon Richter @ 2005-09-18 10:27 UTC (permalink / raw)
  To: Roman Zippel; +Cc: ppc-dev list
In-Reply-To: <432C7324.9070203@linux-m68k.org>

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

Hi,

Roman Zippel schrieb:

> Regarding APUS: with the current rate of changes I simply don't have the
> time to catch up right now. What's the game plan here? If I miss the
> deadline, I have to start from scratch?

Well, I have a tree that sort of works, but needs to be merged with the
ongoing changes, and possibly the patch should be split as well. Do you
have an archive of patches submitted to you, so they can be applied
separately?

(On a related note, are you going to be at the Oldenburg meeting this
year? I'm planning to catch up on APUS there and have some commit
objects ready at the end of it.)

   Simon

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 374 bytes --]

^ permalink raw reply

* Re: __switch_to test-and-branch ALTIVEC specific?
From: Benjamin Herrenschmidt @ 2005-09-18  1:31 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, cort, linux-ppc-embedded
In-Reply-To: <28EAC1FF-341D-45C3-BA9E-221AE04F6DC1@freescale.com>

On Tue, 2005-09-13 at 16:43 -0500, Kumar Gala wrote:
> On Sep 13, 2005, at 3:35 PM, Marcelo Tosatti wrote:
> 
> > On Tue, Sep 13, 2005 at 02:05:57PM -0500, Kumar Gala wrote:
> >
> >> This probably has to due with what happens on a G4 system with a
> >> kernel not build with Altivec.. However, I dont remember exactly what
> >>
> >
> >
> >> behavior is desired.
> >>
> >
> > What would be the appropriate set of definitions to use, then ?
> >
> > #if defined (CONFIG_ALTIVEC || CONFIG_6xx) ?
> 
> That's probably better.  Hopefully Ben will have some reason if what  
> you suggest is not sufficient.

Just #ifdef CONFIG_ALTIVEC is fine

Ben.

^ permalink raw reply

* Re: __switch_to test-and-branch ALTIVEC specific?
From: Benjamin Herrenschmidt @ 2005-09-18  1:31 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, linux-ppc-embedded
In-Reply-To: <A6CA30D6-DDC3-4AEF-8CA2-58CFA261F44B@freescale.com>

On Tue, 2005-09-13 at 14:05 -0500, Kumar Gala wrote:
> This probably has to due with what happens on a G4 system with a  
> kernel not build with Altivec.. However, I dont remember exactly what  
> behavior is desired.

No, we should never set MSR_VEC on a kernel not built with
CONFIG_ALTIVEC.

Ben.

^ permalink raw reply

* Re: PATCH powerpc: Merge asm-ppc*/sections.h
From: Benjamin Herrenschmidt @ 2005-09-18  1:28 UTC (permalink / raw)
  To: Gabriel Paubert; +Cc: linuxppc64-dev, Arnd Bergmann, linuxppc-dev@ozlabs.org
In-Reply-To: <20050915205709.GA31156@iram.es>


> So yes, I object strongly object if I don't have a way 
> of removing useless PMAC code. The kernel is already very 
> bloated compared with the 2.2 we started with, which was 
> well below 1MB with the minimal setup: serial console, root 
> on NFS, no swap, some locally modules to control the PCI<->VME 
> bridge and what is behind on the VME bus. 

I think we should have the ability to not build some platforms like we
have on ppc64. That would allow you to build a PReP kernel without CHRP
and PMAC code.

Ben.

^ permalink raw reply

* Re: Repeated corruption of file->f_ep_lock
From: Benjamin Herrenschmidt @ 2005-09-18  1:23 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: ppc-dev list, David Woodhouse, Davide Libenzi, viro
In-Reply-To: <17196.5625.322927.221055@cargo.ozlabs.ibm.com>

On Sat, 2005-09-17 at 23:11 +1000, Paul Mackerras wrote:
> David Woodhouse writes:
> 
> > The previous and next members of 'struct file', which are f_ep_list and
> > f_mapping respectively, are always fine. It's just f_ep_lock which is
> > scribbled upon, and the scribble is fairly repeatable: 'owner_cpu' is
> > almost always set to 0x901 but occasionally 0x501, and the 'lock' field
> > has values like 20282484, 24042884, 28022484, 24042084, 22000424 (hex).
> > Do those numbers seem meaningful to anyone? Any clues as to where they
> > might be coming from?
> 
> They look like part of an exception stack frame.  The 901 or 501 would
> be the trap number; 500 for an external interrupt or 900 for a
> decrementer interrupt, plus 1 which we use as a marker to say that
> only the volatile registers have been saved in the frame.  The other
> values (20282484 etc.) could possibly be condition register values.
> That would fit with owner_cpu being 2 words past the lock field; the
> trap field in struct pt_regs is 2 words past the ccr field.

kernel stack overflow ? Also, you could try using the DABR (Data Access
Breakpoint) if any on your CPU to try to catch at the instant of the
corruption...

Ben.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox