Re: patch powerpc-fix-size-check-for-hugetlbfs.patch queued to -stable tree

2007-08-14 Thread David Gibson
On Mon, Aug 13, 2007 at 04:26:27PM -0700, [EMAIL PROTECTED] wrote:
 
 This is a note to let you know that we have just queued up the patch titled
 
  Subject: powerpc: Fix size check for hugetlbfs
 
 to the 2.6.22-stable tree.  Its filename is
 
  powerpc-fix-size-check-for-hugetlbfs.patch
 
 A git repo of this tree can be found at 
 
 http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
 
 
 From [EMAIL PROTECTED]  Mon Aug 13 16:17:09 2007
 From: Benjamin Herrenschmidt [EMAIL PROTECTED]
 Date: Wed, 08 Aug 2007 15:44:15 +1000
 Subject: powerpc: Fix size check for hugetlbfs
 To: linuxppc-dev list linuxppc-dev@ozlabs.org
 Cc: Paul Mackerras [EMAIL PROTECTED], [EMAIL PROTECTED]
 Message-ID: [EMAIL PROTECTED]
 
 From: Benjamin Herrenschmidt [EMAIL PROTECTED]
 
 My slices address space management code that was added in 2.6.22
 implementation of get_unmapped_area() doesn't properly check that the
 size is a multiple of the requested page size. This allows userland to
 create VMAs that aren't a multiple of the huge page size with hugetlbfs
 (since hugetlbfs entirely relies on get_unmapped_area() to do that
 checking) which leads to a kernel BUG() when such areas are torn down.

Ok, I said I was going to look into a libhugetlbfs testcase for this.
Doesn't appear there's specifically a testcase for misaligned size -
I'll add one.

However, it seems the current kernel, on ppc64, gives a testcase
failure on 'misaligned_offset', because it's not failing a mapping
with a non-hugepage aligned file offset.  I'm not sure (yet) if this
failure is also caused by the new slice code, but it seems a likely
candidate.

Still investigating...

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[patch 07/12] powerpc: Fix size check for hugetlbfs

2007-08-14 Thread Greg KH
-stable review patch.  If anyone has any objections, please let us know.

--
From: Benjamin Herrenschmidt [EMAIL PROTECTED]

My slices address space management code that was added in 2.6.22
implementation of get_unmapped_area() doesn't properly check that the
size is a multiple of the requested page size. This allows userland to
create VMAs that aren't a multiple of the huge page size with hugetlbfs
(since hugetlbfs entirely relies on get_unmapped_area() to do that
checking) which leads to a kernel BUG() when such areas are torn down.

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]

---
 arch/powerpc/mm/slice.c |2 ++
 1 file changed, 2 insertions(+)

--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -405,6 +405,8 @@ unsigned long slice_get_unmapped_area(un
 
if (len  mm-task_size)
return -ENOMEM;
+   if (len  ((1ul  pshift) - 1))
+   return -EINVAL;
if (fixed  (addr  ((1ul  pshift) - 1)))
return -EINVAL;
if (fixed  addr  (mm-task_size - len))

-- 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: patch powerpc-fix-size-check-for-hugetlbfs.patch queued to -stable tree

2007-08-14 Thread David Gibson
On Tue, Aug 14, 2007 at 04:45:34PM +1000, David Gibson wrote:
 On Mon, Aug 13, 2007 at 04:26:27PM -0700, [EMAIL PROTECTED] wrote:
  
  This is a note to let you know that we have just queued up the patch titled
  
   Subject: powerpc: Fix size check for hugetlbfs
  
  to the 2.6.22-stable tree.  Its filename is
  
   powerpc-fix-size-check-for-hugetlbfs.patch
  
  A git repo of this tree can be found at 
  
  http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
  
  
  From [EMAIL PROTECTED]  Mon Aug 13 16:17:09 2007
  From: Benjamin Herrenschmidt [EMAIL PROTECTED]
  Date: Wed, 08 Aug 2007 15:44:15 +1000
  Subject: powerpc: Fix size check for hugetlbfs
  To: linuxppc-dev list linuxppc-dev@ozlabs.org
  Cc: Paul Mackerras [EMAIL PROTECTED], [EMAIL PROTECTED]
  Message-ID: [EMAIL PROTECTED]
  
  From: Benjamin Herrenschmidt [EMAIL PROTECTED]
  
  My slices address space management code that was added in 2.6.22
  implementation of get_unmapped_area() doesn't properly check that the
  size is a multiple of the requested page size. This allows userland to
  create VMAs that aren't a multiple of the huge page size with hugetlbfs
  (since hugetlbfs entirely relies on get_unmapped_area() to do that
  checking) which leads to a kernel BUG() when such areas are torn down.
 
 Ok, I said I was going to look into a libhugetlbfs testcase for this.
 Doesn't appear there's specifically a testcase for misaligned size -
 I'll add one.
 
 However, it seems the current kernel, on ppc64, gives a testcase
 failure on 'misaligned_offset', because it's not failing a mapping
 with a non-hugepage aligned file offset.  I'm not sure (yet) if this
 failure is also caused by the new slice code, but it seems a likely
 candidate.

I have written a new test for the handling of misaligned addresses,
lengths and offsets for libhugetlbfs.  With it I've verified that this
patch does correct a serious problem with length handling - without
the patch this new testcase causes an oops for me.  It's simpler than
the 'misaligned_offset' testcase in which the misaligned mapping was
just a step to triggering a different and much more subtle kernel bug
(where the misaligned mapping failed, but corrupted some pagetables in
the process).

But the testcase still fails because a mapping with misaligned offset
still succeeds.  Still don't know if this is related to the same slice
changes or not.  Need to do a bisect, but I'm putting it off because I
have some other bugs to chase.

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [patch 07/12] powerpc: Fix size check for hugetlbfs

2007-08-14 Thread David Gibson
On Tue, Aug 14, 2007 at 12:29:18AM -0700, Greg KH wrote:
 -stable review patch.  If anyone has any objections, please let us know.
 
 --
 From: Benjamin Herrenschmidt [EMAIL PROTECTED]
 
 My slices address space management code that was added in 2.6.22
 implementation of get_unmapped_area() doesn't properly check that the
 size is a multiple of the requested page size. This allows userland to
 create VMAs that aren't a multiple of the huge page size with hugetlbfs
 (since hugetlbfs entirely relies on get_unmapped_area() to do that
 checking) which leads to a kernel BUG() when such areas are torn down.
 
 Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
 Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
 Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]

Acked-by: David Gibson [EMAIL PROTECTED]

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Stop pmac_zilog from abusing 8250's device numbers.

2007-08-14 Thread Olaf Hering
On Wed, Apr 04, Paul Mackerras wrote:

 David Woodhouse writes:
 
  There are proper device numbers registered for pmac_zilog now. Use them.

Which numbers?

 Sigh.  I guess this is inevitable, but IMNSHO this exposes a weakness
 in our serial subsystem.

So, when will the name of pmac_zilog get changed?
What major/minor pair will the two ports get?
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Stop pmac_zilog from abusing 8250's device numbers.

2007-08-14 Thread David Woodhouse
On Tue, 2007-08-14 at 13:49 +0200, Olaf Hering wrote:
 On Wed, Apr 04, Paul Mackerras wrote:
 
  David Woodhouse writes:
  
   There are proper device numbers registered for pmac_zilog now. Use them.
 
 Which numbers?

shinybook /shiny/git/mtd-utils $ ls -l /dev/ttyPZ*
crw-rw 1 root uucp 204, 192 2007-08-13 11:48 /dev/ttyPZ0
crw-rw 1 root uucp 204, 193 2007-08-13 11:48 /dev/ttyPZ1

-- 
dwmw2

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Stop pmac_zilog from abusing 8250's device numbers.

2007-08-14 Thread Olaf Hering
On Tue, Aug 14, David Woodhouse wrote:

 On Tue, 2007-08-14 at 13:49 +0200, Olaf Hering wrote:
  On Wed, Apr 04, Paul Mackerras wrote:
  
   David Woodhouse writes:
   
There are proper device numbers registered for pmac_zilog now. Use them.
  
  Which numbers?
 
 shinybook /shiny/git/mtd-utils $ ls -l /dev/ttyPZ*
 crw-rw 1 root uucp 204, 192 2007-08-13 11:48 /dev/ttyPZ0
 crw-rw 1 root uucp 204, 193 2007-08-13 11:48 /dev/ttyPZ1

I dont see 204:192 in devices.txt
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] ps3: Fix no storage devices found

2007-08-14 Thread Geert Uytterhoeven
Fix probing of PS3 storage devices: in the success case, we should set `error'
to zero, not `result'.

Without this patch no storage devices are found.

Signed-off-by: Geert Uytterhoeven [EMAIL PROTECTED]
---
This brown paper bag bug slipped in due to bad patch splitting.
Please apply as soon as possible. Thanks!

 arch/powerpc/platforms/ps3/device-init.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- a/arch/powerpc/platforms/ps3/device-init.c
+++ b/arch/powerpc/platforms/ps3/device-init.c
@@ -372,7 +372,7 @@ static int ps3_storage_wait_for_device(c
notify_event-dev_type == repo-dev_type) {
pr_debug(%s:%u: device ready: dev_id %u\n, __func__,
 __LINE__, repo-dev_id);
-   result = 0;
+   error = 0;
break;
}
 

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:+32 (0)2 700 8453 
Fax:  +32 (0)2 700 8622 
E-mail:   [EMAIL PROTECTED] 
Internet: http://www.sony-europe.com/

Sony Network and Software Technology Center Europe  
A division of Sony Service Centre (Europe) N.V. 
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium  
VAT BE 0413.825.160 · RPR Brussels  
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH] ps3: Fix no storage devices found

2007-08-14 Thread Geoff Levand
Geert Uytterhoeven wrote:
 Fix probing of PS3 storage devices: in the success case, we should set `error'
 to zero, not `result'.
 
 Without this patch no storage devices are found.
 
 Signed-off-by: Geert Uytterhoeven [EMAIL PROTECTED]
 ---
 This brown paper bag bug slipped in due to bad patch splitting.
 Please apply as soon as possible. Thanks!

Looks good.

Acked-by: Geoff Levand [EMAIL PROTECTED]

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


ft_ordered removal patch status?

2007-08-14 Thread Becky Bruce
Hi Paul,

Is there a reason this hasn't been picked up:

http://ozlabs.org/pipermail/linuxppc-dev/2007-May/035906.html

It fixes a build warning in the tree and removes some dead code. It  
appears to still apply cleanly to the top of your tree if there  
are issues please let me know so I can fix them.

Thanks,
Becky

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 0/4] PowerPC 440EPx: Initial Sequoia support take 2

2007-08-14 Thread Valentine Barshak
The following patches add initial PowerPC 440EPx Sequoia board support.
The code is based mainly on the Bamboo board support by Josh Boyer and
should be applied on top of the [patch 00/10] 4xx patch series for 2.6.24
which adds Bamboo support, since Sequoia shares some code pieces with Bamboo.
These patches have been modified based on the comments for the previous
440EPx Sequoia patch series.

The 2.6.24 4xx patch series is included in the following git tree:
git pull git://git.infradead.org/users/jwboyer/powerpc.git for-2.6.24

Thanks,
Valentine.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] Update lmb.h include protection to ASM_POWERPC

2007-08-14 Thread Becky Bruce
This file was protected by _PPC64_LMB_H, which is confusing, as the 32-bit code
also uses the lmb these days.  Changed to _ASM_POWERPC_LMB_H.

Signed-off-by: Becky Bruce [EMAIL PROTECTED]
---
 include/asm-powerpc/lmb.h |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/asm-powerpc/lmb.h b/include/asm-powerpc/lmb.h
index 0c5880f..b5f9f4c 100644
--- a/include/asm-powerpc/lmb.h
+++ b/include/asm-powerpc/lmb.h
@@ -1,5 +1,5 @@
-#ifndef _PPC64_LMB_H
-#define _PPC64_LMB_H
+#ifndef _ASM_POWERPC_LMB_H
+#define _ASM_POWERPC_LMB_H
 #ifdef __KERNEL__
 
 /*
@@ -77,4 +77,4 @@ lmb_end_pfn(struct lmb_region *type, unsigned long region_nr)
 }
 
 #endif /* __KERNEL__ */
-#endif /* _PPC64_LMB_H */
+#endif /* _ASM_POWERPC_LMB_H */
-- 
1.5.0.3

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 1/4] PowerPC 440EPx: Sequoia defconfig

2007-08-14 Thread Valentine Barshak
Sequoia defconfig

Signed-off-by: Valentine Barshak [EMAIL PROTECTED]
---
 arch/powerpc/configs/sequoia_defconfig |  783 +
 1 files changed, 783 insertions(+)

diff -ruN linux-2.6.orig/arch/powerpc/configs/sequoia_defconfig 
linux-2.6/arch/powerpc/configs/sequoia_defconfig
--- linux-2.6.orig/arch/powerpc/configs/sequoia_defconfig   1970-01-01 
03:00:00.0 +0300
+++ linux-2.6/arch/powerpc/configs/sequoia_defconfig2007-08-14 
17:18:07.0 +0400
@@ -0,0 +1,783 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc1
+# Fri Jul 27 20:46:07 2007
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+# CONFIG_6xx is not set
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+CONFIG_44x=y
+# CONFIG_E200 is not set
+CONFIG_PPC_FPU=y
+CONFIG_4xx=y
+CONFIG_BOOKE=y
+CONFIG_PTE_64BIT=y
+CONFIG_PHYS_64BIT=y
+# CONFIG_PPC_MM_SLICES is not set
+CONFIG_NOT_COHERENT_CACHE=y
+CONFIG_PPC32=y
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_IRQ_PER_CPU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_OF=y
+CONFIG_PPC_UDBG_16550=y
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+CONFIG_PPC_DCR_NATIVE=y
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_PPC_DCR=y
+CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED=anticipatory
+
+#
+# Platform support
+#
+# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_MPC5200 is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+# CONFIG_EBONY is not set
+CONFIG_SEQUOIA=y
+CONFIG_440EPX=y
+CONFIG_440A=y
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPM2 is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+CONFIG_MATH_EMULATION=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_PROC_DEVICETREE=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE=
+CONFIG_SECCOMP=y
+CONFIG_WANT_DEVICE_TREE=y
+CONFIG_DEVICE_TREE=sequoia.dts

[PATCH 2/4] PowerPC 440EPx: Sequoia DTS

2007-08-14 Thread Valentine Barshak
AMCC Sequoia device tree.

Signed-off-by: Valentine Barshak [EMAIL PROTECTED]
---
 arch/powerpc/boot/dts/sequoia.dts |  289 ++
 1 files changed, 289 insertions(+)

