* Re: Fw: 2.6.16 crashes when running numastat on p575
From: Nathan Lynch @ 2006-04-03 14:10 UTC (permalink / raw)
To: Christoph Lameter; +Cc: akpm, linuxppc-dev, Paul Jackson, ak, linux-kernel
In-Reply-To: <Pine.LNX.4.64.0604022224001.18401@schroedinger.engr.sgi.com>
Christoph Lameter wrote:
> On Sun, 2 Apr 2006, Paul Jackson wrote:
>
> > - for (cpu = 0; cpu < NR_CPUS; cpu++) {
> > + for_each_online_cpu(cpu) {
> >
> > Idle curiosity -- what keeps a cpu from going offline during
> > this scan, and leaving us with the same crash as before?
>
> Nothing keeps a processor from going offline. We could take the hotplug
> lock for every for_each_online_cpu() in the kernel.
In this case, disabling preempt around the for_each_online_cpu loop
would prevent any cpu from going down in the meantime. But since this
function doesn't look like it's a hot path, and we're potentially
traversing lots of zones and cpus, lock_cpu_hotplug might be preferable.
As Paul noted, the fix as it stands isn't adequate.
^ permalink raw reply
* Re: Some issues of Linux2.6.16.1 compilation for MPC8548
From: Kumar Gala @ 2006-04-03 14:13 UTC (permalink / raw)
To: fengcheng lu; +Cc: linuxppc-dev
In-Reply-To: <e9aafa30604030439y29b88638o220a4446295001d0@mail.gmail.com>
On Apr 3, 2006, at 6:39 AM, fengcheng lu wrote:
> Hello all
>
> When I try to compile the latest kernel2.6.16.1 for MPC8548, I
> have the following questions.
>
> 1. run the make command after the kernel is configured(all are
> default configurations except the processor type is MPC8548), the
> following errors are got
> CC arch/powerpc/kernel/asm-offset.s
> In file included from include/asm-ppc/io.h:39
> from include/asm/io.h:13,
> from arch/powerpc/kernel/asm-offsets.c:33:
> arch/powerpc/include/asm/mpc85xx.h:29:40: platforms/85xx/
> mpc8555_cds.h: No such file or directory
> make[1]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1
>
> It seems the header file path is wrong. so I build the symbol link
> ln -s /usr/src/linux-2.6.16.1/include/platforms /usr/src/
> linux-2.6.16.1/arch/ppc/platforms
> ln -s /usr/src/linux-2.6.16.1/include/syslib /usr/src/
> linux-2.6.16.1/arch/ppc/syslib
> After that, the issues is fixed. But I have still other issues:
>
> 2.
> arch/powerpc/kernel/entry_32.S:48:24: head_booke.h: No such
> file or directory
> make[1]: *** [arch/powerpc/kernel/entry_32.o] Error 1
> I found this file in arch/ppc/kernel/head_booke.h and copy it
> into arch/powerpc/kernel/ and re-compile it. sio this issue is
> fixed. but new problem coming
>
> 3.
> ld: arch/powerpc/platforms/85xx/built-in.o: No such file: No
> such file or directory
> make[1]: *** [arch/powerpc/platforms/built-in.o] Error 1
>
> What do I do? Any patches for these issues?
Are you trying to build 8548 with ARCH=ppc or ARCH=powerpc?
- kumar
^ permalink raw reply
* where do applications get loaded in virtual memory on a 4xx?
From: Ralph Blach @ 2006-04-03 12:46 UTC (permalink / raw)
To: Linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 208 bytes --]
I would like to know where in virtual memory application get loaded.
I can do an NM and see the address in an a.out file? How do these address
actually translate to 4xx virtual address?
thanks
Chip
[-- Attachment #2: Type: text/html, Size: 309 bytes --]
^ permalink raw reply
* Re: Fw: 2.6.16 crashes when running numastat on p575
From: Andi Kleen @ 2006-04-03 11:49 UTC (permalink / raw)
To: Paul Jackson; +Cc: akpm, linux-kernel, linuxppc-dev, ak, Christoph Lameter
In-Reply-To: <20060402221513.96f05bdc.pj@sgi.com>
On Monday 03 April 2006 07:15, Paul Jackson wrote:
> - for (cpu = 0; cpu < NR_CPUS; cpu++) {
> + for_each_online_cpu(cpu) {
>
> Idle curiosity -- what keeps a cpu from going offline during
> this scan, and leaving us with the same crash as before?
CPU hotdown uses RCU like techniques to avoid this. Only potential
problem could be on a preemptive kernel, but I hope nobody tries
cpu unplug on such a beast. The later could be probably fixed
with a rcu_read_lock() or somesuch.
-Andi
^ permalink raw reply
* Some issues of Linux2.6.16.1 compilation for MPC8548
From: fengcheng lu @ 2006-04-03 11:39 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]
Hello all
When I try to compile the latest kernel2.6.16.1 for MPC8548, I have the
following questions.
1. run the make command after the kernel is configured(all are default
configurations except the processor type is MPC8548), the following errors
are got
* CC arch/powerpc/kernel/asm-offset.s*
* In file included from include/asm-ppc/io.h:39*
* from include/asm/io.h:13,*
* from arch/powerpc/kernel/asm-offsets.c:33:*
* arch/powerpc/include/asm/mpc85xx.h:29:40:
platforms/85xx/mpc8555_cds.h: No such file or directory*
*make[1]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1*
It seems the header file path is wrong. so I build the symbol link
ln -s /usr/src/linux-2.6.16.1/include/platforms /usr/src/linux-
2.6.16.1/arch/ppc/platforms
ln -s /usr/src/linux-2.6.16.1/include/syslib /usr/src/linux-
2.6.16.1/arch/ppc/syslib
After that, the issues is fixed. But I have still other issues:
2.
* arch/powerpc/kernel/entry_32.S:48:24: head_booke.h: No such file or
directory*
* make[1]: *** [arch/powerpc/kernel/entry_32.o] Error 1*
I found this file in arch/ppc/kernel/head_booke.h and copy it into
arch/powerpc/kernel/ and re-compile it. sio this issue is fixed. but new
problem coming
3.
* ld: arch/powerpc/platforms/85xx/built-in.o: No such file: No such
file or directory*
* make[1]: *** [arch/powerpc/platforms/built-in.o] Error 1*
**
* What do I do? Any patches for these issues?*
**
**
*Best Regards*
*Lu *
[-- Attachment #2: Type: text/html, Size: 3458 bytes --]
^ permalink raw reply
* [PATCH] ppc32: Fix string comparing in platform_notify_map
From: Vitaly Bordug @ 2006-04-03 11:26 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-embedded
Fixed odd function behavior when dev->bus_id does not contain '.' - it
compared that case 0 characters of the string and hereby reported success and
executed callback. Now bus_id's are compared correctly, extra callback
triggering eliminated.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
---
arch/ppc/syslib/ppc_sys.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c
index 60c724e..7662c4e 100644
--- a/arch/ppc/syslib/ppc_sys.c
+++ b/arch/ppc/syslib/ppc_sys.c
@@ -156,12 +156,13 @@ void platform_notify_map(const struct pl
while (map->bus_id != NULL) {
idx = -1;
s = strrchr(dev->bus_id, '.');
- if (s != NULL)
+ if (s != NULL) {
idx = (int)simple_strtol(s + 1, NULL, 10);
- else
+ len = s - dev->bus_id;
+ } else {
s = dev->bus_id;
-
- len = s - dev->bus_id;
+ len = strlen(dev->bus_id);
+ }
if (!strncmp(dev->bus_id, map->bus_id, len)) {
pdev = container_of(dev, struct platform_device, dev);
^ permalink raw reply related
* MPC5200 FEC Ethernet only halfduplex ?
From: Thomas Schnürer @ 2006-04-03 10:22 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
Im working with Linux on our MPC5200 Board, with the latest Rev. B3 Processor.
I was updating our Linux BSP from BestComm 2.1 to 2.2 some time ago and used your patches which increased usability of the FEC very much.
There is a line in the driver code which I dont understand, it says:
+ fec_restart(dev, 0); /* always use half duplex mode only */
Why can only half duplex be used ? I made a test with the iperf tool and saw that with the driver in its current state I get 90 Mbit/s in one direction and only 10 kBit/ other way. When changing the fec_restart call to (dev, 1) it turns to 90 Mbit and 250 kBit/s.
Then I changed for couriosity the BestComm task prioritisation and suddenly I get 90 Mbit in both directions.
So whats the reason for this setting above ?
Thanks in advance!
[-- Attachment #2: Type: text/html, Size: 1414 bytes --]
^ permalink raw reply
* Re: mpc5200b and floating point
From: Sascha Hauer @ 2006-04-03 10:10 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <20060331133619.GD7738@localhost.localdomain>
On Fri, Mar 31, 2006 at 03:36:20PM +0200, Sascha Hauer wrote:
> Hi,
>
> I'm working with a mpc5200b custom board and I'm trying to run an
> application with floating point. All floating point variables seem to
> zero all the time. Since I'm not very familiar with powerpc it might be
> something stupid I have overlooked.
> Any hints?
The problem turned out to be toolchain related. We chrooted into the
rootfs on an Ibook, same problem there. I'll take a closer look in my
toochain.
Thank you for your replies,
Sascha Hauer
^ permalink raw reply
* Re: Fw: 2.6.16 crashes when running numastat on p575
From: Sonny Rao @ 2006-04-03 8:09 UTC (permalink / raw)
To: Christoph Lameter
Cc: Andrew Morton, Paul Jackson, linux-kernel, linuxppc-dev, ak
In-Reply-To: <Pine.LNX.4.64.0604022149450.15895@schroedinger.engr.sgi.com>
On Sun, Apr 02, 2006 at 10:12:29PM -0700, Christoph Lameter wrote:
> On Sun, 2 Apr 2006, Andrew Morton wrote:
>
> > I have a vague feeling that you guys worked on numastat?
>
> This is mostly Andi's code although I added the zone_pcp() stuff. This is
> failing because zone_pcp() only returns valid information for online
> processors.
>
> Initially all zone_pcps() point to the boot_cpuset (see zone_pcp_init)
> and therefore zone_pcp) is always valid and we do not see this bug. But
> if someone downs a processor or a processor dies then free_zone_pageset()
> is called which will set zone_pcp() = NULL.
>
>
> Fix NULL pointer dereference in node_read_numastat()
>
> zone_pcp() only returns valid values if the processor is online.
>
> Change node_read_numastat() to only scan online processors.
>
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
>
> Index: linux-2.6.16/drivers/base/node.c
> ===================================================================
> --- linux-2.6.16.orig/drivers/base/node.c 2006-03-19 21:53:29.000000000 -0800
> +++ linux-2.6.16/drivers/base/node.c 2006-04-02 21:59:49.000000000 -0700
> @@ -106,7 +106,7 @@ static ssize_t node_read_numastat(struct
> other_node = 0;
> for (i = 0; i < MAX_NR_ZONES; i++) {
> struct zone *z = &pg->node_zones[i];
> - for (cpu = 0; cpu < NR_CPUS; cpu++) {
> + for_each_online_cpu(cpu) {
> struct per_cpu_pageset *ps = zone_pcp(z,cpu);
> numa_hit += ps->numa_hit;
> numa_miss += ps->numa_miss;
Works, thanks.
Sonny
^ permalink raw reply
* Re: mpc5200b and floating point
From: Sascha Hauer @ 2006-04-03 8:03 UTC (permalink / raw)
To: White; +Cc: linuxppc-embedded
In-Reply-To: <20060331203634.3818e8af@White64>
On Fri, Mar 31, 2006 at 08:36:34PM +0200, White wrote:
> Am Fri, 31 Mar 2006 15:36:20 +0200 schrieb Sascha Hauer
> <s.hauer@pengutronix.de> :
>
> Please check your Toolchain.
> Have you build it ?
I have built it with crosstool 0.38
>
> Do you use glibc or something like uclibc ?
glibc
With -msoft-float everything is working fine, but with softfloat.
Without flags or with -mhard-float my toolchain (which is btw a
gcc-4.0.2, glibc 2.3.6) generates floating point instructions which I
can see in the objdump.
Since this seems more like a toolchain related problem, maybe the
crosstool ml is a better place for this.
Sascha
^ permalink raw reply
* RE: PPC405 support in later 2.4.x kernels
From: Krishnan @ 2006-04-03 6:51 UTC (permalink / raw)
To: linuxppc-embedded
Dear All,
Does anyone have an explanation for this issue? We are facing the same
problem at our site.
As far as I can see on the site there is no consolidated answer to the
experiments done by Trevor.
This was posted by Trevor Woerner on Fri Aug 1 13:32:41 EST 2003.
Thanks,
kris
^ permalink raw reply
* Re: Fw: 2.6.16 crashes when running numastat on p575
From: Paul Jackson @ 2006-04-03 6:43 UTC (permalink / raw)
To: Christoph Lameter; +Cc: akpm, linuxppc-dev, ak, linux-kernel
In-Reply-To: <Pine.LNX.4.64.0604022224001.18401@schroedinger.engr.sgi.com>
Christoph wrote:
> Could you take that up with the hotplug folks?
Hmmm ... I suddenly notice that I'm on vacation
for the next two weeks. Sorry <grin>.
In any case, I'll have to leave that one for
the hotplug folks to sort out. I have other
priorities and limited talents.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
^ permalink raw reply
* Re: Fw: 2.6.16 crashes when running numastat on p575
From: Christoph Lameter @ 2006-04-03 5:12 UTC (permalink / raw)
To: Sonny Rao; +Cc: Andrew Morton, linuxppc-dev, ak, Paul Jackson, linux-kernel
In-Reply-To: <20060402213216.2e61b74e.akpm@osdl.org>
On Sun, 2 Apr 2006, Andrew Morton wrote:
> I have a vague feeling that you guys worked on numastat?
This is mostly Andi's code although I added the zone_pcp() stuff. This is
failing because zone_pcp() only returns valid information for online
processors.
Initially all zone_pcps() point to the boot_cpuset (see zone_pcp_init)
and therefore zone_pcp) is always valid and we do not see this bug. But
if someone downs a processor or a processor dies then free_zone_pageset()
is called which will set zone_pcp() = NULL.
Fix NULL pointer dereference in node_read_numastat()
zone_pcp() only returns valid values if the processor is online.
Change node_read_numastat() to only scan online processors.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.16/drivers/base/node.c
===================================================================
--- linux-2.6.16.orig/drivers/base/node.c 2006-03-19 21:53:29.000000000 -0800
+++ linux-2.6.16/drivers/base/node.c 2006-04-02 21:59:49.000000000 -0700
@@ -106,7 +106,7 @@ static ssize_t node_read_numastat(struct
other_node = 0;
for (i = 0; i < MAX_NR_ZONES; i++) {
struct zone *z = &pg->node_zones[i];
- for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ for_each_online_cpu(cpu) {
struct per_cpu_pageset *ps = zone_pcp(z,cpu);
numa_hit += ps->numa_hit;
numa_miss += ps->numa_miss;
^ permalink raw reply
* Re: Fw: 2.6.16 crashes when running numastat on p575
From: Paul Jackson @ 2006-04-03 5:15 UTC (permalink / raw)
To: Christoph Lameter; +Cc: akpm, linuxppc-dev, ak, linux-kernel
In-Reply-To: <Pine.LNX.4.64.0604022149450.15895@schroedinger.engr.sgi.com>
- for (cpu = 0; cpu < NR_CPUS; cpu++) {
+ for_each_online_cpu(cpu) {
Idle curiosity -- what keeps a cpu from going offline during
this scan, and leaving us with the same crash as before?
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
^ permalink raw reply
* Re: Fw: 2.6.16 crashes when running numastat on p575
From: Christoph Lameter @ 2006-04-03 5:25 UTC (permalink / raw)
To: Paul Jackson; +Cc: akpm, linuxppc-dev, ak, linux-kernel
In-Reply-To: <20060402221513.96f05bdc.pj@sgi.com>
On Sun, 2 Apr 2006, Paul Jackson wrote:
> - for (cpu = 0; cpu < NR_CPUS; cpu++) {
> + for_each_online_cpu(cpu) {
>
> Idle curiosity -- what keeps a cpu from going offline during
> this scan, and leaving us with the same crash as before?
Nothing keeps a processor from going offline. We could take the hotplug
lock for every for_each_online_cpu() in the kernel. Could you take that
up with the hotplug folks?
^ permalink raw reply
* _machine removal breaks kexec?
From: Anton Blanchard @ 2006-04-03 1:40 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus
Hi,
It looks like the _machine removal broke kexec:
# kexec -l vmlinux
/proc/device-tree/chosen/linux,platform: No such file or directory
The kexec tools seem to want the linux,platform property:
/* if LPAR, no need to read any more from /chosen */
if (platform != PLATFORM_PSERIES) {
closedir(cdir);
continue;
}
Anton
^ permalink raw reply
* Re: [PATCH] Add 85xx CDS to arch/powerpc
From: Jon Loeliger @ 2006-04-02 23:20 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, Paul Mackerras, linuxppc-embedded
In-Reply-To: <200604030100.27013.arnd@arndb.de>
So, like, the other day Arnd Bergmann mumbled:
> [MPIC]
>
> Shouldn't all this come from the device tree?
>
> ...
>
> > +/* PCI interrupt controller */
> > +#define PIRQ0A MPC85xx_IRQ_EXT0
> > +#define PIRQ0B MPC85xx_IRQ_EXT1
> > +#define PIRQ0C MPC85xx_IRQ_EXT2
> > +#define PIRQ0D MPC85xx_IRQ_EXT3
> > +#define PIRQ1A MPC85xx_IRQ_EXT11
>
> And these as well, more importantly?
Yep. In time they will. However, the parsing of the
PIC nodes hasn't been added to the 85xx (uh, nor 83xx)
as of yet.
It is on "the list".
We should defer to Kumar to accepting these at this stage
or not.
jdl
^ permalink raw reply
* Re: [PATCH] Add 85xx CDS to arch/powerpc
From: Arnd Bergmann @ 2006-04-02 23:00 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <Pine.LNX.4.61.0604021737010.9886@ld0175-tx32.am.freescale.net>
On Monday 03 April 2006 00:42, Andy Fleming wrote:
> +void __init mpc85xx_cds_pic_init(void)
> +{
> + struct mpic *mpic1;
> + phys_addr_t OpenPIC_PAddr;
> +
> + /* Determine the Physical Address of the OpenPIC regs */
> + OpenPIC_PAddr = get_immrbase() + MPC85xx_OPENPIC_OFFSET;
> +
> + mpic1 = mpic_alloc(OpenPIC_PAddr,
> + MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
> + 4, MPC85xx_OPENPIC_IRQ_OFFSET, 0, 250,
> + mpc85xx_cds_openpic_initsenses,
> + sizeof(mpc85xx_cds_openpic_initsenses), " OpenPIC ");
> + BUG_ON(mpic1 == NULL);
> + mpic_assign_isu(mpic1, 0, OpenPIC_PAddr + 0x10200);
> + mpic_assign_isu(mpic1, 1, OpenPIC_PAddr + 0x10280);
> + mpic_assign_isu(mpic1, 2, OpenPIC_PAddr + 0x10300);
> + mpic_assign_isu(mpic1, 3, OpenPIC_PAddr + 0x10380);
> + mpic_assign_isu(mpic1, 4, OpenPIC_PAddr + 0x10400);
> + mpic_assign_isu(mpic1, 5, OpenPIC_PAddr + 0x10480);
> + mpic_assign_isu(mpic1, 6, OpenPIC_PAddr + 0x10500);
> + mpic_assign_isu(mpic1, 7, OpenPIC_PAddr + 0x10580);
> +
> + /* dummy mappings to get to 48 */
> + mpic_assign_isu(mpic1, 8, OpenPIC_PAddr + 0x10600);
> + mpic_assign_isu(mpic1, 9, OpenPIC_PAddr + 0x10680);
> + mpic_assign_isu(mpic1, 10, OpenPIC_PAddr + 0x10700);
> + mpic_assign_isu(mpic1, 11, OpenPIC_PAddr + 0x10780);
> +
> + /* External ints */
> + mpic_assign_isu(mpic1, 12, OpenPIC_PAddr + 0x10000);
> + mpic_assign_isu(mpic1, 13, OpenPIC_PAddr + 0x10080);
> + mpic_assign_isu(mpic1, 14, OpenPIC_PAddr + 0x10100);
Shouldn't all this come from the device tree?
> +/* CADMUS info */
> +#define CADMUS_BASE (0xf8004000)
> +#define CADMUS_SIZE (256)
> +#define CM_VER (0)
> +#define CM_CSR (1)
> +#define CM_RST (2)
> +
> +/* CDS NVRAM/RTC */
> +#define CDS_RTC_ADDR (0xf8000000)
> +#define CDS_RTC_SIZE (8 * 1024)
> +
> +/* PCI interrupt controller */
> +#define PIRQ0A MPC85xx_IRQ_EXT0
> +#define PIRQ0B MPC85xx_IRQ_EXT1
> +#define PIRQ0C MPC85xx_IRQ_EXT2
> +#define PIRQ0D MPC85xx_IRQ_EXT3
> +#define PIRQ1A MPC85xx_IRQ_EXT11
And these as well, more importantly?
Arnd <><
^ permalink raw reply
* 2.6.16 crashes when running numastat on p575
From: Sonny Rao @ 2006-04-02 22:19 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel
Hi, I'm getting an immediate crash on 2.6.16 when I run the numastat
command. The machine is a 16-way IBM p575 POWER5+ box. It has 8 NUMA
nodes. Bug is very easy to reproduce on this machine, haven't seen it
on another machine yet.
exception info:
16:mon> e
cpu 0x16: Vector: 300 (Data Access) at [c0000005aa5db890]
pc: c000000000293940: .node_read_numastat+0x7c/0x114
lr: c00000000028aeb4: .sysdev_show+0x48/0x64
sp: c0000005aa5dbb10
msr: 8000000000009032
dar: 68
dsisr: 40000000
current = 0xc0000003b7037800
paca = 0xc0000000005a8780
pid = 14382, comm = numastat
disassembly:
c000000000293930 e9240000 ld r9,0(r4)
c000000000293934 38840008 addi r4,r4,8
c000000000293938 7c0607b4 extsw r6,r0
c00000000029393c 2f86007f cmpwi cr7,r6,127
c000000000293940 e8e90068 ld r7,104(r9) <----------- Null
Ptr in r9
c000000000293944 e8090040 ld r0,64(r9)
c000000000293948 e9690048 ld r11,72(r9)
c00000000029394c e9490050 ld r10,80(r9)
c000000000293950 e9090058 ld r8,88(r9)
c000000000293954 e9290060 ld r9,96(r9)
c000000000293958 7f7b0214 add r27,r27,r0
c00000000029395c 7f5a5a14 add r26,r26,r11
c000000000293960 7f9c3a14 add r28,r28,r7
c000000000293964 7fff5214 add r31,r31,r10
registers:
16:mon> r
R00 = 0000000000000002 R16 = 000000001009b360
R01 = c0000005aa5dbb10 R17 = 0000000000000001
R02 = c00000000077ad10 R18 = 0000000000000000
R03 = c000000b67459000 R19 = 0000000000000000
R04 = c000000f7ffd5cd0 R20 = 000000000000001a
R05 = 0000000000000000 R21 = 00000000101220d0
R06 = 0000000000000002 R22 = 000000001013fdd8
R07 = 000000000000161f R23 = 0000000000001000
R08 = 0000000000001310 R24 = 0000000000000000
R09 = 0000000000000000 R25 = 0000000000001310
R10 = 0000000000000000 R26 = 0000000000000000
R11 = 0000000000000000 R27 = 000000000000161f
R12 = c000000f7ffd5c80 R28 = 000000000000161f
R13 = c0000000005a8780 R29 = 0000000000000000
R14 = 0000000000000000 R30 = c000000000637430
R15 = 0000000000000000 R31 = 0000000000000000
pc = c000000000293940 .node_read_numastat+0x7c/0x114
lr = c00000000028aeb4 .sysdev_show+0x48/0x64
msr = 8000000000009032 cr = 44222488
ctr = c0000000002938c4 xer = 0000000000000010 trap = 300
dar = 0000000000000068 dsisr = 40000000
source code for the function, I believe r9 corresponds to
the struct per_cpu_pageset *ps
static ssize_t node_read_numastat(struct sys_device * dev, char * buf)
{
unsigned long numa_hit, numa_miss, interleave_hit,numa_foreign;
unsigned long local_node, other_node;
int i, cpu;
pg_data_t *pg = NODE_DATA(dev->id);
numa_hit = 0;
numa_miss = 0;
interleave_hit = 0;
numa_foreign = 0;
local_node = 0;
other_node = 0;
for (i = 0; i < MAX_NR_ZONES; i++) {
struct zone *z = &pg->node_zones[i];
for (cpu = 0; cpu < NR_CPUS; cpu++) {
struct per_cpu_pageset *ps = zone_pcp(z,cpu);
numa_hit += ps->numa_hit;
numa_miss += ps->numa_miss;
numa_foreign += ps->numa_foreign;
interleave_hit += ps->interleave_hit;
local_node += ps->local_node;
other_node += ps->other_node;
}
}
...
so the first attempt to dereference 'ps' causes an oops.
Anton B. says that if pg is non-NULL, ps should be non-NULL as well...
Sonny
^ permalink raw reply
* [PATCH] Add 85xx CDS to arch/powerpc
From: Andy Fleming @ 2006-04-02 22:42 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: linuxppc-dev, Paul Mackerras
This patch adds support for 85xx CDS support to arch/powerpc
Signed-off-by: Andy Fleming <afleming@freescale.com>
>From nobody Mon Sep 17 00:00:00 2001
From: Andrew Fleming <afleming@freescale.com>
Date: Sun Apr 2 17:36:26 2006 -0500
Subject: [PATCH] * Added support for 85xx CDS in arch/powerpc
---
arch/powerpc/configs/mpc85xx_cds_defconfig | 846 ++++++++++++++++++++++++++++
arch/powerpc/platforms/85xx/Kconfig | 9
arch/powerpc/platforms/85xx/Makefile | 1
arch/powerpc/platforms/85xx/mpc85xx_cds.c | 359 ++++++++++++
arch/powerpc/platforms/85xx/mpc85xx_cds.h | 43 +
include/asm-ppc/mpc85xx.h | 3
6 files changed, 1260 insertions(+), 1 deletions(-)
create mode 100644 arch/powerpc/configs/mpc85xx_cds_defconfig
create mode 100644 arch/powerpc/platforms/85xx/mpc85xx_cds.c
create mode 100644 arch/powerpc/platforms/85xx/mpc85xx_cds.h
c4e2c1cef7dd981ef5a160670070cfb09ebf317e
diff --git a/arch/powerpc/configs/mpc85xx_cds_defconfig b/arch/powerpc/configs/mpc85xx_cds_defconfig
new file mode 100644
index 0000000..9bb022a
--- /dev/null
+++ b/arch/powerpc/configs/mpc85xx_cds_defconfig
@@ -0,0 +1,846 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.16
+# Sun Apr 2 11:23:42 2006
+#
+# CONFIG_PPC64 is not set
+CONFIG_PPC32=y
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+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_PPC_UDBG_16550=y
+# CONFIG_GENERIC_TBSYNC is not set
+# CONFIG_DEFAULT_UIMAGE is not set
+
+#
+# Processor support
+#
+# CONFIG_CLASSIC32 is not set
+# CONFIG_PPC_52xx is not set
+# CONFIG_PPC_82xx is not set
+# CONFIG_PPC_83xx is not set
+CONFIG_PPC_85xx=y
+# CONFIG_40x is not set
+# CONFIG_44x is not set
+# CONFIG_8xx is not set
+# CONFIG_E200 is not set
+CONFIG_85xx=y
+CONFIG_E500=y
+CONFIG_BOOKE=y
+CONFIG_FSL_BOOKE=y
+# CONFIG_PHYS_64BIT is not set
+CONFIG_SPE=y
+
+#
+# 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_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_EMBEDDED=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_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# Block layer
+#
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF 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"
+CONFIG_MPIC=y
+# CONFIG_WANT_EARLY_SERIAL is not set
+
+#
+# Platform support
+#
+# CONFIG_MPC8540_ADS is not set
+CONFIG_MPC85xx_CDS=y
+CONFIG_MPC8540=y
+CONFIG_PPC_INDIRECT_PCI_BE=y
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# 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=y
+CONFIG_MATH_EMULATION=y
+CONFIG_ARCH_FLATMEM_ENABLE=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_PROC_DEVICETREE=y
+# CONFIG_CMDLINE_BOOL is not set
+# CONFIG_PM is not set
+# CONFIG_SOFTWARE_SUSPEND is not set
+# CONFIG_SECCOMP is not set
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_PPC_I8259=y
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_FSL_SOC=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+# CONFIG_PCI_DEBUG is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# PCI Hotplug Support
+#
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_BOOT_LOAD=0x00800000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=32768
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+# CONFIG_BLK_DEV_IDEDISK is not set
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_IDE_GENERIC=y
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=y
+# CONFIG_BLK_DEV_OPTI621 is not set
+# CONFIG_BLK_DEV_SL82C105 is not set
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+# CONFIG_IDEDMA_PCI_AUTO is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+CONFIG_BLK_DEV_VIA82CXXX=y
+# CONFIG_IDE_ARM is not set
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_IVB is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# Macintosh device drivers
+#
+# CONFIG_WINDFARM is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# PHY device support
+#
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+
+#
+# Tulip family network device support
+#
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_PCI is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+CONFIG_E1000=y
+CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+CONFIG_GIANFAR=y
+CONFIG_GFAR_NAPI=y
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_NVRAM is not set
+CONFIG_GEN_RTC=y
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FB is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+# CONFIG_MSDOS_PARTITION is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+# CONFIG_LIBCRC32C is not set
+
+#
+# Instrumentation Support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_MAGIC_SYSRQ is not set
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_UNWIND_INFO is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_DEBUGGER is not set
+# CONFIG_BDI_SWITCH is not set
+# CONFIG_BOOTX_TEXT is not set
+# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
+# CONFIG_PPC_EARLY_DEBUG_G5 is not set
+# CONFIG_PPC_EARLY_DEBUG_RTAS is not set
+# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
+# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Hardware crypto devices
+#
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 06e3712..454fc53 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -11,13 +11,20 @@ config MPC8540_ADS
help
This option enables support for the MPC 8540 ADS board
+config MPC85xx_CDS
+ bool "Freescale MPC85xx CDS"
+ select DEFAULT_UIMAGE
+ select PPC_I8259 if PCI
+ help
+ This option enables support for the MPC85xx CDS board
+
endchoice
config MPC8540
bool
select PPC_UDBG_16550
select PPC_INDIRECT_PCI
- default y if MPC8540_ADS
+ default y if MPC8540_ADS || MPC85xx_CDS
config PPC_INDIRECT_PCI_BE
bool
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile
index ffc4139..7615aa5 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -3,3 +3,4 @@
#
obj-$(CONFIG_PPC_85xx) += misc.o pci.o
obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
+obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
new file mode 100644
index 0000000..18e6e11
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -0,0 +1,359 @@
+/*
+ * MPC85xx setup and early boot code plus other random bits.
+ *
+ * Maintained by Kumar Gala (see MAINTAINERS for contact information)
+ *
+ * Copyright 2005 Freescale Semiconductor Inc.
+ *
+ * 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.
+ */
+
+#include <linux/config.h>
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/errno.h>
+#include <linux/reboot.h>
+#include <linux/pci.h>
+#include <linux/kdev_t.h>
+#include <linux/major.h>
+#include <linux/console.h>
+#include <linux/delay.h>
+#include <linux/seq_file.h>
+#include <linux/root_dev.h>
+#include <linux/initrd.h>
+#include <linux/module.h>
+#include <linux/fsl_devices.h>
+
+#include <asm/system.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <asm/atomic.h>
+#include <asm/time.h>
+#include <asm/io.h>
+#include <asm/machdep.h>
+#include <asm/ipic.h>
+#include <asm/bootinfo.h>
+#include <asm/pci-bridge.h>
+#include <asm/mpc85xx.h>
+#include <asm/irq.h>
+#include <mm/mmu_decl.h>
+#include <asm/prom.h>
+#include <asm/udbg.h>
+#include <asm/mpic.h>
+#include <asm/i8259.h>
+
+#include <sysdev/fsl_soc.h>
+#include "mpc85xx.h"
+
+#ifndef CONFIG_PCI
+unsigned long isa_io_base = 0;
+unsigned long isa_mem_base = 0;
+#endif
+
+static int cds_pci_slot = 2;
+static volatile u8 *cadmus;
+
+/*
+ * Internal interrupts are all Level Sensitive, and Positive Polarity
+ *
+ * Note: Likely, this table and the following function should be
+ * obtained and derived from the OF Device Tree.
+ */
+static u_char mpc85xx_cds_openpic_initsenses[] __initdata = {
+ MPC85XX_INTERNAL_IRQ_SENSES,
+#if defined(CONFIG_PCI)
+ (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* Ext 0: PCI slot 0 */
+ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 1: PCI slot 1 */
+ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 2: PCI slot 2 */
+ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 3: PCI slot 3 */
+#else
+ 0x0, /* External 0: */
+ 0x0, /* External 1: */
+ 0x0, /* External 2: */
+ 0x0, /* External 3: */
+#endif
+ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* External 5: PHY */
+ 0x0, /* External 6: */
+ 0x0, /* External 7: */
+ 0x0, /* External 8: */
+ 0x0, /* External 9: */
+ 0x0, /* External 10: */
+#ifdef CONFIG_PCI
+ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext 11: PCI2 slot 0 */
+#else
+ 0x0, /* External 11: */
+#endif
+};
+
+
+#ifdef CONFIG_PCI
+/*
+ * interrupt routing
+ */
+int
+mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
+{
+ struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
+
+ if (!hose->index)
+ {
+ /* Handle PCI1 interrupts */
+ char pci_irq_table[][4] =
+ /*
+ * PCI IDSEL/INTPIN->INTLINE
+ * A B C D
+ */
+
+ /* Note IRQ assignment for slots is based on which slot the elysium is
+ * in -- in this setup elysium is in slot #2 (this PIRQA as first
+ * interrupt on slot */
+ {
+ { 0, 1, 2, 3 }, /* 16 - PMC */
+ { 0, 1, 2, 3 }, /* 17 P2P (Tsi320) */
+ { 0, 1, 2, 3 }, /* 18 - Slot 1 */
+ { 1, 2, 3, 0 }, /* 19 - Slot 2 */
+ { 2, 3, 0, 1 }, /* 20 - Slot 3 */
+ { 3, 0, 1, 2 }, /* 21 - Slot 4 */
+ };
+
+ const long min_idsel = 16, max_idsel = 21, irqs_per_slot = 4;
+ int i, j;
+
+ for (i = 0; i < 6; i++)
+ for (j = 0; j < 4; j++)
+ pci_irq_table[i][j] =
+ ((pci_irq_table[i][j] + 5 -
+ cds_pci_slot) & 0x3) + PIRQ0A;
+
+ return PCI_IRQ_TABLE_LOOKUP;
+ } else {
+ /* Handle PCI2 interrupts (if we have one) */
+ char pci_irq_table[][4] =
+ {
+ /*
+ * We only have one slot and one interrupt
+ * going to PIRQA - PIRQD */
+ { PIRQ1A, PIRQ1A, PIRQ1A, PIRQ1A }, /* 21 - slot 0 */
+ };
+
+ const long min_idsel = 21, max_idsel = 21, irqs_per_slot = 4;
+
+ return PCI_IRQ_TABLE_LOOKUP;
+ }
+}
+
+#define ARCADIA_HOST_BRIDGE_IDSEL 17
+#define ARCADIA_2ND_BRIDGE_IDSEL 3
+
+extern int mpc85xx_pci2_busno;
+
+int
+mpc85xx_exclude_device(u_char bus, u_char devfn)
+{
+ if (bus == 0 && PCI_SLOT(devfn) == 0)
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ if (mpc85xx_pci2_busno)
+ if (bus == (mpc85xx_pci2_busno) && PCI_SLOT(devfn) == 0)
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ /* We explicitly do not go past the Tundra 320 Bridge */
+ if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL))
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ if ((bus == 0) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL))
+ return PCIBIOS_DEVICE_NOT_FOUND;
+ else
+ return PCIBIOS_SUCCESSFUL;
+}
+
+void __init
+mpc85xx_cds_pcibios_fixup(void)
+{
+ struct pci_dev *dev;
+ u_char c;
+
+ if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_82C586_1, NULL))) {
+ /*
+ * U-Boot does not set the enable bits
+ * for the IDE device. Force them on here.
+ */
+ pci_read_config_byte(dev, 0x40, &c);
+ c |= 0x03; /* IDE: Chip Enable Bits */
+ pci_write_config_byte(dev, 0x40, c);
+
+ /*
+ * Since only primary interface works, force the
+ * IDE function to standard primary IDE interrupt
+ * w/ 8259 offset
+ */
+ dev->irq = 14;
+ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
+ pci_dev_put(dev);
+ }
+
+ /*
+ * Force legacy USB interrupt routing
+ */
+ if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_82C586_2, NULL))) {
+ dev->irq = 10;
+ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10);
+ pci_dev_put(dev);
+ }
+
+ if ((dev = pci_get_device(PCI_VENDOR_ID_VIA,
+ PCI_DEVICE_ID_VIA_82C586_2, dev))) {
+ dev->irq = 11;
+ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11);
+ pci_dev_put(dev);
+ }
+}
+#endif /* CONFIG_PCI */
+
+void __init mpc85xx_cds_pic_init(void)
+{
+ struct mpic *mpic1;
+ phys_addr_t OpenPIC_PAddr;
+
+ /* Determine the Physical Address of the OpenPIC regs */
+ OpenPIC_PAddr = get_immrbase() + MPC85xx_OPENPIC_OFFSET;
+
+ mpic1 = mpic_alloc(OpenPIC_PAddr,
+ MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
+ 4, MPC85xx_OPENPIC_IRQ_OFFSET, 0, 250,
+ mpc85xx_cds_openpic_initsenses,
+ sizeof(mpc85xx_cds_openpic_initsenses), " OpenPIC ");
+ BUG_ON(mpic1 == NULL);
+ mpic_assign_isu(mpic1, 0, OpenPIC_PAddr + 0x10200);
+ mpic_assign_isu(mpic1, 1, OpenPIC_PAddr + 0x10280);
+ mpic_assign_isu(mpic1, 2, OpenPIC_PAddr + 0x10300);
+ mpic_assign_isu(mpic1, 3, OpenPIC_PAddr + 0x10380);
+ mpic_assign_isu(mpic1, 4, OpenPIC_PAddr + 0x10400);
+ mpic_assign_isu(mpic1, 5, OpenPIC_PAddr + 0x10480);
+ mpic_assign_isu(mpic1, 6, OpenPIC_PAddr + 0x10500);
+ mpic_assign_isu(mpic1, 7, OpenPIC_PAddr + 0x10580);
+
+ /* dummy mappings to get to 48 */
+ mpic_assign_isu(mpic1, 8, OpenPIC_PAddr + 0x10600);
+ mpic_assign_isu(mpic1, 9, OpenPIC_PAddr + 0x10680);
+ mpic_assign_isu(mpic1, 10, OpenPIC_PAddr + 0x10700);
+ mpic_assign_isu(mpic1, 11, OpenPIC_PAddr + 0x10780);
+
+ /* External ints */
+ mpic_assign_isu(mpic1, 12, OpenPIC_PAddr + 0x10000);
+ mpic_assign_isu(mpic1, 13, OpenPIC_PAddr + 0x10080);
+ mpic_assign_isu(mpic1, 14, OpenPIC_PAddr + 0x10100);
+
+ mpic_init(mpic1);
+
+#ifdef CONFIG_PCI
+ mpic_setup_cascade(PIRQ0A, i8259_irq_cascade, NULL);
+
+ i8259_init(0,0);
+#endif
+}
+
+
+/*
+ * Setup the architecture
+ */
+static void __init
+mpc85xx_cds_setup_arch(void)
+{
+ struct device_node *cpu;
+#ifdef CONFIG_PCI
+ struct device_node *np;
+#endif
+
+ if (ppc_md.progress)
+ ppc_md.progress("mpc85xx_cds_setup_arch()", 0);
+
+ cpu = of_find_node_by_type(NULL, "cpu");
+ if (cpu != 0) {
+ unsigned int *fp;
+
+ fp = (int *)get_property(cpu, "clock-frequency", NULL);
+ if (fp != 0)
+ loops_per_jiffy = *fp / HZ;
+ else
+ loops_per_jiffy = 500000000 / HZ;
+ of_node_put(cpu);
+ }
+
+ cadmus = ioremap(CADMUS_BASE, CADMUS_SIZE);
+ cds_pci_slot = ((cadmus[CM_CSR] >> 6) & 0x3) + 1;
+
+ if (ppc_md.progress) {
+ char buf[40];
+ snprintf(buf, 40, "CDS Version = 0x%x in slot %d\n",
+ cadmus[CM_VER], cds_pci_slot);
+ ppc_md.progress(buf, 0);
+ }
+
+#ifdef CONFIG_PCI
+ for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;)
+ add_bridge(np);
+
+ ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup;
+ ppc_md.pci_swizzle = common_swizzle;
+ ppc_md.pci_map_irq = mpc85xx_map_irq;
+ ppc_md.pci_exclude_device = mpc85xx_exclude_device;
+#endif
+
+#ifdef CONFIG_ROOT_NFS
+ ROOT_DEV = Root_NFS;
+#else
+ ROOT_DEV = Root_HDA1;
+#endif
+}
+
+
+void
+mpc85xx_cds_show_cpuinfo(struct seq_file *m)
+{
+ uint pvid, svid, phid1;
+ uint memsize = total_memory;
+
+ pvid = mfspr(SPRN_PVR);
+ svid = mfspr(SPRN_SVR);
+
+ seq_printf(m, "Vendor\t\t: Freescale Semiconductor\n");
+ seq_printf(m, "Machine\t\t: MPC85xx CDS (0x%x)\n", cadmus[CM_VER]);
+ seq_printf(m, "PVR\t\t: 0x%x\n", pvid);
+ seq_printf(m, "SVR\t\t: 0x%x\n", svid);
+
+ /* Display cpu Pll setting */
+ phid1 = mfspr(SPRN_HID1);
+ seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
+
+ /* Display the amount of memory */
+ seq_printf(m, "Memory\t\t: %d MB\n", memsize / (1024 * 1024));
+}
+
+
+/*
+ * Called very early, device-tree isn't unflattened
+ */
+static int __init mpc85xx_cds_probe(void)
+{
+ /* We always match for now, eventually we should look at
+ * the flat dev tree to ensure this is the board we are
+ * supposed to run on
+ */
+ return 1;
+}
+
+define_machine(mpc85xx_cds) {
+ .name = "MPC85xx CDS",
+ .probe = mpc85xx_cds_probe,
+ .setup_arch = mpc85xx_cds_setup_arch,
+ .init_IRQ = mpc85xx_cds_pic_init,
+ .show_cpuinfo = mpc85xx_cds_show_cpuinfo,
+ .get_irq = mpic_get_irq,
+ .restart = mpc85xx_restart,
+ .calibrate_decr = generic_calibrate_decr,
+ .progress = udbg_progress,
+};
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.h b/arch/powerpc/platforms/85xx/mpc85xx_cds.h
new file mode 100644
index 0000000..671f54f
--- /dev/null
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.h
@@ -0,0 +1,43 @@
+/*
+ * arch/ppc/platforms/85xx/mpc85xx_cds_common.h
+ *
+ * MPC85xx CDS board definitions
+ *
+ * Maintainer: Kumar Gala <galak@kernel.crashing.org>
+ *
+ * Copyright 2004 Freescale Semiconductor, Inc
+ *
+ * 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.
+ *
+ */
+
+#ifndef __MACH_MPC85XX_CDS_H__
+#define __MACH_MPC85XX_CDS_H__
+
+/* CADMUS info */
+#define CADMUS_BASE (0xf8004000)
+#define CADMUS_SIZE (256)
+#define CM_VER (0)
+#define CM_CSR (1)
+#define CM_RST (2)
+
+/* CDS NVRAM/RTC */
+#define CDS_RTC_ADDR (0xf8000000)
+#define CDS_RTC_SIZE (8 * 1024)
+
+/* PCI interrupt controller */
+#define PIRQ0A MPC85xx_IRQ_EXT0
+#define PIRQ0B MPC85xx_IRQ_EXT1
+#define PIRQ0C MPC85xx_IRQ_EXT2
+#define PIRQ0D MPC85xx_IRQ_EXT3
+#define PIRQ1A MPC85xx_IRQ_EXT11
+
+#define NR_8259_INTS 16
+#define CPM_IRQ_OFFSET NR_8259_INTS
+
+#define MPC85xx_OPENPIC_IRQ_OFFSET 80
+
+#endif /* __MACH_MPC85XX_CDS_H__ */
diff --git a/include/asm-ppc/mpc85xx.h b/include/asm-ppc/mpc85xx.h
index f47002a..4f844eb 100644
--- a/include/asm-ppc/mpc85xx.h
+++ b/include/asm-ppc/mpc85xx.h
@@ -28,6 +28,9 @@
#if defined(CONFIG_MPC8555_CDS) || defined(CONFIG_MPC8548_CDS)
#include <platforms/85xx/mpc8555_cds.h>
#endif
+#ifdef CONFIG_MPC85xx_CDS
+#include <platforms/85xx/mpc85xx_cds.h>
+#endif
#ifdef CONFIG_MPC8560_ADS
#include <platforms/85xx/mpc8560_ads.h>
#endif
--
1.2.4
^ permalink raw reply related
* [PATCH] Set cpu explicitly in kernel compiles
From: Olaf Hering @ 2006-04-02 19:40 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, trini
In-Reply-To: <17016.29775.224816.691409@cargo.ozlabs.ibm.com>
On Wed, 2005-05-04, Paul Mackeras wrote:
> What do people think of this patch? The motivation for it is that a
> biarch gcc-4.0 will by default tune for POWER4, even for a 32-bit
> compile, meaning that we end up with a lot of nops we don't need.
> This also takes out -mstring.
>
> With this, the text size reduces by about 120k for my normal config
> when compiling with a biarch gcc-4.0. The text size also reduces
> slightly when compiling with the Debian gcc-3.3.5 (32-bit only, not
> biarch).
Compile the 32bit kernel with -mcpu=powerpc. This reduces the imagesize
when a compiler is used that defaults to -mtune=power4. It inserts lots
of nops to please the 64bit cpu instruction scheduling. But all these nops
are not needed for 32bit kernels.
Example with SLES10 gcc 4.1.0 and arch/powerpc/configs/pmac32_defconfig:
vmlinux vmlinux.strip vmlinux.gz
-O2 4980515 4187528 1846829
-Os 4618801 3827084 1673333
-O2 -mcpu=powerpc 4738851 3945868 1816253
-Os -mcpu=powerpc 4532785 3741068 1664688
Signed-off-by: Olaf Hering <olh@suse.de>
---
arch/powerpc/Makefile | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.16-olh/arch/powerpc/Makefile
===================================================================
--- linux-2.6.16-olh.orig/arch/powerpc/Makefile
+++ linux-2.6.16-olh/arch/powerpc/Makefile
@@ -107,6 +107,7 @@ endif
cpu-as-$(CONFIG_PPC64BRIDGE) += -Wa,-mppc64bridge
cpu-as-$(CONFIG_4xx) += -Wa,-m405
cpu-as-$(CONFIG_6xx) += -Wa,-maltivec
+cpu-as-$(CONFIG_6xx) += -mcpu=powerpc
cpu-as-$(CONFIG_POWER4) += -Wa,-maltivec
cpu-as-$(CONFIG_E500) += -Wa,-me500
cpu-as-$(CONFIG_E200) += -Wa,-me200
^ permalink raw reply
* Re: Kernel for MPC Lite 5200 will not compile
From: Matthias Fechner @ 2006-04-02 19:32 UTC (permalink / raw)
To: Sylvain Munaut; +Cc: linuxppc-embedded
In-Reply-To: <44300CEC.5040007@246tNt.com>
Hallo Sylvain,
* Sylvain Munaut <tnt@246tNt.com> [02-04-06 19:42]:
> PS: Please cc me when answering ... without it I might miss the mail ...
thx for your answer. I was today able to get the board running.
Now I can login.
Thx a lot for your help!
Best regards,
Matthias
--
"Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the universe trying to produce
bigger and better idiots. So far, the universe is winning." -- Rich Cook
^ permalink raw reply
* Re: Kernel for MPC Lite 5200 will not compile
From: Sylvain Munaut @ 2006-04-02 17:42 UTC (permalink / raw)
To: linuxppc-embedded, idefix
In-Reply-To: <20060401091900.GA2740@server.idefix.loc>
Matthias Fechner wrote:
> Hello Sylvain,
>
> * Sylvain Munaut <tnt@246tNt.com> [28-03-06 22:47]:
>
>> If it still doesnt work, report it and I'll have a closer look. Maybe
>> something changed
>> recently and I didn't update my tree since a few days ...
>>
>
> ok, I have now the board to really test it.
> I tried to boot over NFS, the kernel was loaded successfully but it
> will not really boot, I got:
>
Well, if you didn't find the network driver then booting over NFS is not
gonna happen ...
and since (see below) you didn't configure the console properly either,
you can't
even see the error message ...
> bootargs=root=/dev/nfs rw nfsroot=192.168.0.151:/usr/local/eldk/ppc_6xx ip=192.168.0.101:192.168.0.151:192.168.0.151:255.255.255.0:icecube::off
>
>
As I said earlier in this thread, you need console=ttyPSC0 in your
kernel command line, else, you
just won't see anything on the serial except very early debug.
> I tried to find if the networkcard from the board will work, but I
> cannot find a driver in the kernel for it.
> What can be the problem for this?
>
Well, you didn't pull from the bestcomm head maybe ?
PS: Please cc me when answering ... without it I might miss the mail ...
Sylvain
^ permalink raw reply
* yaboot load address
From: Ingmar @ 2006-04-02 13:43 UTC (permalink / raw)
To: linuxppc-dev
Hi,
I have a issue with the load address of the yaboot loader, I need it to be
loaded higher in memory than 2MB, at about 10MB. Recompiling the yaboot loader
is no problem, but I need to get into the part of code that calls (and loads)
the yaboot program. Editing the ofboot file, (forth script) does not
(completely?) solve the problem. Updates to the ToolBox ROM image have to be
made to?
Any ideas on steps I need to make to (recompile?) edit the tbxi file to let it
load yaboot at another address?
Ingmar
^ permalink raw reply
* [PATCH] powerpc: Avoid __initcall warnings
From: Anton Blanchard @ 2006-04-02 10:18 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus
Fix __initcall return in proc_rtas_init and rtas_init.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: build/arch/powerpc/kernel/rtas-proc.c
===================================================================
--- build.orig/arch/powerpc/kernel/rtas-proc.c 2006-03-30 10:08:47.000000000 +1100
+++ build/arch/powerpc/kernel/rtas-proc.c 2006-04-02 19:57:41.000000000 +1000
@@ -258,11 +258,11 @@ static int __init proc_rtas_init(void)
struct proc_dir_entry *entry;
if (!machine_is(pseries))
- return 1;
+ return -ENODEV;
rtas_node = of_find_node_by_name(NULL, "rtas");
if (rtas_node == NULL)
- return 1;
+ return -ENODEV;
entry = create_proc_entry("ppc64/rtas/progress", S_IRUGO|S_IWUSR, NULL);
if (entry)
Index: build/arch/powerpc/platforms/pseries/rtasd.c
===================================================================
--- build.orig/arch/powerpc/platforms/pseries/rtasd.c 2006-03-30 10:08:47.000000000 +1100
+++ build/arch/powerpc/platforms/pseries/rtasd.c 2006-04-02 20:14:50.000000000 +1000
@@ -488,7 +488,7 @@ static int __init rtas_init(void)
/* No RTAS */
if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) {
printk(KERN_INFO "rtasd: no event-scan on system\n");
- return 1;
+ return -ENODEV;
}
entry = create_proc_entry("ppc64/rtas/error_log", S_IRUSR, NULL);
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox