* Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
From: Ingo Molnar @ 2008-01-31 9:06 UTC (permalink / raw)
To: Luck, Tony
Cc: sparclinux, linux-ia64, Linux Kernel Development, Mike Travis,
Linux/PPC Development, Geert Uytterhoeven, Thomas Gleixner,
Linus Torvalds
In-Reply-To: <1FE6DD409037234FAB833C420AA843EC78C219@orsmsx424.amr.corp.intel.com>
* Luck, Tony <tony.luck@intel.com> wrote:
> > I'll start digging on why this doesn't boot ... but you might as well
> > send the fixes so far upstream to Linus so that the SMP fix is available
>
> Well a pure 2.6.24 version compiled with CONFIG_SMP=n booted just
> fine, so the breakage is recent ... and more than likely related to
> this change.
>
> I've only had a casual dig at the failing case ... kernel dies in
> memset() as called from kmem_cache_alloc() with the address being
> written as 0x4000000000117b48 (which is off in the virtual address
> space range used by users ... not a kernel address).
hm, as far as i could check, on ia64 UP the .percpu section link
difference was the only ia64 difference i could find out of those
changes. Could you try to copy a 2.6.24 include/asm-generic/percpu.h,
include/asm-ia64.h and include/linux/percpu.h into your current tree,
and see whether that boots? If yes, then it's the percpu changes. The
patch below does this ontop of very latest -git - and it builds fine
with your UP config with a crosscompiler.
> I'll dig some more tomorrow.
thanks.
Ingo
---
include/asm-generic/percpu.h | 99 ++++++++++++++++---------------------------
include/asm-ia64/percpu.h | 57 +++++++++++++++++++-----
include/linux/percpu.h | 20 --------
3 files changed, 82 insertions(+), 94 deletions(-)
Index: linux-x86.q/include/asm-generic/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-generic/percpu.h
+++ linux-x86.q/include/asm-generic/percpu.h
@@ -3,79 +3,54 @@
#include <linux/compiler.h>
#include <linux/threads.h>
-/*
- * Determine the real variable name from the name visible in the
- * kernel sources.
- */
-#define per_cpu_var(var) per_cpu__##var
-
+#define __GENERIC_PER_CPU
#ifdef CONFIG_SMP
-/*
- * per_cpu_offset() is the offset that has to be added to a
- * percpu variable to get to the instance for a certain processor.
- *
- * Most arches use the __per_cpu_offset array for those offsets but
- * some arches have their own ways of determining the offset (x86_64, s390).
- */
-#ifndef __per_cpu_offset
extern unsigned long __per_cpu_offset[NR_CPUS];
#define per_cpu_offset(x) (__per_cpu_offset[x])
-#endif
-
-/*
- * Determine the offset for the currently active processor.
- * An arch may define __my_cpu_offset to provide a more effective
- * means of obtaining the offset to the per cpu variables of the
- * current processor.
- */
-#ifndef __my_cpu_offset
-#define __my_cpu_offset per_cpu_offset(raw_smp_processor_id())
-#define my_cpu_offset per_cpu_offset(smp_processor_id())
-#else
-#define my_cpu_offset __my_cpu_offset
-#endif
-
-/*
- * Add a offset to a pointer but keep the pointer as is.
- *
- * Only S390 provides its own means of moving the pointer.
- */
-#ifndef SHIFT_PERCPU_PTR
-#define SHIFT_PERCPU_PTR(__p, __offset) RELOC_HIDE((__p), (__offset))
-#endif
-
-/*
- * A percpu variable may point to a discarded regions. The following are
- * established ways to produce a usable pointer from the percpu variable
- * offset.
- */
-#define per_cpu(var, cpu) \
- (*SHIFT_PERCPU_PTR(&per_cpu_var(var), per_cpu_offset(cpu)))
-#define __get_cpu_var(var) \
- (*SHIFT_PERCPU_PTR(&per_cpu_var(var), my_cpu_offset))
-#define __raw_get_cpu_var(var) \
- (*SHIFT_PERCPU_PTR(&per_cpu_var(var), __my_cpu_offset))
-
-
-#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA
-extern void setup_per_cpu_areas(void);
-#endif
+/* Separate out the type, so (int[3], foo) works. */
+#define DEFINE_PER_CPU(type, name) \
+ __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name
+
+#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
+ __attribute__((__section__(".data.percpu.shared_aligned"))) \
+ __typeof__(type) per_cpu__##name \
+ ____cacheline_aligned_in_smp
+
+/* var is in discarded region: offset to particular copy we want */
+#define per_cpu(var, cpu) (*({ \
+ extern int simple_identifier_##var(void); \
+ RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]); }))
+#define __get_cpu_var(var) per_cpu(var, smp_processor_id())
+#define __raw_get_cpu_var(var) per_cpu(var, raw_smp_processor_id())
+
+/* A macro to avoid #include hell... */
+#define percpu_modcopy(pcpudst, src, size) \
+do { \
+ unsigned int __i; \
+ for_each_possible_cpu(__i) \
+ memcpy((pcpudst)+__per_cpu_offset[__i], \
+ (src), (size)); \
+} while (0)
#else /* ! SMP */
-#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var)))
-#define __get_cpu_var(var) per_cpu_var(var)
-#define __raw_get_cpu_var(var) per_cpu_var(var)
+#define DEFINE_PER_CPU(type, name) \
+ __typeof__(type) per_cpu__##name
+
+#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
+ DEFINE_PER_CPU(type, name)
+
+#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
+#define __get_cpu_var(var) per_cpu__##var
+#define __raw_get_cpu_var(var) per_cpu__##var
#endif /* SMP */
-#ifndef PER_CPU_ATTRIBUTES
-#define PER_CPU_ATTRIBUTES
-#endif
+#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
-#define DECLARE_PER_CPU(type, name) extern PER_CPU_ATTRIBUTES \
- __typeof__(type) per_cpu_var(name)
+#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
#endif /* _ASM_GENERIC_PERCPU_H_ */
Index: linux-x86.q/include/asm-ia64/percpu.h
===================================================================
--- linux-x86.q.orig/include/asm-ia64/percpu.h
+++ linux-x86.q/include/asm-ia64/percpu.h
@@ -15,36 +15,69 @@
#include <linux/threads.h>
-#ifdef CONFIG_SMP
-
#ifdef HAVE_MODEL_SMALL_ATTRIBUTE
-# define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__)))
+# define __SMALL_ADDR_AREA __attribute__((__model__ (__small__)))
+#else
+# define __SMALL_ADDR_AREA
#endif
-#define __my_cpu_offset __ia64_per_cpu_var(local_per_cpu_offset)
+#define DECLARE_PER_CPU(type, name) \
+ extern __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name
+
+/* Separate out the type, so (int[3], foo) works. */
+#define DEFINE_PER_CPU(type, name) \
+ __attribute__((__section__(".data.percpu"))) \
+ __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name
+
+#ifdef CONFIG_SMP
+#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
+ __attribute__((__section__(".data.percpu.shared_aligned"))) \
+ __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name \
+ ____cacheline_aligned_in_smp
+#else
+#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
+ DEFINE_PER_CPU(type, name)
+#endif
+
+/*
+ * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an
+ * external routine, to avoid include-hell.
+ */
+#ifdef CONFIG_SMP
+
+extern unsigned long __per_cpu_offset[NR_CPUS];
+#define per_cpu_offset(x) (__per_cpu_offset[x])
+/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
+DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
+
+#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu]))
+#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset)))
+#define __raw_get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __ia64_per_cpu_var(local_per_cpu_offset)))
+
+extern void percpu_modcopy(void *pcpudst, const void *src, unsigned long size);
+extern void setup_per_cpu_areas (void);
extern void *per_cpu_init(void);
#else /* ! SMP */
-#define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu")))
-
+#define per_cpu(var, cpu) (*((void)(cpu), &per_cpu__##var))
+#define __get_cpu_var(var) per_cpu__##var
+#define __raw_get_cpu_var(var) per_cpu__##var
#define per_cpu_init() (__phys_per_cpu_start)
#endif /* SMP */
+#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
+#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
+
/*
* Be extremely careful when taking the address of this variable! Due to virtual
* remapping, it is different from the canonical address returned by __get_cpu_var(var)!
* On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly
* more efficient.
*/
-#define __ia64_per_cpu_var(var) per_cpu__##var
-
-#include <asm-generic/percpu.h>
-
-/* Equal to __per_cpu_offset[smp_processor_id()], but faster to access: */
-DECLARE_PER_CPU(unsigned long, local_per_cpu_offset);
+#define __ia64_per_cpu_var(var) (per_cpu__##var)
#endif /* !__ASSEMBLY__ */
Index: linux-x86.q/include/linux/percpu.h
===================================================================
--- linux-x86.q.orig/include/linux/percpu.h
+++ linux-x86.q/include/linux/percpu.h
@@ -9,26 +9,6 @@
#include <asm/percpu.h>
-#ifdef CONFIG_SMP
-#define DEFINE_PER_CPU(type, name) \
- __attribute__((__section__(".data.percpu"))) \
- PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
-
-#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
- __attribute__((__section__(".data.percpu.shared_aligned"))) \
- PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \
- ____cacheline_aligned_in_smp
-#else
-#define DEFINE_PER_CPU(type, name) \
- PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
-
-#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
- DEFINE_PER_CPU(type, name)
-#endif
-
-#define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var)
-#define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var)
-
/* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */
#ifndef PERCPU_ENOUGH_ROOM
#ifdef CONFIG_MODULES
^ permalink raw reply
* RE: [PATCH 1/2] Add RapidIO node into MPC8641HPCN dts file
From: Zhang Wei @ 2008-01-31 7:36 UTC (permalink / raw)
To: galak; +Cc: linuxppc-dev
In-Reply-To: <12017655292517-git-send-email-y>
Sorry for wrong sending name of this and next email.
Best Regards,
Wei.=20
> -----Original Message-----
> From: y [mailto:y]=20
> Sent: Thursday, January 31, 2008 3:45 PM
> To: galak@kernel.crashing.org
> Cc: linuxppc-dev@ozlabs.org; Zhang Wei
> Subject: [PATCH 1/2] Add RapidIO node into MPC8641HPCN dts file
>=20
> From: Zhang Wei <wei.zhang@freescale.com>
>=20
> Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
> ---
> arch/powerpc/boot/dts/mpc8641_hpcn.dts | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>=20
> diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts=20
> b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
> index 556a9ca..1a0fce5 100644
> --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
> +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
> @@ -25,6 +25,7 @@
> serial1 =3D &serial1;
> pci0 =3D &pci0;
> pci1 =3D &pci1;
> + rapidio0 =3D &rapidio0;
> };
> =20
> cpus {
> @@ -499,4 +500,16 @@
> 0 00100000>;
> };
> };
> +
> + rapidio0: rapidio@f80c0000 {
> + #address-cells =3D <2>;
> + #size-cells =3D <2>;
> + compatible =3D "fsl,rapidio-delta";
> + reg =3D <f80c0000 20000>;
> + ranges =3D <0 0 c0000000 0 20000000>;
> + interrupt-parent =3D <&mpic>;
> + /* err_irq bell_outb_irq bell_inb_irq
> + msg1_tx_irq msg1_rx_irq msg2_tx_irq=20
> msg2_rx_irq */
> + interrupts =3D <30 2 31 2 32 2 35 2 36 2 37 2 38 2>;
> + };
> };
> --=20
> 1.5.2
>=20
>=20
^ permalink raw reply
* [PATCH 2/2] Add RapidIO node probing into MPC86xx_HPCN board id table.
From: Zhang Wei @ 2008-01-31 7:46 UTC (permalink / raw)
To: galak; +Cc: linuxppc-dev
In-Reply-To: <12017656032841-git-send-email-wei.zhang@freescale.com>
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
---
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index cfbe8c5..4a3e421 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -215,6 +215,7 @@ mpc86xx_time_init(void)
static __initdata struct of_device_id of_bus_ids[] = {
{ .compatible = "simple-bus", },
+ { .compatible = "fsl,rapidio-delta", },
{},
};
--
1.5.2
^ permalink raw reply related
* [PATCH 1/2] Add RapidIO node into MPC8641HPCN dts file
From: Zhang Wei @ 2008-01-31 7:46 UTC (permalink / raw)
To: galak; +Cc: linuxppc-dev
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
---
arch/powerpc/boot/dts/mpc8641_hpcn.dts | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 556a9ca..1a0fce5 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -25,6 +25,7 @@
serial1 = &serial1;
pci0 = &pci0;
pci1 = &pci1;
+ rapidio0 = &rapidio0;
};
cpus {
@@ -499,4 +500,16 @@
0 00100000>;
};
};
+
+ rapidio0: rapidio@f80c0000 {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ compatible = "fsl,rapidio-delta";
+ reg = <f80c0000 20000>;
+ ranges = <0 0 c0000000 0 20000000>;
+ interrupt-parent = <&mpic>;
+ /* err_irq bell_outb_irq bell_inb_irq
+ msg1_tx_irq msg1_rx_irq msg2_tx_irq msg2_rx_irq */
+ interrupts = <30 2 31 2 32 2 35 2 36 2 37 2 38 2>;
+ };
};
--
1.5.2
^ permalink raw reply related
* [PATCH 2/2] Add RapidIO node probing into MPC86xx_HPCN board id table.
From: y @ 2008-01-31 7:45 UTC (permalink / raw)
To: galak; +Cc: linuxppc-dev
In-Reply-To: <12017655292517-git-send-email-y>
From: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
---
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index cfbe8c5..4a3e421 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -215,6 +215,7 @@ mpc86xx_time_init(void)
static __initdata struct of_device_id of_bus_ids[] = {
{ .compatible = "simple-bus", },
+ { .compatible = "fsl,rapidio-delta", },
{},
};
--
1.5.2
^ permalink raw reply related
* [PATCH 1/2] Add RapidIO node into MPC8641HPCN dts file
From: y @ 2008-01-31 7:45 UTC (permalink / raw)
To: galak; +Cc: linuxppc-dev
From: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
---
arch/powerpc/boot/dts/mpc8641_hpcn.dts | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index 556a9ca..1a0fce5 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -25,6 +25,7 @@
serial1 = &serial1;
pci0 = &pci0;
pci1 = &pci1;
+ rapidio0 = &rapidio0;
};
cpus {
@@ -499,4 +500,16 @@
0 00100000>;
};
};
+
+ rapidio0: rapidio@f80c0000 {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ compatible = "fsl,rapidio-delta";
+ reg = <f80c0000 20000>;
+ ranges = <0 0 c0000000 0 20000000>;
+ interrupt-parent = <&mpic>;
+ /* err_irq bell_outb_irq bell_inb_irq
+ msg1_tx_irq msg1_rx_irq msg2_tx_irq msg2_rx_irq */
+ interrupts = <30 2 31 2 32 2 35 2 36 2 37 2 38 2>;
+ };
};
--
1.5.2
^ permalink raw reply related
* [PATCH] [POWERPC] Set dma_data correctly for direct_ops on pasemi
From: Olof Johansson @ 2008-01-31 6:41 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, torvalds
In-Reply-To: <18337.8955.539106.868486@cargo.ozlabs.ibm.com>
More late-caught fallout from the mainline merge. The patch:
[POWERPC] Use archdata.dma_data in dma_direct_ops and add the offset
"Now that all platforms using dma_direct_offset setup the
archdata.dma_data correctly, ..."
Nope -- the pasemi iommu setup code that disables translation on the
DMA pci device didn't set dma_data correctly.
The below patch is needed, please merge as soon as practical. Thanks!
Signed-off-by: Olof Johansson <olof@lixom.net>
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index 9916a0f..c5cfd4b 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -182,8 +182,10 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
* CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE at build time.
*/
if (dev->vendor == 0x1959 && dev->device == 0xa007 &&
- !firmware_has_feature(FW_FEATURE_LPAR))
+ !firmware_has_feature(FW_FEATURE_LPAR)) {
dev->dev.archdata.dma_ops = &dma_direct_ops;
+ dev->dev.archdata.dma_data = 0;
+ }
#endif
dev->dev.archdata.dma_data = &iommu_table_iobmap;
^ permalink raw reply related
* RE: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .
From: Zhang Wei @ 2008-01-31 6:04 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <A3EAB036-F69D-48DD-8CA9-4EAAE63AE1F5@kernel.crashing.org>
All right, I'll give you another patch for 86xx dts file. :)
Btw: Why the PCI and other nodes were moved from SOC? Just for clear?
If they are moved out, their register address must use full address not
offset address.
Thanks!
Wei.
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
> Sent: Wednesday, January 30, 2008 10:44 PM
> To: Zhang Wei
> Cc: mporter@kernel.crashing.org;=20
> linux-kernel@vger.kernel.org; linuxppc-dev@ozlabs.org
> Subject: Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .
>=20
> Can you post a device tree update as well.
>=20
> The older patches on the list for the 86xx .dts should NOT=20
> put the rio =20
> node under the soc. It should be at the same level as PCI.
>=20
> - k
>=20
^ permalink raw reply
* RE: [PATCH 4/6] Add multi mport support.
From: Zhang Wei @ 2008-01-31 6:30 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <F2D2FCC7-D1ED-4DC6-BE7A-EE2755CCE125@kernel.crashing.org>
=20
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
>=20
> On Jan 31, 2008, at 12:15 AM, Kumar Gala wrote:
>=20
> >
> > On Jan 30, 2008, at 11:57 PM, Zhang Wei wrote:
> >
> >>
> >>
> >>> -----Original Message-----
> >>> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> >>>
> >>> On Jan 30, 2008, at 4:30 AM, Zhang Wei wrote:
> >>>
> >>>> Change lots of static variable to mport private. And add
> >>> mport to some
> >>>> function declaration.
> >>>
> >>> Can you explain this patch further. Its not clear=20
> exactly from this
> >>> commit message why we are doing this.
> >>>
> >>> - k
> >>
> >> Sorry about I have a little hurry about it.
> >>
> >> The original RapidIO driver suppose there is only one mpc85xx RIO
> >> controller
> >> in system. So, some data structures are defined as mpc85xx_rio =20
> >> global,
> >> such as 'regs_win', 'dbell_ring', 'msg_tx_ring'. Now, I=20
> changed them
> >> to
> >> mport's private members. And you can define multi RIO=20
> OF-nodes in dts
> >> file
> >> for multi RapidIO controller in one processor, such as PCI/PCI-Ex =20
> >> host
> >> controllers
> >> in Freescale's silicon. And the mport operation function=20
> declaration
> >> should be changed
> >> to know which RapidIO controller is target.
> >
> > thanks, this makes a lot of sense and now reviewing the patch will
> > make some sense to me :)
>=20
> when we have multiple ports are the device IDs on the ports intended =20
> to be unique only to a port or unique across all ports?
>=20
I consider each RIO controller will has its own network, the device IDs
should be
unique only in its port network.
Cheers!
Wei
^ permalink raw reply
* Re: [PATCH 4/6] Add multi mport support.
From: Kumar Gala @ 2008-01-31 6:20 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <EC566605-6890-4983-8700-3B15C9EFC1C5@kernel.crashing.org>
On Jan 31, 2008, at 12:15 AM, Kumar Gala wrote:
>
> On Jan 30, 2008, at 11:57 PM, Zhang Wei wrote:
>
>>
>>
>>> -----Original Message-----
>>> From: Kumar Gala [mailto:galak@kernel.crashing.org]
>>>
>>> On Jan 30, 2008, at 4:30 AM, Zhang Wei wrote:
>>>
>>>> Change lots of static variable to mport private. And add
>>> mport to some
>>>> function declaration.
>>>
>>> Can you explain this patch further. Its not clear exactly from this
>>> commit message why we are doing this.
>>>
>>> - k
>>
>> Sorry about I have a little hurry about it.
>>
>> The original RapidIO driver suppose there is only one mpc85xx RIO
>> controller
>> in system. So, some data structures are defined as mpc85xx_rio
>> global,
>> such as 'regs_win', 'dbell_ring', 'msg_tx_ring'. Now, I changed them
>> to
>> mport's private members. And you can define multi RIO OF-nodes in dts
>> file
>> for multi RapidIO controller in one processor, such as PCI/PCI-Ex
>> host
>> controllers
>> in Freescale's silicon. And the mport operation function declaration
>> should be changed
>> to know which RapidIO controller is target.
>
> thanks, this makes a lot of sense and now reviewing the patch will
> make some sense to me :)
when we have multiple ports are the device IDs on the ports intended
to be unique only to a port or unique across all ports?
- k
^ permalink raw reply
* Re: [PATCH 4/6] Add multi mport support.
From: Kumar Gala @ 2008-01-31 6:15 UTC (permalink / raw)
To: Zhang Wei; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <ABF87B0B6A38C0458E319AC973ED68AEBD0677@zch01exm26.fsl.freescale.net>
On Jan 30, 2008, at 11:57 PM, Zhang Wei wrote:
>
>
>> -----Original Message-----
>> From: Kumar Gala [mailto:galak@kernel.crashing.org]
>>
>> On Jan 30, 2008, at 4:30 AM, Zhang Wei wrote:
>>
>>> Change lots of static variable to mport private. And add
>> mport to some
>>> function declaration.
>>
>> Can you explain this patch further. Its not clear exactly from this
>> commit message why we are doing this.
>>
>> - k
>
> Sorry about I have a little hurry about it.
>
> The original RapidIO driver suppose there is only one mpc85xx RIO
> controller
> in system. So, some data structures are defined as mpc85xx_rio global,
> such as 'regs_win', 'dbell_ring', 'msg_tx_ring'. Now, I changed them
> to
> mport's private members. And you can define multi RIO OF-nodes in dts
> file
> for multi RapidIO controller in one processor, such as PCI/PCI-Ex host
> controllers
> in Freescale's silicon. And the mport operation function declaration
> should be changed
> to know which RapidIO controller is target.
thanks, this makes a lot of sense and now reviewing the patch will
make some sense to me :)
- k
^ permalink raw reply
* Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .
From: Kumar Gala @ 2008-01-31 6:15 UTC (permalink / raw)
To: Zhang Wei; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <ABF87B0B6A38C0458E319AC973ED68AEBD0683@zch01exm26.fsl.freescale.net>
On Jan 31, 2008, at 12:04 AM, Zhang Wei wrote:
> All right, I'll give you another patch for 86xx dts file. :)
>
> Btw: Why the PCI and other nodes were moved from SOC? Just for clear?
> If they are moved out, their register address must use full address
> not
> offset address.
we did this because the feeling was the SOC node just represented the
IMMR/CCSBAR registers, and not the address space used by the various
busses.
(this is why pci, rio, and local bus all exist outside of the soc node).
- k
^ permalink raw reply
* RE: [PATCH 4/6] Add multi mport support.
From: Zhang Wei @ 2008-01-31 5:57 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <AF4B8466-C1CE-4FFB-8341-4BFC1CB76116@kernel.crashing.org>
=20
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
>=20
> On Jan 30, 2008, at 4:30 AM, Zhang Wei wrote:
>=20
> > Change lots of static variable to mport private. And add=20
> mport to some
> > function declaration.
>=20
> Can you explain this patch further. Its not clear exactly from this =20
> commit message why we are doing this.
>=20
> - k
Sorry about I have a little hurry about it.
The original RapidIO driver suppose there is only one mpc85xx RIO
controller
in system. So, some data structures are defined as mpc85xx_rio global,
such as 'regs_win', 'dbell_ring', 'msg_tx_ring'. Now, I changed them to
mport's private members. And you can define multi RIO OF-nodes in dts
file
for multi RapidIO controller in one processor, such as PCI/PCI-Ex host
controllers
in Freescale's silicon. And the mport operation function declaration
should be changed
to know which RapidIO controller is target.
Thanks!
Wei
^ permalink raw reply
* Re: [PATCH] [NET] cpmac: convert to new Fixed PHY infrastructure (was: Re: fixed phy support (warning related to FIXED_MII_100_FDX))
From: Kumar Gala @ 2008-01-31 4:30 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev list, Eugene Konev, Jeff Garzik, netdev
In-Reply-To: <20080121204953.GA11384@localhost.localdomain>
> From: Anton Vorontsov <avorontsov@ru.mvista.com>
> Subject: [PATCH] [NET] cpmac: convert to new Fixed PHY infrastructure
>
> This patch converts cpmac to the new Fixed PHY infrastructure,
> though it
> doesn't fix all the problems with that driver. I didn't even bother to
> test this patch to compile, because cpmac driver is broken in
> several ways:
>
> 1. This driver won't compile by itself because lack of its header
> describing
> platform data;
> 2. It assumes that fixed PHYs should be created by the ethernet
> driver.
> It is wrong assumption: fixed PHYs creation is platform code
> authority,
> driver must blindly accept bus_id and phy_id platform data variables
> instead.
>
> Also, it seem that that driver doesn't have actual in-tree users, so
> nothing to fix further.
>
> The main purpose of that patch is to get rid of the following Kconfig
> warning:
>
> scripts/kconfig/conf -s arch/powerpc/Kconfig
> drivers/net/Kconfig:1713:warning: 'select' used by config symbol
> 'CPMAC' refers to undefined symbol 'FIXED_MII_100_FDX'
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> drivers/net/Kconfig | 4 +--
> drivers/net/cpmac.c | 55 +++++++++++++++
> +----------------------------------
> 2 files changed, 19 insertions(+), 40 deletions(-)
applied.
- k
^ permalink raw reply
* Re: [PATCH v3] powerpc: configure USB clock for MPC8315E
From: Kumar Gala @ 2008-01-31 4:30 UTC (permalink / raw)
To: Kim Phillips; +Cc: olof, linuxppc-dev, Jerry Huang
In-Reply-To: <20080130124619.32484395.kim.phillips@freescale.com>
On Jan 30, 2008, at 12:46 PM, Kim Phillips wrote:
> SCCR USB bits are in a different location on the mpc8315.
>
> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> ---
> changed to detect parent node compatibility with fsl,mpc8315-immr, and
> do a of_node_put when done.
>
> arch/powerpc/boot/dts/mpc8315erdb.dts | 2 +-
> arch/powerpc/platforms/83xx/mpc83xx.h | 2 ++
> arch/powerpc/platforms/83xx/usb.c | 17 +++++++++++++----
> 3 files changed, 16 insertions(+), 5 deletions(-)
applied.
- k
^ permalink raw reply
* Re: build error with kdump shutdown hook support
From: Olof Johansson @ 2008-01-31 4:22 UTC (permalink / raw)
To: Geoff Levand; +Cc: linuxppc-dev@ozlabs.org, Michael Neuling
In-Reply-To: <47A13EEB.8030806@am.sony.com>
On Wed, Jan 30, 2008 at 07:22:19PM -0800, Geoff Levand wrote:
> Hi.
>
> It seems something is missing in the current
> linux-2.6.git (8af03e782cae1e0a0f530ddd22301cdd12cf9dc0).
See:
http://patchwork.ozlabs.org/linuxppc/patch?id=16607
Or add a separate handler instead of reusing the debugger one, either
way works for me. I went with the easier option.
-Olof
^ permalink raw reply
* git tree rebased
From: Kumar Gala @ 2008-01-31 4:22 UTC (permalink / raw)
To: linuxppc-dev list; +Cc: linuxppc-embedded
Now that all the changes I had in my tree are in Linus's tree I'm
rebasing the master branch of my git tree to match linus.
git.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git
Anyone using my tree should do a git-pull -f.
- k
^ permalink raw reply
* Re: [PATCH 2/2] IB/ehca: Add PMA support
From: Roland Dreier @ 2008-01-31 4:09 UTC (permalink / raw)
To: Joachim Fenkes
Cc: LKML, OF-EWG, LinuxPPC-Dev, Christoph Raisch, OF-General,
Stefan Roscher
In-Reply-To: <200801252118.28122.fenkes@de.ibm.com>
thanks, applied 1-2
^ permalink raw reply
* Re: [PATCH] IB/ehca: Prevent sending UD packets to QP0
From: Roland Dreier @ 2008-01-31 4:06 UTC (permalink / raw)
To: Joachim Fenkes
Cc: LKML, OF-EWG, LinuxPPC-Dev, Christoph Raisch, OF-General,
Stefan Roscher
In-Reply-To: <200801241759.09065.fenkes@de.ibm.com>
thanks, applied
^ permalink raw reply
* build error with kdump shutdown hook support
From: Geoff Levand @ 2008-01-31 3:22 UTC (permalink / raw)
To: Michael Neuling; +Cc: linuxppc-dev@ozlabs.org
Hi.
It seems something is missing in the current
linux-2.6.git (8af03e782cae1e0a0f530ddd22301cdd12cf9dc0).
CC arch/powerpc/kernel/crash.o
arch/powerpc/kernel/crash.c: In function 'default_machine_crash_shutdown':
arch/powerpc/kernel/crash.c:388: error: '__debugger_fault_handler' undeclared (first use in this function)
arch/powerpc/kernel/crash.c:388: error: (Each undeclared identifier is reported only once
arch/powerpc/kernel/crash.c:388: error: for each function it appears in.)
commit 496b010e1e70a9b4286fa34f19523f24a194f119
Author: Michael Neuling <mikey@neuling.org>
Date: Fri Jan 18 15:50:30 2008 +1100
[POWERPC] kdump shutdown hook support
This adds hooks into the default_machine_crash_shutdown so drivers can
register a function to be run in the first kernel before we hand off
to the second kernel. This should only be used in exceptional
circumstances, like where the device can't be reset in the second
kernel alone (as is the case with eHEA). To emphasize this, the
number of handles allowed to be registered is currently #def to 1.
This uses the setjmp/longjmp code around the call out to the
registered hooks, so any bogus exceptions we encounter will hopefully
be recoverable.
Tested with bogus data and instruction exceptions.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
^ permalink raw reply
* RE: [PATCH 3/6] Move include/asm-ppc/rio.h to include/asm-powerpc/rio.h
From: Zhang Wei @ 2008-01-31 3:36 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <AF5092BE-3384-44F8-A104-560DD4331726@kernel.crashing.org>
=20
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
> On Jan 30, 2008, at 4:30 AM, Zhang Wei wrote:
>=20
> > Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
> > ---
> > include/asm-powerpc/rio.h | 18 ++++++++++++++++++
> > include/asm-ppc/rio.h | 18 ------------------
> > 2 files changed, 18 insertions(+), 18 deletions(-)
> > create mode 100644 include/asm-powerpc/rio.h
> > delete mode 100644 include/asm-ppc/rio.h
>=20
> it seems with OF we can just git rid of this?
>=20
Aha, yep :), The change just make the RIO driver in arch/powerpc can be
compiled with RapidIO OF patch.
If we have OF patch, you can drop this patch.
Thanks!
Wei.
^ permalink raw reply
* [PATCH] [POWERPC] Fix compilation for CONFIG_DEBUGGER=n and CONFIG_KEXEC=y
From: Olof Johansson @ 2008-01-31 3:34 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, torvalds
In-Reply-To: <18337.8955.539106.868486@cargo.ozlabs.ibm.com>
Looks like "[POWERPC] kdump shutdown hook support" broke builds when
CONFIG_DEBUGGER=n and CONFIG_KEXEC=y, such as in g5_defconfig:
arch/powerpc/kernel/crash.c: In function 'default_machine_crash_shutdown':
arch/powerpc/kernel/crash.c:388: error: '__debugger_fault_handler' undeclared (first use in this function)
arch/powerpc/kernel/crash.c:388: error: (Each undeclared identifier is reported only once
arch/powerpc/kernel/crash.c:388: error: for each function it appears in.)
Move the debugger hooks to under CONFIG_DEBUGGER || CONFIG_KEXEC, since
that's when the crash code is enabled.
(I should have caught this with my build-script pre-merge, my bad. :( )
Signed-off-by: Olof Johansson <olof@lixom.net>
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 848a204..4b5b7ff 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -54,7 +54,7 @@
#endif
#include <asm/kexec.h>
-#ifdef CONFIG_DEBUGGER
+#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
int (*__debugger)(struct pt_regs *regs);
int (*__debugger_ipi)(struct pt_regs *regs);
int (*__debugger_bpt)(struct pt_regs *regs);
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h
index bc9739d..8d37283 100644
--- a/include/asm-powerpc/system.h
+++ b/include/asm-powerpc/system.h
@@ -65,7 +65,7 @@
struct task_struct;
struct pt_regs;
-#ifdef CONFIG_DEBUGGER
+#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
extern int (*__debugger)(struct pt_regs *regs);
extern int (*__debugger_ipi)(struct pt_regs *regs);
^ permalink raw reply related
* Re: [RFC] [POWERPC] bootwrapper: build multiple cuImages
From: Grant Likely @ 2008-01-31 2:40 UTC (permalink / raw)
To: Stephen Neuendorffer; +Cc: scottwood, linuxppc-dev
In-Reply-To: <20080131014952.83827290071@mail95-dub.bigfish.com>
On 1/30/08, Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> wrote:
>
> I like the spirit... It does seem like the compiled in device tree is
> specified in the wrong place.
heh, thanks. :-)
> > +zImage.mpc866ads: vmlinux $(wrapperbits) $(dtstree)/mpc866ads.dts
> > + $(call if_changed,wrap,$*,$(dtstree)/mpc866ads.dts)
> > +zImage.initrd.mpc866ads: vmlinux $(wrapperbits)
> $(dtstree)/mpc866ads.dts
> > + $(call
> if_changed,wrap,$*,$(dtstree)/mpc866ads.dts,,$(obj)/ramdisk.image.gz)
> > +
> > +zImage.mpc885ads: vmlinux $(wrapperbits) $(dtstree)/mpc885ads.dts
> > + $(call if_changed,wrap,$*,$(dtstree)/mpc885ads.dts)
> > +zImage.initrd.mpc885ads: vmlinux $(wrapperbits)
> $(dtstree)/mpc885ads.dts
> > + $(call
> if_changed,wrap,$*,$(dtstree)/mpc885ads.dts,,$(obj)/ramdisk.image.gz)
> > +
> > +zImage.ep88xc: vmlinux $(wrapperbits) $(dtstree)/ep88xc.dts
> > + $(call if_changed,wrap,$*,$(dtstree)/ep88xc.dts)
> > +zImage.initrd.ep88xc: vmlinux $(wrapperbits) $(dtstree)/ep88xc.dts
> > + $(call
> if_changed,wrap,$*,$(dtstree)/ep88xc.dts,,$(obj)/ramdisk.image.gz)
>
> It seems like all you've done here is expand out the $(obj)/zImage.%
> rule?, but now the $* has nothing to match to? I don't think this
> works.
Oops, that's a mistake. $* should have been replaced.
>
> How about just:
> $(obj)/zImage.initrd.%: vmlinux $(wrapperbits) %.dts
> $(call if_changed,wrap,$*,$*.dts,,$(obj)/ramdisk.image.gz)
mpc866ads, mpc885ads and ep88xc are oddities in that they build
zImages with embedded device tree blobs. Most zImages don't do that
and zImage* is an overloaded target. Only the three boards above have
.dts files that should be included. Doing it this way matches the
method used for the ps3 zImages.
Consider for instance when zImage.chrp is built. With the rule above,
the wrapper would go looking for chrp.dts and fail when it couldn't
find it. The old rule works because dts is set to nothing if
CONFIG_DEVICE_TREE is not set and the wrapper just passes over the dts
processing commands.
I could change the wrapper to just skip dts files that don't exist,
but I don't think that is the right behavior either. Then you'll have
inconsistent behavior when files are present/absent and there are
cases (like the three boards above) where we *want* the wrapper to
fail if the dts file is missing.
One option would be to add two new targets: zImage.dtb.% and
zImage.initrd.dtb.%, but I'm not sure if it is a good idea.
>
> Which would handle the default case of platform code for each dts.
>
> Then for cases where you have a multiplatform target, you'd have
> something like
> $(obj)/zImage.initrd.virtex.%: vmlinux $(wrapperbits) %.dts
> $(call if_changed,wrap,virtex,$*.dts,,$(obj)/ramdisk.image.gz)
cuImage is already an example of exactly this, except for the mapping
between cuImage-*.c and .dts files. Also, I think the '.virtex' in
the above example is superfluous. The .dts file itself discribes the
platform as a virtex platform.
However, specifically for the virtex, we still need something like:
zImage.raw.% or elfImage.%. (I'd like to avoid overloading zImage
even more, so 'elfImage' or something like it is probably the better
choice).
> > diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
> > index 763a0c4..b70ec6a 100755
> > --- a/arch/powerpc/boot/wrapper
> > +++ b/arch/powerpc/boot/wrapper
> > @@ -158,6 +158,26 @@ miboot|uboot)
> > cuboot*)
> > binary=y
> > gzip=
> > + case "$platform" in
> > + *-mpc885ads|*-adder875*|*-ep88xc)
> > + platformo=$object/cuboot-8xx.o
> > + ;;
> > + *5200*|*-motionpro)
> > + platformo=$object/cuboot-52xx.o
> > + ;;
> > + *-pq2fads|*-ep8248e|*-mpc8272*)
> > + platformo=$object/cuboot-pq2.o
> > + ;;
> > + *-mpc824*)
> > + platformo=$object/cuboot-824x.o
> > + ;;
> > + *-mpc83*)
> > + platformo=$object/cuboot-83xx.o
> > + ;;
> > + *-mpc85*)
> > + platformo=$object/cuboot-85xx.o
> > + ;;
> > + esac
> > ;;
> > ps3)
> > platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o"
>
> I'm not particularly fond of making the wrapper smarter... It seems
> like the wrapper should be stupid and the logic about what to include
> done in the Makefile or in Kconfig. Also, it seems like a strange place
> to explicitly encode the dependency between the name of the dts file and
> the platform code.
No; I'm not totally sold on this approach either, but there is already
precedence in the wrapper and I can't think of a cleaner or easier
place to map dts files to cuboot-* objects.
Thanks for the comments
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply
* RE: [RFC] [POWERPC] bootwrapper: build multiple cuImages
From: Stephen Neuendorffer @ 2008-01-31 1:49 UTC (permalink / raw)
To: Grant Likely, jwboyer, linuxppc-dev, scottwood, galak
In-Reply-To: <20080131003347.5779.96112.stgit@trillian.secretlab.ca>
I like the spirit... It does seem like the compiled in device tree is
specified in the wrong place.
Comments inline.
> -----Original Message-----
> From: =
linuxppc-dev-bounces+stephen.neuendorffer=3Dxilinx.com@ozlabs.org
[mailto:linuxppc-dev-
> bounces+stephen.neuendorffer=3Dxilinx.com@ozlabs.org] On Behalf Of =
Grant
Likely
> Sent: Wednesday, January 30, 2008 4:34 PM
> To: jwboyer@gmail.com; linuxppc-dev@ozlabs.org;
scottwood@freescale.com; galak@kernel.crashing.org
> Subject: [RFC] [POWERPC] bootwrapper: build multiple cuImages
>=20
> From: Grant Likely <grant.likely@secretlab.ca>
>=20
> Currently, the kernel uses CONFIG_DEVICE_TREE to wrap a kernel image
> with a fdt blob which means for any given configuration only one dts
> file can be selected and so support for only one board can be built
>=20
> This patch moves the selection of the default .dts file out of the
kernel
> config and into the bootwrapper makefile. The makefile chooses which
> images to build based on the kernel config and the dts source file
> name is taken directly from the image name. For example
"cuImage.ebony"
> will use "ebony.dts" as the device tree source file.
>=20
> In addition, this patch allows a specific image to be requested from
the
> command line by adding "cuImage.%" and "treeImage.%" targets to the
list
> of valid built targets in arch/powerpc/Makefile. This allows the
default
> dts selection to be overridden.
>=20
> Another advantage to this change is it allows a single defconfig to be
> supplied for all boards using the same chip family and only differing
in
> the device tree.
>=20
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>=20
> ---
>=20
> Please review and comment. I have not exhaustively tested this patch
> and I'm sure to have missed some boards. However, I think the concept
> is sound and will be a good change.
> ---
>=20
> arch/powerpc/Kconfig | 19 -------
> arch/powerpc/Makefile | 9 +--
> arch/powerpc/boot/Makefile | 123
++++++++++++++++++++++++++++++++------------
> arch/powerpc/boot/wrapper | 20 +++++++
> 4 files changed, 112 insertions(+), 59 deletions(-)
>=20
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 5e10838..5c205c7 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -407,25 +407,6 @@ config WANT_DEVICE_TREE
> bool
> default n
>=20
> -config DEVICE_TREE
> - string "Static device tree source file"
> - depends on WANT_DEVICE_TREE
> - help
> - This specifies the device tree source (.dts) file to be
> - compiled and included when building the bootwrapper. If a
> - relative filename is given, then it will be relative to
> - arch/powerpc/boot/dts. If you are not using the bootwrapper,
> - or do not need to build a dts into the bootwrapper, this
> - field is ignored.
> -
> - For example, this is required when building a cuImage target
> - for an older U-Boot, which cannot pass a device tree itself.
> - Such a kernel will not work with a newer U-Boot that tries to
> - pass a device tree (unless you tell it not to). If your
U-Boot
> - does not mention a device tree in "help bootm", then use the
> - cuImage target and specify a device tree here. Otherwise, use
> - the uImage target and leave this field blank.
> -
> endmenu
>=20
> config ISA_DMA_API
> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index f70df9b..6845482 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -151,14 +151,11 @@ core-$(CONFIG_XMON) +=3D
arch/powerpc/xmon/
> drivers-$(CONFIG_OPROFILE) +=3D arch/powerpc/oprofile/
>=20
> # Default to zImage, override when needed
> -defaultimage-y :=3D zImage
> -defaultimage-$(CONFIG_DEFAULT_UIMAGE) :=3D uImage
> -KBUILD_IMAGE :=3D $(defaultimage-y)
> -all: $(KBUILD_IMAGE)
> +all: zImage
>=20
> CPPFLAGS_vmlinux.lds :=3D -Upowerpc
>=20
> -BOOT_TARGETS =3D zImage zImage.initrd uImage
> +BOOT_TARGETS =3D zImage zImage.initrd uImage treeImage.% cuImage.%
>=20
> PHONY +=3D $(BOOT_TARGETS)
>=20
> @@ -180,7 +177,7 @@ define archhelp
> endef
>=20
> install: vdso_install
> - $(Q)$(MAKE) $(build)=3D$(boot) BOOTIMAGE=3D$(KBUILD_IMAGE) install
> + $(Q)$(MAKE) $(build)=3D$(boot) install
>=20
> vdso_install:
> ifeq ($(CONFIG_PPC64),y)
> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index b36f911..7173abe 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -123,6 +123,8 @@ targets +=3D $(patsubst
$(obj)/%,%,$(obj-boot) wrapper.a)
> extra-y :=3D $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
> $(obj)/zImage.lds $(obj)/zImage.coff.lds
$(obj)/zImage.ps3.lds
>=20
> +dtstree :=3D $(srctree)/$(src)/dts
> +
> wrapper :=3D$(srctree)/$(src)/wrapper
> wrapperbits :=3D $(extra-y) $(addprefix $(obj)/,addnote hack-coff
mktree dtc) \
> $(wrapper) FORCE
> @@ -191,26 +193,67 @@ image-$(CONFIG_PPC_PRPMC2800) +=3D
zImage.prpmc2800
> image-$(CONFIG_PPC_ISERIES) +=3D zImage.iseries
> image-$(CONFIG_DEFAULT_UIMAGE) +=3D uImage
>=20
> -ifneq ($(CONFIG_DEVICE_TREE),"")
> -image-$(CONFIG_PPC_8xx) +=3D cuImage.8xx
> -image-$(CONFIG_PPC_EP88XC) +=3D zImage.ep88xc
> +#
> +# Targets which embed a device tree blob
> +#
> +# Theses are default targets to build images which embed device tree
blobs.
> +# They are only required on boards which do not have FDT support in
firmware.
> +# Boards with newish u-boot firmare can use the uImage target above
> +#
> +
> +# Board ports in arch/powerpc/platform/40x/Kconfig
> image-$(CONFIG_EP405) +=3D zImage.ep405
> -image-$(CONFIG_8260) +=3D cuImage.pq2
> -image-$(CONFIG_EP8248E) +=3D zImage.ep8248e
> -image-$(CONFIG_PPC_MPC52xx) +=3D cuImage.52xx
> -image-$(CONFIG_STORCENTER) +=3D cuImage.824x
> -image-$(CONFIG_PPC_83xx) +=3D cuImage.83xx
> -image-$(CONFIG_PPC_85xx) +=3D cuImage.85xx
> -image-$(CONFIG_MPC7448HPC2) +=3D cuImage.hpc2
> +image-$(CONFIG_WALNUT) +=3D treeImage.walnut
> +
> +# Board ports in arch/powerpc/platform/44x/Kconfig
> image-$(CONFIG_EBONY) +=3D treeImage.ebony
cuImage.ebony
> image-$(CONFIG_BAMBOO) +=3D treeImage.bamboo
cuImage.bamboo
> image-$(CONFIG_SEQUOIA) +=3D cuImage.sequoia
> image-$(CONFIG_RAINIER) +=3D cuImage.rainier
> -image-$(CONFIG_WALNUT) +=3D treeImage.walnut
> image-$(CONFIG_TAISHAN) +=3D cuImage.taishan
> image-$(CONFIG_KATMAI) +=3D cuImage.katmai
> image-$(CONFIG_WARP) +=3D cuImage.warp
> -endif
> +
> +# Board ports in arch/powerpc/platform/8xx/Kconfig
> +image-$(CONFIG_PPC_MPC86XADS) +=3D zImage.mpc866ads
> +image-$(CONFIG_PPC_MPC885ADS) +=3D zImage.mpc885ads
> +image-$(CONFIG_PPC_EP88XC) +=3D zImage.ep88xc
> +image-$(CONFIG_PPC_ADDER875) +=3D cuImage.adder875-uboot
> +
> +# Board ports in arch/powerpc/platform/52xx/Kconfig
> +image-$(CONFIG_PPC_LITE5200) +=3D cuImage.lite5200
cuImage.lite5200b
> +
> +# Board ports in arch/powerpc/platform/82xx/Kconfig
> +image-$(CONFIG_MPC8272_ADS) +=3D cuImage.mpc8272ads
> +image-$(CONFIG_PQ2FADS) +=3D cuImage.pq2fads
> +image-$(CONFIG_EP8248E) +=3D zImage.ep8248e
> +
> +# Board ports in arch/powerpc/platform/83xx/Kconfig
> +image-$(CONFIG_MPC8313_RDB) +=3D cuImage.mpc8313erdb
> +image-$(CONFIG_MPC832x_MDS) +=3D cuImage.mpc832x_mds
> +image-$(CONFIG_MPC832x_RDB) +=3D cuImage.mpc832x_rdb
> +image-$(CONFIG_MPC834x_ITX) +=3D cuImage.mpc8349emitx \
> + cuImage.mpc8349emitxgp
> +image-$(CONFIG_MPC834x_MDS) +=3D cuImage.mpc834x_mds
> +image-$(CONFIG_MPC836x_MDS) +=3D cuImage.mpc836x_mds
> +image-$(CONFIG_MPC837x_MDS) +=3D cuImage.mpc8377_mds \
> + cuImage.mpc8378_mds \
> + cuImage.mpc8379_mds
> +
> +# Board ports in arch/powerpc/platform/83xx/Kconfig
> +image-$(CONFIG_MPC8540_ADS) +=3D cuImage.mpc8540ads
> +image-$(CONFIG_MPC8560_ADS) +=3D cuImage.mpc8560ads
> +image-$(CONFIG_MPC85xx_CDS) +=3D cuImage.mpc8541cds \
> + cuImage.mpc8548cds \
> + cuImage.mpc8555cds
> +image-$(CONFIG_MPC85xx_MDS) +=3D cuImage.mpc8568mds
> +image-$(CONFIG_MPC85xx_DS) +=3D cuImage.mpc8544ds \
> + cuImage.mpc8572ds
> +
> +# Board ports in arch/powerpc/platform/embedded6xx/Kconfig
> +image-$(CONFIG_STORCENTER) +=3D cuImage.storcenter
> +image-$(CONFIG_PPC_PRPMC2800) +=3D cuImage.prpmc2800
> +image-$(CONFIG_MPC7448HPC2) +=3D cuImage.mpc7448hpc2
>=20
> ifneq ($(CONFIG_REDBOOT),"")
> image-$(CONFIG_PPC_8xx) +=3D zImage.redboot-8xx
> @@ -230,24 +273,14 @@ targets +=3D $(image-y) $(initrd-y)
>=20
> $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
>=20
> -# If CONFIG_WANT_DEVICE_TREE is set and CONFIG_DEVICE_TREE isn't an
> -# empty string, define 'dts' to be path to the dts
> -# CONFIG_DEVICE_TREE will have "" around it, make sure to strip them
> -ifeq ($(CONFIG_WANT_DEVICE_TREE),y)
> -ifneq ($(CONFIG_DEVICE_TREE),"")
> -dts =3D $(if $(shell echo $(CONFIG_DEVICE_TREE) | grep '^/'),\
> - ,$(srctree)/$(src)/dts/)$(CONFIG_DEVICE_TREE:"%"=3D%)
> -endif
> -endif
> -
> # Don't put the ramdisk on the pattern rule; when its missing make
will try
> # the pattern rule with less dependencies that also matches (even
with the
> # hard dependency listed).
> -$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) $(dts)
> - $(call if_changed,wrap,$*,$(dts),,$(obj)/ramdisk.image.gz)
> +$(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
> + $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
>=20
> -$(obj)/zImage.%: vmlinux $(wrapperbits) $(dts)
> - $(call if_changed,wrap,$*,$(dts))
> +$(obj)/zImage.%: vmlinux $(wrapperbits)
> + $(call if_changed,wrap,$*)
>=20
> # This cannot be in the root of $(src) as the zImage rule always adds
a $(obj)
> # prefix
> @@ -259,22 +292,42 @@ $(obj)/zImage.iseries: vmlinux
>=20
> $(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits)
$(srctree)/$(src)/dts/ps3.dts
> $(STRIP) -s -R .comment $< -o vmlinux.strip
> - $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,)
> + $(call cmd,wrap,ps3,$(dtstree)/ps3.dts,,)
>=20
> $(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits)
$(srctree)/$(src)/dts/ps3.dts
> $(obj)/ramdisk.image.gz
> - $(call
cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz)
> + $(call cmd,wrap,ps3,$(dtstree)/ps3.dts,,$(obj)/ramdisk.image.gz)
> +
> +zImage.ep405: vmlinux $(wrapperbits) $(dtstree)/ep405.dts
> + $(call if_changed,wrap,$*,$(dtstree)/ep405.dts)
> +zImage.initrd.ep405: vmlinux $(wrapperbits) $(dtstree)/ep405.dts
> + $(call
if_changed,wrap,$*,$(dtstree)/ep405.dts,,$(obj)/ramdisk.image.gz)
> +
> +zImage.mpc866ads: vmlinux $(wrapperbits) $(dtstree)/mpc866ads.dts
> + $(call if_changed,wrap,$*,$(dtstree)/mpc866ads.dts)
> +zImage.initrd.mpc866ads: vmlinux $(wrapperbits)
$(dtstree)/mpc866ads.dts
> + $(call
if_changed,wrap,$*,$(dtstree)/mpc866ads.dts,,$(obj)/ramdisk.image.gz)
> +
> +zImage.mpc885ads: vmlinux $(wrapperbits) $(dtstree)/mpc885ads.dts
> + $(call if_changed,wrap,$*,$(dtstree)/mpc885ads.dts)
> +zImage.initrd.mpc885ads: vmlinux $(wrapperbits)
$(dtstree)/mpc885ads.dts
> + $(call
if_changed,wrap,$*,$(dtstree)/mpc885ads.dts,,$(obj)/ramdisk.image.gz)
> +
> +zImage.ep88xc: vmlinux $(wrapperbits) $(dtstree)/ep88xc.dts
> + $(call if_changed,wrap,$*,$(dtstree)/ep88xc.dts)
> +zImage.initrd.ep88xc: vmlinux $(wrapperbits) $(dtstree)/ep88xc.dts
> + $(call
if_changed,wrap,$*,$(dtstree)/ep88xc.dts,,$(obj)/ramdisk.image.gz)
It seems like all you've done here is expand out the $(obj)/zImage.%
rule?, but now the $* has nothing to match to? I don't think this
works.
How about just:
$(obj)/zImage.initrd.%: vmlinux $(wrapperbits) %.dts
$(call if_changed,wrap,$*,$*.dts,,$(obj)/ramdisk.image.gz)
Which would handle the default case of platform code for each dts.
Then for cases where you have a multiplatform target, you'd have
something like
$(obj)/zImage.initrd.virtex.%: vmlinux $(wrapperbits) %.dts
$(call if_changed,wrap,virtex,$*.dts,,$(obj)/ramdisk.image.gz)
>=20
> $(obj)/uImage: vmlinux $(wrapperbits)
> $(call if_changed,wrap,uboot)
>=20
> -$(obj)/cuImage.%: vmlinux $(dts) $(wrapperbits)
> - $(call if_changed,wrap,cuboot-$*,$(dts))
> +$(obj)/cuImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits)
> + $(call if_changed,wrap,cuboot-$*,$(dtstree)/$*.dts)
>=20
> -$(obj)/treeImage.initrd.%: vmlinux $(dts) $(wrapperbits)
> - $(call
if_changed,wrap,treeboot-$*,$(dts),,$(obj)/ramdisk.image.gz)
> +$(obj)/treeImage.initrd.%: vmlinux $(dtstree)/%.dts $(wrapperbits)
> + $(call
if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz)
>=20
> -$(obj)/treeImage.%: vmlinux $(dts) $(wrapperbits)
> - $(call if_changed,wrap,treeboot-$*,$(dts))
> +$(obj)/treeImage.%: vmlinux $(dtstree)/%.dts $(wrapperbits)
> + $(call if_changed,wrap,treeboot-$*,$(dtstree)/$*.dts)
>=20
> # If there isn't a platform selected then just strip the vmlinux.
> ifeq (,$(image-y))
> @@ -283,8 +336,10 @@ endif
>=20
> $(obj)/zImage: $(addprefix $(obj)/, $(image-y))
> @rm -f $@; ln $< $@
> + @echo target images: $(image-y)
> $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y))
> @rm -f $@; ln $< $@
> + @echo target images: $(initrd-y)
>=20
> install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
> sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux
System.map "$(INSTALL_PATH)" $<
> diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
> index 763a0c4..b70ec6a 100755
> --- a/arch/powerpc/boot/wrapper
> +++ b/arch/powerpc/boot/wrapper
> @@ -158,6 +158,26 @@ miboot|uboot)
> cuboot*)
> binary=3Dy
> gzip=3D
> + case "$platform" in
> + *-mpc885ads|*-adder875*|*-ep88xc)
> + platformo=3D$object/cuboot-8xx.o
> + ;;
> + *5200*|*-motionpro)
> + platformo=3D$object/cuboot-52xx.o
> + ;;
> + *-pq2fads|*-ep8248e|*-mpc8272*)
> + platformo=3D$object/cuboot-pq2.o
> + ;;
> + *-mpc824*)
> + platformo=3D$object/cuboot-824x.o
> + ;;
> + *-mpc83*)
> + platformo=3D$object/cuboot-83xx.o
> + ;;
> + *-mpc85*)
> + platformo=3D$object/cuboot-85xx.o
> + ;;
> + esac
> ;;
> ps3)
> platformo=3D"$object/ps3-head.o $object/ps3-hvcall.o =
$object/ps3.o"
I'm not particularly fond of making the wrapper smarter... It seems
like the wrapper should be stupid and the logic about what to include
done in the Makefile or in Kconfig. Also, it seems like a strange place
to explicitly encode the dependency between the name of the dts file and
the platform code.
Steve
>=20
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply
* compilation errors...sorry, sigh...
From: Lorenzo T. Flores @ 2008-01-31 1:01 UTC (permalink / raw)
To: linuxppc-embedded
Hey all,
I was wondering if anyone could help me figure out what to do next as
far as some compilation errors are concerned.
I'm working with an Avnet 4vfx12ls eval board (has virtex-4 and PPC).
Now, I've generated BSP files using Xilinx XPS, and from past posts on
this forum found the Secret Lab's virtex 2.6 git tree (not sure if I'm
using proper terminology, feel free to correct me, please!)
Well, I copied in the BSP files into the distribution. Ran 'make
menuconfig' then 'make bzImage'
Here's the errors I get:
---------------------------------------------------------------------
GEN .version
CHK include/linux/compile.h
dnsdomainname: Unknown host
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
kernel/built-in.o: In function `enable_all_kprobes':
kernel/kprobes.c:926: undefined reference to `arch_arm_kprobe'
kernel/built-in.o: In function `disable_all_kprobes':
kernel/kprobes.c:957: undefined reference to `arch_disarm_kprobe'
kernel/kprobes.c:956: undefined reference to `arch_trampoline_kprobe'
kernel/built-in.o: In function `init_kprobes':
kernel/kprobes.c:823: undefined reference to `arch_init_kprobes'
kernel/built-in.o: In function `report_probe':
kernel/kprobes.c:838: undefined reference to `setjmp_pre_handler'
kernel/kprobes.c:838: undefined reference to `setjmp_pre_handler'
kernel/built-in.o: In function `unregister_kprobe':
kernel/kprobes.c:610: undefined reference to `arch_disarm_kprobe'
kernel/kprobes.c:632: undefined reference to `arch_remove_kprobe'
kernel/built-in.o: In function `pre_handler_kretprobe':
kernel/kprobes.c:702: undefined reference to `arch_prepare_kretprobe'
kernel/built-in.o: In function `in_kprobes_functions':
kernel/kprobes.c:495: undefined reference to `__kprobes_text_start'
kernel/kprobes.c:495: undefined reference to `__kprobes_text_start'
kernel/kprobes.c:495: undefined reference to `__kprobes_text_end'
kernel/kprobes.c:495: undefined reference to `__kprobes_text_end'
kernel/built-in.o: In function `__register_kprobe':
kernel/kprobes.c:556: undefined reference to `arch_prepare_kprobe'
kernel/kprobes.c:565: undefined reference to `arch_arm_kprobe'
kernel/built-in.o: In function `register_jprobe':
kernel/kprobes.c:669: undefined reference to `setjmp_pre_handler'
kernel/kprobes.c:669: undefined reference to `setjmp_pre_handler'
kernel/kprobes.c:670: undefined reference to `longjmp_break_handler'
kernel/kprobes.c:670: undefined reference to `longjmp_break_handler'
kernel/built-in.o:(__ksymtab_gpl+0x398): undefined reference to
`jprobe_return'
kernel/built-in.o:(.data+0x4a84): undefined reference to
`kprobe_exceptions_notify'
make: *** [.tmp_vmlinux1] Error 1
---------------------------------------------------------------------
I'm using ELDK's ppc_4xx toolchain.
Any info or links to relevant posts would be so much appreciated. I
looked through the archives and know my answers are probably in there
somewhere...I'm just not sure if I could distill the proper information.
Thank you all for any input!
best,
Lorenzo Flores
--
Embedded Systems Engineer
Alpha Golf
(510) 526-7443, ext. 07
65 Franciscan Way
Kensington, CA 94707
^ 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