diff -ruN linux-2.6.orig/arch/powerpc/boot/dts/sequoia.dts 
linux-2.6/arch/powerpc/boot/dts/sequoia.dts
--- linux-2.6.orig/arch/powerpc/boot/dts/sequoia.dts1970-01-01 
03:00:00.0 +0300
+++ linux-2.6/arch/powerpc/boot/dts/sequoia.dts 2007-08-14 19:32:56.0 
+0400
@@ -0,0 +1,289 @@
+/*
+ * Device Tree Source for AMCC Sequoia
+ *
+ * Based on Bamboo code by Josh Boyer [EMAIL PROTECTED]
+ * Copyright (c) 2006, 2007 IBM Corp.
+ *
+ * FIXME: Draft only!
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed as is without
+ * any warranty of any kind, whether express or implied.
+ *
+ */
+
+/ {
+   #address-cells = 2;
+   #size-cells = 1;
+   model = amcc,sequoia;
+   compatible = amcc,sequoia;
+   dcr-parent = /cpus/PowerPC,[EMAIL PROTECTED];
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = cpu;
+   reg = 0;
+   clock-frequency = 0; /* Filled in by zImage */
+   timebase-frequency = 0; /* Filled in by zImage */
+   i-cache-line-size = 20;
+   d-cache-line-size = 20;
+   i-cache-size = 8000;
+   d-cache-size = 8000;
+   dcr-controller;
+   dcr-access-method = native;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0 0 0; /* Filled in by zImage */
+   };
+
+   UIC0: interrupt-controller0 {
+   compatible = ibm,uic-440epx,ibm,uic;
+   interrupt-controller;
+   cell-index = 0;
+   dcr-reg = 0c0 009;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+   };
+
+   UIC1: interrupt-controller1 {
+   compatible = ibm,uic-440epx,ibm,uic;
+   interrupt-controller;
+   cell-index = 1;
+   dcr-reg = 0d0 009;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+   interrupts = 1e 4 1f 4; /* cascade */
+   interrupt-parent = UIC0;
+   };
+
+   UIC2: interrupt-controller2 {
+   compatible = ibm,uic-440epx,ibm,uic;
+   interrupt-controller;
+   cell-index = 2;
+   dcr-reg = 0e0 009;
+   #address-cells = 0;
+   #size-cells = 0;
+   #interrupt-cells = 2;
+   interrupts = 1c 4 1d 4; /* cascade */
+   interrupt-parent = UIC0;
+   };
+
+   SDR0: sdr {
+   compatible = ibm,sdr-440epx, ibm,sdr-440ep;
+   dcr-reg = 00e 002;
+   };
+
+   CPR0: cpr {
+   compatible = ibm,cpr-440epx, ibm,sdr-440ep;
+   dcr-reg = 00c 002;
+   };
+
+   plb {
+   compatible = ibm,plb-440epx, ibm,plb4;
+   #address-cells = 2;
+   #size-cells = 1;
+   ranges;
+   clock-frequency = 0; /* Filled in by zImage */
+
+   SDRAM0: sdram {
+   device_type = memory-controller;
+   compatible = ibm,sdram-44x-ddr2denali;
+   dcr-reg = 010 2;
+   };
+
+   DMA0: dma {
+   compatible = ibm,dma-440epx, ibm,dma-4xx;
+   dcr-reg = 100 027;
+   };
+
+   MAL0: mcmal {
+   compatible = ibm,mcmal-440epx, ibm,mcmal-440spe, 
ibm,mcmal2;
+   dcr-reg = 180 62;
+   num-tx-chans = 4;
+   num-rx-chans = 4;
+   interrupt-parent = MAL0;
+   interrupts = 0 1 2 3 4;
+   #interrupt-cells = 1;
+   #address-cells = 0;
+   #size-cells = 0;
+   interrupt-map = /*TXEOB*/ 0 UIC0 a 4
+   /*RXEOB*/ 1 UIC0 b 4
+   /*SERR*/  2 UIC1 0 4
+   /*TXDE*/  3 UIC1 1 4
+   /*RXDE*/  4 UIC1 2 4;
+   interrupt-map-mask = ;
+   };
+
+   POB0: opb {
+   compatible = ibm,opb-440epx, ibm,opb;
+   #address-cells = 1;
+   #size-cells = 1;
+   /* Bamboo is oddball in the 44x world and doesn't use 
the ERPN
+* bits.
+   

[PATCH 3/4] PowerPC 440EPx: Sequoia bootwrapper

2007-08-14 Thread Valentine Barshak
Bootwrapper code for AMCC 440EPx Sequoia board.
The DDR2 Denali controller support has been moved to
 arch/powerpc/boot/4xx.c
The code also uses 440EP clocking fixups
initially provided for 440EP Bamboo.

Signed-off-by: Valentine Barshak [EMAIL PROTECTED]
---
 arch/powerpc/boot/44x.h|1 
 arch/powerpc/boot/4xx.c|  108 +
 arch/powerpc/boot/4xx.h|1 
 arch/powerpc/boot/Makefile |6 +-
 arch/powerpc/boot/cuboot-sequoia.c |   31 ++
 arch/powerpc/boot/sequoia.c|   48 
 6 files changed, 193 insertions(+), 2 deletions(-)

diff -ruN linux-2.6.orig/arch/powerpc/boot/44x.h 
linux-2.6/arch/powerpc/boot/44x.h
--- linux-2.6.orig/arch/powerpc/boot/44x.h  2007-08-14 17:11:16.0 
+0400
+++ linux-2.6/arch/powerpc/boot/44x.h   2007-08-14 17:25:37.0 +0400
@@ -12,5 +12,6 @@
 
 void ebony_init(void *mac0, void *mac1);
 void bamboo_init(void);
+void sequoia_init(void *mac0, void *mac1);
 
 #endif /* _PPC_BOOT_44X_H_ */
diff -ruN linux-2.6.orig/arch/powerpc/boot/4xx.c 
linux-2.6/arch/powerpc/boot/4xx.c
--- linux-2.6.orig/arch/powerpc/boot/4xx.c  2007-08-14 17:11:16.0 
+0400
+++ linux-2.6/arch/powerpc/boot/4xx.c   2007-08-14 20:16:57.0 +0400
@@ -39,6 +39,114 @@
dt_fixup_memory(0, memsize);
 }
 
+/* 4xx DDR1/2 Denali memory controller support */
+/* DDR0 registers */
+#define DDR0_022
+#define DDR0_088
+#define DDR0_1010
+#define DDR0_1414
+#define DDR0_4242
+#define DDR0_4343
+
+/* DDR0_02 */
+#define DDR_START  0x1
+#define DDR_START_SHIFT0
+#define DDR_MAX_CS_REG 0x3
+#define DDR_MAX_CS_REG_SHIFT   24
+#define DDR_MAX_COL_REG0xf
+#define DDR_MAX_COL_REG_SHIFT  16
+#define DDR_MAX_ROW_REG0xf
+#define DDR_MAX_ROW_REG_SHIFT  8
+/* DDR0_08 */
+#define DDR_DDR2_MODE  0x1
+#define DDR_DDR2_MODE_SHIFT0
+/* DDR0_10 */
+#define DDR_CS_MAP 0x3
+#define DDR_CS_MAP_SHIFT   8
+/* DDR0_14 */
+#define DDR_REDUC  0x1
+#define DDR_REDUC_SHIFT16
+/* DDR0_42 */
+#define DDR_APIN   0x7
+#define DDR_APIN_SHIFT 24
+/* DDR0_43 */
+#define DDR_COL_SZ 0x7
+#define DDR_COL_SZ_SHIFT   8
+#define DDR_BANK8  0x1
+#define DDR_BANK8_SHIFT0
+
+#define DDR_GET_VAL(val, mask, shift)  (((val)  (shift))  (mask))
+
+static inline u32 mfdcr_sdram0(u32 reg)
+{
+mtdcr(DCRN_SDRAM0_CFGADDR, reg);
+return mfdcr(DCRN_SDRAM0_CFGDATA);
+}
+
+void ibm4xx_denali_fixup_memsize(void)
+{
+   u32 val, max_cs, max_col, max_row;
+   u32 cs, col, row, bank, dpath;
+   unsigned long memsize;
+
+   val = mfdcr_sdram0(DDR0_02);
+   if (!DDR_GET_VAL(val, DDR_START, DDR_START_SHIFT))
+   fatal(DDR controller is not initialized\n);
+
+   /* get maximum cs col and row values */
+   max_cs  = DDR_GET_VAL(val, DDR_MAX_CS_REG, DDR_MAX_CS_REG_SHIFT);
+   max_col = DDR_GET_VAL(val, DDR_MAX_COL_REG, DDR_MAX_COL_REG_SHIFT);
+   max_row = DDR_GET_VAL(val, DDR_MAX_ROW_REG, DDR_MAX_ROW_REG_SHIFT);
+
+   /* get CS value */
+   val = mfdcr_sdram0(DDR0_10);
+
+   val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT);
+   cs = 0;
+   while (val) {
+   if (val  0x1)
+   cs++;
+   val = val  1;
+   }
+
+   if (!cs)
+   fatal(No memory installed\n);
+   if (cs  max_cs)
+   fatal(DDR wrong CS configuration\n);
+
+   /* get data path bytes */
+   val = mfdcr_sdram0(DDR0_14);
+
+   if (DDR_GET_VAL(val, DDR_REDUC, DDR_REDUC_SHIFT))
+   dpath = 8; /* 64 bits */
+   else
+   dpath = 4; /* 32 bits */
+
+   /* get adress pins (rows) */
+   val = mfdcr_sdram0(DDR0_42);
+
+   row = DDR_GET_VAL(val, DDR_APIN, DDR_APIN_SHIFT);
+   if (row  max_row)
+   fatal(DDR wrong APIN configuration\n);
+   row = max_row - row;
+
+   /* get collomn size and banks */
+   val = mfdcr_sdram0(DDR0_43);
+
+   col = DDR_GET_VAL(val, DDR_COL_SZ, DDR_COL_SZ_SHIFT);
+   if (col  max_col)
+   fatal(DDR wrong COL configuration\n);
+   col = max_col - col;
+
+   if (DDR_GET_VAL(val, DDR_BANK8, DDR_BANK8_SHIFT))
+   bank = 8; /* 8 banks */
+   else
+   bank = 4; /* 4 banks */
+
+   memsize = cs * (1  (col+row)) * bank * dpath;
+   dt_fixup_memory(0, memsize);
+}
+
 #define DBCR0_RST_SYSTEM 0x3000
 
 void ibm44x_dbcr_reset(void)
