Re: [patch 1/1] hvc_console: fix: hp->ws winsize check runs out-of-sync
Hendrik Brueckner writes: > From: Hendrik Brueckner <[EMAIL PROTECTED]> > > The test to check for a new winsize runs out-of-sync with the underlying > tty. After a tty has been released and initialized again, the winsize might > differ between the tty and the hp struct. > The solution is to simply remove the check and always schedule the resize > work. Looks OK. Is this going to go in via the s390 tree, or should I put it in the powerpc tree? Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [patch 1/1] hvc_console: fix: hp->ws winsize check runs out-of-sync
Hi Paul, On Wed, Dec 03, 2008 at 08:17:13PM +1100, Paul Mackerras wrote: > Looks OK. Is this going to go in via the s390 tree, or should I put > it in the powerpc tree? The patch should go via the powerpc tree. Thanks and regards, Hendrik ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/pseries: fix idle sleep early exit state
Sebastien Dugue writes: > In pseries_dedicated_idle_sleep(), if we need to exit idle during the > snooze period (i.e. need_resched or cpu has been offlined), then we should > re-disable the interrupts and clear TIF_POLLING_NRFLAG before leaving. Are you doing this because of a bug you actually observed, or did you just find this by inspection? I don't believe it's necessary to do these things (disabling interrupts, clearing TIF_POLLING_NRFLAG) because the code that calls it immediately reenables interrupts and sets TIF_POLLING_NRFLAG again. From arch/powerpc/kernel/idle.c (line 73): if (!need_resched() && !cpu_should_die()) ppc_md.power_save(); local_irq_enable(); set_thread_flag(TIF_POLLING_NRFLAG); Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/pseries: fix idle sleep early exit state
On Wed, 3 Dec 2008 20:38:54 +1100 Paul Mackerras <[EMAIL PROTECTED]> wrote: > Sebastien Dugue writes: > > > In pseries_dedicated_idle_sleep(), if we need to exit idle during the > > snooze period (i.e. need_resched or cpu has been offlined), then we should > > re-disable the interrupts and clear TIF_POLLING_NRFLAG before leaving. > > Are you doing this because of a bug you actually observed, or did you > just find this by inspection? By inspection, and just to be consistent with the other way out. But you're right, it's not really necessary here. > I don't believe it's necessary to do > these things (disabling interrupts, clearing TIF_POLLING_NRFLAG) > because the code that calls it immediately reenables interrupts and > sets TIF_POLLING_NRFLAG again. From arch/powerpc/kernel/idle.c (line > 73): > > if (!need_resched() && !cpu_should_die()) > ppc_md.power_save(); > > local_irq_enable(); > set_thread_flag(TIF_POLLING_NRFLAG); > > Paul. > Thanks, Sebastien. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 4/4] leds: Let GPIO LEDs keep their current state
On Sun, 2008-11-23 at 13:31 +0100, Pavel Machek wrote: > On Thu 2008-11-20 17:05:56, Trent Piepho wrote: > > On Mon, 17 Nov 2008, Richard Purdie wrote: > > > On Fri, 2008-10-24 at 16:09 -0700, Trent Piepho wrote: > > >> +if (template->keep_state) > > >> +state = !!gpio_get_value(led_dat->gpio) ^ > > >> led_dat->active_low; > > >> +else > > >> +state = template->default_state; > > >> > > >> state = of_get_property(child, "default-state", NULL); > > >> led.default_state = state && !strcmp(state, "on"); > > >> +led.keep_state = state && !strcmp(state, "keep"); > > >> > > >> +++ b/include/linux/leds.h > > >> @@ -138,7 +138,8 @@ struct gpio_led { > > >> const char *default_trigger; > > >> unsignedgpio; > > >> u8 active_low; > > >> -u8 default_state; > > >> +u8 default_state; /* 0 = off, 1 = on */ > > >> +u8 keep_state; /* overrides default_state */ > > >> }; > > > > > > How about something simpler here, just make default state have three > > > different values - "keep", "on" and "off"? I'm not keen on having two > > > different state variables like this. > > > > I thought of that, but it ends up being more complex. Instead of just > > using: > > static const struct gpio_led myled = { > > .name = "something", > > .keep_state = 1, > > } > > > > You'd do something like this: > > .default_state = LEDS_GPIO_DEFSTATE_KEEP, > > > > Is that better? > > Yes. Yes, agreed, much better. Richard -- Richard Purdie Intel Open Source Technology Centre ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/powermac: Add missing of_node_put
Hi Stephen, I fix the patch. I also change the "vias == 0" in "vias == NULL". Is "!vias" better ? On Wednesday 03 December 2008 00:25:08 Stephen Rothwell wrote: > Hi Nicolas, > > On Wed, 3 Dec 2008 10:19:01 +1100 Stephen Rothwell <[EMAIL PROTECTED]> wrote: > > > > I think this particular patch is also required against Linus' kernel (not > > just linux-next). > > In fact, I think all these patches can apply to Linus' current tree. > Signed-off-by: Nicolas Palix <[EMAIL PROTECTED]> Signed-off-by: Julia Lawall <[EMAIL PROTECTED]> --- arch/powerpc/platforms/powermac/pci.c |2 + arch/powerpc/platforms/powermac/time.c | 11 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index bcf50d7..800fcce 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c @@ -661,6 +661,7 @@ static void __init init_second_ohare(void) pci_find_hose_for_OF_device(np); if (!hose) { printk(KERN_ERR "Can't find PCI hose for OHare2 !\n"); + of_node_put(np); return; } early_read_config_word(hose, bus, devfn, PCI_COMMAND, &cmd); @@ -669,6 +670,7 @@ static void __init init_second_ohare(void) early_write_config_word(hose, bus, devfn, PCI_COMMAND, cmd); } has_second_ohare = 1; + of_node_put(np); } /* diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c index 59eb840..1810e42 100644 --- a/arch/powerpc/platforms/powermac/time.c +++ b/arch/powerpc/platforms/powermac/time.c @@ -265,12 +265,15 @@ int __init via_calibrate_decr(void) struct resource rsrc; vias = of_find_node_by_name(NULL, "via-cuda"); - if (vias == 0) + if (vias == NULL) vias = of_find_node_by_name(NULL, "via-pmu"); - if (vias == 0) + if (vias == NULL) vias = of_find_node_by_name(NULL, "via"); - if (vias == 0 || of_address_to_resource(vias, 0, &rsrc)) + if (vias == NULL || of_address_to_resource(vias, 0, &rsrc)) { + of_node_put(vias); return 0; + } + of_node_put(vias); via = ioremap(rsrc.start, rsrc.end - rsrc.start + 1); if (via == NULL) { printk(KERN_ERR "Failed to map VIA for timer calibration !\n"); @@ -297,7 +300,7 @@ int __init via_calibrate_decr(void) ppc_tb_freq = (dstart - dend) * 100 / 6; iounmap(via); - + return 1; } #endif -- Nicolas Palix ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[git pull] Please pull powerpc.git merge branch
Please pull from the 'merge' branch of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge to get one commit from Ben Herrenschmidt that fixes a regression since 2.6.27. Thanks, Paul. arch/powerpc/kernel/dma.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 2434bbb30e79468c49cff3cff6005236f55ed188 Author: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Date: Sun Nov 30 18:53:40 2008 + powerpc: Fix dma_map_sg() cache flushing on non coherent platforms On PowerPC 4xx or other non cache-coherent platforms, we lost the appropriate cache flushing in dma_map_sg() when merging the 32 and 64-bit DMA code (commit 4fc665b88a79a45bae8bbf3a05563c27c7337c3d, "powerpc: Merge 32 and 64-bit dma code"). This restores it. Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> Acked-by: Becky Bruce <[EMAIL PROTECTED]> Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]> ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Commits added to powerpc.git next and master branches
I have added the following commits to the next and master branches of my powerpc.git tree. I also pulled in Linus' tree plus the fix from Ben that I just asked him to pull. Paul. Anton Vorontsov (3): powerpc and sparc: Introduce dev_archdata node accessors of/i2c: Fill the archdata for I2C devices of/gpio: Implement of_get_gpio_flags() Becky Bruce (1): powerpc: Add sync_*_for_* to dma_ops Benjamin Herrenschmidt (1): powerpc: Fix ppc32 mm_struct CPU tracking in SMP Hendrik Brueckner (1): hvc_console: Always schedule resize work on resize Johannes Berg (1): powerpc: Allow the max stack trace depth to be configured Julia Lawall (1): powerpc: Eliminate NULL test and memset after alloc_bootmem Kumar Gala (4): powerpc: Add MSR[CE, DE] to the MSR bits we print on show_regs() powerpc: hash_page_sync should only be used on SMP & STD_MMU_32 powerpc: Add a local_flush_tlb_page to handle kmap_atomic invalidates powerpc: Use RCU based pte freeing mechanism for all powerpc Nicolas Palix (1): drivers/hvc: Add missing of_node_put Sebastien Dugue (1): powerpc/ibmebus: Get rid of the IRQ mapping in ibmebus_free_irq() Sonny Rao (1): powerpc/BSR: Support multiple OF-node description of BSR roel kluin (2): powerpc/macintosh: Fix unsigned check in smu_sat_get_sdb_partition() powerpc: Make open count variables signed in hvcs/hvsi/hvc_console ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: next branch update
Kumar Gala writes: > Can you update to -rc7 or greater. Also can we look at picking up > outstanding patches. Done. I notice there are quite a few on patchwork that are delegated to you. Are you going to send me a pull request shortly? Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] crypto: talitos - Fix modpost warning
On Tue, Dec 02, 2008 at 10:29:16PM -0600, Kumar Gala wrote: > Removed __devexit from talitos_remove() since its also called from > talitos_probe(). > > WARNING: vmlinux.o(.text+0x28a008): Section mismatch in reference from the > function talitos_probe() to the function .devexit.text:talitos_remove() > The function talitos_probe() references a function in an exit section. > Often the function talitos_remove() has valid usage outside the exit section > and the fix is to remove the __devexit annotation of talitos_remove. > > Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> OK, but what about the __devexit_p reference on talitos_remove? We should remove that too. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [U-Boot] NAND only (no NOR)
Hello, On Wed, Dec 3, 2008 at 8:40 AM, Trent Piepho <[EMAIL PROTECTED]> wrote: > On Wed, 3 Dec 2008, Sean MacLennan wrote: >>> Yes, I would recommend to do it this way if possible. A small NOR for >>> U-Boot and environment and everything else in NAND. This makes things >>> much easier. But I understand that this is sometimes a problem with >>> space (2 FLASH chips) and costs. >> >> Mainly cost. We didn't want to pay for a second chip. > > I think for NAND the latches necessary to de-multiplex the localbus aren't > necessary like they are for NOR? On our board the latches might even take > more space than the flash chip. The local bus can be configured to run non-multiplexed. Regards, -- Leon ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Remove modpost warning with start_secondary
On Dec 2, 2008, at 11:31 PM, Nathan Lynch wrote: Kumar Gala wrote: WARNING: vmlinux.o(.text+0x2aa): Section mismatch in reference from the variable __secondary_start to the function .devinit.text:start_secondary() The function __secondary_start() references the function __devinit start_secondary(). start_secondary gets called by __secondary_start which is in asm code so its not marked as __devinit. Its easier to just remove the __devinit from start_secondary than try and deal with __secondary_start. Which just gets another mismatch warning here: WARNING: arch/powerpc/kernel/built-in.o(.text+0x23cc4): Section mismatch in reference from the function .start_secondary() to the function .devinit.text:.smp_store_cpu_info() The function .start_secondary() references the function __devinit .smp_store_cpu_info(). This is often because .start_secondary lacks a __devinit annotation or the annotation of .smp_store_cpu_info is wrong. Isn't there a better way to address this? It doesn't seem right to increase the kernel's memory usage to get rid of a modpost warning. Fair.. what defconfig did you build? - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] crypto: talitos - Fix modpost warning
On Dec 3, 2008, at 6:06 AM, Herbert Xu wrote: On Tue, Dec 02, 2008 at 10:29:16PM -0600, Kumar Gala wrote: Removed __devexit from talitos_remove() since its also called from talitos_probe(). WARNING: vmlinux.o(.text+0x28a008): Section mismatch in reference from the function talitos_probe() to the function .devexit.text:talitos_remove() The function talitos_probe() references a function in an exit section. Often the function talitos_remove() has valid usage outside the exit section and the fix is to remove the __devexit annotation of talitos_remove. Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> OK, but what about the __devexit_p reference on talitos_remove? We should remove that too. missed that one. will fix up and post a new patch. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
MPC512x: fsldma for UART FIFO
I'm trying to use DMA to take data from the rx FIFO of a PSC and store it in a buffer. I had to change the off_to_size function, because it assumed that if offset would be 0, then size would be 32bits, while I need to read 8 bits at a time, otherwise the FIFO wouldn't work correctly. Has anyone worked with MPC512x DMA? Unfortunately, the other DMA drivers, which are IDE and PCM sound, both use 32bits accesses. Changing fsldma to use 0 size works, but DMA seems to give back wrong data. Thanks, M ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] crypto: talitos - Fix modpost warning
On Dec 3, 2008, at 8:52 AM, Kumar Gala wrote: On Dec 3, 2008, at 6:06 AM, Herbert Xu wrote: On Tue, Dec 02, 2008 at 10:29:16PM -0600, Kumar Gala wrote: Removed __devexit from talitos_remove() since its also called from talitos_probe(). WARNING: vmlinux.o(.text+0x28a008): Section mismatch in reference from the function talitos_probe() to the function .devexit.text:talitos_remove() The function talitos_probe() references a function in an exit section. Often the function talitos_remove() has valid usage outside the exit section and the fix is to remove the __devexit annotation of talitos_remove. Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> OK, but what about the __devexit_p reference on talitos_remove? We should remove that too. missed that one. will fix up and post a new patch. Nevermind. Al bet me to this fix :) - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] powerpc/85xx: Fix compile warnings in mpc85xx_mds.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c: In function 'board_fixups': arch/powerpc/platforms/85xx/mpc85xx_mds.c:244: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t' arch/powerpc/platforms/85xx/mpc85xx_mds.c:250: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t' Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- arch/powerpc/platforms/85xx/mpc85xx_mds.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 2494c51..915e8d3 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c @@ -241,13 +241,13 @@ static int __init board_fixups(void) mdio = of_find_compatible_node(NULL, NULL, compstrs[i]); of_address_to_resource(mdio, 0, &res); - snprintf(phy_id, BUS_ID_SIZE, "%x:%02x", res.start, 1); + snprintf(phy_id, BUS_ID_SIZE, "%llx:%02x", (u64)res.start, 1); phy_register_fixup_for_id(phy_id, mpc8568_fixup_125_clock); phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups); /* Register a workaround for errata */ - snprintf(phy_id, BUS_ID_SIZE, "%x:%02x", res.start, 7); + snprintf(phy_id, BUS_ID_SIZE, "%llx:%02x", (u64)res.start, 7); phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups); of_node_put(mdio); -- 1.5.6.5 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: next branch update
On Dec 3, 2008, at 5:34 AM, Paul Mackerras wrote: Kumar Gala writes: Can you update to -rc7 or greater. Also can we look at picking up outstanding patches. Done. I notice there are quite a few on patchwork that are delegated to you. Are you going to send me a pull request shortly? Yeah.. I bulk of these are just track USB driver patches that should go via those subsystem maintainers. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Add use of Epson RTX-8581 RTC to GE Fanuc SBC610 dts
On Nov 20, 2008, at 2:52 AM, Martyn Welch wrote: Adding use of newly added Epson RTX-8581 real-time clock driver to GE Fanuc SBC610's dts file and adding driver to default config. Signed-off-by: Martyn Welch <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/gef_sbc610.dts |5 + arch/powerpc/configs/86xx/gef_sbc610_defconfig |8 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) applied to next - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH for 2.6.28] NAND: fsl_upm: fix build problem with 2.6.28-rc2
On Nov 26, 2008, at 10:38 AM, Anton Vorontsov wrote: From: Wolfgang Grandegger <[EMAIL PROTECTED]> The patch fixes following build error: CC drivers/mtd/nand/fsl_upm.o drivers/mtd/nand/fsl_upm.c: In function 'fun_chip_init': drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 2 of 'of_mtd_parse_partitions' from incompatible pointer type drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 3 of 'of_mtd_parse_partitions' from incompatible pointer type drivers/mtd/nand/fsl_upm.c:168: error: too many arguments to function 'of_mtd_parse_partitions' make[1]: *** [drivers/mtd/nand/fsl_upm.o] Error 1 The breakage was introduced in 69fd3a8d098faf41a04930afa83757c0555ee360 ("[MTD] remove unused mtd parameter in of_mtd_parse_partitions()"). While at it, also add a check for the of_mtd_parse_partitions() return value. Signed-off-by: Wolfgang Grandegger <[EMAIL PROTECTED]> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- drivers/mtd/nand/fsl_upm.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index 024e3ff..a83192f 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c @@ -163,9 +163,11 @@ static int __devinit fun_chip_init(struct fsl_upm_nand *fun, ret = parse_mtd_partitions(&fun->mtd, part_types, &fun->parts, 0); #ifdef CONFIG_MTD_OF_PARTS - if (ret == 0) - ret = of_mtd_parse_partitions(fun->dev, &fun->mtd, - flash_np, &fun->parts); + if (ret == 0) { + ret = of_mtd_parse_partitions(fun->dev, flash_np, &fun->parts); + if (ret < 0) + goto err; + } #endif if (ret > 0) ret = add_mtd_partitions(&fun->mtd, fun->parts, ret); -- 1.5.6.5 David, what's going on with this patch? - k -- To unsubscribe from this list: send the line "unsubscribe linux- kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/qe: Move cmxgcr_lock definition from the ucc.c into the qe.c
On Nov 11, 2008, at 9:31 AM, Anton Vorontsov wrote: With this patch we can compile the qe_lib/usb.c without the UCC support (that is, without UCC_GETH and/or SERIAL_QE). Fixes following link error (CONFIG_SMP should be =y to trigger this): arch/powerpc/sysdev/built-in.o: In function `qe_usb_clock_set': (.text+0x3cae): undefined reference to `cmxgcr_lock' make: *** [.tmp_vmlinux1] Error 1 While at it, also add missing spinlock.h includes. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- This is for powerpc-next since nobody enables QE_USB yet. arch/powerpc/sysdev/qe_lib/qe.c |3 +++ arch/powerpc/sysdev/qe_lib/ucc.c |4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) applied to next. - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Please pull from 'next' branch
Please pull from 'next' branch of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git next to receive the following updates: arch/powerpc/Makefile |1 arch/powerpc/boot/dts/gef_sbc610.dts | 11 arch/powerpc/configs/86xx/gef_sbc610_defconfig |8 arch/powerpc/include/asm/mmu-fsl-booke.h |2 arch/powerpc/include/asm/processor.h |6 arch/powerpc/include/asm/sfp-machine.h | 58 +- arch/powerpc/kernel/head_fsl_booke.S | 103 +++ arch/powerpc/kernel/traps.c| 62 +- arch/powerpc/math-emu/Makefile |2 arch/powerpc/math-emu/fadd.c |1 arch/powerpc/math-emu/fcmpo.c |5 arch/powerpc/math-emu/fdiv.c |9 arch/powerpc/math-emu/fdivs.c |9 arch/powerpc/math-emu/fmadd.c |5 arch/powerpc/math-emu/fmadds.c |5 arch/powerpc/math-emu/fmsub.c |5 arch/powerpc/math-emu/fmsubs.c |5 arch/powerpc/math-emu/fmul.c |3 arch/powerpc/math-emu/fmuls.c |3 arch/powerpc/math-emu/fnmadd.c |5 arch/powerpc/math-emu/fnmadds.c|5 arch/powerpc/math-emu/fnmsub.c |5 arch/powerpc/math-emu/fnmsubs.c|5 arch/powerpc/math-emu/fsqrt.c |5 arch/powerpc/math-emu/fsqrts.c |5 arch/powerpc/math-emu/fsub.c |3 arch/powerpc/math-emu/fsubs.c |3 arch/powerpc/math-emu/math_efp.c | 720 + arch/powerpc/platforms/85xx/Makefile |2 arch/powerpc/platforms/85xx/mpc85xx_mds.c |4 arch/powerpc/platforms/85xx/smp.c | 104 +++ arch/powerpc/platforms/86xx/Kconfig|2 arch/powerpc/platforms/86xx/Makefile |3 arch/powerpc/platforms/86xx/gef_gpio.c | 143 arch/powerpc/sysdev/qe_lib/qe.c|3 arch/powerpc/sysdev/qe_lib/ucc.c |4 36 files changed, 1225 insertions(+), 99 deletions(-) Anton Vorontsov (1): powerpc/qe: Move cmxgcr_lock definition from the ucc.c into the qe.c Kumar Gala (4): powerpc: Remove unncessary SPE related compiler flag powerpc/85xx: minor head_fsl_booke.S cleanup powerpc/85xx: Add support for SMP initialization powerpc/85xx: Fix compile warnings in mpc85xx_mds.c Liu Yu (4): powerpc/math-emu: Fix single float point division bug powerpc/math-emu: Adopt new version of _FP_CHOOSENAN powerpc/math-emu: Remove redundant 'ret' powerpc: Add SPE/EFP math emulation for E500v1/v2 processors. Martyn Welch (2): powerpc/86xx: Add use of Epson RTX-8581 RTC to GE Fanuc SBC610 dts powerpc/86xx: Basic GPIO support for GE Fanuc SBC610 Trent Piepho (1): powerpc: Better setup of boot page TLB entry ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/83xx: Fix MCU support merge issue in mpc8349emitx.dts
On Nov 27, 2008, at 11:36 AM, Anton Vorontsov wrote: Just found the merge issue in 442746989d92afc125040e0f29b33602ad94da99 ("powerpc/83xx: Add support for MCU microcontroller in .dts files"): the commit adds the MCU controller node into the DMA node, which is wrong because the MCU sits on the I2C bus. Fix this by moving the MCU node into the I2C controller node. The original patch[1] was OK though. ;-) [1] http://patchwork.ozlabs.org/patch/4895/ Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8349emitx.dts | 16 1 files changed, 8 insertions(+), 8 deletions(-) applied to merge - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH v4] powerpc: Basic GPIO support for GE Fanuc SBC610
On Nov 7, 2008, at 8:15 AM, Martyn Welch wrote: Basic support for the GPIO available on the SBC610 VPX Single Board Computer from GE Fanuc (PowerPC MPC8641D). This patch adds basic support for the GPIO in the devices I/O FPGA, the GPIO functionality is exposed through the AFIX pins on the backplane, unless used by an AFIX card. This code currently does not support switching between totem-pole and open-drain outputs (when used as outputs, GPIOs default to totem- pole). The interrupt capabilites of the GPIO lines is also not currently supported. Signed-off-by: Martyn Welch <[EMAIL PROTECTED]> --- Anton: Thank you for your fast response. Changes since version 3: * Removed repetitive and obvious comments * Removed stray empty line arch/powerpc/boot/dts/gef_sbc610.dts |6 + arch/powerpc/platforms/86xx/Kconfig|2 arch/powerpc/platforms/86xx/Makefile |3 - arch/powerpc/platforms/86xx/gef_gpio.c | 143 +++ + 4 files changed, 153 insertions(+), 1 deletions(-) applied to next - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Please pull from 'merge'
Please pull from 'merge' branch of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git merge to receive the following updates: (This is to fix a patch merge issue, the tree is based on paul's merge tree) arch/powerpc/boot/dts/mpc8349emitx.dts | 16 1 file changed, 8 insertions(+), 8 deletions(-) Anton Vorontsov (1): powerpc/83xx: Fix MCU support merge issue in mpc8349emitx.dts ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/85xx: Fix compile warnings in mpc85xx_mds.c
On Wed, 3 Dec 2008, Kumar Gala wrote: > arch/powerpc/platforms/85xx/mpc85xx_mds.c: In function 'board_fixups': > arch/powerpc/platforms/85xx/mpc85xx_mds.c:244: warning: format '%x' expects > type 'unsigned int', but argument 4 has type 'resource_size_t' > arch/powerpc/platforms/85xx/mpc85xx_mds.c:250: warning: format '%x' expects > type 'unsigned int', but argument 4 has type 'resource_size_t' > > Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> > --- > arch/powerpc/platforms/85xx/mpc85xx_mds.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c > b/arch/powerpc/platforms/85xx/mpc85xx_mds.c > index 2494c51..915e8d3 100644 > --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c > +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c > @@ -241,13 +241,13 @@ static int __init board_fixups(void) > mdio = of_find_compatible_node(NULL, NULL, compstrs[i]); > > of_address_to_resource(mdio, 0, &res); > - snprintf(phy_id, BUS_ID_SIZE, "%x:%02x", res.start, 1); > + snprintf(phy_id, BUS_ID_SIZE, "%llx:%02x", (u64)res.start, 1); ^^^ unsigned long? u64 differs for 32-bit and 64-bit. Doh, if you would put the whole resource range there, you could use %pR ;-) With kind regards, Geert Uytterhoeven Software Architect Sony Techsoft Centre 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/ A division of Sony Europe (Belgium) N.V. VAT BE 0413.825.160 · RPR Brussels Fortis · BIC GEBABEBB · IBAN BE41293037680010 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/85xx: Fix compile warnings in mpc85xx_mds.c
On Dec 3, 2008, at 10:17 AM, Geert Uytterhoeven wrote: On Wed, 3 Dec 2008, Kumar Gala wrote: arch/powerpc/platforms/85xx/mpc85xx_mds.c: In function 'board_fixups': arch/powerpc/platforms/85xx/mpc85xx_mds.c:244: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t' arch/powerpc/platforms/85xx/mpc85xx_mds.c:250: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t' Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- arch/powerpc/platforms/85xx/mpc85xx_mds.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/ powerpc/platforms/85xx/mpc85xx_mds.c index 2494c51..915e8d3 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c @@ -241,13 +241,13 @@ static int __init board_fixups(void) mdio = of_find_compatible_node(NULL, NULL, compstrs[i]); of_address_to_resource(mdio, 0, &res); - snprintf(phy_id, BUS_ID_SIZE, "%x:%02x", res.start, 1); + snprintf(phy_id, BUS_ID_SIZE, "%llx:%02x", (u64)res.start, 1); ^^^ unsigned long? u64 differs for 32-bit and 64-bit. This is proper. This is a 32-bit only platform (and the format is long long). Doh, if you would put the whole resource range there, you could use %pR ;-) and if we had a %R ... :) - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH for 2.6.28] NAND: fsl_upm: fix build problem with 2.6.28-rc2
On Wed, Dec 03, 2008 at 09:47:53AM -0600, Kumar Gala wrote: [...] >> The patch fixes following build error: >> >> CC drivers/mtd/nand/fsl_upm.o >> drivers/mtd/nand/fsl_upm.c: In function 'fun_chip_init': >> drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 2 of >> 'of_mtd_parse_partitions' from incompatible pointer type >> drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 3 of >> 'of_mtd_parse_partitions' from incompatible pointer type >> drivers/mtd/nand/fsl_upm.c:168: error: too many arguments to function >> 'of_mtd_parse_partitions' >> make[1]: *** [drivers/mtd/nand/fsl_upm.o] Error 1 >> >> The breakage was introduced in >> 69fd3a8d098faf41a04930afa83757c0555ee360 >> ("[MTD] remove unused mtd parameter in of_mtd_parse_partitions()"). >> >> While at it, also add a check for the of_mtd_parse_partitions() return >> value. >> >> Signed-off-by: Wolfgang Grandegger <[EMAIL PROTECTED]> >> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> [...] > David, > > what's going on with this patch? Recently I got email from Andrew's patch tracking system that the patch was merged into subsystem tree. Here it is: http://git.infradead.org/mtd-2.6.git?a=commitdiff;h=29b65861fbece04cfdf3fee352d5247369131850 -- Anton Vorontsov email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH] powerpc/85xx: Add localbus node in mpc8572ds dts file
From: Haiying Wang <[EMAIL PROTECTED]> Also add NOR and NAND flash partitions for mpc8572ds board Signed-off-by: Haiying Wang <[EMAIL PROTECTED]> Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc8572ds.dts | 113 +++ 1 files changed, 113 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts index 4d374ce..13de3f7 100644 --- a/arch/powerpc/boot/dts/mpc8572ds.dts +++ b/arch/powerpc/boot/dts/mpc8572ds.dts @@ -64,6 +64,119 @@ reg = <0x0 0x0>;// Filled by U-Boot }; + [EMAIL PROTECTED] { + #address-cells = <2>; + #size-cells = <1>; + compatible = "fsl,mpc8572-elbc", "fsl,elbc", "simple-bus"; + reg = <0xffe05000 0x1000>; + interrupts = <19 2>; + interrupt-parent = <&mpic>; + + ranges = <0x0 0x0 0xe800 0x0800 + 0x1 0x0 0xe000 0x0800 + 0x2 0x0 0xffa0 0x0004 + 0x3 0x0 0xffdf 0x8000 + 0x4 0x0 0xffa4 0x0004 + 0x5 0x0 0xffa8 0x0004 + 0x6 0x0 0xffac 0x0004>; + + [EMAIL PROTECTED],0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x800>; + bank-width = <2>; + device-width = <1>; + + [EMAIL PROTECTED] { + reg = <0x0 0x0300>; + readl-only; + }; + + [EMAIL PROTECTED] { + reg = <0x0300 0x00e0>; + read-only; + }; + + [EMAIL PROTECTED] { + reg = <0x03e0 0x0020>; + read-only; + }; + + [EMAIL PROTECTED] { + reg = <0x0400 0x0040>; + read-only; + }; + + [EMAIL PROTECTED] { + reg = <0x0440 0x03b0>; + }; + + [EMAIL PROTECTED] { + reg = <0x07f0 0x0008>; + read-only; + }; + + [EMAIL PROTECTED] { + reg = <0x07f8 0x0008>; + read-only; + }; + }; + + [EMAIL PROTECTED],0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,mpc8572-fcm-nand", +"fsl,elbc-fcm-nand"; + reg = <0x2 0x0 0x4>; + + [EMAIL PROTECTED] { + reg = <0x0 0x0200>; + read-only; + }; + + [EMAIL PROTECTED] { + reg = <0x0200 0x1000>; + }; + + [EMAIL PROTECTED] { + reg = <0x1200 0x0800>; + read-only; + }; + + [EMAIL PROTECTED] { + reg = <0x1a00 0x0400>; + }; + + [EMAIL PROTECTED] { + reg = <0x1e00 0x0100>; + read-only; + }; + + [EMAIL PROTECTED] { + reg = <0x1f00 0x2100>; + }; + }; + + [EMAIL PROTECTED],0 { + compatible = "fsl,mpc8572-fcm-nand", +"fsl,elbc-fcm-nand"; + reg = <0x4 0x0 0x4>; + }; + + [EMAIL PROTECTED],0 { + compatible = "fsl,mpc8572-fcm-nand", +"fsl,elbc-fcm-nand"; + reg = <0x5 0x0 0x4>; + }; + + [EMAIL PROTECTED],0 { + compatible = "fsl,mpc8572-fcm-nand", +"fsl,elbc-fcm-nand"; + reg = <0x6 0x0 0x4>; + }; + }; + [EMAIL PROTECTED] { #address-cells = <1>; #size-cells = <1>; -- 1.5.6.5 ___ Linuxppc-dev mailing list Li
Re: [PATCH] powerpc/85xx: Fix compile warnings in mpc85xx_mds.c
On Wed, 3 Dec 2008, Kumar Gala wrote: > On Dec 3, 2008, at 10:17 AM, Geert Uytterhoeven wrote: > >On Wed, 3 Dec 2008, Kumar Gala wrote: > > >arch/powerpc/platforms/85xx/mpc85xx_mds.c: In function 'board_fixups': > > >arch/powerpc/platforms/85xx/mpc85xx_mds.c:244: warning: format '%x' expects > > >type 'unsigned int', but argument 4 has type 'resource_size_t' > > >arch/powerpc/platforms/85xx/mpc85xx_mds.c:250: warning: format '%x' expects > > >type 'unsigned int', but argument 4 has type 'resource_size_t' > > > > > >Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> > > >--- > > >arch/powerpc/platforms/85xx/mpc85xx_mds.c |4 ++-- > > >1 files changed, 2 insertions(+), 2 deletions(-) > > > > > >diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c > > >b/arch/powerpc/platforms/85xx/mpc85xx_mds.c > > >index 2494c51..915e8d3 100644 > > >--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c > > >+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c > >>@@ -241,13 +241,13 @@ static int __init board_fixups(void) > > > mdio = of_find_compatible_node(NULL, NULL, compstrs[i]); > > > > > > of_address_to_resource(mdio, 0, &res); > > >- snprintf(phy_id, BUS_ID_SIZE, "%x:%02x", res.start, 1); > > >+ snprintf(phy_id, BUS_ID_SIZE, "%llx:%02x", (u64)res.start, 1); > > ^^^ > >unsigned long? u64 differs for 32-bit and 64-bit. > > This is proper. This is a 32-bit only platform (and the format is long long). Sorry, I meant `unsigned long long'. One day someone may copy-and-paste to a 64-bit platform... > >Doh, if you would put the whole resource range there, you could use %pR ;-) > > and if we had a %R ... :) ... we would have a hard job teaching gcc how to handle it ;-) With kind regards, Geert Uytterhoeven Software Architect Sony Techsoft Centre 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/ A division of Sony Europe (Belgium) N.V. VAT BE 0413.825.160 · RPR Brussels Fortis · BIC GEBABEBB · IBAN BE41293037680010 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH for 2.6.28] NAND: fsl_upm: fix build problem with 2.6.28-rc2
On Dec 3, 2008, at 10:27 AM, Anton Vorontsov wrote: On Wed, Dec 03, 2008 at 09:47:53AM -0600, Kumar Gala wrote: [...] The patch fixes following build error: CC drivers/mtd/nand/fsl_upm.o drivers/mtd/nand/fsl_upm.c: In function 'fun_chip_init': drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 2 of 'of_mtd_parse_partitions' from incompatible pointer type drivers/mtd/nand/fsl_upm.c:168: warning: passing argument 3 of 'of_mtd_parse_partitions' from incompatible pointer type drivers/mtd/nand/fsl_upm.c:168: error: too many arguments to function 'of_mtd_parse_partitions' make[1]: *** [drivers/mtd/nand/fsl_upm.o] Error 1 The breakage was introduced in 69fd3a8d098faf41a04930afa83757c0555ee360 ("[MTD] remove unused mtd parameter in of_mtd_parse_partitions()"). While at it, also add a check for the of_mtd_parse_partitions() return value. Signed-off-by: Wolfgang Grandegger <[EMAIL PROTECTED]> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> [...] David, what's going on with this patch? Recently I got email from Andrew's patch tracking system that the patch was merged into subsystem tree. Here it is: http://git.infradead.org/mtd-2.6.git?a=commitdiff;h=29b65861fbece04cfdf3fee352d5247369131850 is it going into 2.6.28 or waiting for .29? - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH v2] powerpc/85xx: Fix compile warnings in mpc85xx_mds.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c: In function 'board_fixups': arch/powerpc/platforms/85xx/mpc85xx_mds.c:244: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t' arch/powerpc/platforms/85xx/mpc85xx_mds.c:250: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_size_t' Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- Used unsigned long long instead of u64 as pointed out by Geert - k arch/powerpc/platforms/85xx/mpc85xx_mds.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 2494c51..b915bf5 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c @@ -241,13 +241,15 @@ static int __init board_fixups(void) mdio = of_find_compatible_node(NULL, NULL, compstrs[i]); of_address_to_resource(mdio, 0, &res); - snprintf(phy_id, BUS_ID_SIZE, "%x:%02x", res.start, 1); + snprintf(phy_id, BUS_ID_SIZE, "%llx:%02x", + (unsigned long long)res.start, 1); phy_register_fixup_for_id(phy_id, mpc8568_fixup_125_clock); phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups); /* Register a workaround for errata */ - snprintf(phy_id, BUS_ID_SIZE, "%x:%02x", res.start, 7); + snprintf(phy_id, BUS_ID_SIZE, "%llx:%02x", + (unsigned long long)res.start, 7); phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups); of_node_put(mdio); -- 1.5.6.5 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Remove modpost warning with start_secondary
Kumar Gala wrote: > > On Dec 2, 2008, at 11:31 PM, Nathan Lynch wrote: > >> Kumar Gala wrote: >>> WARNING: vmlinux.o(.text+0x2aa): Section mismatch in reference from >>> the variable __secondary_start to the function >>> .devinit.text:start_secondary() >>> The function __secondary_start() references >>> the function __devinit start_secondary(). >>> >>> start_secondary gets called by __secondary_start which is in asm >>> code so its >>> not marked as __devinit. Its easier to just remove the __devinit >>> from >>> start_secondary than try and deal with __secondary_start. >> >> Which just gets another mismatch warning here: >> >> WARNING: arch/powerpc/kernel/built-in.o(.text+0x23cc4): Section >> mismatch in reference from the function .start_secondary() to the >> function .devinit.text:.smp_store_cpu_info() >> The function .start_secondary() references >> the function __devinit .smp_store_cpu_info(). >> This is often because .start_secondary lacks a __devinit >> annotation or the annotation of .smp_store_cpu_info is wrong. >> >> Isn't there a better way to address this? It doesn't seem right to >> increase the kernel's memory usage to get rid of a modpost warning. > > Fair.. what defconfig did you build? Try ppc64_defconfig with HOTPLUG_CPU=n. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 0/5] Few patches for galak/powerpc.git next
Hi Kumar, Here are few patches queued for the next branch. The patches are mostly USB related. Plus a trivial patch that fixes some sparse warnings. [PATCH 1/5] powerpc/qe: Implement QE Pin Multiplexing API [PATCH 2/5] powerpc: Implement GPIO driver for simple memory-mapped banks [PATCH 3/5] powerpc/83xx: Add USB Host/Gadget support for MPC8360E-MDS boards [PATCH 4/5] powerpc/83xx: Add USB Host support for MPC8360E-RDK boards [PATCH 5/5] powerpc/83xx: Fix sparse warnings in mpc836x_mds.c Thanks, -- Anton Vorontsov email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/5] powerpc/qe: Implement QE Pin Multiplexing API
With this API we're able to set a QE pin to the GPIO mode or a dedicated peripheral function. The API relies on the fact that QE gpio controllers are registered. If they aren't, the API won't work (gracefully though). There is one caveat though: if anybody occupied the node->data before us, or overwrote it, then bad things will happen. Luckily this is all in the platform code that we fully control, so this should never happen. I could implement more checks (for example we could create a list of successfully registered QE controllers, and compare the node->data in the qe_pin_request()), but this is unneeded if nobody is going to do silly things behind our back. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/qe.h | 21 arch/powerpc/sysdev/qe_lib/gpio.c | 195 + 2 files changed, 216 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/qe.h b/arch/powerpc/include/asm/qe.h index edee15d..3227440 100644 --- a/arch/powerpc/include/asm/qe.h +++ b/arch/powerpc/include/asm/qe.h @@ -17,6 +17,8 @@ #ifdef __KERNEL__ #include +#include +#include #include #include @@ -112,6 +114,25 @@ extern int par_io_config_pin(u8 port, u8 pin, int dir, int open_drain, int assignment, int has_irq); extern int par_io_data_set(u8 port, u8 pin, u8 val); +/* + * Pin multiplexing functions. + */ +struct qe_pin; +#ifdef CONFIG_QE_GPIO +extern struct qe_pin *qe_pin_request(struct device_node *np, int index); +extern void qe_pin_free(struct qe_pin *qe_pin); +extern void qe_pin_set_gpio(struct qe_pin *qe_pin); +extern void qe_pin_set_dedicated(struct qe_pin *pin); +#else +static inline struct qe_pin *qe_pin_request(struct device_node *np, int index) +{ + return ERR_PTR(-ENOSYS); +} +static inline void qe_pin_free(struct qe_pin *qe_pin) {} +static inline void qe_pin_set_gpio(struct qe_pin *qe_pin) {} +static inline void qe_pin_set_dedicated(struct qe_pin *pin) {} +#endif /* CONFIG_QE_GPIO */ + /* QE internal API */ int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input); enum qe_clock qe_clock_source(const char *source); diff --git a/arch/powerpc/sysdev/qe_lib/gpio.c b/arch/powerpc/sysdev/qe_lib/gpio.c index 8e5a0bc..3485288 100644 --- a/arch/powerpc/sysdev/qe_lib/gpio.c +++ b/arch/powerpc/sysdev/qe_lib/gpio.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -24,8 +25,14 @@ struct qe_gpio_chip { struct of_mm_gpio_chip mm_gc; spinlock_t lock; + unsigned long pin_flags[QE_PIO_PINS]; +#define QE_PIN_REQUESTED 0 + /* shadowed data register to clear/set bits safely */ u32 cpdata; + + /* saved_regs used to restore dedicated functions */ + struct qe_pio_regs saved_regs; }; static inline struct qe_gpio_chip * @@ -40,6 +47,12 @@ static void qe_gpio_save_regs(struct of_mm_gpio_chip *mm_gc) struct qe_pio_regs __iomem *regs = mm_gc->regs; qe_gc->cpdata = in_be32(®s->cpdata); + qe_gc->saved_regs.cpdata = qe_gc->cpdata; + qe_gc->saved_regs.cpdir1 = in_be32(®s->cpdir1); + qe_gc->saved_regs.cpdir2 = in_be32(®s->cpdir2); + qe_gc->saved_regs.cppar1 = in_be32(®s->cppar1); + qe_gc->saved_regs.cppar2 = in_be32(®s->cppar2); + qe_gc->saved_regs.cpodr = in_be32(®s->cpodr); } static int qe_gpio_get(struct gpio_chip *gc, unsigned int gpio) @@ -103,6 +116,188 @@ static int qe_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) return 0; } +struct qe_pin { + /* +* The qe_gpio_chip name is unfortunate, we should change that to +* something like qe_pio_controller. Someday. +*/ + struct qe_gpio_chip *controller; + int num; +}; + +/** + * qe_pin_request - Request a QE pin + * @np:device node to get a pin from + * @index: index of a pin in the device tree + * Context:non-atomic + * + * This function return qe_pin so that you could use it with the rest of + * the QE Pin Multiplexing API. + */ +struct qe_pin *qe_pin_request(struct device_node *np, int index) +{ + struct qe_pin *qe_pin; + struct device_node *gc; + struct of_gpio_chip *of_gc = NULL; + struct of_mm_gpio_chip *mm_gc; + struct qe_gpio_chip *qe_gc; + int err; + int size; + const void *gpio_spec; + const u32 *gpio_cells; + unsigned long flags; + + qe_pin = kzalloc(sizeof(*qe_pin), GFP_KERNEL); + if (!qe_pin) { + pr_debug("%s: can't allocate memory\n", __func__); + return ERR_PTR(-ENOMEM); + } + + err = of_parse_phandles_with_args(np, "gpios", "#gpio-cells", index, + &gc, &gpio_spec); + if (err) { + pr_debug("%s: can't parse gpios property\n", __func__); + goto err0; + } + + if (!of_device_is_compatible(gc, "fs
[PATCH 2/5] powerpc: Implement GPIO driver for simple memory-mapped banks
The driver supports very simple GPIO controllers, that is, when a controller provides just a 'data' register. Such controllers may be found in various BCSRs (Board's FPGAs used to control board's switches, LEDs, chip-selects, Ethernet/USB PHY power, etc). So far we support only 1-byte GPIO banks. Support for other widths may be implemented when/if needed. p.s. To avoid "made up" compatible entries (like compatible = "simple-gpio"), boards must call the simple_gpiochip_init() to pass the compatible string. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- Documentation/powerpc/dts-bindings/fsl/board.txt | 30 arch/powerpc/platforms/Kconfig | 10 ++ arch/powerpc/sysdev/Makefile |1 + arch/powerpc/sysdev/simple_gpio.c| 156 ++ arch/powerpc/sysdev/simple_gpio.h| 15 ++ 5 files changed, 212 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/sysdev/simple_gpio.c create mode 100644 arch/powerpc/sysdev/simple_gpio.h diff --git a/Documentation/powerpc/dts-bindings/fsl/board.txt b/Documentation/powerpc/dts-bindings/fsl/board.txt index 81a917e..2bd9888 100644 --- a/Documentation/powerpc/dts-bindings/fsl/board.txt +++ b/Documentation/powerpc/dts-bindings/fsl/board.txt @@ -27,3 +27,33 @@ Example (MPC8610HPCD): compatible = "fsl,fpga-pixis"; reg = <0xe800 32>; }; + +* Freescale BCSR GPIO banks + +Some BCSR registers act as simple GPIO controllers, each such +register can be represented by the gpio-controller node. + +Required properities: +- compatible : Should be "fsl,-bcsr-gpio"; +- reg : Should contain the address and the lenght of the GPIO bank + register; +- #gpio-cells : Should be two. The first cell is the pin number and the + second cell is used to specify optional paramters (currently unused); +- gpio-controller : Marks the port as GPIO controller. + +Example: + + [EMAIL PROTECTED],0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,mpc8360mds-bcsr"; + reg = <1 0 0x8000>; + ranges = <0 1 0 0x8000>; + + bcsr13: [EMAIL PROTECTED] { + #gpio-cells = <2>; + compatible = "fsl,mpc8360mds-bcsr-gpio"; + reg = <0xd 1>; + gpio-controller; + }; + }; diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 47e956c..63780c8 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig @@ -312,4 +312,14 @@ config MPC8xxx_GPIO Say Y here if you're going to use hardware that connects to the MPC831x/834x/837x/8572/8610 GPIOs. +config SIMPLE_GPIO + bool "Support for simple, memory-mapped GPIO controllers" + depends on PPC + select GENERIC_GPIO + select ARCH_REQUIRE_GPIOLIB + help + Say Y here to support simple, memory-mapped GPIO controllers. + These are usually BCSRs used to control board's switches, LEDs, + chip-selects, Ethernet/USB PHY's power and various other small + on-board peripherals. endmenu diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 5afce11..b33b28a 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile @@ -17,6 +17,7 @@ obj-$(CONFIG_FSL_PCI) += fsl_pci.o $(fsl-msi-obj-y) obj-$(CONFIG_FSL_LBC) += fsl_lbc.o obj-$(CONFIG_FSL_GTM) += fsl_gtm.o obj-$(CONFIG_MPC8xxx_GPIO) += mpc8xxx_gpio.o +obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o obj-$(CONFIG_RAPIDIO) += fsl_rio.o obj-$(CONFIG_TSI108_BRIDGE)+= tsi108_pci.o tsi108_dev.o obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ diff --git a/arch/powerpc/sysdev/simple_gpio.c b/arch/powerpc/sysdev/simple_gpio.c new file mode 100644 index 000..d62c85a --- /dev/null +++ b/arch/powerpc/sysdev/simple_gpio.c @@ -0,0 +1,156 @@ +/* + * Simple Memory-Mapped GPIOs + * + * Copyright (c) MontaVista Software, Inc. 2008. + * + * Author: Anton Vorontsov <[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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "simple_gpio.h" + +struct u8_gpio_chip { + struct of_mm_gpio_chip mm_gc; + spinlock_t lock; + + /* shadowed data register to clear/set bits safely */ + u8 data; +}; + +static struct u8_gpio_chip *to_u8_gpio_chip(struct of_mm_gpio_chip *mm_gc) +{ + return container_of(mm_gc, struct u8_gpio_chip, mm_gc); +} + +static u8 u8_pin2mask(unsigned int pin) +{ + return 1 << (8 - 1 - pin)
[PATCH 3/5] powerpc/83xx: Add USB Host/Gadget support for MPC8360E-MDS boards
- Update the device tree per QE USB bindings; - Add timer (FSL GTM) node; - Add gpio-controller node for BCSR13 bank (GPIOs on that bank are used to control the USB transceiver); - Set up other BCSR registers; - Configure the QE Par IO. The work is loosely based on Li Yang's patch[1], which was used to support peripheral mode only. [1] http://ozlabs.org/pipermail/linuxppc-dev/2008-August/061357.html The s-o-b line of the original patch preserved here. Signed-off-by: Li Yang <[EMAIL PROTECTED]> Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc836x_mds.dts | 43 - arch/powerpc/platforms/83xx/mpc836x_mds.c | 75 + 2 files changed, 116 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts index 14534d0..6e34f17 100644 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts @@ -69,8 +69,18 @@ }; [EMAIL PROTECTED],0 { + #address-cells = <1>; + #size-cells = <1>; compatible = "fsl,mpc8360mds-bcsr"; reg = <1 0 0x8000>; + ranges = <0 1 0 0x8000>; + + bcsr13: [EMAIL PROTECTED] { + #gpio-cells = <2>; + compatible = "fsl,mpc8360mds-bcsr-gpio"; + reg = <0xd 1>; + gpio-controller; + }; }; }; @@ -195,10 +205,21 @@ }; [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; reg = <0x1400 0x100>; + ranges = <0 0x1400 0x100>; device_type = "par_io"; num-ports = <7>; + qe_pio_b: [EMAIL PROTECTED] { + #gpio-cells = <2>; + compatible = "fsl,mpc8360-qe-pario-bank", +"fsl,mpc8323-qe-pario-bank"; + reg = <0x18 0x18>; + gpio-controller; + }; + pio1: [EMAIL PROTECTED] { pio-map = < /* port pin dir open_drain assignment has_irq */ @@ -282,6 +303,15 @@ }; }; + [EMAIL PROTECTED] { + compatible = "fsl,mpc8360-qe-gtm", +"fsl,qe-gtm", "fsl,gtm"; + reg = <0x440 0x40>; + clock-frequency = <13200>; + interrupts = <12 13 14 15>; + interrupt-parent = <&qeic>; + }; + [EMAIL PROTECTED] { cell-index = <0>; compatible = "fsl,spi"; @@ -301,11 +331,20 @@ }; [EMAIL PROTECTED] { - compatible = "qe_udc"; + compatible = "fsl,mpc8360-qe-usb", +"fsl,mpc8323-qe-usb"; reg = <0x6c0 0x40 0x8b00 0x100>; interrupts = <11>; interrupt-parent = <&qeic>; - mode = "slave"; + fsl,fullspeed-clock = "clk21"; + fsl,lowspeed-clock = "brg9"; + gpios = <&qe_pio_b 2 0 /* USBOE */ +&qe_pio_b 3 0 /* USBTP */ +&qe_pio_b 8 0 /* USBTN */ +&qe_pio_b 9 0 /* USBRP */ +&qe_pio_b 11 0 /* USBRN */ +&bcsr135 0 /* SPEED */ +&bcsr134 1>; /* POWER */ }; enet0: [EMAIL PROTECTED] { diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index 9d46e5b..fbcca19 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -93,6 +94,16 @@ static void __init mpc836x_mds_setup_arch(void) for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;) par_io_of_config(np); +#ifdef CONFIG_QE_USB + /* Must fixup Par IO before QE GPIO chips are registered. */ + par_io_config_pin(1, 2, 1, 0, 3, 0); /* USBOE */ + par_io_config_pin(1, 3, 1, 0, 3, 0); /* USBTP */ + par_io_config_pin(1, 8, 1, 0, 1, 0); /* USBTN */ + par_io_config_pin(1, 10
[PATCH 4/5] powerpc/83xx: Add USB Host support for MPC8360E-RDK boards
Simply add the usb node to support USB host on the MPC8360E-RDK boards. Currently U-Boot doesn't fill the clock-frequency property for timer nodes, so for now we have to fill it manually. Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/boot/dts/mpc836x_rdk.dts | 19 +-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/boot/dts/mpc836x_rdk.dts b/arch/powerpc/boot/dts/mpc836x_rdk.dts index decadf3..37b7895 100644 --- a/arch/powerpc/boot/dts/mpc836x_rdk.dts +++ b/arch/powerpc/boot/dts/mpc836x_rdk.dts @@ -218,8 +218,23 @@ reg = <0x440 0x40>; interrupts = <12 13 14 15>; interrupt-parent = <&qeic>; - /* filled by u-boot */ - clock-frequency = <0>; + clock-frequency = <1>; + }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc8360-qe-usb", +"fsl,mpc8323-qe-usb"; + reg = <0x6c0 0x40 0x8b00 0x100>; + interrupts = <11>; + interrupt-parent = <&qeic>; + fsl,fullspeed-clock = "clk21"; + gpios = <&qe_pio_b 2 0 /* USBOE */ +&qe_pio_b 3 0 /* USBTP */ +&qe_pio_b 8 0 /* USBTN */ +&qe_pio_b 9 0 /* USBRP */ +&qe_pio_b 11 0 /* USBRN */ +&qe_pio_e 20 0 /* SPEED */ +&qe_pio_e 21 1 /* POWER */>; }; [EMAIL PROTECTED] { -- 1.5.6.5 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 5/5] powerpc/83xx: Fix sparse warnings in mpc836x_mds.c
This patch fixes following sparse warnings: CHECK mpc836x_mds.c mpc836x_mds.c:75:12: warning: Using plain integer as NULL pointer mpc836x_mds.c:79:13: warning: incorrect type in assignment (different address spaces) mpc836x_mds.c:79:13:expected unsigned char [usertype] *static [toplevel] bcsr_regs mpc836x_mds.c:79:13:got void [noderef] * mpc836x_mds.c:105:3: warning: incorrect type in argument 1 (different address spaces) mpc836x_mds.c:105:3:expected unsigned char volatile [noderef] [usertype] *addr mpc836x_mds.c:105:3:got unsigned char [usertype] * mpc836x_mds.c:105:3: warning: incorrect type in argument 1 (different address spaces) mpc836x_mds.c:105:3:expected unsigned char const volatile [noderef] [usertype] *addr mpc836x_mds.c:105:3:got unsigned char [usertype] * mpc836x_mds.c:107:3: warning: incorrect type in argument 1 (different address spaces) mpc836x_mds.c:107:3:expected unsigned char volatile [noderef] [usertype] *addr mpc836x_mds.c:107:3:got unsigned char [usertype] * mpc836x_mds.c:107:3: warning: incorrect type in argument 1 (different address spaces) mpc836x_mds.c:107:3:expected unsigned char const volatile [noderef] [usertype] *addr mpc836x_mds.c:107:3:got unsigned char [usertype] * mpc836x_mds.c:131:11: warning: incorrect type in argument 1 (different address spaces) mpc836x_mds.c:131:11:expected void volatile [noderef] *addr mpc836x_mds.c:131:11:got unsigned char [usertype] *static [toplevel] bcsr_regs Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> --- arch/powerpc/platforms/83xx/mpc836x_mds.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index fbcca19..09e9d6f 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -56,8 +57,6 @@ #define DBG(fmt...) #endif -static u8 *bcsr_regs = NULL; - /* * * Setup the architecture @@ -66,13 +65,14 @@ static u8 *bcsr_regs = NULL; static void __init mpc836x_mds_setup_arch(void) { struct device_node *np; + u8 __iomem *bcsr_regs = NULL; if (ppc_md.progress) ppc_md.progress("mpc836x_mds_setup_arch()", 0); /* Map BCSR area */ np = of_find_node_by_name(NULL, "bcsr"); - if (np != 0) { + if (np) { struct resource res; of_address_to_resource(np, 0, &res); -- 1.5.6.5 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc/qe: Select QE_USB with USB_GADGET_FSL_QE
On Sat, Nov 08, 2008 at 08:52:54PM +0300, Anton Vorontsov wrote: > Boards should know when QE_USB is used, so that they can configure USB > clocks and pins. > > Another option would be to add 'select QE_USB' into USB_GADGET_FSL_QE, > but selects are evil since they don't support dependencies. > > While at it, also remove 'host' from the symbol description, since the > QE_USB code is used to support the gadget driver as well. > > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> > --- Anything wrong with this one? Thanks, > arch/powerpc/sysdev/qe_lib/Kconfig |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/arch/powerpc/sysdev/qe_lib/Kconfig > b/arch/powerpc/sysdev/qe_lib/Kconfig > index 76ffbc4..41ac3df 100644 > --- a/arch/powerpc/sysdev/qe_lib/Kconfig > +++ b/arch/powerpc/sysdev/qe_lib/Kconfig > @@ -22,5 +22,6 @@ config UCC > > config QE_USB > bool > + default y if USB_GADGET_FSL_QE > help > - QE USB Host Controller support > + QE USB Controller support > -- > 1.5.6.3 > ___ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev -- Anton Vorontsov email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 0/5] Few patches for galak/powerpc.git next
On Dec 3, 2008, at 1:26 PM, Anton Vorontsov wrote: Hi Kumar, Here are few patches queued for the next branch. The patches are mostly USB related. Plus a trivial patch that fixes some sparse warnings. [PATCH 1/5] powerpc/qe: Implement QE Pin Multiplexing API [PATCH 2/5] powerpc: Implement GPIO driver for simple memory-mapped banks [PATCH 3/5] powerpc/83xx: Add USB Host/Gadget support for MPC8360E- MDS boards [PATCH 4/5] powerpc/83xx: Add USB Host support for MPC8360E-RDK boards [PATCH 5/5] powerpc/83xx: Fix sparse warnings in mpc836x_mds.c Thanks, Thanks.. Do you mind doing me a favor and updating the status of any patches that are superceded on http://patchwork.ozlabs.org/ - k ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH v2] powerpc/85xx: Create dts for each core in CAMP mode for MPC8572DS
From: Haiying Wang <[EMAIL PROTECTED]> This patch creates the dts files for each core and splits the devices between the two cores for MPC8572DS. core0 has memory, L2, i2c, dma1, global-util, eth0, eth1, crypto, pci0, pci1. core1 has L2, dma2, eth2, eth3, pci2, msi. MPIC is shared between two cores but each core will protect its interrupts from other core by using "protected-sources" of mpic. Signed-off-by: Haiying Wang <[EMAIL PROTECTED]> Signed-off-by: Kumar Gala <[EMAIL PROTECTED]> --- * Remove the interrupt-parent for serial because we use polling mode. * Add i2c's irq number to core1's protected-sources. arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts | 483 arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts | 234 2 files changed, 717 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts create mode 100644 arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts diff --git a/arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts b/arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts new file mode 100644 index 000..c114c4e --- /dev/null +++ b/arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts @@ -0,0 +1,483 @@ +/* + * MPC8572 DS Core0 Device Tree Source in CAMP mode. + * + * In CAMP mode, each core needs to have its own dts. Only mpic and L2 cache + * can be shared, all the other devices must be assigned to one core only. + * This dts file allows core0 to have memory, l2, i2c, dma1, global-util, eth0, + * eth1, crypto, pci0, pci1. + * + * Copyright 2007, 2008 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +/dts-v1/; +/ { + model = "fsl,MPC8572DS"; + compatible = "fsl,MPC8572DS", "fsl,MPC8572DS-CAMP"; + #address-cells = <1>; + #size-cells = <1>; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet1; + serial0 = &serial0; + pci0 = &pci0; + pci1 = &pci1; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,[EMAIL PROTECTED] { + device_type = "cpu"; + reg = <0x0>; + d-cache-line-size = <32>; // 32 bytes + i-cache-line-size = <32>; // 32 bytes + d-cache-size = <0x8000>;// L1, 32K + i-cache-size = <0x8000>;// L1, 32K + timebase-frequency = <0>; + bus-frequency = <0>; + clock-frequency = <0>; + next-level-cache = <&L2>; + }; + + }; + + memory { + device_type = "memory"; + reg = <0x0 0x0>;// Filled by U-Boot + }; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <1>; + device_type = "soc"; + compatible = "simple-bus"; + ranges = <0x0 0xffe0 0x10>; + reg = <0xffe0 0x1000>; // CCSRBAR & soc regs, remove once parse code for immrbase fixed + bus-frequency = <0>;// Filled out by uboot. + + [EMAIL PROTECTED] { + compatible = "fsl,mpc8572-memory-controller"; + reg = <0x2000 0x1000>; + interrupt-parent = <&mpic>; + interrupts = <18 2>; + }; + + [EMAIL PROTECTED] { + compatible = "fsl,mpc8572-memory-controller"; + reg = <0x6000 0x1000>; + interrupt-parent = <&mpic>; + interrupts = <18 2>; + }; + + L2: [EMAIL PROTECTED] { + compatible = "fsl,mpc8572-l2-cache-controller"; + reg = <0x2 0x1000>; + cache-line-size = <32>; // 32 bytes + cache-size = <0x8>; // L2, 512K + interrupt-parent = <&mpic>; + interrupts = <16 2>; + }; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <0>; + cell-index = <0>; + compatible = "fsl-i2c"; + reg = <0x3000 0x100>; + interrupts = <43 2>; + interrupt-parent = <&mpic>; + dfsrr; + }; + + [EMAIL PROTECTED] { + #address-cells = <1>; + #size-cells = <0>; +
Please pull from 'next' branch (updated)
Please pull from 'next' branch of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git next to receive the following updates: arch/powerpc/Makefile |1 arch/powerpc/boot/dts/gef_sbc610.dts | 11 arch/powerpc/boot/dts/mpc8572ds.dts| 113 +++ arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts | 483 arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts | 234 arch/powerpc/configs/86xx/gef_sbc610_defconfig |8 arch/powerpc/include/asm/mmu-fsl-booke.h |2 arch/powerpc/include/asm/processor.h |6 arch/powerpc/include/asm/sfp-machine.h | 58 +- arch/powerpc/kernel/head_fsl_booke.S | 103 +++ arch/powerpc/kernel/traps.c| 62 +- arch/powerpc/math-emu/Makefile |2 arch/powerpc/math-emu/fadd.c |1 arch/powerpc/math-emu/fcmpo.c |5 arch/powerpc/math-emu/fdiv.c |9 arch/powerpc/math-emu/fdivs.c |9 arch/powerpc/math-emu/fmadd.c |5 arch/powerpc/math-emu/fmadds.c |5 arch/powerpc/math-emu/fmsub.c |5 arch/powerpc/math-emu/fmsubs.c |5 arch/powerpc/math-emu/fmul.c |3 arch/powerpc/math-emu/fmuls.c |3 arch/powerpc/math-emu/fnmadd.c |5 arch/powerpc/math-emu/fnmadds.c|5 arch/powerpc/math-emu/fnmsub.c |5 arch/powerpc/math-emu/fnmsubs.c|5 arch/powerpc/math-emu/fsqrt.c |5 arch/powerpc/math-emu/fsqrts.c |5 arch/powerpc/math-emu/fsub.c |3 arch/powerpc/math-emu/fsubs.c |3 arch/powerpc/math-emu/math_efp.c | 720 + arch/powerpc/platforms/85xx/Makefile |2 arch/powerpc/platforms/85xx/mpc85xx_ds.c | 11 arch/powerpc/platforms/85xx/mpc85xx_mds.c |6 arch/powerpc/platforms/85xx/smp.c | 104 +++ arch/powerpc/platforms/86xx/Kconfig|2 arch/powerpc/platforms/86xx/Makefile |3 arch/powerpc/platforms/86xx/gef_gpio.c | 143 arch/powerpc/sysdev/qe_lib/qe.c|3 arch/powerpc/sysdev/qe_lib/ucc.c |4 40 files changed, 2067 insertions(+), 100 deletions(-) Anton Vorontsov (1): powerpc/qe: Move cmxgcr_lock definition from the ucc.c into the qe.c Haiying Wang (3): powerpc/85xx: Add localbus node in mpc8572ds dts file powerpc/85xx: Don't reset the MPIC for CAMP mode on MPC8572DS powerpc/85xx: Create dts for each core in CAMP mode for MPC8572DS Kumar Gala (4): powerpc: Remove unncessary SPE related compiler flag powerpc/85xx: minor head_fsl_booke.S cleanup powerpc/85xx: Add support for SMP initialization powerpc/85xx: Fix compile warnings in mpc85xx_mds.c Liu Yu (4): powerpc/math-emu: Fix single float point division bug powerpc/math-emu: Adopt new version of _FP_CHOOSENAN powerpc/math-emu: Remove redundant 'ret' powerpc: Add SPE/EFP math emulation for E500v1/v2 processors. Martyn Welch (2): powerpc/86xx: Add use of Epson RTX-8581 RTC to GE Fanuc SBC610 dts powerpc/86xx: Basic GPIO support for GE Fanuc SBC610 Trent Piepho (1): powerpc: Better setup of boot page TLB entry ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 0/5] Few patches for galak/powerpc.git next
On Wed, Dec 03, 2008 at 01:53:26PM -0600, Kumar Gala wrote: > > On Dec 3, 2008, at 1:26 PM, Anton Vorontsov wrote: > >> Hi Kumar, >> >> Here are few patches queued for the next branch. The patches are >> mostly USB related. Plus a trivial patch that fixes some sparse >> warnings. >> >> [PATCH 1/5] powerpc/qe: Implement QE Pin Multiplexing API >> [PATCH 2/5] powerpc: Implement GPIO driver for simple memory-mapped >> banks >> [PATCH 3/5] powerpc/83xx: Add USB Host/Gadget support for MPC8360E-MDS >> boards >> [PATCH 4/5] powerpc/83xx: Add USB Host support for MPC8360E-RDK boards >> [PATCH 5/5] powerpc/83xx: Fix sparse warnings in mpc836x_mds.c >> >> Thanks, > > Thanks.. Do you mind doing me a favor and updating the status of any > patches that are superceded on http://patchwork.ozlabs.org/ Wow, I can change status of my own patches.. super. Done, plus I also set 'accepted' state for some patches that were already merged in powerpc or other trees. Hope this is ok. -- Anton Vorontsov email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/2] powerpc/83xx: add support for MCU on 8349emitx, 837xrdb and 8315erdb boards
On Fri, Oct 17, 2008 at 12:57 PM, Anton Vorontsov <[EMAIL PROTECTED]> wrote: > MCU is an external Freescale MC9S08QG8 microcontroller, mainly used to > provide soft power-off function, but also exports two GPIOs (wired to > the LEDs and also available from the external headers). > > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> Kumar, I think you merged this patch incorrectly ... > diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts > b/arch/powerpc/boot/dts/mpc8349emitx.dts > index 7fc5414..4bdbaf4 100644 > --- a/arch/powerpc/boot/dts/mpc8349emitx.dts > +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts > @@ -91,6 +91,14 @@ >interrupts = <18 0x8>; >interrupt-parent = <&ipic>; >}; > + > + mcu_pio: [EMAIL PROTECTED] { > + #gpio-cells = <2>; > + compatible = "fsl,mc9s08qg8-mpc8349emitx", > +"fsl,mcu-mpc8349emitx"; > + reg = <0x0a>; > + gpio-controller; > + }; This node is supposed to go under the I2C node, but you put it under the DMA node. -- Timur Tabi Linux kernel developer at Freescale ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Fix bogus cache flushing on all 40x and BookE processors
On Tue, 2 Dec 2008, Benjamin Herrenschmidt wrote: > On Tue, 2008-12-02 at 01:36 -0600, Kumar Gala wrote: > >>> #define CPU_FTRS_E200 (CPU_FTR_USE_TB | CPU_FTR_SPE_COMP | \ >>> CPU_FTR_NODSISRALIGN | CPU_FTR_COHERENT_ICACHE | \ >>> - CPU_FTR_UNIFIED_ID_CACHE) >>> + CPU_FTR_UNIFIED_ID_CACHE | CPU_FTR_NOEXECUTE) >>> #define CPU_FTRS_E500 (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ >>> - CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN) >>> + CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | >>> CPU_FTR_NODSISRALIGN \ >> >> Added a '|' at the end of the line before the escape > > Right. Will send a new patch tomorrow. Appart from that, have you > verified it doesn't have any adverse effects for you ? I did some quick > tests on 440 and things seem to be fine. #ifdef __powerpc64__ #define LONG_ASM_CONST(x) ASM_CONST(x) #else #define LONG_ASM_CONST(x) 0 #endif #define CPU_FTR_NOEXECUTE LONG_ASM_CONST(0x0008) Am I not looking at the right code? Since e200 and e500 aren't powerpc64, doesn't adding CPU_FTR_NOEXECUTE have no effect at all? ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [git pull] Please pull powerpc.git merge branch
I wrote: > Please pull from the 'merge' branch of > > git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge > > to get one commit from Ben Herrenschmidt that fixes a regression since > 2.6.27. I have just added one more commit from Kumar's merge branch, so when you pull the diffstat should be: arch/powerpc/boot/dts/mpc8349emitx.dts | 16 arch/powerpc/kernel/dma.c |1 + 2 files changed, 9 insertions(+), 8 deletions(-) If you had already pulled, please pull again, or pull Kumar's merge branch directly. Thanks, Paul. Anton Vorontsov (1): powerpc/83xx: Fix MCU support merge issue in mpc8349emitx.dts Benjamin Herrenschmidt (1): powerpc: Fix dma_map_sg() cache flushing on non coherent platforms ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
linux-next: tree build warning
Hi all, Today's linux-next build (powerpc ppc64_defconfig) produced this warning: drivers/ieee1394/sbp2.c: In function 'sbp2_create_command_orb': drivers/ieee1394/sbp2.c:1559: warning: unused variable 'dmadev' Caused by commit 15e09c0ecaab4a1b4a7ed69db536c38948b92279 ("powerpc: Add sync_*_for_* to dma_ops") from the powerpc tree. The macros added for !CONFIG_PPC_NEED_DMA_SYNC_OPS should really be static inline functions. (as akpm says: "program in C not C preprocessor"). -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpOfMKYQblR7.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
linux-next: manual merge of the driver-core tree
Hi Greg, Today's linux-next merge of the driver-core tree got a conflict in arch/powerpc/platforms/85xx/mpc85xx_mds.c between commit 24a99596f7465274a8e65ddd29a7d9028969b9f9 ("powerpc/85xx: Fix compile warnings in mpc85xx_mds.c") from the galak tree and commit f58f23751464d095f9942304bc5f6072b79a2cc3 ("powerpc: struct device - replace bus_id with dev_name(), dev_set_name()") from the driver-core tree. I fixed it up (see below) and can carry the fix as necessary. Paul, maybe you should apply the patch from the driver-core tree as it was cc'd to you and all its prerequisites are upstream. -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ diff --cc arch/powerpc/platforms/85xx/mpc85xx_mds.c index b915bf5,80c55a5..000 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c @@@ -241,15 -241,13 +241,15 @@@ static int __init board_fixups(void mdio = of_find_compatible_node(NULL, NULL, compstrs[i]); of_address_to_resource(mdio, 0, &res); - snprintf(phy_id, BUS_ID_SIZE, "%llx:%02x", - snprintf(phy_id, sizeof(phy_id), "%x:%02x", res.start, 1); ++ snprintf(phy_id, sizeof(phy_id), "%llx:%02x", + (unsigned long long)res.start, 1); phy_register_fixup_for_id(phy_id, mpc8568_fixup_125_clock); phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups); /* Register a workaround for errata */ - snprintf(phy_id, BUS_ID_SIZE, "%llx:%02x", - snprintf(phy_id, sizeof(phy_id), "%x:%02x", res.start, 7); ++ snprintf(phy_id, sizeof(phy_id), "%llx:%02x", + (unsigned long long)res.start, 7); phy_register_fixup_for_id(phy_id, mpc8568_mds_phy_fixups); of_node_put(mdio); ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/2] powerpc/83xx: add support for MCU on 8349emitx, 837xrdb and 8315erdb boards
On Wed, Dec 03, 2008 at 05:10:30PM -0600, Timur Tabi wrote: > On Fri, Oct 17, 2008 at 12:57 PM, Anton Vorontsov > <[EMAIL PROTECTED]> wrote: > > MCU is an external Freescale MC9S08QG8 microcontroller, mainly used to > > provide soft power-off function, but also exports two GPIOs (wired to > > the LEDs and also available from the external headers). > > > > Signed-off-by: Anton Vorontsov <[EMAIL PROTECTED]> > > Kumar, I think you merged this patch incorrectly ... [...] > This node is supposed to go under the I2C node, but you put it under > the DMA node. I've noticed this on the other 'stg pull', when it told me that the patch isn't empty (stg patch becomes empty if merged). This should be fixed already: http://ozlabs.org/pipermail/linuxppc-dev/2008-November/065666.html Anyway, thanks for heads up! -- Anton Vorontsov email: [EMAIL PROTECTED] irc://irc.freenode.net/bd2 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 0/3] PS3 patches for 2.6.29
Hi Paul, Here is a small set of patches for 2.6.29. Please consider them for your next branch. [patch 1/3] powerpc: Fix typo in pgtable-ppc64.h [patch 2/3] powerpc/ps3: Quiet dmesg output [patch 3/3] powerpc/ps3: Add sub-match id modalias support -Geoff -- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 1/3] powerpc: Fix typo in pgtable-ppc64.h
Fix a minor comment typo in pgtable-ppc64.h. Signed-off-by: Geoff Levand <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/pgtable-ppc64.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/powerpc/include/asm/pgtable-ppc64.h +++ b/arch/powerpc/include/asm/pgtable-ppc64.h @@ -100,7 +100,7 @@ #define _PAGE_WRENABLE (_PAGE_RW | _PAGE_DIRTY) -/* __pgprot defined in arch/powerpc/incliude/asm/page.h */ +/* __pgprot defined in arch/powerpc/include/asm/page.h */ #define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED) #define PAGE_SHARED__pgprot(_PAGE_BASE | _PAGE_RW | _PAGE_USER) -- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 2/3] powerpc/ps3: Quiet dmesg output
Change the debug message in dma_sb_region_create() from pr_info() to DBG() to quiet the dmesg output. Signed-off-by: Geoff Levand <[EMAIL PROTECTED]> --- arch/powerpc/platforms/ps3/mm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c @@ -649,7 +649,7 @@ static int dma_sb_region_create(struct p { int result; - pr_info(" -> %s:%d:\n", __func__, __LINE__); + DBG(" -> %s:%d:\n", __func__, __LINE__); BUG_ON(!r); -- ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[patch 3/3] powerpc/ps3: Add sub-match id modalias support
From: Geert Uytterhoeven <[EMAIL PROTECTED]> commit 059e4938f8b060b10c4352e6c45739473bc73267 ("powerpc/ps3: Add a sub-match id to ps3_system_bus") forgot to update the module alias support: - Add the sub-match ids to the module aliases, so udev can distinguish between different types of sub-devices. - Rename PS3_MODULE_ALIAS_GRAPHICS to PS3_MODULE_ALIAS_GPU_FB, as ps3fb binds to the "FB" sub-device. Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]> Signed-off-by: Geoff Levand <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/ps3.h | 57 +++ arch/powerpc/platforms/ps3/device-init.c |4 +- arch/powerpc/platforms/ps3/system-bus.c | 10 +++-- drivers/video/ps3fb.c|6 +-- 4 files changed, 39 insertions(+), 38 deletions(-) --- a/arch/powerpc/include/asm/ps3.h +++ b/arch/powerpc/include/asm/ps3.h @@ -305,30 +305,34 @@ static inline const char* ps3_result(int /* system bus routines */ enum ps3_match_id { - PS3_MATCH_ID_EHCI = 1, - PS3_MATCH_ID_OHCI = 2, - PS3_MATCH_ID_GELIC = 3, - PS3_MATCH_ID_AV_SETTINGS= 4, - PS3_MATCH_ID_SYSTEM_MANAGER = 5, - PS3_MATCH_ID_STOR_DISK = 6, - PS3_MATCH_ID_STOR_ROM = 7, - PS3_MATCH_ID_STOR_FLASH = 8, - PS3_MATCH_ID_SOUND = 9, - PS3_MATCH_ID_GRAPHICS = 10, - PS3_MATCH_ID_LPM= 11, -}; - -#define PS3_MODULE_ALIAS_EHCI "ps3:1" -#define PS3_MODULE_ALIAS_OHCI "ps3:2" -#define PS3_MODULE_ALIAS_GELIC "ps3:3" -#define PS3_MODULE_ALIAS_AV_SETTINGS"ps3:4" -#define PS3_MODULE_ALIAS_SYSTEM_MANAGER "ps3:5" -#define PS3_MODULE_ALIAS_STOR_DISK "ps3:6" -#define PS3_MODULE_ALIAS_STOR_ROM "ps3:7" -#define PS3_MODULE_ALIAS_STOR_FLASH "ps3:8" -#define PS3_MODULE_ALIAS_SOUND "ps3:9" -#define PS3_MODULE_ALIAS_GRAPHICS "ps3:10" -#define PS3_MODULE_ALIAS_LPM"ps3:11" + PS3_MATCH_ID_EHCI = 1, + PS3_MATCH_ID_OHCI = 2, + PS3_MATCH_ID_GELIC = 3, + PS3_MATCH_ID_AV_SETTINGS= 4, + PS3_MATCH_ID_SYSTEM_MANAGER = 5, + PS3_MATCH_ID_STOR_DISK = 6, + PS3_MATCH_ID_STOR_ROM = 7, + PS3_MATCH_ID_STOR_FLASH = 8, + PS3_MATCH_ID_SOUND = 9, + PS3_MATCH_ID_GPU= 10, + PS3_MATCH_ID_LPM= 11, +}; + +enum ps3_match_sub_id { + PS3_MATCH_SUB_ID_GPU_FB = 1, +}; + +#define PS3_MODULE_ALIAS_EHCI "ps3:1:0" +#define PS3_MODULE_ALIAS_OHCI "ps3:2:0" +#define PS3_MODULE_ALIAS_GELIC "ps3:3:0" +#define PS3_MODULE_ALIAS_AV_SETTINGS "ps3:4:0" +#define PS3_MODULE_ALIAS_SYSTEM_MANAGER"ps3:5:0" +#define PS3_MODULE_ALIAS_STOR_DISK "ps3:6:0" +#define PS3_MODULE_ALIAS_STOR_ROM "ps3:7:0" +#define PS3_MODULE_ALIAS_STOR_FLASH"ps3:8:0" +#define PS3_MODULE_ALIAS_SOUND "ps3:9:0" +#define PS3_MODULE_ALIAS_GPU_FB"ps3:10:1" +#define PS3_MODULE_ALIAS_LPM "ps3:11:0" enum ps3_system_bus_device_type { PS3_DEVICE_TYPE_IOC0 = 1, @@ -337,11 +341,6 @@ enum ps3_system_bus_device_type { PS3_DEVICE_TYPE_LPM, }; -enum ps3_match_sub_id { - /* for PS3_MATCH_ID_GRAPHICS */ - PS3_MATCH_SUB_ID_FB = 1, -}; - /** * struct ps3_system_bus_device - a device on the system bus */ --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c @@ -497,8 +497,8 @@ static int __init ps3_register_graphics_ if (!p) return -ENOMEM; - p->dev.match_id = PS3_MATCH_ID_GRAPHICS; - p->dev.match_sub_id = PS3_MATCH_SUB_ID_FB; + p->dev.match_id = PS3_MATCH_ID_GPU; + p->dev.match_sub_id = PS3_MATCH_SUB_ID_GPU_FB; p->dev.dev_type = PS3_DEVICE_TYPE_IOC0; result = ps3_system_bus_device_register(&p->dev); --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c @@ -175,7 +175,7 @@ int ps3_open_hv_device(struct ps3_system return ps3_open_hv_device_sb(dev); case PS3_MATCH_ID_SOUND: - case PS3_MATCH_ID_GRAPHICS: + case PS3_MATCH_ID_GPU: return ps3_open_hv_device_gpu(dev); case PS3_MATCH_ID_AV_SETTINGS: @@ -213,7 +213,7 @@ int ps3_close_hv_device(struct ps3_syste return ps3_close_hv_device_sb(dev); case PS3_MATCH_ID_SOUND: - case PS3_MATCH_ID_GRAPHICS: + case PS3_MATCH_ID_GPU: return ps3_close_hv_device_gpu(dev); case PS3_MATCH_ID_AV_SETTINGS: @@ -453,7 +453,8 @@ static int ps3_system_bus_uevent(struct { struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); - if (add_uevent_var(env, "MODALIAS=ps3:%d", dev->match_id)) + if (add_uevent_var(env, "MODALIAS=ps3:%d:%d", dev->match_id,
Re: [PATCH] powerpc: Fix bogus cache flushing on all 40x and BookE processors
On Wed, 2008-12-03 at 15:09 -0800, Trent Piepho wrote: > #ifdef __powerpc64__ > #define LONG_ASM_CONST(x) ASM_CONST(x) > #else > #define LONG_ASM_CONST(x) 0 > #endif > > #define CPU_FTR_NOEXECUTE LONG_ASM_CONST(0x0008) > > Am I not looking at the right code? Since e200 and e500 aren't powerpc64, > doesn't adding CPU_FTR_NOEXECUTE have no effect at all? No, you are right, this is a case where I didn't actually verify that the patch had the expected effect :-( We are running out of low FTR bits, heck, I might make them 64-bit for everybody soon. I'll fix that up, thanks for spotting it. Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
USB reset errors in 2.6.28*
This is a repost of a message sent to linuxppc-dev. It was recommended a send it here. The warp is a PPC based telephony appliance. You can get details from the Pika website: http://www.pikatechnologies.com/english/View.asp?x=608 Cheers, Sean MacLennan Anybody else seeing USB problems in the 2.6.28 kernels? The warp has a USB 1.1 port off the PPC 440EP processor. In 2.6.26 we had some problems with certain USB keys, but 2.6.27 fixed it. However, the 2.6.28 stream broke it again before rc1. We get this when you try to use a usb key: sd 0:0:0:0: [sda] 990865 512-byte hardware sectors: (507 MB/483 MiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sd 0:0:0:0: [sda] Attached SCSI removable disk usb 1-1: reset full speed USB device using ppc-of-ohci and address 2 usb 1-1: reset full speed USB device using ppc-of-ohci and address 2 usb 1-1: reset full speed USB device using ppc-of-ohci and address 2 usb 1-1: reset full speed USB device using ppc-of-ohci and address 2 usb 1-1: reset full speed USB device using ppc-of-ohci and address 2 usb 1-1: reset full speed USB device using ppc-of-ohci and address 2 usb 1-1: reset full speed USB device using ppc-of-ohci and address 2 usb 1-1: reset full speed USB device using ppc-of-ohci and address 2 sd 0:0:0:0: timing out command, waited 60s It then seems to work, but I see corruption on the usb key. I haven't looked into it too much since we aren't switching to 2.6.28 anytime soon (it breaks our Secure Digital card driver). ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: linux-next: manual merge of the driver-core tree
On Thu, Dec 04, 2008 at 10:44:18AM +1100, Stephen Rothwell wrote: > Hi Greg, > > Today's linux-next merge of the driver-core tree got a conflict in > arch/powerpc/platforms/85xx/mpc85xx_mds.c between commit > 24a99596f7465274a8e65ddd29a7d9028969b9f9 ("powerpc/85xx: Fix compile > warnings in mpc85xx_mds.c") from the galak tree and commit > f58f23751464d095f9942304bc5f6072b79a2cc3 ("powerpc: struct device - > replace bus_id with dev_name(), dev_set_name()") from the driver-core > tree. > > I fixed it up (see below) and can carry the fix as necessary. > > Paul, maybe you should apply the patch from the driver-core tree as it > was cc'd to you and all its prerequisites are upstream. Yes, Paul, please apply the patch, and let me know. It will make things much easier in the end for everyone involved. thanks, greg k-h ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: USB reset errors in 2.6.28*
On Wed, Dec 03, 2008 at 08:29:53PM -0500, Sean MacLennan wrote: > > It then seems to work, but I see corruption on the usb key. I haven't > looked into it too much since we aren't switching to 2.6.28 anytime > soon (it breaks our Secure Digital card driver). What driver is that? Why would 2.6.28 be broken? If it's an out-of-tree driver, please let me know and I'll be glad to get it merged. thanks, greg k-h ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: USB reset errors in 2.6.28*
On Wed, 3 Dec 2008 20:26:07 -0800 "Greg KH" <[EMAIL PROTECTED]> wrote: > On Wed, Dec 03, 2008 at 08:29:53PM -0500, Sean MacLennan wrote: > > > > It then seems to work, but I see corruption on the usb key. I > > haven't looked into it too much since we aren't switching to 2.6.28 > > anytime soon (it breaks our Secure Digital card driver). > > What driver is that? Why would 2.6.28 be broken? If it's an > out-of-tree driver, please let me know and I'll be glad to get it > merged. I am embarrassed to say that I tried the usb with 2.6.28-rc7 and it seems to be fixed. I should have tried it with 2.6.28-rc7 *before* sending the error report :( Cheers, Sean ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/3] powerpc: Add local_flush_tlb_mm() to SW loaded TLB implementations
This adds a local_flush_tlb_mm() call as a pre-requisite for some SMP work for BookE processors Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/tlbflush.h |5 + 1 file changed, 5 insertions(+) --- linux-work.orig/arch/powerpc/include/asm/tlbflush.h 2008-12-03 14:33:02.0 +1100 +++ linux-work/arch/powerpc/include/asm/tlbflush.h 2008-12-03 14:33:22.0 +1100 @@ -40,6 +40,11 @@ extern void _tlbil_va(unsigned long addr extern void _tlbia(void); #endif +static inline void local_flush_tlb_mm(struct mm_struct *mm) +{ + _tlbil_pid(mm->context.id); +} + static inline void flush_tlb_mm(struct mm_struct *mm) { _tlbil_pid(mm->context.id); ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 2/3] powerpc: Split mmu_context handling
This splits the mmu_context handling between 32-bit hash based processors, 64-bit hash based processors and everybody else. This is preliminary work for adding SMP support for BookE processors. Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/bug.h |9 arch/powerpc/include/asm/mmu_context.h | 266 +++ arch/powerpc/kernel/asm-offsets.c|1 arch/powerpc/kernel/head_32.S| 14 + arch/powerpc/kernel/ppc_ksyms.c |3 arch/powerpc/kernel/swsusp.c |2 arch/powerpc/mm/Makefile |6 arch/powerpc/mm/mmu_context_hash32.c | 101 ++ arch/powerpc/mm/mmu_context_hash64.c | 78 +++ arch/powerpc/mm/mmu_context_nohash.c | 168 + arch/powerpc/platforms/Kconfig.cputype | 18 + arch/powerpc/platforms/powermac/cpufreq_32.c |2 drivers/macintosh/via-pmu.c |4 13 files changed, 430 insertions(+), 242 deletions(-) --- linux-work.orig/arch/powerpc/include/asm/bug.h 2008-12-03 13:50:01.0 +1100 +++ linux-work/arch/powerpc/include/asm/bug.h 2008-12-03 13:50:18.0 +1100 @@ -26,7 +26,7 @@ .previous .endm #else - .macro EMIT_BUG_ENTRY addr,file,line,flags +.macro EMIT_BUG_ENTRY addr,file,line,flags .section __bug_table,"a" 5001: PPC_LONG \addr .short \flags @@ -113,6 +113,13 @@ #define HAVE_ARCH_BUG_ON #define HAVE_ARCH_WARN_ON #endif /* __ASSEMBLY __ */ +#else +#ifdef __ASSEMBLY__ +.macro EMIT_BUG_ENTRY addr,file,line,flags +.endm +#else /* !__ASSEMBLY__ */ +#define _EMIT_BUG_ENTRY +#endif #endif /* CONFIG_BUG */ #include Index: linux-work/arch/powerpc/include/asm/mmu_context.h === --- linux-work.orig/arch/powerpc/include/asm/mmu_context.h 2008-12-03 13:50:01.0 +1100 +++ linux-work/arch/powerpc/include/asm/mmu_context.h 2008-12-03 13:50:18.0 +1100 @@ -2,270 +2,71 @@ #define __ASM_POWERPC_MMU_CONTEXT_H #ifdef __KERNEL__ +#include +#include +#include +#include #include #include #include - -#ifndef CONFIG_PPC64 -#include -#include - -/* - * On 32-bit PowerPC 6xx/7xx/7xxx CPUs, we use a set of 16 VSIDs - * (virtual segment identifiers) for each context. Although the - * hardware supports 24-bit VSIDs, and thus >1 million contexts, - * we only use 32,768 of them. That is ample, since there can be - * at most around 30,000 tasks in the system anyway, and it means - * that we can use a bitmap to indicate which contexts are in use. - * Using a bitmap means that we entirely avoid all of the problems - * that we used to have when the context number overflowed, - * particularly on SMP systems. - * -- paulus. - */ - -/* - * This function defines the mapping from contexts to VSIDs (virtual - * segment IDs). We use a skew on both the context and the high 4 bits - * of the 32-bit virtual address (the "effective segment ID") in order - * to spread out the entries in the MMU hash table. Note, if this - * function is changed then arch/ppc/mm/hashtable.S will have to be - * changed to correspond. - */ -#define CTX_TO_VSID(ctx, va) (((ctx) * (897 * 16) + ((va) >> 28) * 0x111) \ -& 0xff) - -/* - The MPC8xx has only 16 contexts. We rotate through them on each - task switch. A better way would be to keep track of tasks that - own contexts, and implement an LRU usage. That way very active - tasks don't always have to pay the TLB reload overhead. The - kernel pages are mapped shared, so the kernel can run on behalf - of any task that makes a kernel entry. Shared does not mean they - are not protected, just that the ASID comparison is not performed. --- Dan - - The IBM4xx has 256 contexts, so we can just rotate through these - as a way of "switching" contexts. If the TID of the TLB is zero, - the PID/TID comparison is disabled, so we can use a TID of zero - to represent all kernel pages as shared among all contexts. - -- Dan - */ - -static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) -{ -} - -#ifdef CONFIG_8xx -#define NO_CONTEXT 16 -#define LAST_CONTEXT 15 -#define FIRST_CONTEXT 0 - -#elif defined(CONFIG_4xx) -#define NO_CONTEXT 256 -#define LAST_CONTEXT 255 -#define FIRST_CONTEXT 1 - -#elif defined(CONFIG_E200) || defined(CONFIG_E500) -#define NO_CONTEXT 256 -#define LAST_CONTEXT 255 -#define FIRST_CONTEXT 1 - -#else - -/* PPC 6xx, 7xx CPUs */ -#define NO_CONTEXT ((unsigned long) -1) -#define LAST_CONTEXT 32767 -#define FIRST_CONTEXT 1 -#endif +#include /* - * Set the current MMU context. - * On 32-bit PowerPCs (other than the 8xx embedded chips), this is done by - * loading up th
[PATCH 3/3] powerpc: Rework context management for CPUs with no hash table
This reworks the context management code used by 4xx,8xx and freescale BookE. It adds support for SMP by implementing a concept of stale context map to lazily flush the TLB on processors where a context may have been invalidated. This also contains the ground work for generalizing such lazy TLB flushing by just picking up a new PID and marking the old one stale. This will be implemented later. This is a first implementation that uses a global spinlock. Ideally, we should try to get at least the fast path (context ID already assigned) lockless or limited to a per context lock, but for now this will do. I tried to keep the UP case reasonably simple to avoid adding too much overhead to 8xx which does a lot of context stealing since it effectively has only 16 PIDs available. Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/mmu-40x.h |5 arch/powerpc/include/asm/mmu-44x.h |5 arch/powerpc/include/asm/mmu-fsl-booke.h |5 arch/powerpc/mm/mmu_context_nohash.c | 258 --- 4 files changed, 217 insertions(+), 56 deletions(-) --- linux-work.orig/arch/powerpc/include/asm/mmu-40x.h 2008-12-04 15:02:19.0 +1100 +++ linux-work/arch/powerpc/include/asm/mmu-40x.h 2008-12-04 15:04:03.0 +1100 @@ -54,8 +54,9 @@ #ifndef __ASSEMBLY__ typedef struct { - unsigned long id; - unsigned long vdso_base; + unsigned short id; + unsigned short active; + unsigned long vdso_base; } mm_context_t; #endif /* !__ASSEMBLY__ */ Index: linux-work/arch/powerpc/include/asm/mmu-44x.h === --- linux-work.orig/arch/powerpc/include/asm/mmu-44x.h 2008-12-04 15:02:19.0 +1100 +++ linux-work/arch/powerpc/include/asm/mmu-44x.h 2008-12-04 15:04:03.0 +1100 @@ -56,8 +56,9 @@ extern unsigned int tlb_44x_hwater; typedef struct { - unsigned long id; - unsigned long vdso_base; + unsigned short id; + unsigned short active; + unsigned long vdso_base; } mm_context_t; #endif /* !__ASSEMBLY__ */ Index: linux-work/arch/powerpc/include/asm/mmu-fsl-booke.h === --- linux-work.orig/arch/powerpc/include/asm/mmu-fsl-booke.h2008-12-04 15:02:19.0 +1100 +++ linux-work/arch/powerpc/include/asm/mmu-fsl-booke.h 2008-12-04 15:04:03.0 +1100 @@ -74,8 +74,9 @@ #ifndef __ASSEMBLY__ typedef struct { - unsigned long id; - unsigned long vdso_base; + unsigned short id; + unsigned short active; + unsigned long vdso_base; } mm_context_t; #endif /* !__ASSEMBLY__ */ Index: linux-work/arch/powerpc/mm/mmu_context_nohash.c === --- linux-work.orig/arch/powerpc/mm/mmu_context_nohash.c2008-12-04 15:04:03.0 +1100 +++ linux-work/arch/powerpc/mm/mmu_context_nohash.c 2008-12-04 15:18:46.0 +1100 @@ -1,32 +1,43 @@ /* * This file contains the routines for handling the MMU on those - * PowerPC implementations where the MMU substantially follows the - * architecture specification. This includes the 6xx, 7xx, 7xxx, - * 8260, and POWER3 implementations but excludes the 8xx and 4xx. - * -- paulus - * - * Derived from arch/ppc/mm/init.c: - *Copyright (C) 1995-1996 Gary Thomas ([EMAIL PROTECTED]) + * PowerPC implementations where the MMU is not using the hash + * table, such as 8xx, 4xx, BookE's etc... * - * Modifications by Paul Mackerras (PowerMac) ([EMAIL PROTECTED]) - * and Cort Dougan (PReP) ([EMAIL PROTECTED]) - *Copyright (C) 1996 Paul Mackerras + * Copyright 2008 Ben Herrenschmidt <[EMAIL PROTECTED]> + *IBM Corp. * - * Derived from "arch/i386/mm/init.c" - *Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds + * Derived from previous arch/powerpc/mm/mmu_context.c + * and arch/powerpc/include/asm/mmu_context.h * * 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. * + * TODO: + * + * - The global context lock will not scale very well + * - The maps should be dynamically allocated to allow for processors + * that support more PID bits at runtime + * - Implement flush_tlb_mm() by making the context stale and picking + * a new one + * - More aggressively clear stale map bits and maybe find some way to + * also clear mm->cpu_vm_mask bits when processes are migrated + * */ +#undef DEBUG +#define DEBUG_STEAL_ONLY + +#include #include #include #include #include +#include + +#undef DEBUG_MAP_CONSISTENCY /* * The MPC8xx has only 16 contexts. We rotate through them on each @@ -64,11 +75,11 @@ #error Unsupported p
[PATCH] powerpc: Fix bogus cache flushing on all 40x and BookE processors v2
We were missing the CPU_FTR_NOEXECUTE bit in our cputable for all these processors. The result is that update_mmu_cache() would flush the cache for all pages mapped to userspace which is totally unnecessary on those processors since we already handle flushing on execute in the page fault path. This should provide a nice speed up ;-) Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]> --- This one fixes the E500 definition and uses a bit that works for 32-bit processors arch/powerpc/include/asm/cputable.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) --- linux-work.orig/arch/powerpc/include/asm/cputable.h 2008-12-01 16:55:53.0 +1100 +++ linux-work/arch/powerpc/include/asm/cputable.h 2008-12-04 15:03:47.0 +1100 @@ -163,6 +163,7 @@ extern const char *powerpc_base_platform #define CPU_FTR_SPEASM_CONST(0x0200) #define CPU_FTR_NEED_PAIRED_STWCX ASM_CONST(0x0400) #define CPU_FTR_LWSYNC ASM_CONST(0x0800) +#define CPU_FTR_NOEXECUTE ASM_CONST(0x1000) /* * Add the 64-bit processor unique features in the top half of the word; @@ -177,7 +178,6 @@ extern const char *powerpc_base_platform #define CPU_FTR_SLBLONG_ASM_CONST(0x0001) #define CPU_FTR_16M_PAGE LONG_ASM_CONST(0x0002) #define CPU_FTR_TLBIEL LONG_ASM_CONST(0x0004) -#define CPU_FTR_NOEXECUTE LONG_ASM_CONST(0x0008) #define CPU_FTR_IABR LONG_ASM_CONST(0x0020) #define CPU_FTR_MMCRA LONG_ASM_CONST(0x0040) #define CPU_FTR_CTRL LONG_ASM_CONST(0x0080) @@ -366,19 +366,20 @@ extern const char *powerpc_base_platform #define CPU_FTRS_CLASSIC32 (CPU_FTR_COMMON | \ CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE) #define CPU_FTRS_8XX (CPU_FTR_USE_TB) -#define CPU_FTRS_40X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN) -#define CPU_FTRS_44X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN) +#define CPU_FTRS_40X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) +#define CPU_FTRS_44X (CPU_FTR_USE_TB | CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) #define CPU_FTRS_E200 (CPU_FTR_USE_TB | CPU_FTR_SPE_COMP | \ CPU_FTR_NODSISRALIGN | CPU_FTR_COHERENT_ICACHE | \ - CPU_FTR_UNIFIED_ID_CACHE) + CPU_FTR_UNIFIED_ID_CACHE | CPU_FTR_NOEXECUTE) #define CPU_FTRS_E500 (CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ - CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN) + CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NODSISRALIGN | \ + CPU_FTR_NOEXECUTE) #define CPU_FTRS_E500_2(CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ CPU_FTR_SPE_COMP | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_BIG_PHYS | \ - CPU_FTR_NODSISRALIGN) + CPU_FTR_NODSISRALIGN | CPU_FTR_NOEXECUTE) #define CPU_FTRS_E500MC(CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | \ CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_BIG_PHYS | CPU_FTR_NODSISRALIGN | \ - CPU_FTR_L2CSR | CPU_FTR_LWSYNC) + CPU_FTR_L2CSR | CPU_FTR_LWSYNC | CPU_FTR_NOEXECUTE) #define CPU_FTRS_GENERIC_32(CPU_FTR_COMMON | CPU_FTR_NODSISRALIGN) /* 64-bit CPUs */ ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/3] powerpc: Split mmu_context handling
Hi Ben, On Thu, 04 Dec 2008 16:41:48 +1100 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > --- linux-work.orig/arch/powerpc/include/asm/bug.h2008-12-03 > 13:50:01.0 +1100 > +++ linux-work/arch/powerpc/include/asm/bug.h 2008-12-03 13:50:18.0 > +1100 > @@ -26,7 +26,7 @@ >.previous > .endm > #else > - .macro EMIT_BUG_ENTRY addr,file,line,flags > +.macro EMIT_BUG_ENTRY addr,file,line,flags Please don't make unrelated trivial fixups - they just make us look hard to see if something really changed. > -/* > - * switch_mm is the entry point called from the architecture independent > +/* switch_mm is the entry point called from the architecture independent The same goes for just changing the comment style away from the usual ... > -/* > - * After we have set current->mm to a new value, this activates > +/* After we have set current->mm to a new value, this activates Ditto > --- linux-work.orig/arch/powerpc/kernel/head_32.S 2008-12-03 > 13:50:01.0 +1100 > +++ linux-work/arch/powerpc/kernel/head_32.S 2008-12-03 13:50:18.0 > +1100 > @@ -1050,7 +1051,7 @@ start_here: >* We do this here because we know the mmu is disabled, and >* will be enabled for real in just a few instructions. >*/ > - lis r5, [EMAIL PROTECTED] > + lis r5, [EMAIL PROTECTED] ^ Is this right? > +++ linux-work/arch/powerpc/mm/mmu_context_hash32.c 2008-12-03 > 13:50:18.0 +1100 > +/* > + * This function defines the mapping from contexts to VSIDs (virtual > + * segment IDs). We use a skew on both the context and the high 4 bits > + * of the 32-bit virtual address (the "effective segment ID") in order > + * to spread out the entries in the MMU hash table. Note, if this > + * function is changed then arch/ppc/mm/hashtable.S will have to be > + * changed to correspond. > + */ > +#define CTX_TO_VSID(ctx, va) (((ctx) * (897 * 16) + ((va) >> 28) * 0x111) \ > + & 0xff) Any reason this is not a static inline function? Hmmm, actually it doesn't look like it is used anywhere ... I guess its just for documentation? > +++ linux-work/arch/powerpc/mm/mmu_context_nohash.c 2008-12-03 > 13:50:18.0 +1100 > +#ifdef CONFIG_8xx > +#define NO_CONTEXT 16 > +#define LAST_CONTEXT 15 > +#define FIRST_CONTEXT0 > + > +#elif defined(CONFIG_4xx) > +#define NO_CONTEXT 256 > +#define LAST_CONTEXT 255 > +#define FIRST_CONTEXT1 > + > +#elif defined(CONFIG_E200) || defined(CONFIG_E500) > +#define NO_CONTEXT 256 > +#define LAST_CONTEXT 255 > +#define FIRST_CONTEXT1 Why not combine these last two? > +static unsigned long next_mmu_context; > + /* free up context `next_mmu_context' */ > + /* if we shouldn't free context 0, don't... */ > + if (next_mmu_context < FIRST_CONTEXT) If FIRST_CONTEXT is 0, this will generate a compiler warning (as next_mmu_context can't be < 0). > +config PPC_MMU_NOHASH_32 > + def_bool y > + depends on PPC_MMU_NOHASH && PPC32 > + > +config PPC_MMU_NOHASH_64 > + def_bool y > + depends on PPC_MMU_NOHASH && PPC64 Neither of these are used anywhere. -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgp6MT4ne2XC4.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 3/3] powerpc: Rework context management for CPUs with no hash table
Hi Ben, On Thu, 04 Dec 2008 16:41:53 +1100 Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > +++ linux-work/arch/powerpc/mm/mmu_context_nohash.c 2008-12-04 > 15:18:46.0 +1100 > + /* No more free contexts, let's try to steal one */ > + if (nr_free_contexts == 0) { > +#ifdef CONFIF_SMP ^ typo -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpI7vZZEd3G2.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 3/3] powerpc: Rework context management for CPUs with no hash table
On Thu, 2008-12-04 at 17:38 +1100, Stephen Rothwell wrote: > Hi Ben, > > On Thu, 04 Dec 2008 16:41:53 +1100 Benjamin Herrenschmidt <[EMAIL PROTECTED]> > wrote: > > > > +++ linux-work/arch/powerpc/mm/mmu_context_nohash.c 2008-12-04 > > 15:18:46.0 +1100 > > + /* No more free contexts, let's try to steal one */ > > + if (nr_free_contexts == 0) { > > +#ifdef CONFIF_SMP >^ > typo Bah, leave me some surprises for Kumar for when he tests on actual SMP hardware :-) Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/3] powerpc: Split mmu_context handling
On Thu, 2008-12-04 at 17:17 +1100, Stephen Rothwell wrote: > Please don't make unrelated trivial fixups - they just make us look hard > to see if something really changed. Ooops... caught :-) > > -/* > > - * switch_mm is the entry point called from the architecture independent > > +/* switch_mm is the entry point called from the architecture independent > > The same goes for just changing the comment style away from the usual ... Yeah, I felt that file had way too much white space in it :-) > > --- linux-work.orig/arch/powerpc/kernel/head_32.S 2008-12-03 > > 13:50:01.0 +1100 > > +++ linux-work/arch/powerpc/kernel/head_32.S2008-12-03 > > 13:50:18.0 +1100 > > @@ -1050,7 +1051,7 @@ start_here: > > * We do this here because we know the mmu is disabled, and > > * will be enabled for real in just a few instructions. > > */ > > - lis r5, [EMAIL PROTECTED] > > + lis r5, [EMAIL PROTECTED] > ^ > Is this right? Nope. I really should review my own patches before posting them :-) Guess I was in a hurry to go home. > > +++ linux-work/arch/powerpc/mm/mmu_context_hash32.c 2008-12-03 > > 13:50:18.0 +1100 > > +/* > > + * This function defines the mapping from contexts to VSIDs (virtual > > + * segment IDs). We use a skew on both the context and the high 4 bits > > + * of the 32-bit virtual address (the "effective segment ID") in order > > + * to spread out the entries in the MMU hash table. Note, if this > > + * function is changed then arch/ppc/mm/hashtable.S will have to be > > + * changed to correspond. > > + */ > > +#define CTX_TO_VSID(ctx, va) (((ctx) * (897 * 16) + ((va) >> 28) * > > 0x111) \ > > +& 0xff) > > Any reason this is not a static inline function? Hmmm, actually it > doesn't look like it is used anywhere ... I guess its just for > documentation? This is just moved from it's previous location in mmu_context.h, and yes, as it is, it's mostly documentation. > > +++ linux-work/arch/powerpc/mm/mmu_context_nohash.c 2008-12-03 > > 13:50:18.0 +1100 > > +#ifdef CONFIG_8xx > > +#define NO_CONTEXT 16 > > +#define LAST_CONTEXT 15 > > +#define FIRST_CONTEXT 0 > > + > > +#elif defined(CONFIG_4xx) > > +#define NO_CONTEXT 256 > > +#define LAST_CONTEXT 255 > > +#define FIRST_CONTEXT 1 > > + > > +#elif defined(CONFIG_E200) || defined(CONFIG_E500) > > +#define NO_CONTEXT 256 > > +#define LAST_CONTEXT 255 > > +#define FIRST_CONTEXT 1 > > Why not combine these last two? I think some FSL can get more contexts, dunno, this is also just existing code moved. In any case, I plan to remove those and make the whole context count runtime selected anyway. > > +static unsigned long next_mmu_context; > > > + /* free up context `next_mmu_context' */ > > + /* if we shouldn't free context 0, don't... */ > > + if (next_mmu_context < FIRST_CONTEXT) > > If FIRST_CONTEXT is 0, this will generate a compiler warning (as > next_mmu_context can't be < 0). Same as above, existing code moved from mmu_context_32.c, not the place to change that though it's a good catch. I don't think I still have this issue after the next patch but I'll dbl check. > > +config PPC_MMU_NOHASH_32 > > + def_bool y > > + depends on PPC_MMU_NOHASH && PPC32 > > + > > +config PPC_MMU_NOHASH_64 > > + def_bool y > > + depends on PPC_MMU_NOHASH && PPC64 > > Neither of these are used anywhere. Right well... I had something in mind for those that didn't make it into this patch, I can remove them. Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev