Re: [RFC] [POWERPC] bootwrapper: build multiple cuImages
On 1/30/08, Stephen Neuendorffer [EMAIL PROTECTED] 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. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] Fix compilation for CONFIG_DEBUGGER=n and CONFIG_KEXEC=y
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 [EMAIL PROTECTED] 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); ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [PATCH 3/6] Move include/asm-ppc/rio.h to include/asm-powerpc/rio.h
-Original Message- From: Kumar Gala [mailto:[EMAIL PROTECTED] On Jan 30, 2008, at 4:30 AM, Zhang Wei wrote: Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- 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 it seems with OF we can just git rid of this? 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. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] IB/ehca: Prevent sending UD packets to QP0
thanks, applied ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/2] IB/ehca: Add PMA support
thanks, applied 1-2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
git tree rebased
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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: build error with kdump shutdown hook support
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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v3] powerpc: configure USB clock for MPC8315E
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 [EMAIL PROTECTED] Signed-off-by: Kim Phillips [EMAIL PROTECTED] --- 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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [NET] cpmac: convert to new Fixed PHY infrastructure (was: Re: fixed phy support (warning related to FIXED_MII_100_FDX))
From: Anton Vorontsov [EMAIL PROTECTED] 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 [EMAIL PROTECTED] --- drivers/net/Kconfig |4 +-- drivers/net/cpmac.c | 55 +++ +-- 2 files changed, 19 insertions(+), 40 deletions(-) applied. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [PATCH 4/6] Add multi mport support.
-Original Message- From: Kumar Gala [mailto:[EMAIL PROTECTED] 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! Wei ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .
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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/6] Add multi mport support.
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:[EMAIL PROTECTED] 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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [PATCH 4/6] Add multi mport support.
-Original Message- From: Kumar Gala [mailto:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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? I consider each RIO controller will has its own network, the device IDs should be unique only in its port network. Cheers! Wei ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/6] Add multi mport support.
On Jan 30, 2008, at 11:57 PM, Zhang Wei wrote: -Original Message- From: Kumar Gala [mailto:[EMAIL PROTECTED] 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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .
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:[EMAIL PROTECTED] Sent: Wednesday, January 30, 2008 10:44 PM To: Zhang Wei Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; linuxppc-dev@ozlabs.org Subject: Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ . Can you post a device tree update as well. The older patches on the list for the 86xx .dts should NOT put the rio node under the soc. It should be at the same level as PCI. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] [POWERPC] Set dma_data correctly for direct_ops on pasemi
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 [EMAIL PROTECTED] 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; ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/2] Add RapidIO node into MPC8641HPCN dts file
From: Zhang Wei [EMAIL PROTECTED] Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- 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 0010; }; }; + + rapidio0: [EMAIL PROTECTED] { + #address-cells = 2; + #size-cells = 2; + compatible = fsl,rapidio-delta; + reg = f80c 2; + ranges = 0 0 c000 0 2000; + 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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/2] Add RapidIO node probing into MPC86xx_HPCN board id table.
From: Zhang Wei [EMAIL PROTECTED] Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- 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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/2] Add RapidIO node probing into MPC86xx_HPCN board id table.
Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- 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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [PATCH 1/2] Add RapidIO node into MPC8641HPCN dts file
Sorry for wrong sending name of this and next email. Best Regards, Wei. -Original Message- From: y [mailto:y] Sent: Thursday, January 31, 2008 3:45 PM To: [EMAIL PROTECTED] Cc: linuxppc-dev@ozlabs.org; Zhang Wei Subject: [PATCH 1/2] Add RapidIO node into MPC8641HPCN dts file From: Zhang Wei [EMAIL PROTECTED] Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- 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 0010; }; }; + + rapidio0: [EMAIL PROTECTED] { + #address-cells = 2; + #size-cells = 2; + compatible = fsl,rapidio-delta; + reg = f80c 2; + ranges = 0 0 c000 0 2000; + 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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/2] Add RapidIO node into MPC8641HPCN dts file
Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- 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 0010; }; }; + + rapidio0: [EMAIL PROTECTED] { + #address-cells = 2; + #size-cells = 2; + compatible = fsl,rapidio-delta; + reg = f80c 2; + ranges = 0 0 c000 0 2000; + 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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] [NET]: Remove PowerPC code from fec.c
Jochen Friedrich wrote: fec.c is only used on M68k Coldfire CPUs. Remove leftover PowerPC code from this driver. Signed-off-by: Jochen Friedrich [EMAIL PROTECTED] --- drivers/net/fec.c | 136 +--- 1 files changed, 3 insertions(+), 133 deletions(-) Seems OK to me, but I feel I don't have enough knowledge to ACK or NAK. Please pass through an arch tree, thanks. Jeff ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch v6 3/4] USB: add Cypress c67x00 OTG controller HCD driver
Alan == Alan Stern [EMAIL PROTECTED] writes: Alan On Tue, 29 Jan 2008, Peter Korsgaard wrote: This patch adds HCD support for the Cypress c67x00 family of devices. --- /dev/null +++ linux-2.6/drivers/usb/c67x00/c67x00-hcd.c +int c67x00_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) +{ + struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); + unsigned long flags; + int rc; + + spin_lock_irqsave(c67x00-lock, flags); + rc = usb_hcd_check_unlink_urb(hcd, urb, status); + if (rc) + goto done; + + c67x00_release_urb(c67x00, urb); + usb_hcd_unlink_urb_from_ep(hcd, urb); + spin_unlock_irqrestore(c67x00-lock, flags); + + usb_hcd_giveback_urb(hcd, urb, status); Alan This is wrong. usb_hcd_giveback_urb() must be called with local Alan interrupts disabled. Ups, good catch. I've put a spin_unlock() / spin_lock() around it and moved the _irqrestore down below now. +/* + * pre: urb != NULL and c67x00 locked, urb unlocked + */ +static inline void +c67x00_giveback_urb(struct c67x00_hcd *c67x00, struct urb *urb, int status) +{ + struct c67x00_urb_priv *urbp; + + if (!urb) + return; Alan Since you have the documented precondition that urb != NULL, and since Alan this routine is never called in a context where urb could be NULL, Alan there's no need for this test. Also, I doubt that this routine really Alan needs to be inline (and besides, the compiler is better at making such Alan decisions than we are). It can be null in c67x00_check_td_list, so it's actually the comment that's wrong. I've fixed that. +static void c67x00_sched_done(unsigned long __c67x00) +{ + struct c67x00_hcd *c67x00 = (struct c67x00_hcd *)__c67x00; + struct c67x00_urb_priv *urbp, *tmp; + struct urb *urb; + + spin_lock(c67x00-lock); + + /* Loop over the done list and give back all the urbs */ + list_for_each_entry_safe(urbp, tmp, c67x00-done_list, hep_node) { + urb = urbp-urb; + c67x00_release_urb(c67x00, urb); + if (!usb_hcd_check_unlink_urb(c67x00_hcd_to_hcd(c67x00), + urb, urbp-status)) { Alan The function call above is completely wrong. It is meant to be used only Alan from within the dequeue method. Ahh, so should I just unconditionally do the unlink_urb_from_ep and giveback_urb? + usb_hcd_unlink_urb_from_ep(c67x00_hcd_to_hcd(c67x00), + urb); + spin_unlock(c67x00-lock); + usb_hcd_giveback_urb(c67x00_hcd_to_hcd(c67x00), urb, +urbp-status); + spin_lock(c67x00-lock); + } + } + spin_unlock(c67x00-lock); +} Alan Is there some reason this routine needs to run in a tasklet? Why not Alan just call it directly? Hmm, I don't actually remember anymore. It's was written back in Spring 2006 by Jan. I'll try moving it out of the tasklet and see what it gives. Alan Also, the fact that it is in a tasklet means that it runs with Alan interrupts enabled. Hence your spin_lock() and spin_unlock() calls Alan will not do the right thing. Ahh, ofcause. Thanks for the feedback! -- Bye, Peter Korsgaard ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH v2] 82xx: MGCOGE support
Hello, The following patch adds support for the mpc8247 based board MGCOGE from keymile. changes to the previous patchset: - Added the suggestions from Scott Wood: http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050957.html - The patch http://ozlabs.org/pipermail/linuxppc-dev/2008-January/050931.html is no longer needed. Signed-off-by: Heiko Schocher [EMAIL PROTECTED] --- arch/powerpc/boot/dts/mgcoge.dts | 149 ++ arch/powerpc/configs/mgcoge_defconfig | 821 + arch/powerpc/platforms/82xx/Kconfig |9 + arch/powerpc/platforms/82xx/Makefile |1 + arch/powerpc/platforms/82xx/mgcoge.c | 130 ++ 5 files changed, 1110 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/mgcoge.dts create mode 100644 arch/powerpc/configs/mgcoge_defconfig create mode 100644 arch/powerpc/platforms/82xx/mgcoge.c diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts new file mode 100644 index 000..63f7cfe --- /dev/null +++ b/arch/powerpc/boot/dts/mgcoge.dts @@ -0,0 +1,149 @@ +/* + * Device Tree for the MGCOGE plattform from keymile + * + * Copyright 2008 DENX Software Engineering GmbH + * + * 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. + */ + +/dts-v1/; +/ { + model = MGCOGE; + compatible = keymile,mgcoge; + #address-cells = 1; + #size-cells = 1; + + aliases { + ethernet0 = eth0; + serial0 = smc2; + }; + + cpus { + #address-cells = 1; + #size-cells = 0; + + PowerPC,[EMAIL PROTECTED] { + device_type = cpu; + reg = 0; + d-cache-line-size = 32; + i-cache-line-size = 32; + d-cache-size = 16384; + i-cache-size = 16384; + timebase-frequency = 0; + clock-frequency = 0; + bus-frequency = 0; + }; + }; + + [EMAIL PROTECTED] { + compatible = fsl,mpc8247-localbus, +fsl,pq2-localbus, +simple-bus; + #address-cells = 2; + #size-cells = 1; + reg = 0xf0010100 0x40; + + ranges = 0 0 0xfe00 0x0040; + + [EMAIL PROTECTED],0 { + compatible = cfi-flash; + reg = 0 0x0 0x40; + #address-cells = 1; + #size-cells = 1; + bank-width = 1; + device-width = 1; + [EMAIL PROTECTED] { + label = u-boot; + reg = 0 0x4; + }; + [EMAIL PROTECTED] { + label = env; + reg = 0x4 0x2; + }; + [EMAIL PROTECTED] { + label = user; + reg = 0x6 0x3a; + }; + }; + }; + + memory { + device_type = memory; + reg = 0 0; + }; + + [EMAIL PROTECTED] { + #address-cells = 1; + #size-cells = 1; + compatible = fsl,mpc8247-immr, fsl,pq2-soc, simple-bus; + ranges = 0x 0xf000 0x00053000; + + // Temporary until code stops depending on it. + device_type = soc; + + [EMAIL PROTECTED] { + #address-cells = 1; + #size-cells = 1; + #interrupt-cells = 2; + compatible = fsl,mpc8247-cpm, fsl,cpm2, + simple-bus; + reg = 0x119c0 0x30; + ranges; + + muram { + #address-cells = 1; + #size-cells = 1; + ranges = 0 0 0x1; + + [EMAIL PROTECTED] { + compatible = fsl,cpm-muram-data; + reg = 0x80 0x1f80 0x9800 0x800; + }; + }; + + [EMAIL PROTECTED] { + compatible = fsl,mpc8247-brg, +fsl,cpm2-brg, +fsl,cpm-brg; + reg = 0x119f0 0x10 0x115f0 0x10; + }; + +
[PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .
The driver is also fit for Freescale MPC8641 processor. Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- arch/powerpc/sysdev/fsl_rio.c | 80 1 files changed, 40 insertions(+), 40 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index af2425e..36c4be4 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c @@ -1,5 +1,5 @@ /* - * MPC85xx RapidIO support + * Freescale MPC85xx/MPC86xx RapidIO support * * Copyright 2005 MontaVista Software, Inc. * Matt Porter [EMAIL PROTECTED] @@ -145,7 +145,7 @@ static struct rio_msg_rx_ring { } msg_rx_ring; /** - * mpc85xx_rio_doorbell_send - Send a MPC85xx doorbell message + * fsl_rio_doorbell_send - Send a MPC85xx doorbell message * @index: ID of RapidIO interface * @destid: Destination ID of target device * @data: 16-bit info field of RapidIO doorbell message @@ -153,9 +153,9 @@ static struct rio_msg_rx_ring { * Sends a MPC85xx doorbell message. Returns %0 on success or * %-EINVAL on failure. */ -static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data) +static int fsl_rio_doorbell_send(int index, u16 destid, u16 data) { - pr_debug(mpc85xx_doorbell_send: index %d destid %4.4x data %4.4x\n, + pr_debug(fsl_doorbell_send: index %d destid %4.4x data %4.4x\n, index, destid, data); out_be32((void *)dbell_atmu_regs-rowtar, destid 22); out_be16((void *)(dbell_win), data); @@ -164,7 +164,7 @@ static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data) } /** - * mpc85xx_local_config_read - Generate a MPC85xx local config space read + * fsl_local_config_read - Generate a MPC85xx local config space read * @index: ID of RapdiIO interface * @offset: Offset into configuration space * @len: Length (in bytes) of the maintenance transaction @@ -173,9 +173,9 @@ static int mpc85xx_rio_doorbell_send(int index, u16 destid, u16 data) * Generates a MPC85xx local configuration space read. Returns %0 on * success or %-EINVAL on failure. */ -static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data) +static int fsl_local_config_read(int index, u32 offset, int len, u32 * data) { - pr_debug(mpc85xx_local_config_read: index %d offset %8.8x\n, index, + pr_debug(fsl_local_config_read: index %d offset %8.8x\n, index, offset); *data = in_be32((void *)(regs_win + offset)); @@ -183,7 +183,7 @@ static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data) } /** - * mpc85xx_local_config_write - Generate a MPC85xx local config space write + * fsl_local_config_write - Generate a MPC85xx local config space write * @index: ID of RapdiIO interface * @offset: Offset into configuration space * @len: Length (in bytes) of the maintenance transaction @@ -192,10 +192,10 @@ static int mpc85xx_local_config_read(int index, u32 offset, int len, u32 * data) * Generates a MPC85xx local configuration space write. Returns %0 on * success or %-EINVAL on failure. */ -static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data) +static int fsl_local_config_write(int index, u32 offset, int len, u32 data) { pr_debug - (mpc85xx_local_config_write: index %d offset %8.8x data %8.8x\n, + (fsl_local_config_write: index %d offset %8.8x data %8.8x\n, index, offset, data); out_be32((void *)(regs_win + offset), data); @@ -203,7 +203,7 @@ static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data) } /** - * mpc85xx_rio_config_read - Generate a MPC85xx read maintenance transaction + * fsl_rio_config_read - Generate a MPC85xx read maintenance transaction * @index: ID of RapdiIO interface * @destid: Destination ID of transaction * @hopcount: Number of hops to target device @@ -215,13 +215,13 @@ static int mpc85xx_local_config_write(int index, u32 offset, int len, u32 data) * success or %-EINVAL on failure. */ static int -mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len, +fsl_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len, u32 * val) { u8 *data; pr_debug - (mpc85xx_rio_config_read: index %d destid %d hopcount %d offset %8.8x len %d\n, + (fsl_rio_config_read: index %d destid %d hopcount %d offset %8.8x len %d\n, index, destid, hopcount, offset, len); out_be32((void *)maint_atmu_regs-rowtar, (destid 22) | (hopcount 12) | ((offset ~0x3) 9)); @@ -243,7 +243,7 @@ mpc85xx_rio_config_read(int index, u16 destid, u8 hopcount, u32 offset, int len, } /** - * mpc85xx_rio_config_write - Generate a MPC85xx write maintenance transaction + * fsl_rio_config_write - Generate a MPC85xx write maintenance transaction * @index: ID of RapdiIO interface * @destid: Destination ID of
[PATCH 2/6] Add RapidIO option to kernel configuration.
Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- arch/powerpc/Kconfig| 13 + arch/powerpc/platforms/86xx/Kconfig |1 + 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 47fe256..ad07964 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -535,6 +535,19 @@ source drivers/pcmcia/Kconfig source drivers/pci/hotplug/Kconfig +config HAS_RAPIDIO + bool + default n + +config RAPIDIO + bool RapidIO support + depends on HAS_RAPIDIO + help + If you say Y here, the kernel will include drivers and + infrastructure code to support RapidIO interconnect devices. + +source drivers/rapidio/Kconfig + endmenu menu Advanced setup diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig index 21d1135..8c7c5ff 100644 --- a/arch/powerpc/platforms/86xx/Kconfig +++ b/arch/powerpc/platforms/86xx/Kconfig @@ -8,6 +8,7 @@ config MPC8641_HPCN select PPC_I8259 select DEFAULT_UIMAGE select FSL_ULI1575 + select HAS_RAPIDIO help This option enables support for the MPC8641 HPCN board. -- 1.5.2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 3/6] Move include/asm-ppc/rio.h to include/asm-powerpc/rio.h
Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- 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 diff --git a/include/asm-powerpc/rio.h b/include/asm-powerpc/rio.h new file mode 100644 index 000..0018bf8 --- /dev/null +++ b/include/asm-powerpc/rio.h @@ -0,0 +1,18 @@ +/* + * RapidIO architecture support + * + * Copyright 2005 MontaVista Software, Inc. + * Matt Porter [EMAIL PROTECTED] + * + * 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 ASM_PPC_RIO_H +#define ASM_PPC_RIO_H + +extern void platform_rio_init(void); + +#endif /* ASM_PPC_RIO_H */ diff --git a/include/asm-ppc/rio.h b/include/asm-ppc/rio.h deleted file mode 100644 index 0018bf8..000 --- a/include/asm-ppc/rio.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * RapidIO architecture support - * - * Copyright 2005 MontaVista Software, Inc. - * Matt Porter [EMAIL PROTECTED] - * - * 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 ASM_PPC_RIO_H -#define ASM_PPC_RIO_H - -extern void platform_rio_init(void); - -#endif /* ASM_PPC_RIO_H */ -- 1.5.2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 6/6] Change the kernel configurated RapidIO system size to auto-probing.
The RapidIO system size will auto probe in RIO setup. The route table and rionet_active in rionet.c are changed to be allocated dynamically according the system size. Signed-off-by: Zhang Wei [EMAIL PROTECTED] --- arch/powerpc/sysdev/fsl_rio.c |6 + drivers/net/rionet.c | 16 +++- drivers/rapidio/Kconfig |8 -- drivers/rapidio/rio-scan.c| 51 + drivers/rapidio/rio-sysfs.c |3 +- drivers/rapidio/rio.c |2 +- drivers/rapidio/rio.h |9 +- include/linux/rio.h | 14 +- 8 files changed, 68 insertions(+), 41 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 36b43ec..4877203 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c @@ -1001,6 +1001,12 @@ int fsl_rio_setup(struct of_device *dev) rio_register_mport(port); priv-regs_win = (u32) ioremap(regs.start, regs.end - regs.start + 1); + + port-sys_size = (in_be32((priv-regs_win + RIO_PEF_CAR)) +RIO_PEF_CTLS) 4; + dev_info(dev-dev, RapidIO Common Transport System size: %d\n, + port-sys_size ? 65536 : 256); + priv-atmu_regs = (struct rio_atmu_regs *)(priv-regs_win + RIO_ATMU_REGS_OFFSET); priv-maint_atmu_regs = priv-atmu_regs + 1; diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index e7fd08a..f2c103b 100644 --- a/drivers/net/rionet.c +++ b/drivers/net/rionet.c @@ -77,7 +77,7 @@ static int rionet_capable = 1; * could be made into a hash table to save memory depending * on system trade-offs. */ -static struct rio_dev *rionet_active[RIO_MAX_ROUTE_ENTRIES]; +static struct rio_dev **rionet_active; #define is_rionet_capable(pef, src_ops, dst_ops) \ ((pef RIO_PEF_INB_MBOX) \ @@ -195,7 +195,8 @@ static int rionet_start_xmit(struct sk_buff *skb, struct net_device *ndev) } if (eth-h_dest[0] 0x01) { - for (i = 0; i RIO_MAX_ROUTE_ENTRIES; i++) + for (i = 0; i RIO_MAX_ROUTE_ENTRIES(rnet-mport-syssize); + i++) if (rionet_active[i]) rionet_queue_tx_msg(skb, ndev, rionet_active[i]); @@ -385,6 +386,8 @@ static void rionet_remove(struct rio_dev *rdev) struct net_device *ndev = NULL; struct rionet_peer *peer, *tmp; + free_pages((unsigned long)rionet_active, rdev-net-hport-sys_size ? + __ilog2(sizeof(void *)) + 4 : 0); unregister_netdev(ndev); kfree(ndev); @@ -443,6 +446,15 @@ static int rionet_setup_netdev(struct rio_mport *mport) goto out; } + if (!(rionet_active = (struct rio_dev **)__get_free_pages(GFP_KERNEL, + mport-sys_size ? __ilog2(sizeof(void *)) + 4 + : 0))) { + rc = -ENOMEM; + goto out; + } + memset((void *)rionet_active, 0, sizeof(void *) * + RIO_MAX_ROUTE_ENTRIES(mport-sys_size)); + /* Set up private area */ rnet = (struct rionet_private *)ndev-priv; rnet-mport = mport; diff --git a/drivers/rapidio/Kconfig b/drivers/rapidio/Kconfig index 4142115..c32822a 100644 --- a/drivers/rapidio/Kconfig +++ b/drivers/rapidio/Kconfig @@ -1,14 +1,6 @@ # # RapidIO configuration # -config RAPIDIO_8_BIT_TRANSPORT - bool 8-bit transport addressing - depends on RAPIDIO - ---help--- - By default, the kernel assumes a 16-bit addressed RapidIO - network. By selecting this option, the kernel will support - an 8-bit addressed network. - config RAPIDIO_DISC_TIMEOUT int Discovery timeout duration (seconds) depends on RAPIDIO diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c index 4442072..ca895d1 100644 --- a/drivers/rapidio/rio-scan.c +++ b/drivers/rapidio/rio-scan.c @@ -73,7 +73,7 @@ static u16 rio_get_device_id(struct rio_mport *port, u16 destid, u8 hopcount) rio_mport_read_config_32(port, destid, hopcount, RIO_DID_CSR, result); - return RIO_GET_DID(result); + return RIO_GET_DID(port-sys_size, result); } /** @@ -88,7 +88,7 @@ static u16 rio_get_device_id(struct rio_mport *port, u16 destid, u8 hopcount) static void rio_set_device_id(struct rio_mport *port, u16 destid, u8 hopcount, u16 did) { rio_mport_write_config_32(port, destid, hopcount, RIO_DID_CSR, - RIO_SET_DID(did)); + RIO_SET_DID(port-sys_size, did)); } /** @@ -100,7 +100,8 @@ static void rio_set_device_id(struct rio_mport *port, u16 destid, u8 hopcount, u */ static void
Re: PCI configuration with multiple PCI controllers
On Jan 29, 2008, at 8:20 AM, Laurent Lagrange wrote: Hello, I have a MPC8641 based board. I try to use the two PCIe controllers. My firmware configures (physically) the PCI buses as follow: --+ MPC8641 PCIe 1| bus 1 +--+ | -- | PCI device 0 | BUS 0 | +--+ - - - - - - - - - + MPC8641 PCIe 2| bus 3 +--+ | -- | PCI device 1 | BUS 2 | +--+ --+ I launch the Linux image (2.6.23.9). During the Kernel PCI configuration, buses behind the 2nd MPC8641 PCIe are skipped because its primary bus don't start at bus number 0. The kernel reconfigure the primary bus number of the MPC8641 PCIe 2 controller from 2 to 0. I can patch the kernel to work with my firmware but I don't know if my PCI configuration is the good one. What is the common way to configure the PCI for Linux when a new controller is found: start the bus number to 0 or to the last bus number + 1? Linux now has the concept of PCI domains so each controller is a new domain and thus the first bus should be 0 in each domain. (at least that's the normal way we handle things). - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH][drivers/net/fec_mpc52xx.c] duplicate NETIF_MSG_IFDOWN in MPC52xx_MESSAGES_DEFAULT
Untested patch below, please confirm it's the right fix. -- duplicate NETIF_MSG_IFDOWN, 2nd should be NETIF_MSG_IFUP Signed-off-by: Roel Kluin [EMAIL PROTECTED] --- diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index f91ee70..ca3c3b3 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c @@ -55,7 +55,7 @@ module_param_array_named(mac, mpc52xx_fec_mac_addr, byte, NULL, 0); MODULE_PARM_DESC(mac, six hex digits, ie. 0x1,0x2,0xc0,0x01,0xba,0xbe); #define MPC52xx_MESSAGES_DEFAULT ( NETIF_MSG_DRV | NETIF_MSG_PROBE | \ - NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFDOWN ) + NETIF_MSG_LINK | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP) static int debug = -1; /* the above default */ module_param(debug, int, 0); MODULE_PARM_DESC(debug, debugging messages level); ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
External Interrupt
Hi all, I used the linux kernel 2.6.10 with a processor MPC8548E. I wrote a driver for a device connected with the local bus. This device has an external interrupt. In the local bus driver I have used the macro MPC85xx_IRQ_EXTX to get the interrupt number and pass it to the driver and after that register the ISR. Now with a kernel 2.6.21 this macro isn't available because in the header file irq.h there is the option CONFIG_PPC_MERGE that disable those options. I think this problem is related to the migration of ppc code towards powerpc. I know that now there is the new device tree source file but I think in this file I should describe only the platform device, and this device is not a platform device. Then, how can I get now this value? Is there some function to call? Thanks in advance. Marco ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/6] Add multi mport support.
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 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 1/6] Change RIO function mpc85xx_ to fsl_ .
Can you post a device tree update as well. The older patches on the list for the 86xx .dts should NOT put the rio node under the soc. It should be at the same level as PCI. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch v6 3/4] USB: add Cypress c67x00 OTG controller HCD driver
On Wed, 30 Jan 2008, Peter Korsgaard wrote: +static void c67x00_sched_done(unsigned long __c67x00) +{ + struct c67x00_hcd *c67x00 = (struct c67x00_hcd *)__c67x00; + struct c67x00_urb_priv *urbp, *tmp; + struct urb *urb; + + spin_lock(c67x00-lock); + + /* Loop over the done list and give back all the urbs */ + list_for_each_entry_safe(urbp, tmp, c67x00-done_list, hep_node) { + urb = urbp-urb; + c67x00_release_urb(c67x00, urb); + if (!usb_hcd_check_unlink_urb(c67x00_hcd_to_hcd(c67x00), + urb, urbp-status)) { Alan The function call above is completely wrong. It is meant to be used only Alan from within the dequeue method. Ahh, so should I just unconditionally do the unlink_urb_from_ep and giveback_urb? Yes, that's right. The check_unlink_urb routine merely verifies that an unlink is valid. If you're about to giveback an URB then you already know it's valid to do so. Alan Stern ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
On Wed, 30 Jan 2008, Linux Kernel Mailing List wrote: Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dd5af90a7f3d79e04b7eace9a98644dbf2038f4d Commit: dd5af90a7f3d79e04b7eace9a98644dbf2038f4d Parent: 3212bff370c2f22e4987c6679ba485654cefb178 Author: Mike Travis [EMAIL PROTECTED] AuthorDate: Wed Jan 30 13:33:32 2008 +0100 Committer: Ingo Molnar [EMAIL PROTECTED] CommitDate: Wed Jan 30 13:33:32 2008 +0100 x86/non-x86: percpu, node ids, apic ids x86.git fixup Signed-off-by: Ingo Molnar [EMAIL PROTECTED] Signed-off-by: Thomas Gleixner [EMAIL PROTECTED] --- arch/x86/Kconfig |2 +- include/asm-generic/percpu.h | 12 ++-- init/main.c |4 ++-- kernel/module.c |8 This broke powerpc (and presumably ia64 and sparc64) in current linux-2.6.git: | init/main.c:376: error: static declaration of 'setup_per_cpu_areas' follows non-static declaration | include2/asm/percpu.h:33: error: previous declaration of 'setup_per_cpu_areas' was here as the generic and x86-specific parts were integrated, while the powerpc/ia64/sparc64-specific parts are still missing. 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f0887d1..8e1b33c 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -97,7 +97,7 @@ config GENERIC_TIME_VSYSCALL bool default X86_64 -config ARCH_SETS_UP_PER_CPU_AREA +config HAVE_SETUP_PER_CPU_AREA def_bool X86_64 config ARCH_SUPPORTS_OPROFILE diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index c41b1a7..4b8d31c 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h @@ -47,7 +47,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; #endif /* - * A percpu variable may point to a discarded reghions. The following are + * A percpu variable may point to a discarded regions. The following are * established ways to produce a usable pointer from the percpu variable * offset. */ @@ -59,18 +59,10 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; (*SHIFT_PERCPU_PTR(per_cpu_var(var), __my_cpu_offset)) -#ifdef CONFIG_ARCH_SETS_UP_PER_CPU_AREA +#ifdef CONFIG_HAVE_SETUP_PER_CPU_AREA extern void setup_per_cpu_areas(void); #endif -/* 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))) diff --git a/init/main.c b/init/main.c index 5843fe9..3316dff 100644 --- a/init/main.c +++ b/init/main.c @@ -363,7 +363,7 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { } #else -#ifndef CONFIG_ARCH_SETS_UP_PER_CPU_AREA +#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA unsigned long __per_cpu_offset[NR_CPUS] __read_mostly; EXPORT_SYMBOL(__per_cpu_offset); @@ -384,7 +384,7 @@ static void __init setup_per_cpu_areas(void) ptr += size; } } -#endif /* CONFIG_ARCH_SETS_UP_CPU_AREA */ +#endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */ /* Called by boot processor to activate the rest. */ static void __init smp_init(void) diff --git a/kernel/module.c b/kernel/module.c index f6a4e72..bd60278 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -430,6 +430,14 @@ static unsigned int find_pcpusec(Elf_Ehdr *hdr, return find_sec(hdr, sechdrs, secstrings, .data.percpu); } +static void percpu_modcopy(void *pcpudest, const void *from, unsigned long size) +{ + int cpu; + + for_each_possible_cpu(cpu) + memcpy(pcpudest + per_cpu_offset(cpu), from, size); +} + static int percpu_modinit(void) { pcpu_num_used = 2; - To unsubscribe from this list: send the line unsubscribe git-commits-head in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html With kind regards, Geert Uytterhoeven Software Architect Sony Network and Software Technology Center Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone:+32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [EMAIL PROTECTED] Internet: http://www.sony-europe.com/ Sony Network and Software Technology Center Europe A division of Sony Service Centre (Europe) N.V. Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium VAT BE 0413.825.160 · RPR Brussels Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619___
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Mike Travis [EMAIL PROTECTED] wrote: This broke powerpc (and presumably ia64 and sparc64) in current linux-2.6.git: I'm generating a fixup patch right now... thanks! Sorry about that: we cross-built on ARM but not on SMP non-x86 platforms so this dependency/breakage went unnoticed. Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/6] percpu: Change Kconfig to HAVE_SETUP_PER_CPU_AREA linux-2.6.git
Change: config ARCH_SETS_UP_PER_CPU_AREA to: config HAVE_SETUP_PER_CPU_AREA Based on latest linux-2.6.git Cc: Andi Kleen [EMAIL PROTECTED] Cc: Tony Luck [EMAIL PROTECTED] Cc: David Miller [EMAIL PROTECTED] Cc: Sam Ravnborg [EMAIL PROTECTED] Cc: Rusty Russell [EMAIL PROTECTED] Cc: Geert Uytterhoeven [EMAIL PROTECTED] Cc: linuxppc-dev@ozlabs.org Cc: [EMAIL PROTECTED] Signed-off-by: Mike Travis [EMAIL PROTECTED] --- linux-2.6.git: - added back in missing pieces from x86.git merge The change to using select xxx as suggested by Sam requires an addition to a non-existant file (arch/Kconfig) so I went back to using config xxx to introduce the flag. --- arch/ia64/Kconfig|2 +- arch/powerpc/Kconfig |2 +- arch/sparc64/Kconfig |2 +- init/main.c |2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -80,7 +80,7 @@ config GENERIC_TIME_VSYSCALL bool default y -config ARCH_SETS_UP_PER_CPU_AREA +config HAVE_SETUP_PER_CPU_AREA def_bool y config DMI --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -42,7 +42,7 @@ config GENERIC_HARDIRQS bool default y -config ARCH_SETS_UP_PER_CPU_AREA +config HAVE_SETUP_PER_CPU_AREA def_bool PPC64 config IRQ_PER_CPU --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig @@ -66,7 +66,7 @@ config AUDIT_ARCH bool default y -config ARCH_SETS_UP_PER_CPU_AREA +config HAVE_SETUP_PER_CPU_AREA def_bool y config ARCH_NO_VIRT_TO_BUS --- a/init/main.c +++ b/init/main.c @@ -380,6 +380,8 @@ static void __init setup_per_cpu_areas(v /* Copy section for each CPU (we discard the original) */ size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); + printk(KERN_INFO + PERCPU: Allocating %lu bytes of per cpu data (main)\n, size); ptr = alloc_bootmem_pages(size * nr_possible_cpus); for_each_possible_cpu(i) { -- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
Ingo Molnar wrote: * Luck, Tony [EMAIL PROTECTED] wrote: thanks! Sorry about that: we cross-built on ARM but not on SMP non-x86 platforms so this dependency/breakage went unnoticed. Yes ... all ia64 builds (UP and SMP) are broken at the moment. Please Cc: me with the fixup patch. Could you check the patch below? With this applied to latest -git, ia64 buils fine for me in a cross-compiling environment. (but i dont know whether it boots ...) Ingo This patch is from a different patch set (aka zero-based patch). That one will be updated and resubmitted soon... Thanks, Mike - Subject: generic: percpu infrastructure to rebase the per cpu area to zero From: [EMAIL PROTECTED] * Support an option CONFIG_HAVE_ZERO_BASED_PER_CPU that makes offsets for per cpu variables to start at zero. If a percpu area starts at zero then: - We do not need RELOC_HIDE anymore - Provides for the future capability of architectures providing a per cpu allocator that returns offsets instead of pointers. The offsets would be independent of the processor so that address calculations can be done in a processor independent way. Per cpu instructions can then add the processor specific offset at the last minute possibly in an atomic instruction. The data the linker provides is different for zero based percpu segments: __per_cpu_load - The address at which the percpu area was loaded __per_cpu_size - The length of the per cpu area * Removes the __per_cpu_x in lockdep. The __per_cpu_x are already pointers. There is no need to take the address. * Changes generic setup_per_cpu_areas to allocate per_cpu space in node local memory. This requires a generic early_cpu_to_node function. Signed-off-by: Mike Travis [EMAIL PROTECTED] Reviewed-by: Christoph Lameter [EMAIL PROTECTED] Signed-off-by: Ingo Molnar [EMAIL PROTECTED] --- arch/ia64/Kconfig |2 - arch/ia64/kernel/module.c | 11 arch/powerpc/Kconfig |2 - arch/sparc64/mm/init.c|5 include/asm-alpha/topology.h |1 include/asm-generic/percpu.h |7 - include/asm-generic/sections.h| 10 include/asm-generic/topology.h|3 ++ include/asm-generic/vmlinux.lds.h | 15 include/asm-ia64/percpu.h | 29 +-- include/asm-ia64/topology.h |1 include/asm-mips/mach-ip27/topology.h |1 include/asm-powerpc/percpu.h | 29 +-- include/asm-powerpc/topology.h|1 include/asm-s390/percpu.h | 42 +++--- include/asm-sparc64/percpu.h | 22 ++--- init/main.c | 18 -- kernel/lockdep.c |4 +-- 18 files changed, 78 insertions(+), 125 deletions(-) Index: linux-x86.q/arch/ia64/Kconfig === --- linux-x86.q.orig/arch/ia64/Kconfig +++ linux-x86.q/arch/ia64/Kconfig @@ -80,7 +80,7 @@ config GENERIC_TIME_VSYSCALL bool default y -config ARCH_SETS_UP_PER_CPU_AREA +config HAVE_SETUP_PER_CPU_AREA def_bool y config DMI Index: linux-x86.q/arch/ia64/kernel/module.c === --- linux-x86.q.orig/arch/ia64/kernel/module.c +++ linux-x86.q/arch/ia64/kernel/module.c @@ -940,14 +940,3 @@ module_arch_cleanup (struct module *mod) if (mod-arch.core_unw_table) unw_remove_unwind_table(mod-arch.core_unw_table); } - -#ifdef CONFIG_SMP -void -percpu_modcopy (void *pcpudst, const void *src, unsigned long size) -{ - unsigned int i; - for_each_possible_cpu(i) { - memcpy(pcpudst + per_cpu_offset(i), src, size); - } -} -#endif /* CONFIG_SMP */ Index: linux-x86.q/arch/powerpc/Kconfig === --- linux-x86.q.orig/arch/powerpc/Kconfig +++ linux-x86.q/arch/powerpc/Kconfig @@ -42,7 +42,7 @@ config GENERIC_HARDIRQS bool default y -config ARCH_SETS_UP_PER_CPU_AREA +config HAVE_SETUP_PER_CPU_AREA def_bool PPC64 config IRQ_PER_CPU Index: linux-x86.q/arch/sparc64/mm/init.c === --- linux-x86.q.orig/arch/sparc64/mm/init.c +++ linux-x86.q/arch/sparc64/mm/init.c @@ -1328,6 +1328,11 @@ pgd_t swapper_pg_dir[2048]; static void sun4u_pgprot_init(void); static void sun4v_pgprot_init(void); +/* Dummy function */ +void __init setup_per_cpu_areas(void) +{ +} + void __init paging_init(void) { unsigned long end_pfn, pages_avail, shift, phys_base; Index:
Re: [PATCH] [NET] cpmac: convert to new Fixed PHY infrastructure
Is this going through netdev or do you want me to pick it via the powerpc route? Based on your comments I sorta assumed it was most convenient to lump in with the rest of the powerpc changes... That's fine. I'll push it via the powerpc trees. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
Luck, Tony wrote: Could you check the patch below? With this applied to latest -git, ia64 buils fine for me in a cross-compiling environment. (but i dont know whether it boots ...) Uni-processor build still fails with this patch (config is arch/ia64/configs/tiger_defconfig with CONFIG_SMP switched from =y to =n). I'll add an ia64-nosmp config to our cross build test environment and fix this up... Thanks, Mike arch/ia64/kernel/built-in.o(.text+0x5012): In function `show_interrupts': : relocation truncated to fit: IMM22 per_cpu__kstat arch/ia64/kernel/built-in.o(.text+0x53e1): In function `__bind_irq_vector': : relocation truncated to fit: IMM22 per_cpu__vector_irq arch/ia64/kernel/built-in.o(.text+0x5612): In function `__clear_irq_vector': : relocation truncated to fit: IMM22 per_cpu__vector_irq arch/ia64/kernel/built-in.o(.text+0x5a81): In function `__setup_vector_irq': : relocation truncated to fit: IMM22 per_cpu__vector_irq arch/ia64/kernel/built-in.o(.text+0x6231): In function `ia64_handle_irq': : relocation truncated to fit: IMM22 per_cpuirq_regs arch/ia64/kernel/built-in.o(.text+0x6272): In function `ia64_handle_irq': : relocation truncated to fit: IMM22 per_cpu__vector_irq arch/ia64/kernel/built-in.o(.text+0x7b81): In function `cpu_idle_wait': : relocation truncated to fit: IMM22 .text arch/ia64/kernel/built-in.o(.text+0x7e21): In function `cpu_idle': : relocation truncated to fit: IMM22 .text arch/ia64/kernel/built-in.o(.text+0x7fd1): In function `ia64_save_extra': : relocation truncated to fit: IMM22 per_cpu__pfm_syst_info arch/ia64/kernel/built-in.o(.text+0x8071): In function `ia64_load_extra': : relocation truncated to fit: IMM22 per_cpu__pfm_syst_info arch/ia64/kernel/built-in.o(.text+0x95c0): In function `pfm_write_ibr_dbr': : additional relocation overflows omitted from the output ld: final link failed: Nonrepresentable section on output make: *** [.tmp_vmlinux1] Error 1 SMP build (config zx1_defconfig) builds ok and boots ok too. -Tony ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH v3] powerpc: configure USB clock for MPC8315E
SCCR USB bits are in a different location on the mpc8315. Signed-off-by: Jerry Huang [EMAIL PROTECTED] Signed-off-by: Kim Phillips [EMAIL PROTECTED] --- 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(-) diff --git a/arch/powerpc/boot/dts/mpc8315erdb.dts b/arch/powerpc/boot/dts/mpc8315erdb.dts index b582032..d7a1ece 100644 --- a/arch/powerpc/boot/dts/mpc8315erdb.dts +++ b/arch/powerpc/boot/dts/mpc8315erdb.dts @@ -96,7 +96,7 @@ #address-cells = 1; #size-cells = 1; device_type = soc; - compatible = simple-bus; + compatible = fsl,mpc8315-immr, simple-bus; ranges = 0 0xe000 0x0010; reg = 0xe000 0x0200; bus-frequency = 0; diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index 88bb748..68065e6 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h @@ -14,6 +14,8 @@ #define MPC83XX_SCCR_USB_DRCM_11 0x0030 #define MPC83XX_SCCR_USB_DRCM_01 0x0010 #define MPC83XX_SCCR_USB_DRCM_10 0x0020 +#define MPC8315_SCCR_USB_MASK 0x00c0 +#define MPC8315_SCCR_USB_DRCM_11 0x00c0 #define MPC837X_SCCR_USB_DRCM_11 0x00c0 /* system i/o configuration register low */ diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c index 681230a..471fdd8 100644 --- a/arch/powerpc/platforms/83xx/usb.c +++ b/arch/powerpc/platforms/83xx/usb.c @@ -104,6 +104,7 @@ int mpc831x_usb_cfg(void) u32 temp; void __iomem *immap, *usb_regs; struct device_node *np = NULL; + struct device_node *immr_node = NULL; const void *prop; struct resource res; int ret = 0; @@ -124,10 +125,15 @@ int mpc831x_usb_cfg(void) } /* Configure clock */ - temp = in_be32(immap + MPC83XX_SCCR_OFFS); - temp = ~MPC83XX_SCCR_USB_MASK; - temp |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */ - out_be32(immap + MPC83XX_SCCR_OFFS, temp); + immr_node = of_get_parent(np); + if (immr_node of_device_is_compatible(immr_node, fsl,mpc8315-immr)) + clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, + MPC8315_SCCR_USB_MASK, + MPC8315_SCCR_USB_DRCM_11); + else + clrsetbits_be32(immap + MPC83XX_SCCR_OFFS, + MPC83XX_SCCR_USB_MASK, + MPC83XX_SCCR_USB_DRCM_11); /* Configure pin mux for ULPI. There is no pin mux for UTMI */ if (prop !strcmp(prop, ulpi)) { @@ -144,6 +150,9 @@ int mpc831x_usb_cfg(void) iounmap(immap); + if (immr_node) + of_node_put(immr_node); + /* Map USB SOC space */ ret = of_address_to_resource(np, 0, res); if (ret) { -- 1.5.2.2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Luck, Tony [EMAIL PROTECTED] wrote: Could you check the patch below? With this applied to latest -git, ia64 buils fine for me in a cross-compiling environment. (but i dont know whether it boots ...) Uni-processor build still fails with this patch (config is arch/ia64/configs/tiger_defconfig with CONFIG_SMP switched from =y to =n). could you try the full patchset that Travis has just sent and which i've put into x86.git, you can pull it from: git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git it's a fixes only tree, ontop of Linus-very-latest. Head 4b9e425c25f84. [pull from ssh://master.kernel.org if it's not on git.kernel.org yet, uploaded it this very minute.] Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Ingo Molnar [EMAIL PROTECTED] wrote: Uni-processor build still fails with this patch (config is arch/ia64/configs/tiger_defconfig with CONFIG_SMP switched from =y to =n). could you try the full patchset that Travis has just sent and which i've put into x86.git, you can pull it from: btw., i needed the fix below to get DISCONTIGMEM + !NUMA to build. (this is an ia64 build breakage independent of the x86.git merge) Ingo -- Subject: ia64: build fix From: Ingo Molnar [EMAIL PROTECTED] DISCONTIGMEM does not build with NUMA disabled: include/linux/gfp.h: In function `alloc_pages_node': include/linux/gfp.h:189: error: implicit declaration of function `NODE_DATA' include/linux/gfp.h:189: error: invalid type argument of `-' In file included from include/asm/uaccess.h:39, Signed-off-by: Ingo Molnar [EMAIL PROTECTED] --- arch/ia64/Kconfig |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: linux-x86.q/arch/ia64/Kconfig === --- linux-x86.q.orig/arch/ia64/Kconfig +++ linux-x86.q/arch/ia64/Kconfig @@ -351,7 +351,8 @@ config ARCH_SELECT_MEMORY_MODEL def_bool y config ARCH_DISCONTIGMEM_ENABLE - def_bool y + def_bool n + depends on NUMA help Say Y to support efficient handling of discontiguous physical memory, for architectures which are either NUMA (Non-Uniform Memory Access) @@ -372,7 +373,7 @@ config ARCH_DISCONTIGMEM_DEFAULT config NUMA bool NUMA support - depends on !IA64_HP_SIM !FLATMEM + depends on !IA64_HP_SIM default y if IA64_SGI_SN2 select ACPI_NUMA if ACPI help ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
On Wed, Jan 30, 2008 at 07:49:20PM +0100, Ingo Molnar wrote: * Luck, Tony [EMAIL PROTECTED] wrote: Could you check the patch below? With this applied to latest -git, ia64 buils fine for me in a cross-compiling environment. (but i dont know whether it boots ...) Uni-processor build still fails with this patch (config is arch/ia64/configs/tiger_defconfig with CONFIG_SMP switched from =y to =n). could you try the full patchset that Travis has just sent and which i've put into x86.git, you can pull it from: Looks ok for powerpc so far, I haven't gotten through all defconfigs yet but the first ones that failed before build now. pasemi_defconfig boots as well. -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
could you try the full patchset that Travis has just sent and which i've put into x86.git, you can pull it from: git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git it's a fixes only tree, ontop of Linus-very-latest. Head 4b9e425c25f84. [pull from ssh://master.kernel.org if it's not on git.kernel.org yet, uploaded it this very minute.] Same build fail for CONFIG_SMP=n. The SMP=y build is good (for tiger_defconfig) and boots ok too. -Tony ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Mike Travis [EMAIL PROTECTED] wrote: Could this be a problem with: #ifdef HAVE_MODEL_SMALL_ATTRIBUTE # define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__))) #endif This is only defined for !__ASSEMBLY__ nope, moving that per the patch below did not resolve the link problems. Ingo -- Subject: ia64: build fix #3 From: Ingo Molnar [EMAIL PROTECTED] Signed-off-by: Ingo Molnar [EMAIL PROTECTED] --- include/asm-ia64/percpu.h |8 1 file changed, 4 insertions(+), 4 deletions(-) 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 @@ -8,6 +8,10 @@ #define PERCPU_ENOUGH_ROOM PERCPU_PAGE_SIZE +#ifdef HAVE_MODEL_SMALL_ATTRIBUTE +# define PER_CPU_ATTRIBUTES__attribute__((__model__ (__small__))) +#endif + #ifdef __ASSEMBLY__ # define THIS_CPU(var) (per_cpu__##var) /* use this to mark accesses to per-CPU variables... */ #else /* !__ASSEMBLY__ */ @@ -15,10 +19,6 @@ #include linux/threads.h -#ifdef HAVE_MODEL_SMALL_ATTRIBUTE -# define PER_CPU_ATTRIBUTES__attribute__((__model__ (__small__))) -#endif - #ifdef CONFIG_SMP #define __my_cpu_offset__ia64_per_cpu_var(local_per_cpu_offset) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Olof Johansson [EMAIL PROTECTED] wrote: could you try the full patchset that Travis has just sent and which i've put into x86.git, you can pull it from: Looks ok for powerpc so far, I haven't gotten through all defconfigs yet but the first ones that failed before build now. pasemi_defconfig boots as well. great, thanks! Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
I'm having trouble replicating this error. With the latest linux-2.6.git plus the patch I just sent, I get the following errors: drivers/input/mouse/psmouse-base.c:45: error: __param_proto causes a section type conflict drivers/md/md.c:5881: error: __param_start_ro causes a section type conflict Weird. psmouse-base.c builds ok for me. Perhaps there is a compiler version difference? I'm running a rather old 3.4.6 that came with my RHEL 4.5 release. (plenty of warnings too, but no vmlinux) New section mismatch checks are complaining about lots of stuff in this post 2.6.24 world. There are a couple of dozen other warnings in a normal build. I copied arch/ia64/configs/tiger_defconfig to .config, ran menuconfig to turn off SMP and built with this line Yup ... my script is a little different. It uses $ sed -e '/CONFIG_SMP/d' arch/ia64/configs/tiger_defconfig .config $ make oldconfig But the net effect should be equivalent. #ifdef HAVE_MODEL_SMALL_ATTRIBUTE # define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__))) #endif This is only defined for !__ASSEMBLY__ Some place in there. The CONFIG_SMP=n path in ia64 makes quite radical changes ... rather than putting all the per-cpu stuff into the top 64K of address space and providing a per-cpu TLB mapping for that range to a different physical address ... it just makes all the per-cpu stuff link as ordinary variables in .data. The error messages indicate that some of the new code is unaware of this. -Tony ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Luck, Tony [EMAIL PROTECTED] wrote: This is only defined for !__ASSEMBLY__ Some place in there. The CONFIG_SMP=n path in ia64 makes quite radical changes ... rather than putting all the per-cpu stuff into the top 64K of address space and providing a per-cpu TLB mapping for that range to a different physical address ... it just makes all the per-cpu stuff link as ordinary variables in .data. The error messages indicate that some of the new code is unaware of this. ah, that was the vital clue. The patch below makes the small memory model only defined on SMP, and makes the config build/link fine here. Does this build and boot on your box? Ingo Subject: ia64: build fix #3 From: Ingo Molnar [EMAIL PROTECTED] Signed-off-by: Ingo Molnar [EMAIL PROTECTED] --- include/asm-ia64/percpu.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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,12 +15,12 @@ #include linux/threads.h +#ifdef CONFIG_SMP + #ifdef HAVE_MODEL_SMALL_ATTRIBUTE # define PER_CPU_ATTRIBUTES__attribute__((__model__ (__small__))) #endif -#ifdef CONFIG_SMP - #define __my_cpu_offset__ia64_per_cpu_var(local_per_cpu_offset) extern void *per_cpu_init(void); ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Ingo Molnar [EMAIL PROTECTED] wrote: Some place in there. The CONFIG_SMP=n path in ia64 makes quite radical changes ... rather than putting all the per-cpu stuff into the top 64K of address space and providing a per-cpu TLB mapping for that range to a different physical address ... it just makes all the per-cpu stuff link as ordinary variables in .data. The error messages indicate that some of the new code is unaware of this. ah, that was the vital clue. The patch below makes the small memory model only defined on SMP, and makes the config build/link fine here. Does this build and boot on your box? if this works for you then could you please send me your Acked-by as well, for this and the other ia64 changes, so that we can send these to Linus ASAP? Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
ndfc ecc byte order
There seems to be a byte order conflict between the u-boot and Linux ndfc drivers. u-boot has the following: /* The NDFC uses Smart Media (SMC) bytes order*/ ecc_code[0] = p[2]; ecc_code[1] = p[1]; ecc_code[2] = p[3]; the kernel has: ecc_code[0] = p[1]; ecc_code[1] = p[2]; ecc_code[2] = p[3]; I think u-boot has it right since u-boot and kernel software calculated ECCs agree. Anybody know a reason *not* to switch to the SMC byte order? Note that the kernel version will work if you are reading/writing from the kernel since they agree on the wrong ECC :p Cheers, Sean ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
ah, that was the vital clue. The patch below makes the small memory model only defined on SMP, and makes the config build/link fine here. Does this build and boot on your box? I applied this on top of the git pull from git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git and I see see a build problem for SMP=n :-( -Tony ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Luck, Tony [EMAIL PROTECTED] wrote: ah, that was the vital clue. The patch below makes the small memory model only defined on SMP, and makes the config build/link fine here. Does this build and boot on your box? I applied this on top of the git pull from git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git and I see see a build problem for SMP=n :-( could you send the .config you are using? Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
could you send the .config you are using? Ok. Attached. -Tony upconfig Description: upconfig ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[2.6 patch] powerpc: free_property() mustn't be __init
This patch fixes the following section mismatch: -- snip -- ... WARNING: vmlinux.o(.text+0x55648): Section mismatch in reference from the function .free_node() to the function .init.text:.free_property() ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- 99e9b48d8f5aba059916540fc69815db2b60b08d diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c index be06cfd..657b72f 100644 --- a/arch/powerpc/platforms/iseries/vio.c +++ b/arch/powerpc/platforms/iseries/vio.c @@ -75,7 +75,7 @@ static struct property *new_property(const char *name, int length, return np; } -static void __init free_property(struct property *np) +static void free_property(struct property *np) { kfree(np); } ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[2.6 patch] powerpc: vdso_do_func_patch{32,64}() must be __init
This patch fixes the following section mismatches: -- snip -- ... WARNING: vmlinux.o(.text+0xe49c): Section mismatch in reference from the function .vdso_do_func_patch64() to the function .init.text:.find_symbol64() WARNING: vmlinux.o(.text+0xe4d0): Section mismatch in reference from the function .vdso_do_func_patch64() to the function .init.text:.find_symbol64() WARNING: vmlinux.o(.text+0xe56c): Section mismatch in reference from the function .vdso_do_func_patch32() to the function .init.text:.find_symbol32() WARNING: vmlinux.o(.text+0xe5a0): Section mismatch in reference from the function .vdso_do_func_patch32() to the function .init.text:.find_symbol32() ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- arch/powerpc/kernel/vdso.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) 1c52ed2049b82e8458d03e50633b01ac5e1dfa40 diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 3702df7..d3437c4 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c @@ -336,9 +336,9 @@ static unsigned long __init find_function32(struct lib32_elfinfo *lib, return sym-st_value - VDSO32_LBASE; } -static int vdso_do_func_patch32(struct lib32_elfinfo *v32, - struct lib64_elfinfo *v64, - const char *orig, const char *fix) +static int __init vdso_do_func_patch32(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64, + const char *orig, const char *fix) { Elf32_Sym *sym32_gen, *sym32_fix; @@ -433,9 +433,9 @@ static unsigned long __init find_function64(struct lib64_elfinfo *lib, #endif } -static int vdso_do_func_patch64(struct lib32_elfinfo *v32, - struct lib64_elfinfo *v64, - const char *orig, const char *fix) +static int __init vdso_do_func_patch64(struct lib32_elfinfo *v32, + struct lib64_elfinfo *v64, + const char *orig, const char *fix) { Elf64_Sym *sym64_gen, *sym64_fix; ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[2.6 patch] hvc_rtas_init() must be __init
This patch fixes the following section mismatch: -- snip -- ... WARNING: vmlinux.o(.text+0x2fbca8): Section mismatch in reference from the function .hvc_rtas_init() to the function .devinit.text:.hvc_alloc() ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- 1cc00c4ad5c881db2fc256ced43f3b5ce5c76e1c diff --git a/drivers/char/hvc_rtas.c b/drivers/char/hvc_rtas.c index bb09413..88590d0 100644 --- a/drivers/char/hvc_rtas.c +++ b/drivers/char/hvc_rtas.c @@ -76,7 +76,7 @@ static struct hv_ops hvc_rtas_get_put_ops = { .put_chars = hvc_rtas_write_console, }; -static int hvc_rtas_init(void) +static int __init hvc_rtas_init(void) { struct hvc_struct *hp; ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Luck, Tony [EMAIL PROTECTED] wrote: could you send the .config you are using? Ok. Attached. thanks a ton - this produced a link error here too. after half an hour of head scratching, the updated patch below solves the build problem. The problem i believe is this code in arch/ia64/kernel/mca_asm.S: #define GET_IA64_MCA_DATA(reg) \ GET_THIS_PADDR(reg, ia64_mca_data) \ ;; \ ld8 reg=[reg] this i believe builds an implicit dependency between the mca_asm.o position within the image and the ia64_mca_data percpu variable it accesses - it relies on the immediate 22 addressing mode that has 4MB of scope. Per chance, the .config you sent creates a 14MB image, and the percpu variables moved too far away for the linker to be able to fulfill this constraint. The workaround is to define PER_CPU_ATTRIBUTES to link percpu variables back into the .percpu section on UP too - which ia64 links specially into its vmlinux.lds. But ultimately i think the better solution would be to remove this dependency between arch/ia64/kernel/mca_asm.S and the position of the percpu data. Is my analysis correct? Do you like my fix and does the patch build and boot on your system? Thanks, Ingo --- Subject: ia64: on UP percpu variables are not small memory model From: Ingo Molnar [EMAIL PROTECTED] Tony says: | The CONFIG_SMP=n path in ia64 makes quite radical changes ... rather | than putting all the per-cpu stuff into the top 64K of address space | and providing a per-cpu TLB mapping for that range to a different | physical address ... it just makes all the per-cpu stuff link as ordinary | variables in .data. the new generic percpu code got confused about this as PER_CPU_ATTRIBUTES was defined even on UP, so it picked up that small memory model - which was not possible to get linked. The right fix is to only define that on SMP. This resolved the build failures in my cross-compiling environment. also link these variables into the .percpu section - some assembly code has offset dependencies. Signed-off-by: Ingo Molnar [EMAIL PROTECTED] --- include/asm-ia64/percpu.h |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) 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,18 +15,20 @@ #include linux/threads.h +#ifdef CONFIG_SMP + #ifdef HAVE_MODEL_SMALL_ATTRIBUTE # define PER_CPU_ATTRIBUTES__attribute__((__model__ (__small__))) #endif -#ifdef CONFIG_SMP - #define __my_cpu_offset__ia64_per_cpu_var(local_per_cpu_offset) extern void *per_cpu_init(void); #else /* ! SMP */ +#define PER_CPU_ATTRIBUTES __attribute__((__section__(.data.percpu))) + #define per_cpu_init() (__phys_per_cpu_start) #endif /* SMP */ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: ndfc ecc byte order
On Wednesday 30 January 2008, Sean MacLennan wrote: There seems to be a byte order conflict between the u-boot and Linux ndfc drivers. u-boot has the following: /* The NDFC uses Smart Media (SMC) bytes order*/ ecc_code[0] = p[2]; ecc_code[1] = p[1]; ecc_code[2] = p[3]; the kernel has: ecc_code[0] = p[1]; ecc_code[1] = p[2]; ecc_code[2] = p[3]; I think u-boot has it right since u-boot and kernel software calculated ECCs agree. Anybody know a reason *not* to switch to the SMC byte order? Please take a look at Kconfig config MTD_NAND_NDFC tristate NDFC NanD Flash Controller depends on 4xx !PPC_MERGE select MTD_NAND_ECC_SMC So the SMC byte ordering is selected and it should match the version used in U-Boot. In Linux the swapping is done in nand_ecc.c. So it should work correctly in the current configuration. At least I didn't notice any problems on all the 4xx platforms I used till now. Best regards, Stefan ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
this i believe builds an implicit dependency between the mca_asm.o position within the image and the ia64_mca_data percpu variable it accesses - it relies on the immediate 22 addressing mode that has 4MB of scope. Per chance, the .config you sent creates a 14MB image, and the percpu variables moved too far away for the linker to be able to fulfill this constraint. Sounds very plausible. The workaround is to define PER_CPU_ATTRIBUTES to link percpu variables back into the .percpu section on UP too - which ia64 links specially into its vmlinux.lds. But ultimately i think the better solution would be to remove this dependency between arch/ia64/kernel/mca_asm.S and the position of the percpu data. Yup. That fixes the build ... the resulting binary doesn't boot though :-( I just realized that it has been a while since I tried booting a UP kernel ... so the problem may be unrelated bitrot elsewhere. Overall you are right that the mca_asm.S code should not be dependent on the relative location of the data objects. 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 (which is all anyone really cares about ... there are very, very few UP ia64 systems in existence). Acked-by: Tony Luck [EMAIL PROTECTED] -Tony ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
Ingo Molnar wrote: * Luck, Tony [EMAIL PROTECTED] wrote: Could you check the patch below? With this applied to latest -git, ia64 buils fine for me in a cross-compiling environment. (but i dont know whether it boots ...) Uni-processor build still fails with this patch (config is arch/ia64/configs/tiger_defconfig with CONFIG_SMP switched from =y to =n). could you try the full patchset that Travis has just sent and which i've put into x86.git, you can pull it from: git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git it's a fixes only tree, ontop of Linus-very-latest. Head 4b9e425c25f84. [pull from ssh://master.kernel.org if it's not on git.kernel.org yet, uploaded it this very minute.] Just FYI, the following diff from the above tree applied to linux-2.6.git works with ps3_defconfig on the PS3 (powerpc): git diff dd430ca20c40ecccd6954a7efd13d4398f507728..3823daf866c272c670dda7dc6179a647da64467f -Geoff ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Luck, Tony [EMAIL PROTECTED] 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 (which is all anyone really cares about ... there are very, very few UP ia64 systems in existence). Acked-by: Tony Luck [EMAIL PROTECTED] thanks alot! Can i also add your Acked-by to this patch: Subject: ia64: use generic percpu From: [EMAIL PROTECTED] it seems like a sensible cleanup to me. Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[powerpc changes] Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
* Olof Johansson [EMAIL PROTECTED] wrote: could you try the full patchset that Travis has just sent and which i've put into x86.git, you can pull it from: Looks ok for powerpc so far, I haven't gotten through all defconfigs yet but the first ones that failed before build now. pasemi_defconfig boots as well. could the PowerPC maintainers please Ack the following patch (attached below): Subject: POWERPC: use generic per cpu From: [EMAIL PROTECTED] so that we can push this fix upstream ASAP? Ingo --- Subject: POWERPC: use generic per cpu From: [EMAIL PROTECTED] Powerpc has a way to determine the address of the per cpu area of the currently executing processor via the paca and the array of per cpu offsets is avoided by looking up the per cpu area from the remote paca's (copying x86_64). Cc: Paul Mackerras [EMAIL PROTECTED] Cc: Geert Uytterhoeven [EMAIL PROTECTED] Signed-off-by: Mike Travis [EMAIL PROTECTED] Signed-off-by: Ingo Molnar [EMAIL PROTECTED] --- include/asm-powerpc/percpu.h | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) Index: linux-x86.q/include/asm-powerpc/percpu.h === --- linux-x86.q.orig/include/asm-powerpc/percpu.h +++ linux-x86.q/include/asm-powerpc/percpu.h @@ -13,28 +13,12 @@ #include asm/paca.h #define __per_cpu_offset(cpu) (paca[cpu].data_offset) -#define __my_cpu_offset() get_paca()-data_offset +#define __my_cpu_offset get_paca()-data_offset #define per_cpu_offset(x) (__per_cpu_offset(x)) -/* var is in discarded region: offset to particular copy we want */ -#define per_cpu(var, cpu) (*RELOC_HIDE(per_cpu__##var, __per_cpu_offset(cpu))) -#define __get_cpu_var(var) (*RELOC_HIDE(per_cpu__##var, __my_cpu_offset())) -#define __raw_get_cpu_var(var) (*RELOC_HIDE(per_cpu__##var, local_paca-data_offset)) +#endif /* CONFIG_SMP */ +#endif /* __powerpc64__ */ -extern void setup_per_cpu_areas(void); - -#else /* ! SMP */ - -#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 */ - -#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name - -#else #include asm-generic/percpu.h -#endif #endif /* _ASM_POWERPC_PERCPU_H_ */ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [powerpc changes] Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
On Wed, Jan 30, 2008 at 10:25:58PM +0100, Ingo Molnar wrote: * Olof Johansson [EMAIL PROTECTED] wrote: could you try the full patchset that Travis has just sent and which i've put into x86.git, you can pull it from: Looks ok for powerpc so far, I haven't gotten through all defconfigs yet but the first ones that failed before build now. pasemi_defconfig boots as well. could the PowerPC maintainers please Ack the following patch (attached below): Subject: POWERPC: use generic per cpu From: [EMAIL PROTECTED] so that we can push this fix upstream ASAP? Subject: POWERPC: use generic per cpu From: [EMAIL PROTECTED] Powerpc has a way to determine the address of the per cpu area of the currently executing processor via the paca and the array of per cpu offsets is avoided by looking up the per cpu area from the remote paca's (copying x86_64). Cc: Paul Mackerras [EMAIL PROTECTED] Cc: Geert Uytterhoeven [EMAIL PROTECTED] Signed-off-by: Mike Travis [EMAIL PROTECTED] Signed-off-by: Ingo Molnar [EMAIL PROTECTED] Paul is at LCA, I'm not sure if he's reading email. Looks good to me so: Acked-by: Olof Johansson [EMAIL PROTECTED] -Olof ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/6] percpu: Change Kconfig to HAVE_SETUP_PER_CPU_AREA linux-2.6.git
* [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Change: config ARCH_SETS_UP_PER_CPU_AREA to: config HAVE_SETUP_PER_CPU_AREA undocumented change: config ARCH_NO_VIRT_TO_BUS --- a/init/main.c +++ b/init/main.c @@ -380,6 +380,8 @@ static void __init setup_per_cpu_areas(v /* Copy section for each CPU (we discard the original) */ size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); + printk(KERN_INFO + PERCPU: Allocating %lu bytes of per cpu data (main)\n, size); ptr = alloc_bootmem_pages(size * nr_possible_cpus); but looks fine to me. Ingo ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [powerpc changes] Re: x86/non-x86: percpu, node ids, apic ids x86.git fixup
Ingo Molnar wrote: * Olof Johansson [EMAIL PROTECTED] wrote: could you try the full patchset that Travis has just sent and which i've put into x86.git, you can pull it from: Looks ok for powerpc so far, I haven't gotten through all defconfigs yet but the first ones that failed before build now. pasemi_defconfig boots as well. could the PowerPC maintainers please Ack the following patch (attached below): Subject: POWERPC: use generic per cpu From: [EMAIL PROTECTED] so that we can push this fix upstream ASAP? Ingo --- Subject: POWERPC: use generic per cpu From: [EMAIL PROTECTED] Powerpc has a way to determine the address of the per cpu area of the currently executing processor via the paca and the array of per cpu offsets is avoided by looking up the per cpu area from the remote paca's (copying x86_64). Cc: Paul Mackerras [EMAIL PROTECTED] Cc: Geert Uytterhoeven [EMAIL PROTECTED] Signed-off-by: Mike Travis [EMAIL PROTECTED] Signed-off-by: Ingo Molnar [EMAIL PROTECTED] --- include/asm-powerpc/percpu.h | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) Tested on PS3 with ps3_defconfig and works OK. Acked-by: Geoff Levand [EMAIL PROTECTED] ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/6] percpu: Change Kconfig to HAVE_SETUP_PER_CPU_AREA linux-2.6.git
Ingo Molnar wrote: * [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Change: config ARCH_SETS_UP_PER_CPU_AREA to: config HAVE_SETUP_PER_CPU_AREA undocumented change: config ARCH_NO_VIRT_TO_BUS --- a/init/main.c +++ b/init/main.c @@ -380,6 +380,8 @@ static void __init setup_per_cpu_areas(v /* Copy section for each CPU (we discard the original) */ size = ALIGN(PERCPU_ENOUGH_ROOM, PAGE_SIZE); +printk(KERN_INFO +PERCPU: Allocating %lu bytes of per cpu data (main)\n, size); ptr = alloc_bootmem_pages(size * nr_possible_cpus); but looks fine to me. Ingo Sorry, I should have noted this. The primary reason I put this in, is that if the HAVE_SETUP_PER_CPU_AREA is not set when it should be, then the incorrect (generic) setup_per_cpu_areas() is used and weird things happen later on. The above line documents that PERCPU has been allocated by init/main.c version of this function in the startup messages. (Since it's a static function, there is no duplicate label error in the linker.) Thanks, Mike ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] net: NEWEMAC: Remove rgmii-interface from rgmii matching table
On Wed, 2008-01-30 at 07:16 +0100, Stefan Roese wrote: On Wednesday 16 January 2008, Josh Boyer wrote: On Wed, 16 Jan 2008 20:53:59 +1100 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: On Wed, 2008-01-16 at 10:37 +0100, Stefan Roese wrote: With the removal the the rgmii-interface device_type property from the dts files, the newemac driver needs an update to only rely on compatible property. Signed-off-by: Stefan Roese [EMAIL PROTECTED] I need to test if it works on CAB, can't change the DT on those. I'll let you know tomorrow. This should be fine on CAB. The rgmii node has: compatible = ibm,rgmii-axon, ibm,rgmii so the match should still catch on the latter. How about this patch? Ben, if you think this is ok then we should make sure that it goes in in this merge-window, since the other dts patch relies on it. It's fine. Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
PATCH[1/1] 8xx: Add clock-frequency to Adder875 and mpc885ads board ports
Redo the addition of the clock-frequency parameter to the Adder875 .dts so that the values are decimal rather then hex. Signed-off-by: Bryan O'Donoghue [EMAIL PROTECTED] --- diff --git a/arch/powerpc/boot/dts/adder875-redboot.dts b/arch/powerpc/boot/dts/adder875-redboot.dts index 7c25d96..c508f3c 100644 --- a/arch/powerpc/boot/dts/adder875-redboot.dts +++ b/arch/powerpc/boot/dts/adder875-redboot.dts @@ -149,6 +149,7 @@ compatible = fsl,mpc875-brg, fsl,cpm1-brg, fsl,cpm-brg; + clock-frequency = 5000; reg = 0x9f0 0x10; }; diff --git a/arch/powerpc/boot/dts/adder875-uboot.dts b/arch/powerpc/boot/dts/adder875-uboot.dts index 605202f..d7ac416 100644 --- a/arch/powerpc/boot/dts/adder875-uboot.dts +++ b/arch/powerpc/boot/dts/adder875-uboot.dts @@ -148,6 +148,7 @@ compatible = fsl,mpc875-brg, fsl,cpm1-brg, fsl,cpm-brg; + clock-frequency = 5000; reg = 0x9f0 0x10; }; diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts index 8848e63..f2a437b 100644 --- a/arch/powerpc/boot/dts/mpc885ads.dts +++ b/arch/powerpc/boot/dts/mpc885ads.dts @@ -166,6 +166,7 @@ compatible = fsl,mpc885-brg, fsl,cpm1-brg, fsl,cpm-brg; + clock-frequency = 0; reg = 9f0 10; }; ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[RFC] [POWERPC] bootwrapper: build multiple cuImages
From: Grant Likely [EMAIL PROTECTED] 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 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. 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. 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. Signed-off-by: Grant Likely [EMAIL PROTECTED] --- 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. --- 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(-) 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 -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 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) += arch/powerpc/xmon/ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ # Default to zImage, override when needed -defaultimage-y := zImage -defaultimage-$(CONFIG_DEFAULT_UIMAGE) := uImage -KBUILD_IMAGE := $(defaultimage-y) -all: $(KBUILD_IMAGE) +all: zImage CPPFLAGS_vmlinux.lds := -Upowerpc -BOOT_TARGETS = zImage zImage.initrd uImage +BOOT_TARGETS = zImage zImage.initrd uImage treeImage.% cuImage.% PHONY += $(BOOT_TARGETS) @@ -180,7 +177,7 @@ define archhelp endef install: vdso_install - $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install + $(Q)$(MAKE) $(build)=$(boot) install 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 += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) extra-y:= $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds +dtstree:= $(srctree)/$(src)/dts + wrapper:=$(srctree)/$(src)/wrapper wrapperbits:= $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \ $(wrapper) FORCE @@ -191,26 +193,67 @@ image-$(CONFIG_PPC_PRPMC2800) += zImage.prpmc2800 image-$(CONFIG_PPC_ISERIES)+= zImage.iseries image-$(CONFIG_DEFAULT_UIMAGE) += uImage -ifneq ($(CONFIG_DEVICE_TREE),) -image-$(CONFIG_PPC_8xx)+= cuImage.8xx -image-$(CONFIG_PPC_EP88XC) += 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) += zImage.ep405 -image-$(CONFIG_8260)
RE: x86/non-x86: percpu, node ids, apic ids x86.git fixup
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 0x40117b48 (which is off in the virtual address space range used by users ... not a kernel address). I'll dig some more tomorrow. -Tony ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
RE: [RFC] [POWERPC] bootwrapper: build multiple cuImages
I like the spirit... It does seem like the compiled in device tree is specified in the wrong place. Comments inline. -Original Message- From: [EMAIL PROTECTED] [mailto:linuxppc-dev- [EMAIL PROTECTED] On Behalf Of Grant Likely Sent: Wednesday, January 30, 2008 4:34 PM To: [EMAIL PROTECTED]; linuxppc-dev@ozlabs.org; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [RFC] [POWERPC] bootwrapper: build multiple cuImages From: Grant Likely [EMAIL PROTECTED] 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 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. 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. 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. Signed-off-by: Grant Likely [EMAIL PROTECTED] --- 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. --- 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(-) 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 -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 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) += arch/powerpc/xmon/ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ # Default to zImage, override when needed -defaultimage-y := zImage -defaultimage-$(CONFIG_DEFAULT_UIMAGE) := uImage -KBUILD_IMAGE := $(defaultimage-y) -all: $(KBUILD_IMAGE) +all: zImage CPPFLAGS_vmlinux.lds := -Upowerpc -BOOT_TARGETS = zImage zImage.initrd uImage +BOOT_TARGETS = zImage zImage.initrd uImage treeImage.% cuImage.% PHONY += $(BOOT_TARGETS) @@ -180,7 +177,7 @@ define archhelp endef install: vdso_install - $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install + $(Q)$(MAKE) $(build)=$(boot) install 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 += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds +dtstree := $(srctree)/$(src)/dts + wrapper :=$(srctree)/$(src)/wrapper wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \ $(wrapper) FORCE @@ -191,26 +193,67 @@ image-$(CONFIG_PPC_PRPMC2800) += zImage.prpmc2800 image-$(CONFIG_PPC_ISERIES) += zImage.iseries image-$(CONFIG_DEFAULT_UIMAGE) += uImage -ifneq ($(CONFIG_DEVICE_TREE),) -image-$(CONFIG_PPC_8xx) +=