diff -ruN linux-2.6.orig/arch/powerpc/boot/4xx.h 
linux-2.6/arch/powerpc/boot/4xx.h
--- linux-2.6.orig/arch/powerpc/boot/4xx.h  2007-08-14 17:11:16.0 
+0400
+++ linux-2.6/arch/powerpc/boot/4xx.h   2007-08-14 

[PATCH 4/4] PowerPC 440EPx: Sequoia board support

2007-08-14 Thread Valentine Barshak
AMCC 440EPx Sequoia board support.
The second bit (0x4) in the 440EPx/440GRx PVR value indicates
the Security/Kasumi engine absence if set.
This bit has been removed from the pvr mask to use a single
cputable entry for with/without Security/Kasumi cpu versions.


Signed-off-by: Valentine Barshak [EMAIL PROTECTED]
---
 arch/powerpc/kernel/cputable.c   |   18 +
 arch/powerpc/kernel/head_44x.S   |2 -
 arch/powerpc/platforms/44x/Kconfig   |   17 -
 arch/powerpc/platforms/44x/Makefile  |1 
 arch/powerpc/platforms/44x/sequoia.c |   66 +++
 5 files changed, 102 insertions(+), 2 deletions(-)

diff -ruN linux-2.6.orig/arch/powerpc/kernel/cputable.c 
linux-2.6/arch/powerpc/kernel/cputable.c
--- linux-2.6.orig/arch/powerpc/kernel/cputable.c   2007-08-14 
17:11:18.0 +0400
+++ linux-2.6/arch/powerpc/kernel/cputable.c2007-08-14 19:37:54.0 
+0400
@@ -1132,6 +1132,24 @@
.dcache_bsize   = 32,
.platform   = ppc440,
},
+   { /* 440EPX */
+   .pvr_mask   = 0xfffb,
+   .pvr_value  = 0x28D0,
+   .cpu_name   = 440EPX,
+   .cpu_features   = CPU_FTRS_44X,
+   .cpu_user_features  = COMMON_USER_BOOKE | 
PPC_FEATURE_HAS_FPU,
+   .icache_bsize   = 32,
+   .dcache_bsize   = 32,
+   },
+   { /* 440GRX */
+   .pvr_mask   = 0xfffb,
+   .pvr_value  = 0x28D8,
+   .cpu_name   = 440GRX,
+   .cpu_features   = CPU_FTRS_44X,
+   .cpu_user_features  = COMMON_USER_BOOKE,
+   .icache_bsize   = 32,
+   .dcache_bsize   = 32,
+   },
{   /* 440GP Rev. B */
.pvr_mask   = 0xffff,
.pvr_value  = 0x4440,
diff -ruN linux-2.6.orig/arch/powerpc/kernel/head_44x.S 
linux-2.6/arch/powerpc/kernel/head_44x.S
--- linux-2.6.orig/arch/powerpc/kernel/head_44x.S   2007-08-14 
17:11:19.0 +0400
+++ linux-2.6/arch/powerpc/kernel/head_44x.S2007-08-14 17:18:43.0 
+0400
@@ -217,7 +217,7 @@
lis r4,[EMAIL PROTECTED]/* IVPR only uses the high 16-bits */
mtspr   SPRN_IVPR,r4
 
-#ifdef CONFIG_440EP
+#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)
/* Clear DAPUIB flag in CCR0 (enable APU between CPU and FPU) */
mfspr   r2,SPRN_CCR0
lis r3,0xffef
diff -ruN linux-2.6.orig/arch/powerpc/platforms/44x/Kconfig 
linux-2.6/arch/powerpc/platforms/44x/Kconfig
--- linux-2.6.orig/arch/powerpc/platforms/44x/Kconfig   2007-08-14 
17:11:17.0 +0400
+++ linux-2.6/arch/powerpc/platforms/44x/Kconfig2007-08-14 
20:36:19.0 +0400
@@ -14,6 +14,14 @@
help
  This option enables support for the IBM PPC440GP evaluation board.
 
+config SEQUOIA
+   bool Sequoia
+   depends on 44x
+   default n
+   select 440EPX
+   help
+ This option enables support for the AMCC PPC440EPX evaluation board.
+
 #config LUAN
 #  bool Luan
 #  depends on 44x
@@ -37,6 +45,13 @@
select IBM440EP_ERR42
 #  select IBM_NEW_EMAC_ZMII
 
+config 440EPX
+   bool
+   select PPC_FPU
+# Disabled until the new EMAC Driver is merged.
+#  select IBM_NEW_EMAC_EMAC4
+#  select IBM_NEW_EMAC_ZMII
+
 config 440GP
bool
 # Disabled until the new EMAC Driver is merged.
@@ -50,7 +65,7 @@
 
 config 440A
bool
-   depends on 440GX
+   depends on 440GX || 440EPX
default y
 
 # 44x errata/workaround config symbols, selected by the CPU models above
diff -ruN linux-2.6.orig/arch/powerpc/platforms/44x/Makefile 
linux-2.6/arch/powerpc/platforms/44x/Makefile
--- linux-2.6.orig/arch/powerpc/platforms/44x/Makefile  2007-08-14 
17:11:17.0 +0400
+++ linux-2.6/arch/powerpc/platforms/44x/Makefile   2007-08-14 
17:18:43.0 +0400
@@ -1,3 +1,4 @@
 obj-$(CONFIG_44x)  := misc_44x.o
 obj-$(CONFIG_EBONY)+= ebony.o
 obj-$(CONFIG_BAMBOO) += bamboo.o
+obj-$(CONFIG_SEQUOIA)  += sequoia.o
diff -ruN linux-2.6.orig/arch/powerpc/platforms/44x/sequoia.c 
linux-2.6/arch/powerpc/platforms/44x/sequoia.c
--- linux-2.6.orig/arch/powerpc/platforms/44x/sequoia.c 1970-01-01 
03:00:00.0 +0300
+++ linux-2.6/arch/powerpc/platforms/44x/sequoia.c  2007-08-14 
20:12:26.0 +0400
@@ -0,0 +1,66 @@
+/*
+ * Sequoia board specific routines
+ *
+ * Valentine Barshak [EMAIL PROTECTED]
+ * Copyright 2007 MontaVista Software Inc.
+ *
+ * Based on the Bamboo code by
+ * Josh Boyer [EMAIL PROTECTED]
+ * Copyright 2007 IBM Corporation
+ *
+ * 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 

Re: [PATCH 1/4] PowerPC 440EPx: Sequoia defconfig

2007-08-14 Thread Josh Boyer
On Tue, 14 Aug 2007 22:45:00 +0400
Valentine Barshak [EMAIL PROTECTED] wrote:

 Sequoia defconfig
 
 Signed-off-by: Valentine Barshak [EMAIL PROTECTED]
 ---
  arch/powerpc/configs/sequoia_defconfig |  783 
 +
  1 files changed, 783 insertions(+)
 
 diff -ruN linux-2.6.orig/arch/powerpc/configs/sequoia_defconfig 
 linux-2.6/arch/powerpc/configs/sequoia_defconfig
 --- linux-2.6.orig/arch/powerpc/configs/sequoia_defconfig 1970-01-01 
 03:00:00.0 +0300
 +++ linux-2.6/arch/powerpc/configs/sequoia_defconfig  2007-08-14 
 17:18:07.0 +0400
 @@ -0,0 +1,783 @@
 +#
 +# Automatically generated make config: don't edit
 +# Linux kernel version: 2.6.23-rc1
 +# Fri Jul 27 20:46:07 2007
 +#
 +# CONFIG_PPC64 is not set
 +
 +#
 +# Processor support
 +#
 +# CONFIG_6xx is not set
 +# CONFIG_PPC_85xx is not set
 +# CONFIG_PPC_8xx is not set
 +# CONFIG_40x is not set
 +CONFIG_44x=y
 +# CONFIG_E200 is not set
 +CONFIG_PPC_FPU=y

...

 +CONFIG_MATH_EMULATION=y

You shouldn't need both FPU and MATH_EMULATION.  Bamboo had the same
bug in it's defconfig until recently, so you can blame me if you'd
like :)

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


System crash on boot_e500.S

2007-08-14 Thread mike zheng
 Hi All,

I am trying to bring up MPC8548 CDS board on 2.4 kernel. I have problem in
the head_e500.S. The mtspr SRR0, r7; mtspr SRR1 r6 does not work for me.
The content of R7 and R6 are not moved to SRR0 and SRR1.  I am using the
tool-chain from Freescale for 2.6 kernel.

Any idea on this issue?

Thanks,

Mike



Code of head_e500.S:


  slwi  r6,r6,5 /* setup new context with other address space */
  bl1f  /* Find our address */
1:mflr  r9
  rlwimi  r7,r9,0,20,31
  addi  r7,r7,24
  mtspr SRR0,r7   No change in SRR0
  mtspr SRR1,r6   No change in SRR1
  rfi System crash

/* 4. Clear out PIDs  Search info */  l
  lir6,0
  mtspr SPRN_PID0,r6
  mtspr SPRN_PID1,r6
  mtspr SPRN_PID2,r6
  mtspr SPRN_MAS6,r6
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: System crash on boot_e500.S

2007-08-14 Thread Jon Loeliger
On Tue, 2007-08-14 at 15:14, mike zheng wrote:
 Hi All,
  
 I am trying to bring up MPC8548 CDS board on 2.4 kernel. I have
 problem in the head

Ow, it hurts when I do this!

 _e500.S. The mtspr SRR0, r7; mtspr SRR1 r6 does not work for me. The
 content of R7 and R6 are not moved to SRR0 and SRR1.  I am using the
 tool-chain from Freescale for 2.6 kernel. 
  
 Any idea on this issue?

Maybe use current 2.6 code?

jdl


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 4/4] PowerPC 440EPx: Sequoia board support

2007-08-14 Thread David Gibson
On Tue, Aug 14, 2007 at 11:04:09PM +0400, Valentine Barshak wrote:
 AMCC 440EPx Sequoia board support.
 The second bit (0x4) in the 440EPx/440GRx PVR value indicates
 the Security/Kasumi engine absence if set.
 This bit has been removed from the pvr mask to use a single
 cputable entry for with/without Security/Kasumi cpu versions.
 
 
 Signed-off-by: Valentine Barshak [EMAIL PROTECTED]
 ---
  arch/powerpc/kernel/cputable.c   |   18 +
  arch/powerpc/kernel/head_44x.S   |2 -
  arch/powerpc/platforms/44x/Kconfig   |   17 -
  arch/powerpc/platforms/44x/Makefile  |1 
  arch/powerpc/platforms/44x/sequoia.c |   66 
 +++
  5 files changed, 102 insertions(+), 2 deletions(-)
 
 diff -ruN linux-2.6.orig/arch/powerpc/kernel/cputable.c 
 linux-2.6/arch/powerpc/kernel/cputable.c
 --- linux-2.6.orig/arch/powerpc/kernel/cputable.c 2007-08-14 
 17:11:18.0 +0400
 +++ linux-2.6/arch/powerpc/kernel/cputable.c  2007-08-14 19:37:54.0 
 +0400
 @@ -1132,6 +1132,24 @@
   .dcache_bsize   = 32,
   .platform   = ppc440,
   },
 + { /* 440EPX */
 + .pvr_mask   = 0xfffb,
 + .pvr_value  = 0x28D0,
 + .cpu_name   = 440EPX,
 + .cpu_features   = CPU_FTRS_44X,
 + .cpu_user_features  = COMMON_USER_BOOKE | 
 PPC_FEATURE_HAS_FPU,
 + .icache_bsize   = 32,
 + .dcache_bsize   = 32,
 + },
 + { /* 440GRX */
 + .pvr_mask   = 0xfffb,
 + .pvr_value  = 0x28D8,
 + .cpu_name   = 440GRX,
 + .cpu_features   = CPU_FTRS_44X,
 + .cpu_user_features  = COMMON_USER_BOOKE,
 + .icache_bsize   = 32,
 + .dcache_bsize   = 32,
 + },
   {   /* 440GP Rev. B */
   .pvr_mask   = 0xffff,
   .pvr_value  = 0x4440,
 diff -ruN linux-2.6.orig/arch/powerpc/kernel/head_44x.S 
 linux-2.6/arch/powerpc/kernel/head_44x.S
 --- linux-2.6.orig/arch/powerpc/kernel/head_44x.S 2007-08-14 
 17:11:19.0 +0400
 +++ linux-2.6/arch/powerpc/kernel/head_44x.S  2007-08-14 17:18:43.0 
 +0400
 @@ -217,7 +217,7 @@
   lis r4,[EMAIL PROTECTED]/* IVPR only uses the high 16-bits */
   mtspr   SPRN_IVPR,r4
  
 -#ifdef CONFIG_440EP
 +#if defined(CONFIG_440EP) || defined(CONFIG_440EPX)

Since we should now be able to support both 440GP and 440EP boards in
the same kernel, this probably needs to become a feature section.

   /* Clear DAPUIB flag in CCR0 (enable APU between CPU and FPU) */
   mfspr   r2,SPRN_CCR0
   lis r3,0xffef
 diff -ruN linux-2.6.orig/arch/powerpc/platforms/44x/Kconfig 
 linux-2.6/arch/powerpc/platforms/44x/Kconfig
 --- linux-2.6.orig/arch/powerpc/platforms/44x/Kconfig 2007-08-14 
 17:11:17.0 +0400
 +++ linux-2.6/arch/powerpc/platforms/44x/Kconfig  2007-08-14 
 20:36:19.0 +0400
 @@ -14,6 +14,14 @@
   help
 This option enables support for the IBM PPC440GP evaluation board.
  
 +config SEQUOIA
 + bool Sequoia
 + depends on 44x
 + default n
 + select 440EPX
 + help
 +   This option enables support for the AMCC PPC440EPX evaluation board.
 +
  #config LUAN
  #bool Luan
  #depends on 44x
 @@ -37,6 +45,13 @@
   select IBM440EP_ERR42
  #select IBM_NEW_EMAC_ZMII
  
 +config 440EPX
 + bool
 + select PPC_FPU
 +# Disabled until the new EMAC Driver is merged.
 +#select IBM_NEW_EMAC_EMAC4
 +#select IBM_NEW_EMAC_ZMII
 +
  config 440GP
   bool
  # Disabled until the new EMAC Driver is merged.
 @@ -50,7 +65,7 @@
  
  config 440A
   bool
 - depends on 440GX
 + depends on 440GX || 440EPX
   default y
  
  # 44x errata/workaround config symbols, selected by the CPU models above
 diff -ruN linux-2.6.orig/arch/powerpc/platforms/44x/Makefile 
 linux-2.6/arch/powerpc/platforms/44x/Makefile
 --- linux-2.6.orig/arch/powerpc/platforms/44x/Makefile2007-08-14 
 17:11:17.0 +0400
 +++ linux-2.6/arch/powerpc/platforms/44x/Makefile 2007-08-14 
 17:18:43.0 +0400
 @@ -1,3 +1,4 @@
  obj-$(CONFIG_44x):= misc_44x.o
  obj-$(CONFIG_EBONY)  += ebony.o
  obj-$(CONFIG_BAMBOO) += bamboo.o
 +obj-$(CONFIG_SEQUOIA)+= sequoia.o
 diff -ruN linux-2.6.orig/arch/powerpc/platforms/44x/sequoia.c 
 linux-2.6/arch/powerpc/platforms/44x/sequoia.c
 --- linux-2.6.orig/arch/powerpc/platforms/44x/sequoia.c   1970-01-01 
 03:00:00.0 +0300
 +++ linux-2.6/arch/powerpc/platforms/44x/sequoia.c2007-08-14 
 20:12:26.0 +0400
 @@ -0,0 +1,66 @@
 +/*
 + * Sequoia board specific routines
 + *
 + * Valentine Barshak [EMAIL PROTECTED]
 + * Copyright 2007 MontaVista Software Inc.
 + *
 + * Based on the Bamboo code by
 + * Josh