Re: [PATCHv3] powerpc: convert relocs_check to a shell script using grep
On Sun, Mar 15, 2015 at 10:08:47PM +1100, Stephen Rothwell wrote: > This runs a bit faster and removes another use of perl from > the kernel build. > > Signed-off-by: Stephen Rothwell I only wrote it in perl because ... lazy. Kill it with fire. Acked-By: Tony Breeds Yours Tony. pgpPjZcz7Lh5E.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/2] powerpc: Add a proper syscall for switching endianness
On Fri, Mar 13, 2015 at 05:38:46PM +1100, Michael Ellerman wrote: > According to Paul there are no working implementations of LE on 32-bit cpus, > so > the syscall doesn't really make sense there. Ummm that doesn't sound right. I don't think there is an LE linux userspace but I'm pretty sure we had 32-bit working on 44x. Check where Ian did the initial LE patchset. Yours Tony. pgpSc3geHj_hd.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] powerpc: Remove more traces of bootmem
On Thu, Nov 20, 2014 at 11:07:38AM +1100, Michael Ellerman wrote: > Although we are now selecting NO_BOOTMEM, we still have some traces of > bootmem lying around. That is because even with NO_BOOTMEM there is > still a shim that converts bootmem calls into memblock calls, but > ultimately we want to remove all traces of bootmem. > > Most of the patch is conversions from alloc_bootmem() to > memblock_virt_alloc(). In general a call such as: > > p = (struct foo *)alloc_bootmem(x); > > Becomes: > > p = memblock_virt_alloc(x, 0); > > We don't need the cast because memblock_virt_alloc() returns a void *. > The alignment value of zero tells memblock to use the default alignment, > which is SMP_CACHE_BYTES, the same value alloc_bootmem() uses. > > We remove a number of NULL checks on the result of > memblock_virt_alloc(). That is because memblock_virt_alloc() will panic > if it can't allocate, in exactly the same way as alloc_bootmem(), so the > NULL checks are and always have been redundant. > > The memory returned by memblock_virt_alloc() is already zeroed, so we > remove several memsets of the result of memblock_virt_alloc(). > > Finally we convert a few uses of __alloc_bootmem(x, y, MAX_DMA_ADDRESS) > to just plain memblock_virt_alloc(). We don't use memblock_alloc_base() > because MAX_DMA_ADDRESS is ~0ul on powerpc, so limiting the allocation > to that is pointless, 16XB ought to be enough for anyone. > > Signed-off-by: Michael Ellerman > --- > --- a/arch/powerpc/lib/alloc.c > +++ b/arch/powerpc/lib/alloc.c > @@ -13,9 +13,7 @@ void * __init_refok zalloc_maybe_bootmem(size_t size, gfp_t > mask) > if (mem_init_done) > p = kzalloc(size, mask); > else { > - p = alloc_bootmem(size); > - if (p) > - memset(p, 0, size); > + p = memblock_virt_alloc(size, 0); > } You knew someone would ask but ... Do you want to remove the {} form the else clause so that the style matches the if() Yours Tony. pgp6m6O8tBtsv.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/boot: Don't install zImage.* from make install
in commit 29f1aff2c (powerpc: Copy bootable images in the default install script) we changed to copying all the built boot targets based on the assumption that it's backwards compatible. It turns out that debian devived installkernel scripts will barf if not given exactly 4 args. This change reverts make install to just install the vmlinux (we can change the dfault in a seperate patch) and introduces a new make zInstall which works with a more flexible installkernel script. Cc: Grant Likely Signed-off-by: Tony Breeds --- arch/powerpc/boot/Makefile | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index ccc25ed..8a5bc1c 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -389,7 +389,12 @@ $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) @rm -f $@; ln $< $@ +# Only install the vmlinux install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) + sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" + +# Install the vmlinux and other built boot targets. +zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^ # anything not in $(targets) -- 1.9.3 Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [tip:timers/core] timekeeping: Fixup typo in update_vsyscall_old definition
On Tue, Aug 12, 2014 at 08:30:40AM -0700, John Stultz wrote: > Thanks for pointing it out. I'll send a fix here shortly (though I only > have the ppc64le toolchain handy, so forgive me if its not quite right). /me pimps the kernel.org toolchains: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_powerpc64-linux.tar.xz and gets back in his box. Yours Tony pgpNzT9tmu0Lr.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Kernel build issues after yesterdays merge by Linus
On Thu, Jun 12, 2014 at 10:09:12PM +1000, Anton Blanchard wrote: > The TOC symbol export is special and I think we might need to get our > script to ignore it. Try this (untested) patch. If it's good I'll send it to Ben. diff --git a/arch/powerpc/relocs_check.pl b/arch/powerpc/relocs_check.pl index 3f46e8b..34e3f25 100755 --- a/arch/powerpc/relocs_check.pl +++ b/arch/powerpc/relocs_check.pl @@ -45,6 +45,9 @@ while () { /\bR_PPC_ADDR16_HA\b/ or /\bR_PPC_RELATIVE\b/ or /\bR_PPC_NONE\b/); + # The TOC is "special" so let's ignore it. + next if (/__crc_TOC\./); + # If we see this type of relocation it's an idication that # we /may/ be using an old version of binutils. if (/R_PPC64_UADDR64/) { > Shows how much we use make install :) Below is a quick hack to get you going > but we should look at either fixing the Ubuntu installkernel to handle > extra optional args, or stop passing them from the ppc64 kernel > install.sh script. It seems like passign the zImage files is probably wrong. How about: diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index ccc25ed..146d898 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -390,7 +390,7 @@ $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) @rm -f $@; ln $< $@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y)) - sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $^ + sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" # anything not in $(targets) clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \ pgpB9qeLlAzXL.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/le: Show the endianess of the LPAR under PowerVM.
Signed-off-by: Tony Breeds --- arch/powerpc/platforms/pseries/setup.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 972df0f..5a32caa 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -516,7 +516,11 @@ static void __init pSeries_setup_arch(void) static int __init pSeries_init_panel(void) { /* Manually leave the kernel version on the panel. */ +#ifdef __BIG_ENDIAN__ ppc_md.progress("Linux ppc64\n", 0); +#else + ppc_md.progress("Linux ppc64le\n", 0); +#endif ppc_md.progress(init_utsname()->version, 0); return 0; -- 1.8.5.3 Yours Tony pgpn_jgEk0TVp.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/le: Avoid creatng R_PPC64_TOCSAVE relocations for modules.
When building modules with a native le toolchain the linker will generate R_PPC64_TOCSAVE relocations when it's safe to omit saving r2 on a plt call. This isn't helpful in the conext of a kernel module and the kernel will fail to load those modules with an error like: nf_conntrack: Unknown ADD relocation: 109 This patch tells the linker to avoid createing R_PPC64_TOCSAVE relocations allowing modules to load. Signed-off-by: Tony Breeds --- arch/powerpc/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 0f4344e..fff3945 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -74,6 +74,9 @@ override CROSS32AS += -mlittle-endian LDEMULATION:= lppc GNUTARGET := powerpcle MULTIPLEWORD := -mno-multiple +ifeq ($(call cc-option-yn,-mno-save-toc-indirect),y) + KBUILD_CFLAGS_MODULE += -mno-save-toc-indirect +endif else ifeq ($(call cc-option-yn,-mbig-endian),y) override CC+= -mbig-endian -- 1.8.5.3 Yours Tony pgpbuc0SfuHi0.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: ftrace: bugfix for test_24bit_addr
On Wed, Feb 26, 2014 at 11:22:16PM +1100, Michael Ellerman wrote: > ppc_function_entry() just needs to be a nop on LE, as it already is on 32-bit. Well on LE ABI2, but yes. Yours Tony pgpHb6onHPwUw.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
Currently we're storing a host endian RTAS token in rtas_stop_self_args.token. We then pass that directly to rtas. This is fine on big endian however on little endian the token is not what we expect. This will typically result in hitting: panic("Alas, I survived.\n"); To fix this we always use the stop-self token in host order and always convert it to be32 before passing this to rtas. Signed-off-by: Tony Breeds Cc: sta...@vger.kernel.org --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 82789e7..0ea99e3 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -35,12 +35,7 @@ #include "offline_states.h" /* This version can't take the spinlock, because it never returns */ -static struct rtas_args rtas_stop_self_args = { - .token = RTAS_UNKNOWN_SERVICE, - .nargs = 0, - .nret = 1, - .rets = &rtas_stop_self_args.args[0], -}; +static int rtas_stop_self_token = RTAS_UNKNOWN_SERVICE; static DEFINE_PER_CPU(enum cpu_state_vals, preferred_offline_state) = CPU_STATE_OFFLINE; @@ -93,15 +88,20 @@ void set_default_offline_state(int cpu) static void rtas_stop_self(void) { - struct rtas_args *args = &rtas_stop_self_args; + struct rtas_args args = { + .token = cpu_to_be32(rtas_stop_self_token), + .nargs = 0, + .nret = 1, + .rets = &args.args[0], + }; local_irq_disable(); - BUG_ON(args->token == RTAS_UNKNOWN_SERVICE); + BUG_ON(rtas_stop_self_token == RTAS_UNKNOWN_SERVICE); printk("cpu %u (hwid %u) Ready to die...\n", smp_processor_id(), hard_smp_processor_id()); - enter_rtas(__pa(args)); + enter_rtas(__pa(&args)); panic("Alas, I survived.\n"); } @@ -392,10 +392,10 @@ static int __init pseries_cpu_hotplug_init(void) } } - rtas_stop_self_args.token = rtas_token("stop-self"); + rtas_stop_self_token = rtas_token("stop-self"); qcss_tok = rtas_token("query-cpu-stopped-state"); - if (rtas_stop_self_args.token == RTAS_UNKNOWN_SERVICE || + if (rtas_stop_self_token == RTAS_UNKNOWN_SERVICE || qcss_tok == RTAS_UNKNOWN_SERVICE) { printk(KERN_INFO "CPU Hotplug not supported by firmware " "- disabling.\n"); -- 1.8.1.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: error compiling ptrace in current mainline git
On Fri, Jul 12, 2013 at 10:27:41AM -0600, Chris Friesen wrote: > Hi all, > > I'm trying to build current mainline git with gcc version 4.4.1 as a > cross compiler and I'm getting the following: > > > CC arch/powerpc/kernel/ptrace.o > {standard input}: Assembler messages: > {standard input}:1619: Error: junk at end of line: `1' > Any ideas on how to deal with this? Is this a code error or a > compiler error? It could be either can you: a) try the 4.6.3 cross compiler from: https://www.kernel.org/pub/tools/crosstool/ b) Try a ppc64_defconfig build. If the newer compiler with your .config fixes it it's a compiler issue. If chaning the config with you 4.4.1 compiler fixes it please post you .config to see if we can work out what's going on. Also when you say "current mainline git" I assume you mean the HEAD of linus's tree not Ben's right? Yours Tony pgpB2Im4XiazS.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: IBM OpenPower 720 ipr driver woes
On Mon, Jun 03, 2013 at 09:40:52PM -0400, Robert Knight wrote: > On 6/3/2013 8:01 PM, Tony Breeds wrote: > >On Mon, Jun 03, 2013 at 05:20:12PM -0400, Robert Knight wrote: > > > >>>Device tree struct 0x0482 -> 0x0484 > >>>Calling quiesce... > >>>returning from prom_init > >>>[1.376359] ehci-pci :c8:01.2: can't setup > >Can you try adding "debug" to the kernel commandline. We're missing a > >great chunk of detail. If you're starting from scratch either try F18 or > >the F19 Beta (if you're brave :)) > > > >Yours Tony > So, two points. Since I have no live disks, I can't copy the dmesg > output in dracut onto a disk and just sent it to you -- the only way > that I know to get it is cut and paste from a HMC console window > into a vi buffer. Okay, when I've been in that situation, I run "script" locally and then conenct to the HMC console. When you're done you can exit script adn then a file called typescript will exist in the directory you ran script in. It's a less overhead way of doign what you're already doing. [0.087097] NET: Registered protocol family 16 > [0.087144] pseries_eeh_init: RTAS service and > bm,get-config-addr-info> invalid > [0.087155] eeh_init: Failed to call platform init function (-22) Hmm this seems pretty strange to me. Gavin are these RTAS tokens supported on older power5 boxes? Yours Tony pgphy7uesd9Ge.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: IBM OpenPower 720 ipr driver woes
On Mon, Jun 03, 2013 at 05:20:12PM -0400, Robert Knight wrote: > >Device tree struct 0x0482 -> 0x0484 > >Calling quiesce... > >returning from prom_init > >[1.376359] ehci-pci :c8:01.2: can't setup Can you try adding "debug" to the kernel commandline. We're missing a great chunk of detail. If you're starting from scratch either try F18 or the F19 Beta (if you're brave :)) Yours Tony pgpHmmSknjlsw.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Update currituck pci/usb fixup for new board revision
On Thu, May 09, 2013 at 10:42:13AM +1000, Alistair Popple wrote: > The currituck board uses a different IRQ for the pci usb host > controller depending on the board revision. This patch adds support > for newer board revisions by retrieving the board revision from the > FPGA and mapping the appropriate IRQ. > > Signed-off-by: Alistair Popple Acked-by: Tony Breeds Yours Tony pgp6258pwIZwa.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCHv4 1/2] ppc64: perform proper max_bus_speed detection
On Thu, May 02, 2013 at 12:21:37PM -0300, Kleber Sacilotto de Souza wrote: > Hi Tony, > > It seems Lucas' change is a bit incomplete and is not handling the reference > counter to > the device_node correctly. Is the following change what you had in mind? Ahh Sorry I expected there would be a for_each_parent_of_node macro. I did a quick grep and it seems that's not very common, so open coding it should be fine. > > dn = pcibios_get_phb_of_node(bus); > if (!dn) > return 0; > > for (pdn = dn; pdn != NULL; pdn = of_get_next_parent(pdn)) { > pcie_link_speed_stats = (const uint32_t *) of_get_property(pdn, > "ibm,pcie-link-speed-stats", NULL); > if (pcie_link_speed_stats) > break; > } > > of_node_put(pdn); I think you need the of_node_put() in the body of the loop, otherwise aren't you leaking refcounts? Yours Tony pgpwRUenn1A7K.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCHv4 1/2] ppc64: perform proper max_bus_speed detection
On Wed, Apr 24, 2013 at 07:54:49PM -0300, luca...@linux.vnet.ibm.com wrote: > From: Lucas Kannebley Tavares > > On pseries machines the detection for max_bus_speed should be done > through an OpenFirmware property. This patch adds a function to perform > this detection and a hook to perform dynamic adding of the function only for > pseries. This is done by overwriting the weak > pcibios_root_bridge_prepare function which is called by pci_create_root_bus(). > > Signed-off-by: Lucas Kannebley Tavares > --- > arch/powerpc/include/asm/machdep.h | 2 ++ > arch/powerpc/kernel/pci-common.c | 8 + > arch/powerpc/platforms/pseries/pci.c | 51 > > arch/powerpc/platforms/pseries/pseries.h | 4 +++ > arch/powerpc/platforms/pseries/setup.c | 2 ++ > 5 files changed, 67 insertions(+) > > diff --git a/arch/powerpc/include/asm/machdep.h > b/arch/powerpc/include/asm/machdep.h > index 3d6b410..8f558bf 100644 > --- a/arch/powerpc/include/asm/machdep.h > +++ b/arch/powerpc/include/asm/machdep.h > @@ -107,6 +107,8 @@ struct machdep_calls { > void(*pcibios_fixup)(void); > int (*pci_probe_mode)(struct pci_bus *); > void(*pci_irq_fixup)(struct pci_dev *dev); > + int (*pcibios_root_bridge_prepare)(struct pci_host_bridge > + *bridge); > > /* To setup PHBs when using automatic OF platform driver for PCI */ > int (*pci_setup_phb)(struct pci_controller *host); > diff --git a/arch/powerpc/kernel/pci-common.c > b/arch/powerpc/kernel/pci-common.c > index fa12ae4..80986cf 100644 > --- a/arch/powerpc/kernel/pci-common.c > +++ b/arch/powerpc/kernel/pci-common.c > @@ -844,6 +844,14 @@ int pci_proc_domain(struct pci_bus *bus) > return 1; > } > > +int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) > +{ > + if (ppc_md.pcibios_root_bridge_prepare) > + return ppc_md.pcibios_root_bridge_prepare(bridge); > + > + return 0; > +} > + > /* This header fixup will do the resource fixup for all devices as they are > * probed, but not for bridge ranges > */ > diff --git a/arch/powerpc/platforms/pseries/pci.c > b/arch/powerpc/platforms/pseries/pci.c > index 0b580f4..7f9c956 100644 > --- a/arch/powerpc/platforms/pseries/pci.c > +++ b/arch/powerpc/platforms/pseries/pci.c > @@ -108,3 +108,54 @@ static void fixup_winbond_82c105(struct pci_dev* dev) > } > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, >fixup_winbond_82c105); > + > +int pseries_root_bridge_prepare(struct pci_host_bridge *bridge) > +{ > + struct device_node *dn, *pdn; > + struct pci_bus *bus; > + const uint32_t *pcie_link_speed_stats; > + > + bus = bridge->bus; > + > + dn = pcibios_get_phb_of_node(bus); > + if (!dn) > + return 0; > + > + for (pdn = dn; pdn != NULL; pdn = pdn->parent) { > + pcie_link_speed_stats = (const uint32_t *) of_get_property(dn, > + "ibm,pcie-link-speed-stats", NULL); > + if (pcie_link_speed_stats) > + break; > + } Please use the helpers in include/linux/of.h rather than open coding this. Yours Tony pgpTiexFyqHWG.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v2] powerpc: Wireup the kcmp syscall to sys_ni
Since kmp takes 2 unsigned long args there should be a compat wrapper. Since one isn't provided I think it's safer just to hook this up to not implemented. If we need it later we can do it properly then. Signed-off-by: Tony Breeds --- Changes since v1: - Add comment to make finding the syscall later - thanks sfr arch/powerpc/include/asm/systbl.h | 1 + arch/powerpc/include/asm/unistd.h | 2 +- arch/powerpc/include/uapi/asm/unistd.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 535b6d8..ebbec52 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h @@ -358,3 +358,4 @@ SYSCALL_SPU(setns) COMPAT_SYS(process_vm_readv) COMPAT_SYS(process_vm_writev) SYSCALL(finit_module) +SYSCALL(ni_syscall) /* sys_kcmp */ diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index f25b5c4..1487f0f 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h @@ -12,7 +12,7 @@ #include -#define __NR_syscalls 354 +#define __NR_syscalls 355 #define __NR__exit __NR_exit #define NR_syscalls__NR_syscalls diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h index 8c478c6..74cb4d7 100644 --- a/arch/powerpc/include/uapi/asm/unistd.h +++ b/arch/powerpc/include/uapi/asm/unistd.h @@ -376,6 +376,7 @@ #define __NR_process_vm_readv 351 #define __NR_process_vm_writev 352 #define __NR_finit_module 353 +#define __NR_kcmp 354 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ -- 1.8.1.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: Wireup the kcmp syscall to sys_ni
Since kmp takes 2 unsigned long args there should be a compat wrapper. Since one isn't provided I think it's safer just to hook this up to not implemented. If we need it later we can do it properly then. Signed-off-by: Tony Breeds --- arch/powerpc/include/asm/systbl.h | 1 + arch/powerpc/include/asm/unistd.h | 2 +- arch/powerpc/include/uapi/asm/unistd.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 535b6d8..289bb52 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h @@ -358,3 +358,4 @@ SYSCALL_SPU(setns) COMPAT_SYS(process_vm_readv) COMPAT_SYS(process_vm_writev) SYSCALL(finit_module) +SYSCALL(ni_syscall) diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index f25b5c4..1487f0f 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h @@ -12,7 +12,7 @@ #include -#define __NR_syscalls 354 +#define __NR_syscalls 355 #define __NR__exit __NR_exit #define NR_syscalls__NR_syscalls diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h index 8c478c6..74cb4d7 100644 --- a/arch/powerpc/include/uapi/asm/unistd.h +++ b/arch/powerpc/include/uapi/asm/unistd.h @@ -376,6 +376,7 @@ #define __NR_process_vm_readv 351 #define __NR_process_vm_writev 352 #define __NR_finit_module 353 +#define __NR_kcmp 354 #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ -- 1.8.1.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] ppc32: Fix compile of sha1-powerpc-asm.S
When building with CRYPTO_SHA1_PPC enabled we fail with: --- powerpc/crypto/sha1-powerpc-asm.S: Assembler messages: powerpc/crypto/sha1-powerpc-asm.S:116: Error: can't resolve `0' {*ABS* section} - `STACKFRAMESIZE' {*UND* section} powerpc/crypto/sha1-powerpc-asm.S:116: Error: expression too complex powerpc/crypto/sha1-powerpc-asm.S:178: Error: unsupported relocation against STACKFRAMESIZE --- Use INT_FRAME_SIZE instead. Signed-off-by: Tony Breeds --- arch/powerpc/crypto/sha1-powerpc-asm.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) FWIW the SHA1_PPC makes about a 20% difference on my 32bit board diff --git a/arch/powerpc/crypto/sha1-powerpc-asm.S b/arch/powerpc/crypto/sha1-powerpc-asm.S index a5f8264..125e165 100644 --- a/arch/powerpc/crypto/sha1-powerpc-asm.S +++ b/arch/powerpc/crypto/sha1-powerpc-asm.S @@ -113,7 +113,7 @@ STEPUP4((t)+16, fn) _GLOBAL(powerpc_sha_transform) - PPC_STLU r1,-STACKFRAMESIZE(r1) + PPC_STLU r1,-INT_FRAME_SIZE(r1) SAVE_8GPRS(14, r1) SAVE_10GPRS(22, r1) @@ -175,5 +175,5 @@ _GLOBAL(powerpc_sha_transform) REST_8GPRS(14, r1) REST_10GPRS(22, r1) - addir1,r1,STACKFRAMESIZE + addir1,r1,INT_FRAME_SIZE blr -- 1.8.1.2 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: Add asm/debug.h to get powerpc_debugfs_root
Since the "Disintegrate asm/system.h for PowerPC" (ae3a197e3d0bfe3f4bf1693723e82dc018c096f3) This has been failing when DEBUG is #defined. Signed-off-by: Tony Breeds --- arch/powerpc/kernel/prom.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 8dfd43f..3bd6c84 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -57,6 +57,7 @@ #include #include +#include #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) -- 1.7.7.6 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/47x: Use the new ppc-opcode intrastructiure.
Don't use 47x only #defines for TLBIVAX or ICBT, supply and use helpers in ppc-opcode.h This fixes a compile breakage. Signed-off-by: Tony Breeds --- arch/powerpc/include/asm/ppc-opcode.h |4 arch/powerpc/mm/tlb_nohash_low.S | 15 --- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index 4c25319..b5ed49c 100644 --- a/arch/powerpc/include/asm/ppc-opcode.h +++ b/arch/powerpc/include/asm/ppc-opcode.h @@ -86,6 +86,7 @@ #define PPC_INST_DCBA_MASK 0xfc0007fe #define PPC_INST_DCBAL 0x7c2005ec #define PPC_INST_DCBZL 0x7c2007ec +#define PPC_INST_ICBT 0x7c2c #define PPC_INST_ISEL 0x7c1e #define PPC_INST_ISEL_MASK 0xfc3e #define PPC_INST_LDARX 0x7ca8 @@ -197,6 +198,7 @@ #define __PPC_MB(s)(((s) & 0x1f) << 6) #define __PPC_ME(s)(((s) & 0x1f) << 1) #define __PPC_BI(s)(((s) & 0x1f) << 16) +#define __PPC_CT(t)(((t) & 0x0f) << 21) /* * Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a @@ -259,6 +261,8 @@ __PPC_RS(t) | __PPC_RA0(a) | __PPC_RB(b)) #define PPC_SLBFEE_DOT(t, b) stringify_in_c(.long PPC_INST_SLBFEE | \ __PPC_RT(t) | __PPC_RB(b)) +#define PPC_ICBT(c,a,b)stringify_in_c(.long PPC_INST_ICBT | \ + __PPC_CT(c) | __PPC_RA0(a) | __PPC_RB(b)) /* PASemi instructions */ #define LBZCIX(t,a,b) stringify_in_c(.long PPC_INST_LBZCIX | \ __PPC_RT(t) | __PPC_RA(a) | __PPC_RB(b)) diff --git a/arch/powerpc/mm/tlb_nohash_low.S b/arch/powerpc/mm/tlb_nohash_low.S index fab919f..626ad08 100644 --- a/arch/powerpc/mm/tlb_nohash_low.S +++ b/arch/powerpc/mm/tlb_nohash_low.S @@ -191,12 +191,6 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x) #ifdef CONFIG_PPC_47x /* - * 47x variant of icbt - */ -# define ICBT(CT,RA,RB)\ - .long 0x7c2c | ((CT) << 21) | ((RA) << 16) | ((RB) << 11) - -/* * _tlbivax_bcast is only on 47x. We don't bother doing a runtime * check though, it will blow up soon enough if we mistakenly try * to use it on a 440. @@ -208,8 +202,7 @@ _GLOBAL(_tlbivax_bcast) wrteei 0 mtspr SPRN_MMUCR,r5 isync -/* tlbivax 0,r3 - use .long to avoid binutils deps */ - .long 0x7c000624 | (r3 << 11) + PPC_TLBIVAX(0, R3) isync eieio tlbsync @@ -227,11 +220,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_476_DD2) bl 2f 2: mflrr6 li r7,32 - ICBT(0,r6,r7) /* touch next cache line */ + PPC_ICBT(0,R6,R7) /* touch next cache line */ add r6,r6,r7 - ICBT(0,r6,r7) /* touch next cache line */ + PPC_ICBT(0,R6,R7) /* touch next cache line */ add r6,r6,r7 - ICBT(0,r6,r7) /* touch next cache line */ + PPC_ICBT(0,R6,R7) /* touch next cache line */ sync nop nop -- 1.7.7.6 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH V5 2/3] powerpc/swiotlb: Enable at early stage and disable if not necessary
On Wed, Aug 08, 2012 at 02:03:45PM -0500, Kumar Gala wrote: > > On Aug 3, 2012, at 5:14 AM, Jia Hongtao wrote: > > > Remove the dependency on PCI initialization for SWIOTLB initialization. > > So that PCI can be initialized at proper time. > > > > SWIOTLB is partly determined by PCI inbound/outbound map which is assigned > > in PCI initialization. But swiotlb_init() should be done at the stage of > > mem_init() which is much earlier than PCI initialization. So we reserve the > > memory for SWIOTLB first and free it if not necessary. > > > > All boards are converted to fit this change. > > > > Signed-off-by: Jia Hongtao > > Signed-off-by: Li Yang > > --- > > arch/powerpc/include/asm/swiotlb.h |6 ++ > > arch/powerpc/kernel/dma-swiotlb.c| 20 > > arch/powerpc/mm/mem.c|3 +-- > > arch/powerpc/platforms/44x/currituck.c | 10 ++ > > arch/powerpc/platforms/85xx/mpc85xx_ds.c |1 + > > arch/powerpc/platforms/85xx/qemu_e500.c |1 + > > arch/powerpc/sysdev/fsl_pci.c|5 + > > 7 files changed, 32 insertions(+), 14 deletions(-) > > Josh, Tony > > Can you ack the 44x/currituck.c change. Looks fine to me. Acked-by: Tony Breeds Yours Tony pgplQWNNfUudd.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: 3.5+: yaboot, Invalid memory access
On Mon, Jul 30, 2012 at 10:46:39PM -0700, Christian Kujau wrote: > Hi, > > when trying to upgrade from 3.5 (final) to today's git checkout from > Linus' tree, yaboot cannot boot and the following is printed: > > [...] > returning from prom_init > Invalid memory access at %SRR0: 00c62fd4 %SRR1: 3030 > > The whole message: http://nerdbynature.de/bits/3.5.0/yaboot/ > > The Yaboot version is 1.3.16 (from Debian/testing), I haven't tried 1.3.17 > yet, its changelog does not say anything about "newer kernel support" so > I'm not sure if this would help here. Well the "returning from prom_init" message is from the kernel so yaboot has done something. We'll work out if it was the right thing ;P I had a look at the URL you provided. 1) can you also upload you vmlinux so we can poke at it. 2) What is the dmseg.txt file there? If you're unable to boot 3.5 how did you get the dmesg? Yours Tony pgpzZ9nVBF0M8.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] radeonfb: Add quirk for the graphics adapter in some JSxx
On Wed, Jul 18, 2012 at 06:49:04PM +0200, o...@aepfle.de wrote: Thanks for following this up. > From: Tony Breeds > > These devices are set to 640x480 by firmware, switch them to 800x600@60 > so that the graphical installer can run on remote console. > > Reported by IBM during SLES10 SP2 beta testing: > > https://bugzilla.novell.com/show_bug.cgi?id=461002 > LTC50817 > > Signed-off-by: Olaf Hering Signed-off-by: Tony Breeds Yours Tony pgpIfaSfwpVu2.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: fix uninitialised error in numa.c
On Wed, Jun 20, 2012 at 02:17:47PM +1000, Michael Neuling wrote: > chroma_defconfig currently gives me this with gcc 4.6: > arch/powerpc/mm/numa.c:638:13: error: 'dm' may be used uninitialized in > this function [-Werror=uninitialized] > > It's a bogus warning since of_get_drconf_memory() only writes it > anyway. > > Signed-off-by: Michael Neuling > cc: sta...@kernel.org > --- > Also affects 3.4 and 3.3 stable. > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > index 5ca3a15..880acde 100644 > --- a/arch/powerpc/mm/numa.c > +++ b/arch/powerpc/mm/numa.c > @@ -637,7 +637,7 @@ static inline int __init read_usm_ranges(const u32 **usm) > */ > static void __init parse_drconf_memory(struct device_node *memory) > { > - const u32 *dm, *usm; > + const u32 *dm = NULL, *usm; Woot bikeshed! I think that's what the uninitialized_var() macro is for. Yours Tony pgpy26WRBbXGg.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v2] powerpc/boot: Only build board support files when required.
Currently we build all board files regardless of the final zImage target. This is sub-optimal (in terms on compilation) and leads to problems in one platform needlessly causing failures for other platforms. Use the Kconfig variables to selectively construct this board files to build. Signed-off-by: Tony Breeds --- arch/powerpc/boot/Makefile | 56 +--- 1 files changed, 37 insertions(+), 19 deletions(-) Changes since v1: - I missed a dependancy for ep8248e.c on planetcore.c, this caused the 6xx_defconfig to fail. - Use the sorted and de-duplicated src-wlib and src-plat to setup src-boot - Built: 40x/ep405_defconfig 44x/arches_defconfig 44x/bamboo_defconfig44x/bluestone_defconfig 44x/canyonlands_defconfig 44x/currituck_defconfig 44x/ebony_defconfig 44x/eiger_defconfig 44x/icon_defconfig 44x/iss476-smp_defconfig 44x/katmai_defconfig44x/rainier_defconfig 44x/redwood_defconfig 44x/sam440ep_defconfig 44x/sequoia_defconfig 44x/taishan_defconfig 44x/virtex5_defconfig 44x/warp_defconfig 86xx/sbc8641d_defconfig cell_defconfig celleb_defconfigchrp32_defconfig g5_defconfigmaple_defconfig mpc7448_hpc2_defconfig mpc83xx_defconfig mpc85xx_defconfig mpc86xx_defconfig mpc885_ads_defconfigpasemi_defconfig pmac32_defconfigpowerpc-allmodconfig powerpc-allnoconfig ppc40x_defconfig ppc44x_defconfigppc64_defconfig ppc6xx_defconfigps3_defconfig Without problems. diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index e8461cb..c802a90 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -62,26 +62,45 @@ libfdtheader := fdt.h libfdt.h libfdt_internal.h $(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o): \ $(addprefix $(obj)/,$(libfdtheader)) -src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \ +src-wlib-y := string.S crt0.S crtsavres.S stdio.c main.c \ $(libfdt) libfdt-wrapper.c \ ns16550.c serial.c simple_alloc.c div64.S util.S \ - gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ - 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ - cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ - fsl-soc.c mpc8xx.c pq2.c ugecon.c -src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ - cuboot-ebony.c cuboot-hotfoot.c epapr.c treeboot-ebony.c \ - prpmc2800.c \ - ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ - cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \ - cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ - fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \ - cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ - cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ - virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ - cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \ - gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c \ - treeboot-currituck.c + gunzip_util.c elf_util.c $(zlib) devtree.c stdlib.c \ + oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \ + uartlite.c mpc52xx-psc.c +src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c +src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c +src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c +src-wlib-$(CONFIG_PPC_82xx) += pq2.c fsl-soc.c planetcore.c +src-wlib-$(CONFIG_EMBEDDED6xx) += mv64x60.c mv64x60_i2c.c ugecon.c + +src-plat-y := of.c +src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c \ + treeboot-walnut.c cuboot-acadia.c \ + cuboot-kilauea.c simpleboot.c \ + virtex405-head.S virtex.c +src-plat-$(CONFIG_44x) += treeboot-ebony.c cuboot-ebony.c treeboot-bamboo.c \ + cuboot-bamboo.c cuboot-sam440ep.c \ + cuboot-sequoia.c cuboot-rainier.c \ + cuboot-taishan.c cuboot-katmai.c \ + cuboot-warp.c cuboot-yosemite.c \ + treeboot-iss4xx.c treeboot-currituck.c \ + simpleboot.c fixed-head.S virtex.c +src-plat-$(CONFIG_8xx) += cuboot-8xx.c fixed-head.S ep88xc.c redboot-8xx.c +src-plat-$(CONFIG_PPC_MPC52xx) += cuboot-52xx.c +src-plat-$(CONFIG_PPC_82xx) += cuboot-pq2.c fixed-head.S ep8248e.c cuboot
Re: [PATCH] powerpc/boot: Only build board support files when required.
On Tue, Apr 03, 2012 at 11:41:50AM +1000, Stephen Rothwell wrote: > It is more ususal in the kernel makefiles to do something like: > > src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c > src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c > treeboot-walnut.c \ Gah you are right. How about this. From b59e3f86d72fe3e16881ec972602a9bb3e28045a Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Mon, 2 Apr 2012 16:20:35 +1000 Subject: [PATCH] powerpc/boot: Only build board support files when required. Currently we build all board files regardless of the final zImage target. This is sub-optimal (in terms on compilation) and leads to problems in one platform needlessly causing failures for other platforms. Use the Kconfig variables to selectively construct this board files to build. Signed-off-by: Tony Breeds --- arch/powerpc/boot/Makefile | 57 +-- 1 files changed, 38 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index e8461cb..a05d32d 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -62,27 +62,46 @@ libfdtheader := fdt.h libfdt.h libfdt_internal.h $(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o): \ $(addprefix $(obj)/,$(libfdtheader)) -src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \ +src-wlib-y := string.S crt0.S crtsavres.S stdio.c main.c \ $(libfdt) libfdt-wrapper.c \ ns16550.c serial.c simple_alloc.c div64.S util.S \ - gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ - 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ - cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ - fsl-soc.c mpc8xx.c pq2.c ugecon.c -src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ - cuboot-ebony.c cuboot-hotfoot.c epapr.c treeboot-ebony.c \ - prpmc2800.c \ - ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ - cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \ - cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ - fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \ - cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ - cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ - virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ - cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \ - gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c \ - treeboot-currituck.c -src-boot := $(src-wlib) $(src-plat) empty.c + gunzip_util.c elf_util.c $(zlib) devtree.c stdlib.c \ + oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \ + uartlite.c mpc52xx-psc.c +src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c +src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c +src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c +src-wlib-$(CONFIG_PPC_82xx) += pq2.c fsl-soc.c +src-wlib-$(CONFIG_EMBEDDED6xx) += mv64x60.c mv64x60_i2c.c ugecon.c + +src-plat-y := of.c +src-plat-$(CONFIG_40x) += fixed-head.S ep405.c cuboot-hotfoot.c \ + treeboot-walnut.c cuboot-acadia.c \ + cuboot-kilauea.c simpleboot.c \ + virtex405-head.S virtex.c +src-plat-$(CONFIG_44x) += treeboot-ebony cuboot-ebony treeboot-bamboo \ + cuboot-bamboo cuboot-sam440ep.c \ + cuboot-sequoia.c cuboot-rainier.c \ + cuboot-taishan.c cuboot-katmai.c \ + cuboot-warp.c cuboot-yosemite.c \ + treeboot-iss4xx.c treeboot-currituck.c \ + simpleboot.c fixed-head.S virtex.c +src-plat-$(CONFIG_8xx) += cuboot-8xx.c fixed-head.S ep88xc.c redboot-8xx.c +src-plat-$(CONFIG_PPC_MPC52xx) += cuboot-52xx.c +src-plat-$(CONFIG_PPC_82xx) += cuboot-pq2.c fixed-head.S ep8248e.c cuboot-824x.c +src-plat-$(CONFIG_PPC_83xx) += cuboot-83xx.c fixed-head.S redboot-83xx.c +src-plat-$(CONFIG_FSL_SOC_BOOKE) += cuboot-85xx.c cuboot-85xx-cpm2.c +src-plat-$(CONFIG_EMBEDDED6xx) += cuboot-pq2.c cuboot-mpc7448hpc2.c \ + cuboot-c2k.c gamecube-head.S \ + gamecube.c wii-head.S wii.c holly.c \ + prpmc2800.c +src-plat-$(CONFIG_AMIGAONE) += cuboot-amigaone.c +src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c +src-plat-$(CONFIG_EPAPR_BOOT) += epapr.c + +src-wlib := $(sort $(src-wlib-y)) +src-plat := $(sort $(src-plat-y)) +src-boot := $(src-wlib-y) $(src-plat-y) empty.c src-boot := $(addprefix $(obj)/, $(src-boot)) obj-boot := $(addsuffix .o, $(basename $(src-boot))) -- 1.7.
Re: [PATCH] powerpc/boot: Only build board support files when required.
On Tue, Apr 03, 2012 at 11:00:02AM +1000, David Gibson wrote: > Um.. I believe the one platform breaking another is actually working > as intended. I think Paulus did it this way to stop people breaking > platforms other than the one they were working on without realising > it. Well that may have been the original intent but in the thread "Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2" we're seeing 4xx break 8xx as the 8xx binutils (in use) doesn't have a mfdcrx instruction. So by breaking it up we gain a small decrease in compile times, less chance of a very targeted build breaking an unrelated board. We do as you point out potentially delay discovery of breakage for some time. I don't mind either way but the patch is out there now :) Yours Tony pgpC2QTn9rEkc.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc/boot: Only build board support files when required.
Currently we build all board files regardless of the final zImage target. This is sub-optimal (in terms on compilation) and leads to problems in one platform needlessly causing failures for other platforms. Use the Kconfig variables to selectively construct this board files to build. Signed-off-by: Tony Breeds --- arch/powerpc/boot/Makefile | 69 +--- 1 files changed, 52 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index e8461cb..3d4d9ea 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -65,23 +65,58 @@ $(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o): \ src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \ $(libfdt) libfdt-wrapper.c \ ns16550.c serial.c simple_alloc.c div64.S util.S \ - gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ - 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ - cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ - fsl-soc.c mpc8xx.c pq2.c ugecon.c -src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ - cuboot-ebony.c cuboot-hotfoot.c epapr.c treeboot-ebony.c \ - prpmc2800.c \ - ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ - cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \ - cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ - fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \ - cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ - cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ - virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ - cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \ - gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c \ - treeboot-currituck.c + gunzip_util.c elf_util.c $(zlib) devtree.c stdlib.c \ + oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \ + uartlite.c mpc52xx-psc.c +src-plat := of.c +ifeq ($(CONFIG_40x),y) +src-wlib += 4xx.c planetcore.c +src-plat += fixed-head.S ep405.c cuboot-hotfoot.c treeboot-walnut.c \ + cuboot-acadia.c cuboot-kilauea.c \ + simpleboot.c virtex405-head.S virtex.c +endif +ifeq ($(CONFIG_44x),y) +src-wlib += 4xx.c ebony.c bamboo.c +src-plat += treeboot-ebony cuboot-ebony treeboot-bamboo cuboot-bamboo \ + cuboot-sam440ep.c cuboot-sequoia.c cuboot-rainier.c \ + cuboot-taishan.c cuboot-katmai.c cuboot-warp.c \ + cuboot-yosemite.c treeboot-iss4xx.c treeboot-currituck.c \ + simpleboot.c fixed-head.S virtex.c +endif +ifeq ($(CONFIG_8xx),y) +src-wlib += mpc8xx.c planetcore.c +src-plat += cuboot-8xx.c fixed-head.S ep88xc.c redboot-8xx.c +endif +ifeq ($(CONFIG_PPC_MPC52xx),y) +src-plat += cuboot-52xx.c +endif +ifeq ($(CONFIG_PPC_82xx),y) +src-wlib += pq2.c fsl-soc.c +src-plat += cuboot-pq2.c fixed-head.S ep8248e.c cuboot-824x.c +endif +ifeq ($(CONFIG_PPC_83xx),y) +src-plat += cuboot-83xx.c fixed-head.S redboot-83xx.c +endif +ifeq ($(CONFIG_FSL_SOC_BOOKE),y) +src-plat += cuboot-85xx.c cuboot-85xx-cpm2.c +endif +ifeq ($(CONFIG_EMBEDDED6xx),y) +src-wlib += mv64x60.c mv64x60_i2c.c ugecon.c +src-plat += cuboot-pq2.c cuboot-mpc7448hpc2.c cuboot-c2k.c \ + gamecube-head.S gamecube.c wii-head.S wii.c holly.c \ + prpmc2800.c +endif +ifeq ($(CONFIG_AMIGAONE),y) +src-plat += cuboot-amigaone.c +endif +ifeq ($(CONFIG_PPC_PS3),y) +src-plat += ps3-head.S ps3-hvcall.S ps3.c +endif +ifeq ($(CONFIG_EPAPR_BOOT),y) +src-plat += epapr.c +endif +src-wlib := $(sort $(src-wlib)) +src-plat := $(sort $(src-plat)) src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot)) -- 1.7.7.6 Yours Tony pgpaQhQ53q33V.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2
On Mon, Apr 02, 2012 at 12:01:55PM +1000, Benjamin Herrenschmidt wrote: > Ok, I've asked Tony to have a look at splitting the build decision > in arch/powerpc/boot along the same lines as the CPU families... ie only > wrappers for platforms potentially supported by the built kernel. That > should fix it. Please try this patch. Only lightly tested here. I haven't "split up" src-wlib yet as I wanted to verify I'm on the right track. From e0b1ac84bfd539482bc88b943724e577e6b8dfb3 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Mon, 2 Apr 2012 16:20:35 +1000 Subject: [PATCH] powerpc/boot: Only build board support files when required. Currently we build all board files regardless of the final zImage target. This is sub-optimal (in terms on compilation) and leads to problems in one platform needlessly causing failures for other platforms. Use the Kconfig variables to selectively construct this board files to build. Signed-off-by: Tony Breeds --- arch/powerpc/boot/Makefile | 56 +-- 1 files changed, 43 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index e8461cb..a3c4ae0 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -69,19 +69,49 @@ src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \ 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ fsl-soc.c mpc8xx.c pq2.c ugecon.c -src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ - cuboot-ebony.c cuboot-hotfoot.c epapr.c treeboot-ebony.c \ - prpmc2800.c \ - ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ - cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \ - cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ - fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \ - cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ - cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ - virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ - cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \ - gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c \ - treeboot-currituck.c +src-plat := of.c +ifeq ($(CONFIG_40x),y) +src-plat += fixed-head.S ep405.c cuboot-hotfoot.c treeboot-walnut.c \ + cuboot-acadia.c cuboot-kilauea.c \ + simpleboot.c virtex405-head.S virtex.c +endif +ifeq ($(CONFIG_44x),y) +src-plat += treeboot-ebony cuboot-ebony treeboot-bamboo cuboot-bamboo \ + cuboot-sam440ep.c cuboot-sequoia.c cuboot-rainier.c \ + cuboot-taishan.c cuboot-katmai.c cuboot-warp.c \ + cuboot-yosemite.c treeboot-iss4xx.c treeboot-currituck.c \ + simpleboot.c fixed-head.S virtex.c +endif +ifeq ($(CONFIG_8xx),y) +src-plat += cuboot-8xx.c fixed-head.S ep88xc.c redboot-8xx.c +endif +ifeq ($(CONFIG_PPC_MPC52xx),y) +src-plat += cuboot-52xx.c +endif +ifeq ($(CONFIG_PPC_82xx),y) +src-plat += cuboot-pq2.c fixed-head.S ep8248e.c cuboot-824x.c +endif +ifeq ($(CONFIG_PPC_82xx),y) +src-plat += cuboot-83xx.c fixed-head.S redboot-83xx.c +endif +ifeq ($(CONFIG_FSL_SOC_BOOKE),y) +src-plat += cuboot-85xx.c cuboot-85xx-cpm2.c +endif +ifeq ($(CONFIG_EMBEDDED6xx),y) +src-plat += cuboot-pq2.c cuboot-mpc7448hpc2.c cuboot-c2k.c \ + gamecube-head.S gamecube.c wii-head.S wii.c holly.c \ + prpmc2800.c +endif +ifeq ($(CONFIG_AMIGAONE),y) +src-plat += cuboot-amigaone.c +endif +ifeq ($(CONFIG_PPC_PS3),y) +src-plat += ps3-head.S ps3-hvcall.S ps3.c +endif +ifeq ($(CONFIG_EPAPR_BOOT),y) +src-plat += epapr.c +endif +src-plat := $(sort $(src-plat)) src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot)) -- 1.7.7.6 Yours Tony pgpCmtlTdUPZy.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [git pull] Please pull powerpc.git next branch
On Wed, Mar 21, 2012 at 07:02:00PM -0700, Linus Torvalds wrote: > Ok, so this conflicted a bit with the generalized irq-domain stuff > from Grant Likely, and while I tried to fix it up I can't even > compile-test the end result, so you really need to verify my merge and > perhaps send me fixups. Ok? /me pimps his toolchains on kernel.org :) http://kernel.org/pub/tools/crosstool/files/bin/ Bug reports welcome. Yours Tony pgpT585JG47cL.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2
On Wed, Mar 21, 2012 at 02:10:59PM +0200, Robert Berger wrote: > Hi, > > Up to 3.2.x I was able to compile a mainline kernel for the kilauea > board, but... > > http://git.denx.de/?p=linux-denx.git;a=commitdiff;h=075bcf5879225d0c2a119c23d8046b890e051e81 > > shows, that mfdcrx was introduced in the v3.3 kernel. > > The problem is that for ppc-linux-gcc (GCC) 4.2.2 (which comes with the > ELDK 4.2) this assembly instruction is not known and the build breaks. If the instruction is available on your platform but not in your toolchain we can do something ugly (as we hav in the past) and replace "mfdrcx" with ".long ". That will bypass the compiler breakage. > What puzzles me is that also stuff for boards is being compiled which is > not really needed like treeboot-currituck.c even when I configure the > kernel for a kilauea board. Can you either propvide the config file or the name of the config target so I look into why it's enabling the currituck platform. Yours Tony pgp0Vpa0KmIXi.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 0/2] Kdump support for PPC_47x
On Wed, Mar 14, 2012 at 03:52:30PM +0530, Suzuki K. Poulose wrote: > The following series implements Kexec/Kdump support for > PPC_47x based platforms. Doesn't support SMP yet. > > I have tested these patches on simics simulator for ppc476. I'll test these patches on the currituck board I have here early next week. Yours Tony pgpQyiJBhdzYF.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH stable-2.6.27] powerpc: Add more Power7 specific definitions
On Mon, Feb 13, 2012 at 07:35:28AM +0100, Willy Tarreau wrote: > On Mon, Feb 13, 2012 at 11:52:02AM +1100, Michael Neuling wrote: > > stable-2.6.27.60 added c24cb8e5 which uses PV_POWER7 but it's not > > defined. Following patch adds these definitions. > > Thank you for the report Michael, I have no PPC toolchain so I have > not tested this one. Added now. Just pimping the cross toolchains I build: http://kernel.org/pub/tools/crosstool/files/bin/ Yours Tony pgpIjPZj7gOxc.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: linux-next bad Kconfig for drivers/hid
On Thu, Dec 15, 2011 at 11:08:08AM +0100, Jiri Kosina wrote: > Tony, > > have you actually tested this one to work in the configuration you have > been seeing it to fail? > > I don't seem to be able to find any use of '==' in other Kconfig files > (and never used it myself), so I'd like to have confirmation that it > actually works and fixes the problem before I apply it :) Sorry I used '=' instead of '==' and that worked. I figured the '==' was just a typo. Yours Tony pgprX7J3S0olt.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] Only use initrd_end as the limit for alloc_bottom if it's inside the RMO.
From: Paul Mackerras As the kernels and initrd's get bigger boot-loaders and possibly kexec-tools will need to place the initrd outside the RMO. When this happens we end up with no lowmem and the boot doesn't get very far. Only use initrd_end as the limit for alloc_bottom if it's inside the RMO. Signed-off-by: Paul Mackerras Signed-off-by: Tony Breeds --- arch/powerpc/kernel/prom_init.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index cc58486..940dc0c 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -1224,14 +1224,6 @@ static void __init prom_init_mem(void) RELOC(alloc_bottom) = PAGE_ALIGN((unsigned long)&RELOC(_end) + 0x4000); - /* Check if we have an initrd after the kernel, if we do move our bottom -* point to after it -*/ - if (RELOC(prom_initrd_start)) { - if (RELOC(prom_initrd_end) > RELOC(alloc_bottom)) - RELOC(alloc_bottom) = PAGE_ALIGN(RELOC(prom_initrd_end)); - } - /* * If prom_memory_limit is set we reduce the upper limits *except* for * alloc_top_high. This must be the real top of RAM so we can put @@ -1269,6 +1261,15 @@ static void __init prom_init_mem(void) RELOC(alloc_top) = RELOC(rmo_top); RELOC(alloc_top_high) = RELOC(ram_top); + /* +* Check if we have an initrd after the kernel but still inside +* the RMO. If we do move our bottom point to after it. +*/ + if (RELOC(prom_initrd_start) && + RELOC(prom_initrd_start) < RELOC(rmo_top) && + RELOC(prom_initrd_end) > RELOC(alloc_bottom)) + RELOC(alloc_bottom) = PAGE_ALIGN(RELOC(prom_initrd_end)); + prom_printf("memory layout at init:\n"); prom_printf(" memory_limit : %x (16 MB aligned)\n", RELOC(prom_memory_limit)); prom_printf(" alloc_bottom : %x\n", RELOC(alloc_bottom)); -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: linux-next bad Kconfig for drivers/hid
On Mon, Dec 12, 2011 at 12:21:16AM +0100, Jiri Kosina wrote: > On Thu, 8 Dec 2011, Jeremy Fitzhardinge wrote: > > > > Hm. How about making it "depends on HID && POWER_SUPPLY"? I think that > > would needlessly disable it if HID is also modular, but I'm not sure how > > to fix that. "depends on HID && POWER_SUPPLY && HID == POWER_SUPPLY"? That would work, but I think technically I think you could end up with HID=m and POWER_SUPPLY=m which would still allow HID_BATTERY_STRENGTH=y which is the same problem. I don't know what kind of .config contortions you'd need to do to get there. > How about making it 'default POWER_SUPPLY' instead? By itself that wont help as POWER_SUPPLY=m statisfies. So it looks like we have Jeremy's: HID && POWER_SUPPLY && HID == POWER_SUPPLY or my: POWER_SUPPLY=y Yours Tony pgpl7tsBIH7la.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: fix compile error with 85xx/p1010rdb.c
Current linux-next compiled with mpc85xx_defconfig causes this: arch/powerpc/platforms/85xx/p1010rdb.c:41:14: error: 'np' undeclared (first use in this function) arch/powerpc/platforms/85xx/p1023_rds.c:102:14: error: 'np' undeclared (first use in this function) Introduced in: commit 996983b75cebb1bc1c2c545f20336f24ebfa17af Author: Kyle Moffett Date: Fri Dec 2 06:28:02 2011 + powerpc/mpic: Search for open-pic device-tree node if NULL Signed-off-by: Tony Breeds --- Mikey already posted a fix for p1023_rds.c. I think this is the last one. arch/powerpc/platforms/85xx/p1010rdb.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/85xx/p1010rdb.c b/arch/powerpc/platforms/85x index 894f1e8..538bc3f 100644 --- a/arch/powerpc/platforms/85xx/p1010rdb.c +++ b/arch/powerpc/platforms/85xx/p1010rdb.c @@ -38,10 +38,8 @@ void __init p1010_rdb_pic_init(void) 0, 256, " OpenPIC "); BUG_ON(mpic == NULL); - of_node_put(np); mpic_init(mpic); - } Yours Tony pgp0z29bv7Bax.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
linux-next bad Kconfig for drivers/hid
Commit 4f5ca836bef3 (HID: hid-input: add support for HID devices reporting Battery Strength) went into linux-next on Dec 1st since then a ppc6xx_defconfig has been failing with: --- drivers/built-in.o: In function `hidinput_cleanup_battery': /scratch/tony/working/drivers/hid/hid-input.c:351: undefined reference to `power_supply_unregister' drivers/built-in.o: In function `hidinput_setup_battery': /scratch/tony/working/drivers/hid/hid-input.c:338: undefined reference to `power_supply_register' make[1]: *** [.tmp_vmlinux1] Error 1 --- http://kisskb.ellerman.id.au/kisskb/buildresult/5012563/ vs http://kisskb.ellerman.id.au/kisskb/buildresult/5017366/ The defconfig in question doens't mention either option (CONFIG_POWER_SUPPLY or CONFIG_HID_BATTERY_STRENGTH) and kbuild is genertaing CONFIG_HID_BATTERY_STRENGTH=y CONFIG_POWER_SUPPLY=m which clearly isn't going to work. The following change to HID_BATTERY_STRENGTH Kconfig "works" but seems a little gross. diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 5ed64f6..d2a94e6 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -33,7 +33,7 @@ config HID config HID_BATTERY_STRENGTH bool - depends on POWER_SUPPLY + depends on POWER_SUPPLY=y default y config HIDRAW Any chance we can get a fix into linux-next? Yours Tony pgpSLYSwOqVCN.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [linux-3.2-rc4 PPC64] Series of "Section Mismatch" warnings, are they expected ?
On Fri, Dec 09, 2011 at 12:40:32AM +0530, Subrata Modak wrote: > Hello, > > While compiling linux-3.2-rc4 on PPC64, i get the following set of > warning series. I wanted to know if they are expected, or, they need to > be fixed: If you have time they should be fixed. Yours Tony pgpLJnfmz0SFz.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 7/8] 44x/476fpe: Add 476fpe SoC code
On Sat, Dec 03, 2011 at 08:33:40AM -0500, Josh Boyer wrote: > If the plan is to have them go through my tree, I can fix them up when > I apply them. I was expecting them to go through your tree, so it'd be grat if you didn't mind finxing those up. Yours Tony pgpPpuZpwUGxh.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 7/8] 44x/476fpe: Add 476fpe SoC code
On Sat, Dec 03, 2011 at 07:58:17AM +1100, Benjamin Herrenschmidt wrote: > On Thu, 2011-12-01 at 18:39 +1100, Tony Breeds wrote: > > Based on original work by David 'Shaggy' Kliekamp. > > Typo in Shaggy's last name :-) Rats! Looks like I stuffed it up once. Do you need me to respin with these changes or are the minor enough to be done as the patches are applied? Yours Tony pgp5UvMJoOrOF.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Add support for the currituck 476 platform from IBM (v2)
On Thu, Dec 01, 2011 at 06:39:16PM +1100, Tony Breeds wrote: > Patches 1 to 3 > Modify the 44x PCI code to work with 476fpe/currituck. > Patch 4 > Is an old patch by Christoph Egger that fell through the cracks > somehow. > Patches 5 and 6 > Modify the bootwrapper to handle 476fpe/currituck > Patch 7 > The SoC support. > Patch 8 > The currituck board support. Sorry I forgot the diffstat arch/powerpc/boot/Makefile |5 +- arch/powerpc/boot/dcr.h |6 + arch/powerpc/boot/div64.S| 52 ++ arch/powerpc/boot/dts/currituck.dts | 237 ++ arch/powerpc/boot/treeboot-currituck.c | 119 + arch/powerpc/boot/wrapper|3 + arch/powerpc/configs/44x/currituck_defconfig | 110 arch/powerpc/include/asm/reg.h |1 + arch/powerpc/kernel/cputable.c | 14 ++ arch/powerpc/kernel/head_44x.S |2 + arch/powerpc/mm/44x_mmu.c|4 - arch/powerpc/platforms/44x/Kconfig | 14 ++ arch/powerpc/platforms/44x/Makefile |1 + arch/powerpc/platforms/44x/currituck.c | 204 ++ arch/powerpc/sysdev/ppc4xx_pci.c | 85 +- arch/powerpc/sysdev/ppc4xx_pci.h |7 + 16 files changed, 851 insertions(+), 13 deletions(-) Yours Tony pgp7bANgvympg.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 8/8] 44x/currituck: Add support for the new IBM currituck platform
Based on original work by David 'Shaggy' Kliekamp. Signed-off-by: Tony Breeds --- arch/powerpc/boot/Makefile |5 +- arch/powerpc/boot/dts/currituck.dts | 237 ++ arch/powerpc/boot/treeboot-currituck.c | 119 + arch/powerpc/boot/wrapper|3 + arch/powerpc/configs/44x/currituck_defconfig | 110 arch/powerpc/platforms/44x/Kconfig | 10 + arch/powerpc/platforms/44x/Makefile |1 + arch/powerpc/platforms/44x/currituck.c | 204 ++ 8 files changed, 688 insertions(+), 1 deletions(-) create mode 100644 arch/powerpc/boot/dts/currituck.dts create mode 100644 arch/powerpc/boot/treeboot-currituck.c create mode 100644 arch/powerpc/configs/44x/currituck_defconfig create mode 100644 arch/powerpc/platforms/44x/currituck.c Much of the currituck.c code could go into ppc44x_simple.c but that makes finding a home for the quirk code harder. We can always move it there later. diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 72ee8c1..ff0057f 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -45,6 +45,7 @@ $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405 $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405 $(obj)/treeboot-iss4xx.o: BOOTCFLAGS += -mcpu=405 +$(obj)/treeboot-currituck.o: BOOTCFLAGS += -mcpu=405 $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405 @@ -79,7 +80,8 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \ - gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c + gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c \ + treeboot-currituck.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot)) @@ -212,6 +214,7 @@ image-$(CONFIG_WARP)+= cuImage.warp image-$(CONFIG_YOSEMITE) += cuImage.yosemite image-$(CONFIG_ISS4xx) += treeImage.iss4xx \ treeImage.iss4xx-mpic +image-$(CONFIG_CURRITUCK) += treeImage.currituck # Board ports in arch/powerpc/platform/8xx/Kconfig image-$(CONFIG_MPC86XADS) += cuImage.mpc866ads diff --git a/arch/powerpc/boot/dts/currituck.dts b/arch/powerpc/boot/dts/currituck.dts new file mode 100644 index 000..b801dd0 --- /dev/null +++ b/arch/powerpc/boot/dts/currituck.dts @@ -0,0 +1,237 @@ +/* + * Device Tree Source for IBM Embedded PPC 476 Platform + * + * Copyright © 2011 Tony Breeds IBM Corporation + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + */ + +/dts-v1/; + +/memreserve/ 0x01f0 0x0010;// spin table + +/ { + #address-cells = <2>; + #size-cells = <2>; + model = "ibm,currituck"; + compatible = "ibm,currituck"; + dcr-parent = <&{/cpus/cpu@0}>; + + aliases { + serial0 = &UART0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + model = "PowerPC,476"; + reg = <0>; + clock-frequency = <16>; // 1.6 GHz + timebase-frequency = <1>; // 100Mhz + i-cache-line-size = <32>; + d-cache-line-size = <32>; + i-cache-size = <32768>; + d-cache-size = <32768>; + dcr-controller; + dcr-access-method = "native"; + status = "ok"; + }; + cpu@1 { + device_type = "cpu"; + model = "PowerPC,476"; + reg = <1>; + clock-frequency = <16>; // 1.6 GHz + timebase-frequency = <1>; // 100Mhz + i-cache-line-size = <32>; + d-cache-line-size = <32>; + i-cache-size = <32768>; + d-cache-size = <32768>; + dcr-controller; + dcr-access-method = "native"; + status = &qu
[PATCH 7/8] 44x/476fpe: Add 476fpe SoC code
Based on original work by David 'Shaggy' Kliekamp. Signed-off-by: Tony Breeds --- arch/powerpc/include/asm/reg.h |1 + arch/powerpc/kernel/cputable.c | 14 + arch/powerpc/kernel/head_44x.S |2 + arch/powerpc/platforms/44x/Kconfig |4 ++ arch/powerpc/sysdev/ppc4xx_pci.c | 57 +++- arch/powerpc/sysdev/ppc4xx_pci.h |7 6 files changed, 84 insertions(+), 1 deletions(-) I wimped out on doing the mask and test opperations in head_44x.S for the generic 476 PVR. diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 559da19..7fdc2c0 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h @@ -951,6 +951,7 @@ #define PVR_403GCX 0x00201400 #define PVR_405GP 0x4011 #define PVR_4760x11a52000 +#define PVR_476FPE 0x7ff5 #define PVR_STB03XXX 0x4031 #define PVR_NP405H 0x4141 #define PVR_NP405L 0x4161 diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index edae5bb..7797ae2 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -1830,6 +1830,20 @@ static struct cpu_spec __initdata cpu_specs[] = { .machine_check = machine_check_47x, .platform = "ppc470", }, + { /* 476fpe */ + .pvr_mask = 0x, + .pvr_value = 0x7ff5, + .cpu_name = "476fpe", + .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2, + .cpu_user_features = COMMON_USER_BOOKE | + PPC_FEATURE_HAS_FPU, + .mmu_features = MMU_FTR_TYPE_47x | + MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL, + .icache_bsize = 32, + .dcache_bsize = 128, + .machine_check = machine_check_47x, + .platform = "ppc470", + }, { /* 476 iss */ .pvr_mask = 0x, .pvr_value = 0x0005, diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index b725dab..bb7a9c7 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S @@ -732,6 +732,8 @@ _GLOBAL(init_cpu_state) /* We use the PVR to differenciate 44x cores from 476 */ mfspr r3,SPRN_PVR srwir3,r3,16 + cmplwi cr0,r3,PVR_476FPE@h + beq head_start_47x cmplwi cr0,r3,PVR_476@h beq head_start_47x cmplwi cr0,r3,PVR_476_ISS@h diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 762322c..f0be6e0 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig @@ -308,6 +308,10 @@ config 460SX select IBM_EMAC_ZMII select IBM_EMAC_TAH +config 476FPE + bool + select PPC_FPU + config APM821xx bool select PPC_FPU diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 45148ef..ae15e6f 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -1296,6 +1296,52 @@ static struct ppc4xx_pciex_hwops ppc405ex_pcie_hwops __initdata = #endif /* CONFIG_40x */ +#ifdef CONFIG_476FPE +static int __init ppc_476fpe_pciex_core_init(struct device_node *np) +{ + return 4; +} + +static void __init ppc_476fpe_pciex_check_link(struct ppc4xx_pciex_port *port) +{ + u32 timeout_ms = 20; + u32 val = 0, mask = (PECFG_TLDLP_LNKUP|PECFG_TLDLP_PRESENT); + void __iomem *mbase = ioremap(port->cfg_space.start + 0x1000, + 0x1000); + + printk(KERN_INFO "PCIE%d: Checking link...\n", port->index); + + if (mbase == NULL) { + printk(KERN_WARNING "PCIE%d: failed to get cfg space\n", + port->index); + return; + } + + while (timeout_ms--) { + val = in_le32(mbase + PECFG_TLDLP); + + if ((val & mask) == mask) + break; + msleep(10); + } + + if (val & PECFG_TLDLP_PRESENT) { + printk(KERN_INFO "PCIE%d: link is up !\n", port->index); + port->link = 1; + } else + printk(KERN_WARNING "PCIE%d: Link up failed\n", port->index); + + iounmap(mbase); + return; +} + +static struct ppc4xx_pciex_hwops ppc_476fpe_pcie_hwops __initdata = +{ + .core_init = ppc_476fpe_pciex_core_init, + .check_link = ppc_476fpe_pciex_check_link, +}; +#endif /* CONFIG_476FPE */ + /* Check that the core has been initied and if no
[PATCH 6/8] powerpc/boot: Add mfdcrx
Needed for currituck support. Signed-off-by: Tony Breeds --- arch/powerpc/boot/dcr.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) I chose to use a #define to keep with the style of m[tf]dcr in the same file. diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h index 645a7c9..cc73f7a 100644 --- a/arch/powerpc/boot/dcr.h +++ b/arch/powerpc/boot/dcr.h @@ -9,6 +9,12 @@ }) #define mtdcr(rn, val) \ asm volatile("mtdcr %0,%1" : : "i"(rn), "r"(val)) +#define mfdcrx(rn) \ + ({ \ + unsigned long rval; \ + asm volatile("mfdcrx %0,%1" : "=r"(rval) : "r"(rn)); \ + rval; \ + }) /* 440GP/440GX SDRAM controller DCRs */ #define DCRN_SDRAM0_CFGADDR0x010 -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 5/8] powerpc/boot: Add extended precision shifts to the boot wrapper.
The upcomming currituck patches will need to do 64-bit shifts which will fail with undefined symbol without this patch. I looked at linking against libgcc but we can't guarantee that libgcc was compiled with soft-float. Also Using ../lib/div64.S or ../kernel/misc_32.S, this will break the build as the .o's need to be built with different flags for the bootwrapper vs the kernel. So for now the easyest option is to just copy code from arch/powerpc/kernel/misc_32.S I don't think this code changes too often ;P Signed-off-by: Tony Breeds --- arch/powerpc/boot/div64.S | 52 + 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/div64.S b/arch/powerpc/boot/div64.S index d271ab5..bbcb8a4 100644 --- a/arch/powerpc/boot/div64.S +++ b/arch/powerpc/boot/div64.S @@ -57,3 +57,55 @@ __div64_32: stw r8,4(r3) mr r3,r6 # return the remainder in r3 blr + +/* + * Extended precision shifts. + * + * Updated to be valid for shift counts from 0 to 63 inclusive. + * -- Gabriel + * + * R3/R4 has 64 bit value + * R5has shift count + * result in R3/R4 + * + * ashrdi3: arithmetic right shift (sign propagation) + * lshrdi3: logical right shift + * ashldi3: left shift + */ + .globl __ashrdi3 +__ashrdi3: + subfic r6,r5,32 + srw r4,r4,r5# LSW = count > 31 ? 0 : LSW >> count + addir7,r5,32# could be xori, or addi with -32 + slw r6,r3,r6# t1 = count > 31 ? 0 : MSW << (32-count) + rlwinm r8,r7,0,32 # t3 = (count < 32) ? 32 : 0 + srawr7,r3,r7# t2 = MSW >> (count-32) + or r4,r4,r6# LSW |= t1 + slw r7,r7,r8# t2 = (count < 32) ? 0 : t2 + srawr3,r3,r5# MSW = MSW >> count + or r4,r4,r7# LSW |= t2 + blr + + .globl __ashldi3 +__ashldi3: + subfic r6,r5,32 + slw r3,r3,r5# MSW = count > 31 ? 0 : MSW << count + addir7,r5,32# could be xori, or addi with -32 + srw r6,r4,r6# t1 = count > 31 ? 0 : LSW >> (32-count) + slw r7,r4,r7# t2 = count < 32 ? 0 : LSW << (count-32) + or r3,r3,r6# MSW |= t1 + slw r4,r4,r5# LSW = LSW << count + or r3,r3,r7# MSW |= t2 + blr + + .globl __lshrdi3 +__lshrdi3: + subfic r6,r5,32 + srw r4,r4,r5# LSW = count > 31 ? 0 : LSW >> count + addir7,r5,32# could be xori, or addi with -32 + slw r6,r3,r6# t1 = count > 31 ? 0 : MSW << (32-count) + srw r7,r3,r7# t2 = count < 32 ? 0 : MSW >> (count-32) + or r4,r4,r6# LSW |= t1 + srw r3,r3,r5# MSW = MSW >> count + or r4,r4,r7# LSW |= t2 + blr -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 4/8] 44x: Removing dead CONFIG_PPC47x
From: Christoph Egger CONFIG_PPC47x doesn't exist in Kconfig and no 476 processor calls this function ppc44x_pin_tlb() as it has it's own ppc47x_pin_tlb(). This code is probably an artifact of the original 476 code that shouldn't have made it upstream. Signed-off-by: Christoph Egger Signed-off-by: Tony Breeds --- arch/powerpc/mm/44x_mmu.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c index f60e006..5d4e3ff 100644 --- a/arch/powerpc/mm/44x_mmu.c +++ b/arch/powerpc/mm/44x_mmu.c @@ -78,11 +78,7 @@ static void __init ppc44x_pin_tlb(unsigned int virt, unsigned int phys) "tlbwe %1,%3,%5\n" "tlbwe %0,%3,%6\n" : -#ifdef CONFIG_PPC47x - : "r" (PPC47x_TLB2_S_RWX), -#else : "r" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G), -#endif "r" (phys), "r" (virt | PPC44x_TLB_VALID | PPC44x_TLB_256M), "r" (entry), -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 3/8] 44x/pci: Setup the dma_window properties for each pci_controller
Needed if you want to use swiotlb, harmless otherwise. Signed-off-by: Tony Breeds --- arch/powerpc/sysdev/ppc4xx_pci.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index ab3293a..45148ef 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -185,9 +185,15 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose, out: dma_offset_set = 1; pci_dram_offset = res->start; + hose->dma_window_base_cur = res->start; + hose->dma_window_size = resource_size(res); printk(KERN_INFO "4xx PCI DMA offset set to 0x%08lx\n", pci_dram_offset); + printk(KERN_INFO "4xx PCI DMA window base to 0x%016llx\n", + (unsigned long long)hose->dma_window_base_cur); + printk(KERN_INFO "DMA window size 0x%016llx\n", + (unsigned long long)hose->dma_window_size); return 0; } -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/8] 44x/pci: Add a want_sdr flag into ppc4xx_pciex_hwops
Currituck doesn't need nor use SDR so aborting the pci setup if there is no sdr-base would be bad. Add a flag to ppc4xx_pciex_hwops for the backends to state if they need SDR and then only complain and abort if they do and it's not found in the device tree. Signed-off-by: Tony Breeds --- arch/powerpc/sysdev/ppc4xx_pci.c | 20 ++-- 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 16f5eba..ab3293a 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -647,6 +647,7 @@ static unsigned int ppc4xx_pciex_port_count; struct ppc4xx_pciex_hwops { + bool want_sdr; int (*core_init)(struct device_node *np); int (*port_init_hw)(struct ppc4xx_pciex_port *port); int (*setup_utl)(struct ppc4xx_pciex_port *port); @@ -916,6 +917,7 @@ static int ppc440speB_pciex_init_utl(struct ppc4xx_pciex_port *port) static struct ppc4xx_pciex_hwops ppc440speA_pcie_hwops __initdata = { + .want_sdr = true, .core_init = ppc440spe_pciex_core_init, .port_init_hw = ppc440speA_pciex_init_port_hw, .setup_utl = ppc440speA_pciex_init_utl, @@ -924,6 +926,7 @@ static struct ppc4xx_pciex_hwops ppc440speA_pcie_hwops __initdata = static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata = { + .want_sdr = true, .core_init = ppc440spe_pciex_core_init, .port_init_hw = ppc440speB_pciex_init_port_hw, .setup_utl = ppc440speB_pciex_init_utl, @@ -1034,6 +1037,7 @@ static int ppc460ex_pciex_init_utl(struct ppc4xx_pciex_port *port) static struct ppc4xx_pciex_hwops ppc460ex_pcie_hwops __initdata = { + .want_sdr = true, .core_init = ppc460ex_pciex_core_init, .port_init_hw = ppc460ex_pciex_init_port_hw, .setup_utl = ppc460ex_pciex_init_utl, @@ -1181,6 +1185,7 @@ done: } static struct ppc4xx_pciex_hwops ppc460sx_pcie_hwops __initdata = { + .want_sdr = true, .core_init = ppc460sx_pciex_core_init, .port_init_hw = ppc460sx_pciex_init_port_hw, .setup_utl = ppc460sx_pciex_init_utl, @@ -1276,6 +1281,7 @@ static int ppc405ex_pciex_init_utl(struct ppc4xx_pciex_port *port) static struct ppc4xx_pciex_hwops ppc405ex_pcie_hwops __initdata = { + .want_sdr = true, .core_init = ppc405ex_pciex_core_init, .port_init_hw = ppc405ex_pciex_init_port_hw, .setup_utl = ppc405ex_pciex_init_utl, @@ -1972,13 +1978,15 @@ static void __init ppc4xx_probe_pciex_bridge(struct device_node *np) } port->node = of_node_get(np); - pval = of_get_property(np, "sdr-base", NULL); - if (pval == NULL) { - printk(KERN_ERR "PCIE: missing sdr-base for %s\n", - np->full_name); - return; + if (ppc4xx_pciex_hwops->want_sdr == true) { + pval = of_get_property(np, "sdr-base", NULL); + if (pval == NULL) { + printk(KERN_ERR "PCIE: missing sdr-base for %s\n", + np->full_name); + return; + } + port->sdr_base = *pval; } - port->sdr_base = *pval; /* Check if device_type property is set to "pci" or "pci-endpoint". * Resulting from this setup this PCIe port will be configured -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/8] 44x/pci: Use PCI_BASE_ADDRESS_MEM_PREFETCH rather than magic value.
Signed-off-by: Tony Breeds --- arch/powerpc/sysdev/ppc4xx_pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) This patch was somehow missed from the original series. diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 862f11b..16f5eba 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -1739,7 +1739,7 @@ static void __init ppc4xx_configure_pciex_PIMs(struct ppc4xx_pciex_port *port, /* Calculate window size */ sa = (0xull << ilog2(size)); if (res->flags & IORESOURCE_PREFETCH) - sa |= 0x8; + sa |= PCI_BASE_ADDRESS_MEM_PREFETCH; if (of_device_is_compatible(port->node, "ibm,plb-pciex-460sx")) sa |= PCI_BASE_ADDRESS_MEM_TYPE_64; -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Add support for the currituck 476 platform from IBM (v2)
Patches 1 to 3 Modify the 44x PCI code to work with 476fpe/currituck. Patch 4 Is an old patch by Christoph Egger that fell through the cracks somehow. Patches 5 and 6 Modify the bootwrapper to handle 476fpe/currituck Patch 7 The SoC support. Patch 8 The currituck board support. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 6/6] 44x/currituck: Add support for the new IBM currituck platform
On Thu, Dec 01, 2011 at 03:05:24PM +1100, Tony Breeds wrote: > On Wed, Nov 30, 2011 at 05:20:22PM +1100, Benjamin Herrenschmidt wrote: > > On Wed, 2011-11-30 at 16:24 +1100, Tony Breeds wrote: > > > +void platform_init(void) > > > +{ > > > + /* Cap the zImage to 512MB */ > > > > Any reason ? If yes, please document it a bit more. > > XXX Where 'XXX' means come back and anser this point /before/ hitting send. Basically is was lazyness. Now that I know the memsize I'll allow the zImage to use it all but 512MB should be enought for anywone right? Yours Tony pgpfieYQLsLud.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 6/6] 44x/currituck: Add support for the new IBM currituck platform
On Wed, Nov 30, 2011 at 07:23:40AM -0600, Kumar Gala wrote: > Split the board support patches from the SoC support. Will do, as I said to Ben I was confused. > This seems like it should be PVR_476FPE Yup. Fixed. Yours Tony pgpmujvrlooRf.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 6/6] 44x/currituck: Add support for the new IBM currituck platform
On Wed, Nov 30, 2011 at 05:20:22PM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2011-11-30 at 16:24 +1100, Tony Breeds wrote: > > + plb { > > + compatible = "ibm,plb-4xx", "ibm,plb4"; /* Could be PLB6, > > doesn't matter */ > > Then make it plb6 and add it to the probe list. Might have to whack it's > configuration registers one day etc... Done. > > +* XXX: 1 TB address space, do we really care past > > +* 4 GB and should we expand cell width? > > +*/ > > For OPB probably not :-) Fixed. > That doesn't seem like a very useful pair of statements or useful debug > message All the DBG cruft is gone. > > + for(i = 0; i < MAX_RANKS; i++){ > > + reg = mfdcrx(DDR3_MR0CF + i); > > + printf("%s: reg=0x%08x\r\n", __func__, reg); > > All that debug is pretty gross, keep it if you wish but make it a bit > neater and/or wrap it in DBG Yeah that was an oversight. > > + if (reg & 0x01) { > > if (!(reg & 1)) > continue; > > avoids too much indent Done. > > + dt_fixup_memory(0x0ULL, ibm_currituck_memsize); > > Ok, I see why the global... I'd still prefer if the detect function just > returned the value and the caller whacks the global. Fixed. > > + while ((devp = find_node_by_devtype(devp, "pci"))) { > > + if (getprop(devp, "dma-ranges", &dma_ranges[0], > > sizeof(dma_ranges)) < 0) { > > Can't you replace &dma_ranges[0] with just dma_ranges ? Yes, Fixed. > > +#define SPRN_PIR 0x11E /* Processor Indentification Register */ > > That should go elsewhere along with the other SPR definitions. There isn't a std. place in the bootwrapper. > > > +void platform_init(void) > > +{ > > + /* Cap the zImage to 512MB */ > > Any reason ? If yes, please document it a bit more. XXX > > + node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type", > > +"cpu", sizeof("cpu")); > > + if (!node) > > + fatal("Cannot find cpu node\n"); > > The above will return -a- CPU node... you have several and you don't > know which one. You should probably iterate accross all of them. I'm just trying to get the timebase-frequency, this willbe the same on all CPUs (at least I hope so ;P) so I don't really care which CPU node I get. > > + /* FIXME: Check this works */ Grr that comment shouldn't be there. It does work :) > > +#define PVR_476CURRITUCK 0x7ff5 > > My understanding is that the currituck was the platform, not the chip, > and that the chip was called something like 476FPE, am I wrong ? No you're correct, I was confused about the boundry between 476fpe and currituck. > > + cmplwi cr0,r3,PVR_476CURRITUCK@h > > + beq head_start_47x > > So at some point, they gave us the magic foo to do with the PVR to > identify any 476... I'll try to dig that out of my email archives. Yeah I have that I'll work out the correct way to the the mask and test. > > +++ b/arch/powerpc/platforms/44x/ppc47x.c > > Call the file currituck.c Sure. > > +static void __devinit quirk_ppc_currituck_usb_fixup(struct pci_dev *dev) > > +{ > > + pci_write_config_dword(dev, 0xe0, 0x0114231f); > > + pci_write_config_dword(dev, 0xe4, 0x6c40); > > +} > > Pleae document better what you are doing here and also test > that you are indeed on the right platform so you don't end up > whacking bits on USB controllers on other platforms that happen > to be compiled in the same binary. Sure, no problem. > Ok, I'll have to fixup that vs. Kyle patches but the good thing is that > it will make things even simpler. Thanks. > Now pretty much everything in this platform file is generic I believe. > We could move it all to ppc44x_simple.c. The only things that are not > are the USB quirk and the interrupt fixup. > > The USB quirk which should have a compatible test for the platform to > make sure we don't run it on something else. For such a simple quirk, I > think it's fine ot have it in ppc44x_simple.c or in drivers/pci/quirk.c > > For the interrupt fixup, we can probably address it entirely in the > device-tree, though that means exposing a bunch of on-board bridges > which is only midly annoying. > > Anyways, we can discuss that (or maybe an even better option) > tomorrow :-) Okay I look forward to it :) > Again, you are mixing the SoC with the board here. afaik, currituck is > the board, not the SoC. Fixed. Yours Tony pgpRHmTjNPrYI.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/6] 44x/pci: Continue pci setup even if there is no sdr-base in the device-tree
On Wed, Nov 30, 2011 at 04:46:13PM +1100, Benjamin Herrenschmidt wrote: > If you don't expect an sdr-base as part of the normal operations of that > bridge, don't bring a message that makes me think something is wrong :-) > > Just changing the severity isn't enough. you should just remove the > message and later on, print/warn/error out if you decide you actually > need an sdr-base (such as in the backend). Okay no problem. Yours Tony pgpn98I1ey49s.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 5/6] powerpc/boot: Add mfdcrx
On Thu, Dec 01, 2011 at 10:30:27AM +1100, Tony Breeds wrote: > Okay I'll change it to "i", mostly I used a #define to match the style Of course I menat "r" here. Yours Tony pgp2a2sFjknsb.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 5/6] powerpc/boot: Add mfdcrx
On Wed, Nov 30, 2011 at 02:09:20PM +0100, Segher Boessenkool wrote: > >+#define mfdcrx(rn) \ > >+({ \ > >+unsigned long rval; \ > >+asm volatile("mfdcrx %0,%1" : "=r"(rval) : "g"(rn)); \ > >+rval; \ > >+}) > > "g" is never correct on PowerPC, you want "r" here. You can write > this as a static inline btw, you only need the #define stuff when > there is an "i" constraint involved. Okay I'll change it to "i", mostly I used a #define to match the style of m[tf]dcr. To be honnest I didn't know about the issue with "i" constraints and static inlines. Yours Tony pgpS0mxIQ2IzI.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 4/6] powerpc/boot: Add extended precision shifts to the boot wrapper.
On Wed, Nov 30, 2011 at 06:45:37AM -0500, Josh Boyer wrote: > However, adding this code and wonderful and all but why do we need to > add it? Changelog should say why. Okay changelog updated to: powerpc/boot: Add extended precision shifts to the boot wrapper. The upcoming currituck patches will need to do 64-bit shifts which will fail with undefined symbol without this patch. I looked at linking against libgcc but we can't guarantee that libgcc was compiled with soft-float. Also Using ../lib/div64.S or ../kernel/misc_32.S, this will break the build as the .o's need to be built with different flags for the bootwrapper vs the kernel. So for now the easiest option is to just copy code from arch/powerpc/kernel/misc_32.S I don't think this code changes too often ;P Yours Tony pgpyIaX4m7k31.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 6/6] 44x/currituck: Add support for the new IBM currituck platform
Based on original work by David 'Shaggy' Kliekamp. Signed-off-by: Tony Breeds --- arch/powerpc/boot/Makefile |5 +- arch/powerpc/boot/dts/currituck.dts | 240 ++ arch/powerpc/boot/treeboot-currituck.c | 129 ++ arch/powerpc/boot/wrapper|3 + arch/powerpc/configs/44x/currituck_defconfig | 110 arch/powerpc/include/asm/reg.h |1 + arch/powerpc/kernel/cputable.c | 14 ++ arch/powerpc/kernel/head_44x.S |2 + arch/powerpc/platforms/44x/Kconfig | 10 + arch/powerpc/platforms/44x/Makefile |1 + arch/powerpc/platforms/44x/ppc47x.c | 198 + arch/powerpc/sysdev/ppc4xx_pci.c | 57 ++- arch/powerpc/sysdev/ppc4xx_pci.h |7 + 13 files changed, 775 insertions(+), 2 deletions(-) create mode 100644 arch/powerpc/boot/dts/currituck.dts create mode 100644 arch/powerpc/boot/treeboot-currituck.c create mode 100644 arch/powerpc/configs/44x/currituck_defconfig create mode 100644 arch/powerpc/platforms/44x/ppc47x.c diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 72ee8c1..ff0057f 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -45,6 +45,7 @@ $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405 $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405 $(obj)/treeboot-iss4xx.o: BOOTCFLAGS += -mcpu=405 +$(obj)/treeboot-currituck.o: BOOTCFLAGS += -mcpu=405 $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405 @@ -79,7 +80,8 @@ src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \ - gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c + gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c \ + treeboot-currituck.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot)) @@ -212,6 +214,7 @@ image-$(CONFIG_WARP)+= cuImage.warp image-$(CONFIG_YOSEMITE) += cuImage.yosemite image-$(CONFIG_ISS4xx) += treeImage.iss4xx \ treeImage.iss4xx-mpic +image-$(CONFIG_CURRITUCK) += treeImage.currituck # Board ports in arch/powerpc/platform/8xx/Kconfig image-$(CONFIG_MPC86XADS) += cuImage.mpc866ads diff --git a/arch/powerpc/boot/dts/currituck.dts b/arch/powerpc/boot/dts/currituck.dts new file mode 100644 index 000..7a021a8 --- /dev/null +++ b/arch/powerpc/boot/dts/currituck.dts @@ -0,0 +1,240 @@ +/* + * Device Tree Source for IBM Embedded PPC 476 Platform + * + * Copyright © 2011 Tony Breeds IBM Corporation + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + */ + +/dts-v1/; + +/memreserve/ 0x01f0 0x0010;// spin table + +/ { + #address-cells = <2>; + #size-cells = <2>; + model = "ibm,currituck"; + compatible = "ibm,currituck", "ibm,476"; + dcr-parent = <&{/cpus/cpu@0}>; + + aliases { + serial0 = &UART0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + model = "PowerPC,476"; + reg = <0>; + clock-frequency = <16>; // 1.6 GHz + timebase-frequency = <1>; // 100Mhz + i-cache-line-size = <32>; + d-cache-line-size = <32>; + i-cache-size = <32768>; + d-cache-size = <32768>; + dcr-controller; + dcr-access-method = "native"; + status = "ok"; + }; + cpu@1 { + device_type = "cpu"; + model = "PowerPC,476"; + reg = <1>; + clock-frequency = <16>; // 1.6 GHz + timebase-frequency = <1>; // 100Mhz + i-cache-line-size = <32>; + d-cache-line-size = <32>; + i-cache-size = <32768>; + d-cache-size = <
[PATCH 5/6] powerpc/boot: Add mfdcrx
Signed-off-by: Tony Breeds --- arch/powerpc/boot/dcr.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/dcr.h b/arch/powerpc/boot/dcr.h index 645a7c9..51b5893 100644 --- a/arch/powerpc/boot/dcr.h +++ b/arch/powerpc/boot/dcr.h @@ -9,6 +9,12 @@ }) #define mtdcr(rn, val) \ asm volatile("mtdcr %0,%1" : : "i"(rn), "r"(val)) +#define mfdcrx(rn) \ + ({ \ + unsigned long rval; \ + asm volatile("mfdcrx %0,%1" : "=r"(rval) : "g"(rn)); \ + rval; \ + }) /* 440GP/440GX SDRAM controller DCRs */ #define DCRN_SDRAM0_CFGADDR0x010 -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 4/6] powerpc/boot: Add extended precision shifts to the boot wrapper.
Code copied from arch/powerpc/kernel/misc_32.S Signed-off-by: Tony Breeds --- arch/powerpc/boot/div64.S | 52 + 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/boot/div64.S b/arch/powerpc/boot/div64.S index d271ab5..bbcb8a4 100644 --- a/arch/powerpc/boot/div64.S +++ b/arch/powerpc/boot/div64.S @@ -57,3 +57,55 @@ __div64_32: stw r8,4(r3) mr r3,r6 # return the remainder in r3 blr + +/* + * Extended precision shifts. + * + * Updated to be valid for shift counts from 0 to 63 inclusive. + * -- Gabriel + * + * R3/R4 has 64 bit value + * R5has shift count + * result in R3/R4 + * + * ashrdi3: arithmetic right shift (sign propagation) + * lshrdi3: logical right shift + * ashldi3: left shift + */ + .globl __ashrdi3 +__ashrdi3: + subfic r6,r5,32 + srw r4,r4,r5# LSW = count > 31 ? 0 : LSW >> count + addir7,r5,32# could be xori, or addi with -32 + slw r6,r3,r6# t1 = count > 31 ? 0 : MSW << (32-count) + rlwinm r8,r7,0,32 # t3 = (count < 32) ? 32 : 0 + srawr7,r3,r7# t2 = MSW >> (count-32) + or r4,r4,r6# LSW |= t1 + slw r7,r7,r8# t2 = (count < 32) ? 0 : t2 + srawr3,r3,r5# MSW = MSW >> count + or r4,r4,r7# LSW |= t2 + blr + + .globl __ashldi3 +__ashldi3: + subfic r6,r5,32 + slw r3,r3,r5# MSW = count > 31 ? 0 : MSW << count + addir7,r5,32# could be xori, or addi with -32 + srw r6,r4,r6# t1 = count > 31 ? 0 : LSW >> (32-count) + slw r7,r4,r7# t2 = count < 32 ? 0 : LSW << (count-32) + or r3,r3,r6# MSW |= t1 + slw r4,r4,r5# LSW = LSW << count + or r3,r3,r7# MSW |= t2 + blr + + .globl __lshrdi3 +__lshrdi3: + subfic r6,r5,32 + srw r4,r4,r5# LSW = count > 31 ? 0 : LSW >> count + addir7,r5,32# could be xori, or addi with -32 + slw r6,r3,r6# t1 = count > 31 ? 0 : MSW << (32-count) + srw r7,r3,r7# t2 = count < 32 ? 0 : MSW >> (count-32) + or r4,r4,r6# LSW |= t1 + srw r3,r3,r5# MSW = MSW >> count + or r4,r4,r7# LSW |= t2 + blr -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 3/6] 44x: Removing dead CONFIG_PPC47x
From: Christoph Egger CONFIG_PPC47x doesn't exist in Kconfig, therefore removing all references for it from the source code. Signed-off-by: Christoph Egger --- arch/powerpc/mm/44x_mmu.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c index f60e006..5d4e3ff 100644 --- a/arch/powerpc/mm/44x_mmu.c +++ b/arch/powerpc/mm/44x_mmu.c @@ -78,11 +78,7 @@ static void __init ppc44x_pin_tlb(unsigned int virt, unsigned int phys) "tlbwe %1,%3,%5\n" "tlbwe %0,%3,%6\n" : -#ifdef CONFIG_PPC47x - : "r" (PPC47x_TLB2_S_RWX), -#else : "r" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G), -#endif "r" (phys), "r" (virt | PPC44x_TLB_VALID | PPC44x_TLB_256M), "r" (entry), -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/6] 44x/pci: Setup the dma_window properties for each pci_controller
Needed if you want to use swiotlb, harmless otherwise. Signed-off-by: Tony Breeds --- arch/powerpc/sysdev/ppc4xx_pci.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index d3fa380..d766068 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -185,9 +185,15 @@ static int __init ppc4xx_parse_dma_ranges(struct pci_controller *hose, out: dma_offset_set = 1; pci_dram_offset = res->start; + hose->dma_window_base_cur = res->start; + hose->dma_window_size = resource_size(res); printk(KERN_INFO "4xx PCI DMA offset set to 0x%08lx\n", pci_dram_offset); + printk(KERN_INFO "4xx PCI DMA window base to 0x%016llx\n", + (unsigned long long)hose->dma_window_base_cur); + printk(KERN_INFO "DMA window size 0x%016llx\n", + (unsigned long long)hose->dma_window_size); return 0; } -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/6] 44x/pci: Continue pci setup even if there is no sdr-base in the device-tree
Signed-off-by: Tony Breeds --- arch/powerpc/sysdev/ppc4xx_pci.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 16f5eba..d3fa380 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -1974,11 +1974,11 @@ static void __init ppc4xx_probe_pciex_bridge(struct device_node *np) port->node = of_node_get(np); pval = of_get_property(np, "sdr-base", NULL); if (pval == NULL) { - printk(KERN_ERR "PCIE: missing sdr-base for %s\n", + printk(KERN_INFO "PCIE: missing sdr-base for %s\n", np->full_name); - return; + } else { + port->sdr_base = *pval; } - port->sdr_base = *pval; /* Check if device_type property is set to "pci" or "pci-endpoint". * Resulting from this setup this PCIe port will be configured -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Add support for the currituck 476 platform from IBM
Patches 1 and 2 Modify the 44x PCI code to work with currituck. Patch 3 Is an old patch by Christoph Egger that fell through the cracks somehow. Patches 4 and 5 Modify the bootwrapper to handle currituck Patch 6 The platform itself. arch/powerpc/boot/Makefile |5 +- arch/powerpc/boot/dcr.h |6 + arch/powerpc/boot/div64.S| 52 ++ arch/powerpc/boot/dts/currituck.dts | 240 ++ arch/powerpc/boot/treeboot-currituck.c | 129 ++ arch/powerpc/boot/wrapper|3 + arch/powerpc/configs/44x/currituck_defconfig | 110 arch/powerpc/include/asm/reg.h |1 + arch/powerpc/kernel/cputable.c | 14 ++ arch/powerpc/kernel/head_44x.S |2 + arch/powerpc/mm/44x_mmu.c|4 - arch/powerpc/platforms/44x/Kconfig | 10 + arch/powerpc/platforms/44x/Makefile |1 + arch/powerpc/platforms/44x/ppc47x.c | 198 + arch/powerpc/sysdev/ppc4xx_pci.c | 69 +++- arch/powerpc/sysdev/ppc4xx_pci.h |7 + 16 files changed, 842 insertions(+), 9 deletions(-) ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: 44x: Add mtd ndfc to the ppx44x defconfig
On Wed, Nov 23, 2011 at 12:34:44PM +1100, Benjamin Herrenschmidt wrote: > On Tue, 2011-11-22 at 20:04 -0500, Josh Boyer wrote: > > On Tue, Nov 22, 2011 at 6:50 PM, Tony Breeds > > wrote: > > > Signed-off-by: Tony Breeds > > > > Acked-by: Josh Boyer > > > > Ben, I don't have anything particularly urgent for 3.2 and this seems > > like it is well within the 3.2 window (defconfig updates usually come > > later). Want to pick this up yourself, or do you want me to prep a > > tree somewhere? > > I'm working on 3.3 right now, so I'd rather you throw this in there, I > doesn't seem to be particularily urgent for 3.2 is it? (who actually > uses 4xx_defconfig ?) It's mostly for linux-next / kisskb There was a compiler error added to ndfc in upstream[1]. The change was in linux-next but nothing currently builds that code. If we update 4xx_defconfig then linux-next will catch errors sooner. So it's not urgent, but it doesn't hurt [1] http://patchwork.ozlabs.org/patch/127000/ Yours Tony pgpQWs072jjDB.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: 44x: Add mtd ndfc to the ppx44x defconfig
Signed-off-by: Tony Breeds --- Again appologies for the SPAM trying to send this message. arch/powerpc/configs/ppc44x_defconfig |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig index 6cdf1c0..3b98d73 100644 --- a/arch/powerpc/configs/ppc44x_defconfig +++ b/arch/powerpc/configs/ppc44x_defconfig @@ -52,6 +52,8 @@ CONFIG_MTD_CFI=y CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_CFI_AMDSTD=y CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_NAND=m +CONFIG_MTD_NAND_NDFC=m CONFIG_MTD_UBI=m CONFIG_MTD_UBI_GLUEBI=m CONFIG_PROC_DEVICETREE=y -- 1.7.6.4 Yours Tony pgpE3NOfVZuXt.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: your mail
On Wed, Nov 23, 2011 at 10:42:45AM +1100, Tony Breeds wrote: > From 1a44c074e3ce572cbf60d31ac704e6ce42be4708 Mon Sep 17 00:00:00 2001 > From: Tony Breeds > Date: Wed, 23 Nov 2011 10:16:40 +1100 > Subject: [PATCH] powerpc: 44x: Add mtd ndfc to the ppx44x defconfig Sorry all for the SPAM. I screwed up trying to use mutt and git to send-email Yours Tony pgpn9HA6TeCzC.pgp Description: PGP signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[no subject]
>From 1a44c074e3ce572cbf60d31ac704e6ce42be4708 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Wed, 23 Nov 2011 10:16:40 +1100 Subject: [PATCH] powerpc: 44x: Add mtd ndfc to the ppx44x defconfig Signed-off-by: Tony Breeds --- arch/powerpc/configs/ppc44x_defconfig |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig index 6cdf1c0..3b98d73 100644 --- a/arch/powerpc/configs/ppc44x_defconfig +++ b/arch/powerpc/configs/ppc44x_defconfig @@ -52,6 +52,8 @@ CONFIG_MTD_CFI=y CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_CFI_AMDSTD=y CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_NAND=m +CONFIG_MTD_NAND_NDFC=m CONFIG_MTD_UBI=m CONFIG_MTD_UBI_GLUEBI=m CONFIG_PROC_DEVICETREE=y -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[no subject]
>From 1a44c074e3ce572cbf60d31ac704e6ce42be4708 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Wed, 23 Nov 2011 10:16:40 +1100 Subject: [PATCH] powerpc: 44x: Add mtd ndfc to the ppx44x defconfig Signed-off-by: Tony Breeds --- arch/powerpc/configs/ppc44x_defconfig |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/ppc44x_defconfig index 6cdf1c0..3b98d73 100644 --- a/arch/powerpc/configs/ppc44x_defconfig +++ b/arch/powerpc/configs/ppc44x_defconfig @@ -52,6 +52,8 @@ CONFIG_MTD_CFI=y CONFIG_MTD_JEDECPROBE=y CONFIG_MTD_CFI_AMDSTD=y CONFIG_MTD_PHYSMAP_OF=y +CONFIG_MTD_NAND=m +CONFIG_MTD_NAND_NDFC=m CONFIG_MTD_UBI=m CONFIG_MTD_UBI_GLUEBI=m CONFIG_PROC_DEVICETREE=y -- 1.7.6.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
44x/pci: Add __init annotations for *init_port_hw() functions.
The various port_init_hw methods of ppc4xx_pciex_hwops should have been marked __init and when I added ppc4xx_pciex_port_reset_sdr(), which is __init. This added many section mismatch warnings like: WARNING: arch/powerpc/sysdev/built-in.o(.text+0x5c68): Section mismatch in reference from the function ppc440spe_pciex_init_port_hw() to the function .init.text:ppc4xx_pciex_port_reset_sdr() The function ppc440spe_pciex_init_port_hw() references the function __init ppc4xx_pciex_port_reset_sdr(). This is often because ppc440spe_pciex_init_port_hw lacks a __init annotation or the annotation of ppc4xx_pciex_port_reset_sdr is wrong. Trivial patch to silence those warnings. Reported-By: Stephen Rothwell Signed-off-by: Tony Breeds diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index dbfe96b..60541a6 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -834,7 +834,7 @@ static int __init ppc440spe_pciex_core_init(struct device_node *np) return 3; } -static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port) +static int __init ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port) { u32 val = 1 << 24; @@ -872,12 +872,12 @@ static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port) return ppc4xx_pciex_port_reset_sdr(port); } -static int ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port) +static int __init ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port) { return ppc440spe_pciex_init_port_hw(port); } -static int ppc440speB_pciex_init_port_hw(struct ppc4xx_pciex_port *port) +static int __init ppc440speB_pciex_init_port_hw(struct ppc4xx_pciex_port *port) { int rc = ppc440spe_pciex_init_port_hw(port); @@ -936,7 +936,7 @@ static int __init ppc460ex_pciex_core_init(struct device_node *np) return 2; } -static int ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) +static int __init ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) { u32 val; u32 utlset1; @@ -1122,7 +1122,7 @@ static int __init ppc460sx_pciex_core_init(struct device_node *np) return 2; } -static int ppc460sx_pciex_init_port_hw(struct ppc4xx_pciex_port *port) +static int __init ppc460sx_pciex_init_port_hw(struct ppc4xx_pciex_port *port) { if (port->endpoint) @@ -1189,7 +1189,7 @@ static void ppc405ex_pcie_phy_reset(struct ppc4xx_pciex_port *port) mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET, 0x00101000); } -static int ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) +static int __init ppc405ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) { u32 val; Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [v3 PATCH 1/1] powerpc/4xx: enable and fix pcie gen1/gen2 on the 460sx
On Wed, Jul 20, 2011 at 08:02:29AM -0500, Ayman Elkhashab wrote: > From: Ayman El-Khashab > > Adds a register to the config space for the 460sx. Changes the vc0 > detect to a pll detect. maps configuration space to test the link > status. changes the setup to enable gen2 devices to operate at gen2 > speeds. fixes mapping that was not correct for the 460sx. added > bit definitions for the OMRxMSKL registers. Removed reserved bit > that was set incorrectly in the OMR2MSKL register. FWIW Looks good to me. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [v2 PATCH 1/1] powerpc/4xx: enable and fix pcie gen1/gen2 on the 460sx
On Mon, Jul 18, 2011 at 08:31:01AM -0500, Ayman El-Khashab wrote: > Yes, but I think that is correct for it to be "1". The data > sheets for these parts that I checked had bit 1 marked as > reserved. Only OMR1MSKL and OMR3MSKL had extra definitions > such as the _IO and _UOT. The parts I checked which were > the sheets for the EX and SX (which cover another 6 or 7 > parts) all had it with just a single bit defined on that > register. Ahh okay. I kind of think that this may need to be a seperate change. At the very least it needs to be explicitly mentioned in the change log. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [v2 PATCH 1/1] powerpc/4xx: enable and fix pcie gen1/gen2 on the 460sx
On Fri, Jul 15, 2011 at 11:40:27AM -0500, Ayman Elkhashab wrote: > @@ -1582,8 +1628,8 @@ static int __init ppc4xx_setup_one_pciex_POM(struct > ppc4xx_pciex_port *port, > dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAH, lah); > dcr_write(port->dcrs, DCRO_PEGPL_OMR2BAL, lal); > dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKH, 0x7fff); > - /* Note that 3 here means enabled | single region */ > - dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL, sa | 3); > + dcr_write(port->dcrs, DCRO_PEGPL_OMR2MSKL, > + sa | DCRO_PEGPL_OMRxMSKL_VAL); Didn't you just change "sa | 3" to "sa | 1" ? > index 56d9e5d..61b3659 100644 > --- a/arch/powerpc/sysdev/ppc4xx_pci.h > +++ b/arch/powerpc/sysdev/ppc4xx_pci.h > @@ -464,6 +464,18 @@ > #define PECFG_POM2LAL0x390 > #define PECFG_POM2LAH0x394 > > +/* 460sx only */ > +#define PECFG_460SX_DLLSTA 0x3f8 > + > +/* 460sx Bit Mappings */ > +#define PECFG_460SX_DLLSTA_LINKUP 0x0010 > +#define DCRO_PEGPL_460SX_OMR1MSKL_UOT 0x0004 > + > +/* PEGPL Bit Mappings */ > +#define DCRO_PEGPL_OMRxMSKL_VAL 0x0001 > +#define DCRO_PEGPL_OMR1MSKL_UOT 0x0002 > +#define DCRO_PEGPL_OMR3MSKL_IO0x0002 > + > /* SDR Bit Mappings */ > #define PESDRx_RCSSET_HLDPLB 0x1000 > #define PESDRx_RCSSET_RSTGU 0x0100 Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 1/1] powerpc/4xx: enable and fix pcie gen1/gen2 on the 460sx
On Wed, Jul 13, 2011 at 07:33:31PM -0500, Ayman El-Khashab wrote: > Adds a register to the config space for the 460sx. Changes the vc0 > detect to a pll detect. maps configuration space to test the link > status. changes the setup to enable gen2 devices to operate at gen2 > speeds. fixes mapping that was not correct for the 460sx. > > tested on the 460sx eiger and custom board Hi Ayman. Just a few comments. > +static void __init ppc460sx_pciex_check_link(struct ppc4xx_pciex_port *port) > +{ > + void __iomem *mbase; > + int attempt = 50; > + > + port->link = 0; > + > + mbase = ioremap(port->cfg_space.start + 0x, 0x1000); Why + 0x ? ppc4xx_pciex_port_setup_hose() does: mbase = ioremap(port->cfg_space.start + 0x1000, 0x1000); so isn't one of these statements is wrong? > + if (mbase == NULL) { > + printk(KERN_ERR "%s: Can't map internal config space !", > + port->node->full_name); > + goto done; > + } > + > + while (attempt && (0 == (in_le32(mbase + PECFG_460SX_DLLSTA) > + & 0x0010))) { Nitpicking, I think it'd be nice if there was #define for 0x0010 perhaps: #define PECFG_460SX_DLLSTA_LINKUP 0x0010 > + attempt--; > + mdelay(10); > + } > + if (attempt) > + port->link = 1; > +done: > + iounmap(mbase); > + > +} > + > static struct ppc4xx_pciex_hwops ppc460sx_pcie_hwops __initdata = { > .core_init = ppc460sx_pciex_core_init, > .port_init_hw = ppc460sx_pciex_init_port_hw, > .setup_utl = ppc460sx_pciex_init_utl, > - .check_link = ppc4xx_pciex_check_link_sdr, > + .check_link = ppc460sx_pciex_check_link, > }; > > #endif /* CONFIG_44x */ > @@ -1338,15 +1367,15 @@ static int __init ppc4xx_pciex_port_init(struct > ppc4xx_pciex_port *port) > if (rc != 0) > return rc; > > - if (ppc4xx_pciex_hwops->check_link) > - ppc4xx_pciex_hwops->check_link(port); > - > /* >* Initialize mapping: disable all regions and configure >* CFG and REG regions based on resources in the device tree >*/ > ppc4xx_pciex_port_init_mapping(port); > > + if (ppc4xx_pciex_hwops->check_link) > + ppc4xx_pciex_hwops->check_link(port); > + Why move this? You already iorempat the cfg space. > /* >* Map UTL >*/ > @@ -1360,13 +1389,23 @@ static int __init ppc4xx_pciex_port_init(struct > ppc4xx_pciex_port *port) > ppc4xx_pciex_hwops->setup_utl(port); > > /* > - * Check for VC0 active and assert RDY. > + * Check for VC0 active or PLL Locked and assert RDY. >*/ > if (port->sdr_base) { > - if (port->link && > - ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS, > - 1 << 16, 1 << 16, 5000)) { > - printk(KERN_INFO "PCIE%d: VC0 not active\n", > port->index); > + if (of_device_is_compatible(port->node, > + "ibm,plb-pciex-460sx")){ > + if (port->link && ppc4xx_pciex_wait_on_sdr(port, > + PESDRn_RCSSTS, > + 1 << 12, 1 << 12, 5000)) { > + printk(KERN_INFO "PCIE%d: PLL not locked\n", > + port->index); > + port->link = 0; > + } > + } else if (port->link && > + ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS, > + 1 << 16, 1 << 16, 5000)) { > + printk(KERN_INFO "PCIE%d: VC0 not active\n", > + port->index); > port->link = 0; > } > > @@ -1565,6 +1604,10 @@ static int __init ppc4xx_setup_one_pciex_POM(struct > ppc4xx_pciex_port *port, > pcial = RES_TO_U32_LOW(pci_addr); > sa = (0xu << ilog2(size)) | 0x1; > > + /* Enabled and single region */ > + sa |= (of_device_is_compatible(port->node, "ibm,plb-pciex-460sx")) ? > + 0x5 : 0x3; > + > /* Program register values */ > switch (index) { > case 0: > @@ -1573,8 +1616,7 @@ static int __init ppc4xx_setup_one_pciex_POM(struct > ppc4xx_pciex_port *port, > dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAH, lah); > dcr_write(port->dcrs, DCRO_PEGPL_OMR1BAL, lal); > dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKH, 0x7fff); > - /* Note that 3 here means enabled | single region */ > - dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL, sa | 3); > + dcr_write(port->dcrs, DCRO_PEGPL_OMR1MSKL, sa); > break; > case 1: > out_le32(mbase + PECFG_POM1LAH, pciah); > @@ -1582,8 +1624,7 @@ static int __init ppc4xx
Re: [PATCH 2/3] powerpc/44x: don't use tlbivax on AMP systems
On Wed, Jul 13, 2011 at 12:48:21AM -0500, Kumar Gala wrote: > > On Jul 4, 2011, at 11:38 PM, Tony Breeds wrote: > > > +#ifdef CONFIG_PPC_47x > > +void __init early_init_mmu_47x(void) > > +{ > > +#ifdef CONFIG_SMP > > + unsigned long root = of_get_flat_dt_root(); > > + if (of_get_flat_dt_prop(root, "cooperative-partition", NULL)) > > + mmu_clear_feature(MMU_FTR_USE_TLBIVAX_BCAST); > > +#endif /* CONFIG_SMP */ > > +} > > +#endif /* CONFIG_PPC_47x */ > > + > > Is this device tree prop spec'd anywhere? I don't think this has been formally written up, but this was discussed in Feb. this year http://patchwork.ozlabs.org/patch/81355/ Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] 4xx: Add check_link to struct ppc4xx_pciex_hwops
On Tue, Jul 12, 2011 at 02:04:04PM -0400, Josh Boyer wrote: > On Tue, Jul 12, 2011 at 12:40:07PM -0500, Ayman El-Khashab wrote: > >On Fri, Jul 01, 2011 at 04:44:24PM +1000, Tony Breeds wrote: > >> All current pcie controllers unconditionally use SDR to check the link and > >> poll for reset. > > > >I was able to apply this patch and then modify the 460SX to > >work correctly, so I think it is fine. There is only 1 > >comment below. So how does one supply a patch atop another > >patch? > > > >Best, > >Ayman > > > >> +static int __init ppc4xx_pciex_port_reset_sdr(struct ppc4xx_pciex_port > >> *port) > >> +{ > >> + printk(KERN_INFO "PCIE%d: Checking link...\n", > >> + port->index); > > > >Its not a functional problem, but this printk belongs in the > >check link if anywhere rather than the reset. > > I've got this queued in my tree locally. I can make that change before > I push it out. Thanks Josh. I really thought I'd fixed that before posting. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] 4xx: Add check_link to struct ppc4xx_pciex_hwops
On Tue, Jul 12, 2011 at 05:13:38PM -0500, Ayman El-Khashab wrote: > Ok, so let me ask the following ... will it cause trouble if > I swap the sequence of the calls to the following in xxx_port_init > > ppc4xx_pciex_port_init_mapping(...) > > and > > if (ppc4xx_pciex_hwops->check_link)... > > The reason is that at least on the 460SX, the link check is > done via registers in the config space. But the init_mapping is > needed to setup some of the DCRs to make the config space work. > In my check_link, i map the config space do the link checks > and then unmap since a superset of the space could be mapped > later. This is also what I do. IIRC ppc4xx_pciex_port_init_mapping() required things that are setup between the 2 calls. The double Mapping is fugly but I think it should be safe. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] mm: Fix output of total_ram.
On 32bit platforms that support >= 4GB memory total_ram was truncated. This creates a confusing printk: Top of RAM: 0x1, Total RAM: 0x0 Fix that: Top of RAM: 0x1, Total RAM: 0x1 Signed-off-by: Tony Breeds --- arch/powerpc/mm/mem.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 29d4dde..ac1c3d3 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -249,7 +249,7 @@ static int __init mark_nonram_nosave(void) */ void __init paging_init(void) { - unsigned long total_ram = memblock_phys_mem_size(); + unsigned long long total_ram = memblock_phys_mem_size(); phys_addr_t top_of_ram = memblock_end_of_DRAM(); unsigned long max_zone_pfns[MAX_NR_ZONES]; @@ -269,7 +269,7 @@ void __init paging_init(void) kmap_prot = PAGE_KERNEL; #endif /* CONFIG_HIGHMEM */ - printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%lx\n", + printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%llx\n", (unsigned long long)top_of_ram, total_ram); printk(KERN_DEBUG "Memory hole size: %ldMB\n", (long int)((top_of_ram - total_ram) >> 20)); -- 1.7.4.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 3/3] powerpc/44x: boot wrapper: allow kernel to load into non-zero address
From: Dave Kleikamp For AMP, different kernel instances load into separate memory regions. Read the start of memory from the device tree and limit the memory to what's specified in the device tree. Signed-off-by: Dave Kleikamp Signed-off-by: Tony Breeds Cc: Benjamin Herrenschmidt Cc: Josh Boyer Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/boot/treeboot-iss4xx.c | 23 ++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/boot/treeboot-iss4xx.c b/arch/powerpc/boot/treeboot-iss4xx.c index fcc4495..329e710 100644 --- a/arch/powerpc/boot/treeboot-iss4xx.c +++ b/arch/powerpc/boot/treeboot-iss4xx.c @@ -34,9 +34,29 @@ BSS_STACK(4096); +static u32 ibm4xx_memstart; + static void iss_4xx_fixups(void) { - ibm4xx_sdram_fixup_memsize(); + void *memory; + u32 reg[3]; + + memory = finddevice("/memory"); + if (!memory) + fatal("Can't find memory node\n"); + /* This assumes #address-cells = 2, #size-cells =1 and that */ + getprop(memory, "reg", reg, sizeof(reg)); + if (reg[2]) + /* If the device tree specifies the memory range, use it */ + ibm4xx_memstart = reg[1]; + else + /* othersize, read it from the SDRAM controller */ + ibm4xx_sdram_fixup_memsize(); +} + +static void *iss_4xx_vmlinux_alloc(unsigned long size) +{ + return (void *)ibm4xx_memstart; } #define SPRN_PIR 0x11E /* Processor Indentification Register */ @@ -48,6 +68,7 @@ void platform_init(void) simple_alloc_init(_end, avail_ram, 128, 64); platform_ops.fixups = iss_4xx_fixups; + platform_ops.vmlinux_alloc = iss_4xx_vmlinux_alloc; platform_ops.exit = ibm44x_dbcr_reset; pir_reg = mfspr(SPRN_PIR); fdt_set_boot_cpuid_phys(_dtb_start, pir_reg); -- 1.7.4.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/3] powerpc/44x: don't use tlbivax on AMP systems
From: Dave Kleikamp Since other OS's may be running on the other cores don't use tlbivax Signed-off-by: Dave Kleikamp Signed-off-by: Tony Breeds Cc: Benjamin Herrenschmidt Cc: Josh Boyer Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/mmu.h |7 ++- arch/powerpc/kernel/setup_32.c |2 ++ arch/powerpc/mm/tlb_hash32.c |4 arch/powerpc/mm/tlb_nohash.c | 19 +++ 4 files changed, 31 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h index 4138b21..bb5591f 100644 --- a/arch/powerpc/include/asm/mmu.h +++ b/arch/powerpc/include/asm/mmu.h @@ -120,9 +120,14 @@ static inline int mmu_has_feature(unsigned long feature) return (cur_cpu_spec->mmu_features & feature); } +static inline void mmu_clear_feature(unsigned long feature) +{ + cur_cpu_spec->mmu_features &= ~feature; +} + extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup; -/* MMU initialization (64-bit only fo now) */ +/* MMU initialization */ extern void early_init_mmu(void); extern void early_init_mmu_secondary(void); diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 620d792..6bae164 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -127,6 +127,8 @@ notrace void __init machine_init(unsigned long dt_ptr) /* Do some early initialization based on the flat device tree */ early_init_devtree(__va(dt_ptr)); + early_init_mmu(); + probe_machine(); setup_kdump_trampoline(); diff --git a/arch/powerpc/mm/tlb_hash32.c b/arch/powerpc/mm/tlb_hash32.c index 27b863c..9a445f6 100644 --- a/arch/powerpc/mm/tlb_hash32.c +++ b/arch/powerpc/mm/tlb_hash32.c @@ -177,3 +177,7 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, flush_range(vma->vm_mm, start, end); } EXPORT_SYMBOL(flush_tlb_range); + +void __init early_init_mmu(void) +{ +} diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c index 0bdad3a..04990b9 100644 --- a/arch/powerpc/mm/tlb_nohash.c +++ b/arch/powerpc/mm/tlb_nohash.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -266,6 +267,17 @@ EXPORT_SYMBOL(flush_tlb_page); #endif /* CONFIG_SMP */ +#ifdef CONFIG_PPC_47x +void __init early_init_mmu_47x(void) +{ +#ifdef CONFIG_SMP + unsigned long root = of_get_flat_dt_root(); + if (of_get_flat_dt_prop(root, "cooperative-partition", NULL)) + mmu_clear_feature(MMU_FTR_USE_TLBIVAX_BCAST); +#endif /* CONFIG_SMP */ +} +#endif /* CONFIG_PPC_47x */ + /* * Flush kernel TLB entries in the given range */ @@ -584,4 +596,11 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base, /* Finally limit subsequent allocations */ memblock_set_current_limit(first_memblock_base + ppc64_rma_size); } +#else /* ! CONFIG_PPC64 */ +void __init early_init_mmu(void) +{ +#ifdef CONFIG_PPC_47x + early_init_mmu_47x(); +#endif +} #endif /* CONFIG_PPC64 */ -- 1.7.4.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/3] powerpc/47x: allow kernel to be loaded in higher physical memory
From: Dave Kleikamp The 44x code (which is shared by 47x) assumes the available physical memory begins at 0x. This is not necessarily the case in an AMP environment. Support CONFIG_RELOCATABLE for 476 in order to allow the kernel to be loaded into a higher memory range. Signed-off-by: Tony Breeds Signed-off-by: Dave Kleikamp Cc: Benjamin Herrenschmidt Cc: Josh Boyer Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/Kconfig |2 +- arch/powerpc/configs/44x/iss476-smp_defconfig |6 ++-- arch/powerpc/kernel/head_44x.S| 42 - arch/powerpc/mm/44x_mmu.c | 13 ++-- 4 files changed, 48 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2729c66..7cef1fc 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -841,7 +841,7 @@ config LOWMEM_CAM_NUM config RELOCATABLE bool "Build a relocatable kernel (EXPERIMENTAL)" - depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE + depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || PPC_47x) help This builds a kernel image that is capable of running at the location the kernel is loaded at (some alignment restrictions may diff --git a/arch/powerpc/configs/44x/iss476-smp_defconfig b/arch/powerpc/configs/44x/iss476-smp_defconfig index 92f863a..a6eb6ad 100644 --- a/arch/powerpc/configs/44x/iss476-smp_defconfig +++ b/arch/powerpc/configs/44x/iss476-smp_defconfig @@ -3,8 +3,8 @@ CONFIG_SMP=y CONFIG_EXPERIMENTAL=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y +CONFIG_SPARSE_IRQ=y CONFIG_LOG_BUF_SHIFT=14 -CONFIG_SYSFS_DEPRECATED_V2=y CONFIG_BLK_DEV_INITRD=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_EXPERT=y @@ -21,10 +21,11 @@ CONFIG_ISS4xx=y CONFIG_HZ_100=y CONFIG_MATH_EMULATION=y CONFIG_IRQ_ALL_CPUS=y -CONFIG_SPARSE_IRQ=y CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="root=/dev/issblk0" # CONFIG_PCI is not set +CONFIG_ADVANCED_OPTIONS=y +CONFIG_RELOCATABLE=y CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y @@ -67,7 +68,6 @@ CONFIG_EXT3_FS=y # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT3_FS_SECURITY=y -CONFIG_INOTIFY=y CONFIG_PROC_KCORE=y CONFIG_TMPFS=y CONFIG_CRAMFS=y diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 5e12b74..f8e971b 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S @@ -93,6 +93,30 @@ _ENTRY(_start); bl early_init +#ifdef CONFIG_RELOCATABLE + /* +* r25 will contain RPN/ERPN for the start address of memory +* +* Add the difference between KERNELBASE and PAGE_OFFSET to the +* start of physical memory to get kernstart_addr. +*/ + lis r3,kernstart_addr@ha + la r3,kernstart_addr@l(r3) + + lis r4,KERNELBASE@h + ori r4,r4,KERNELBASE@l + lis r5,PAGE_OFFSET@h + ori r5,r5,PAGE_OFFSET@l + subfr4,r5,r4 + + rlwinm r6,r25,0,28,31 /* ERPN */ + rlwinm r7,r25,0,0,3/* RPN - assuming 256 MB page size */ + add r7,r7,r4 + + stw r6,0(r3) + stw r7,4(r3) +#endif + /* * Decide what sort of machine this is and initialize the MMU. */ @@ -1001,9 +1025,6 @@ clear_utlb_entry: lis r3,PAGE_OFFSET@h ori r3,r3,PAGE_OFFSET@l - /* Kernel is at the base of RAM */ - li r4, 0/* Load the kernel physical address */ - /* Load the kernel PID = 0 */ li r0,0 mtspr SPRN_PID,r0 @@ -1013,9 +1034,8 @@ clear_utlb_entry: clrrwi r3,r3,12/* Mask off the effective page number */ ori r3,r3,PPC47x_TLB0_VALID | PPC47x_TLB0_256M - /* Word 1 */ - clrrwi r4,r4,12/* Mask off the real page number */ - /* ERPN is 0 for first 4GB page */ + /* Word 1 - use r25. RPN is the same as the original entry */ + /* Word 2 */ li r5,0 ori r5,r5,PPC47x_TLB2_S_RWX @@ -1026,7 +1046,7 @@ clear_utlb_entry: /* We write to way 0 and bolted 0 */ lis r0,0x8800 tlbwe r3,r0,0 - tlbwe r4,r0,1 + tlbwe r25,r0,1 tlbwe r5,r0,2 /* @@ -1124,7 +1144,13 @@ head_start_common: lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */ mtspr SPRN_IVPR,r4 - addis r22,r22,KERNELBASE@h + /* +* If the kernel was loaded at a non-zero 256 MB page, we need to +* mask off the most significant 4 bits to get the relative address +* from the start of physical memory +*/ + rlwinm r22,r22,0,4,31 + addis r22,r22,PAGE_OFFSET@h mtlrr22 isync blr diff --git a
[PATCH] 4xx: Add check_link to struct ppc4xx_pciex_hwops
All current pcie controllers unconditionally use SDR to check the link and poll for reset. Refactor the code to include device reset in the port_init_hw() op and add a new check_link() op. This will make room fro new controllers that do not use SDR for these operations. Tested on 460ex. Signed-off-by: Tony Breeds diff --git a/arch/powerpc/sysdev/ppc4xx_pci.c b/arch/powerpc/sysdev/ppc4xx_pci.c index 156aa7d..ad330fe 100644 --- a/arch/powerpc/sysdev/ppc4xx_pci.c +++ b/arch/powerpc/sysdev/ppc4xx_pci.c @@ -650,12 +650,75 @@ struct ppc4xx_pciex_hwops int (*core_init)(struct device_node *np); int (*port_init_hw)(struct ppc4xx_pciex_port *port); int (*setup_utl)(struct ppc4xx_pciex_port *port); + void (*check_link)(struct ppc4xx_pciex_port *port); }; static struct ppc4xx_pciex_hwops *ppc4xx_pciex_hwops; #ifdef CONFIG_44x +static int __init ppc4xx_pciex_wait_on_sdr(struct ppc4xx_pciex_port *port, + unsigned int sdr_offset, + unsigned int mask, + unsigned int value, + int timeout_ms) +{ + u32 val; + + while(timeout_ms--) { + val = mfdcri(SDR0, port->sdr_base + sdr_offset); + if ((val & mask) == value) { + pr_debug("PCIE%d: Wait on SDR %x success with tm %d (%08x)\n", +port->index, sdr_offset, timeout_ms, val); + return 0; + } + msleep(1); + } + return -1; +} + +static int __init ppc4xx_pciex_port_reset_sdr(struct ppc4xx_pciex_port *port) +{ + printk(KERN_INFO "PCIE%d: Checking link...\n", + port->index); + + /* Wait for reset to complete */ + if (ppc4xx_pciex_wait_on_sdr(port, PESDRn_RCSSTS, 1 << 20, 0, 10)) { + printk(KERN_WARNING "PCIE%d: PGRST failed\n", + port->index); + return -1; + } + return 0; +} + +static void __init ppc4xx_pciex_check_link_sdr(struct ppc4xx_pciex_port *port) +{ + /* Check for card presence detect if supported, if not, just wait for +* link unconditionally. +* +* note that we don't fail if there is no link, we just filter out +* config space accesses. That way, it will be easier to implement +* hotplug later on. +*/ + if (!port->has_ibpre || + !ppc4xx_pciex_wait_on_sdr(port, PESDRn_LOOP, + 1 << 28, 1 << 28, 100)) { + printk(KERN_INFO + "PCIE%d: Device detected, waiting for link...\n", + port->index); + if (ppc4xx_pciex_wait_on_sdr(port, PESDRn_LOOP, +0x1000, 0x1000, 2000)) + printk(KERN_WARNING + "PCIE%d: Link up failed\n", port->index); + else { + printk(KERN_INFO + "PCIE%d: link is up !\n", port->index); + port->link = 1; + } + } else + printk(KERN_INFO "PCIE%d: No device detected.\n", port->index); +} + /* Check various reset bits of the 440SPe PCIe core */ static int __init ppc440spe_pciex_check_reset(struct device_node *np) { @@ -806,7 +869,7 @@ static int ppc440spe_pciex_init_port_hw(struct ppc4xx_pciex_port *port) dcri_clrset(SDR0, port->sdr_base + PESDRn_RCSSET, (1 << 24) | (1 << 16), 1 << 12); - return 0; + return ppc4xx_pciex_port_reset_sdr(port); } static int ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port) @@ -856,6 +919,7 @@ static struct ppc4xx_pciex_hwops ppc440speA_pcie_hwops __initdata = .core_init = ppc440spe_pciex_core_init, .port_init_hw = ppc440speA_pciex_init_port_hw, .setup_utl = ppc440speA_pciex_init_utl, + .check_link = ppc4xx_pciex_check_link_sdr, }; static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata = @@ -863,6 +927,7 @@ static struct ppc4xx_pciex_hwops ppc440speB_pcie_hwops __initdata = .core_init = ppc440spe_pciex_core_init, .port_init_hw = ppc440speB_pciex_init_port_hw, .setup_utl = ppc440speB_pciex_init_utl, + .check_link = ppc4xx_pciex_check_link_sdr, }; static int __init ppc460ex_pciex_core_init(struct device_node *np) @@ -944,7 +1009,7 @@ static int ppc460ex_pciex_init_port_hw(struct ppc4xx_pciex_port *port) port->has_ibpre = 1; - return 0; + return ppc4xx_pciex_port_reset_sdr(port); } static int ppc460ex_pciex_init_utl(struct ppc4xx_pciex_port *port) @@ -972,6
Re: Power machines fail to boot after build being successful
On Thu, Aug 26, 2010 at 04:56:10PM +0530, divya wrote: > Hi, > > After successfully building the kernel version 2.6.36-rc2-git4(commitid > d4348c678977c) with the config file attached(used make oldconfig), > P5 and P6 power machines fails to reboot with the following logs > Preparing to boot Linux version 2.6.36-rc2-autotest-next-20100826 > (r...@llm62) (gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux) > ) #1 SMP Thu Aug 26 10:55:01 IST 2010 You say you're booting -git4 but you're running kernel is Linux next from Aug. 26th Can you confirm you see this boot failure with Linus's tree NOT linux next? Adding linux-ppc and linux-next lists. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: Fix bad include of stdint.h in ptrace.h when -D__ASSEMBLY__
In commit 3162d92dfb79a0b5fc03380b8819fa5f870ebf1e (powerpc: Extended ptrace interface) we #included stdint.h even if __ASSEMBLY__ is defined. This broke building of libc with modern kernel headers. --- ../sysdeps/generic/stdint.h: Assembler messages: ../sysdeps/generic/stdint.h:37: Error: Unrecognized opcode: `typedef' ../sysdeps/generic/stdint.h:38: Error: Unrecognized opcode: `typedef' ../sysdeps/generic/stdint.h:39: Error: Unrecognized opcode: `typedef' --- Signed-off-by: Tony Breeds --- arch/powerpc/include/asm/ptrace.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 9e2d84c..441179a 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h @@ -27,7 +27,9 @@ #ifdef __KERNEL__ #include #else +#ifndef __ASSEMBLY__ #include +#endif /* __ASSEMBLY__ */ #endif #ifndef __ASSEMBLY__ -- 1.6.6.1 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: 2.6.34: arch/powerpc/sysdev/micropatch.c not compiling
On Mon, Jul 05, 2010 at 09:45:11AM +0200, LEROY Christophe wrote: > When activating micropatch option, the kernel does not compile. powerpc problems should alos CC linuxppc-dev. > It looks like a spi_t is not defined anywhere. > > CC arch/powerpc/sysdev/micropatch.o > arch/powerpc/sysdev/micropatch.c: In function ‘cpm_load_patch’: > arch/powerpc/sysdev/micropatch.c:629: erreur: expected ‘=’, ‘,’, > ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token > arch/powerpc/sysdev/micropatch.c:629: erreur: ‘spp’ undeclared > (first use in this function) > arch/powerpc/sysdev/micropatch.c:629: erreur: (Each undeclared > identifier is reported only once > arch/powerpc/sysdev/micropatch.c:629: erreur: for each function it > appears in.) > cc1: warnings being treated as errors > arch/powerpc/sysdev/micropatch.c:630: erreur: ISO C89 interdit les > mélanges de déclarations et de code > arch/powerpc/sysdev/micropatch.c:671: erreur: ‘spi_t’ undeclared > (first use in this function) > arch/powerpc/sysdev/micropatch.c:671: erreur: expected expression > before ‘)’ token > make[1]: *** [arch/powerpc/sysdev/micropatch.o] Erreur 1 > make: *** [arch/powerpc/sysdev] Erreur 2 spi_t was removed in commit 644b2a680ccc51a9ec4d6beb12e9d47d2dee98e2 (powerpc/cpm: Remove SPI defines and spi structs). Anton, Kumar it looks like something along the lines of: diff --git a/arch/powerpc/sysdev/micropatch.c b/arch/powerpc/sysdev/micropatch.c index d8d6028..aa1785e 100644 --- a/arch/powerpc/sysdev/micropatch.c +++ b/arch/powerpc/sysdev/micropatch.c @@ -626,7 +626,6 @@ cpm_load_patch(cpm8xx_t *cp) volatile uint *dp;/* Dual-ported RAM. */ volatile cpm8xx_t *commproc; volatile iic_t *iip; - volatile spi_t *spp; volatile smc_uart_t *smp; int i; @@ -668,8 +667,8 @@ cpm_load_patch(cpm8xx_t *cp) /* Put SPI above the IIC, also 32-byte aligned. */ i = (RPBASE + sizeof(iic_t) + 31) & ~31; - spp = (spi_t *)&commproc->cp_dparam[PROFF_SPI]; - spp->spi_rpbase = i; + smp = (smc_uart_t *)&commproc->cp_dparam[PROFF_SPI]; + smp->smc_rpbase = i; # if defined(CONFIG_I2C_SPI_UCODE_PATCH) commproc->cp_cpmcr1 = 0x802a; Would help? Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCHv2 2/2] Update ibm,client-architecture call field based on device tree
On Mon, Feb 01, 2010 at 04:51:02PM -0600, Joel Schopp wrote: > static void __init prom_send_capabilities(void) > { > ihandle elfloader, root; > prom_arg_t ret; > + u32 *cores; > > root = call_prom("open", 1, 1, ADDR("/")); > if (root != 0) { > + /* > + * If you add to the struct, please be sure the 100 index > + * didn't change. The BUILD_BUG_ON is a reminder. > + */ > + cores = (u32 *) &ibm_architecture_vec[100]; > + if(*cores != NR_CPUS) > + prom_printf("client-architecture structure > corrupted\n"); > + *cores = (NR_CPUS / prom_smt_way()); > + prom_printf("setting client-architecture cores to %x\n", > *cores); I don't know if I'm painting a bike shed of if this is a real concern, but if *cores isn't NR_CPUS shouldn't we do nothing rather then clobbering it? Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: update ibm,client-architecture
On Mon, Dec 21, 2009 at 04:14:54PM -0600, Joel Schopp wrote: > It's a bad interface. No matter what you choose there will be a > downside. 1) If you choose NR_CPUS, the best case of how many you > could boot without SMT, then when you boot with SMT2 or SMT4 you can > get assigned more cpus than you can boot. 2) If you choose > NR_CPUS/4, the worst case of how many you could boot, and you get a > large machine with SMT2 or SMT1 you might have said you support less > cpus than you actually do and thus not boot all the cpus. So no > matter what you choose you could be not booting cpus in some > theoretical scenario. We're far enough through boot to determine the threading model, so you /could/ work out what SMT we're in and divide NR_CPUS by that and give that to firmware. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: update ibm,client-architecture
On Mon, Dec 21, 2009 at 12:22:09PM -0600, Joel Schopp wrote: > 4 is the new 2. Since the actual threads per core is unknown at > this point in boot you have to be conservative and go with the > maximum number of any processor. See page 4 of these charts: > http://www.power.org/events/powercon09/taiwan09/IBM_Overview_POWER7.pdf Sure P7 /can/ be 4-way SMT, but consider the case where you know you have 128 threads so you set NR_CPUS to 128, then you boot with "max cores" of 32, so you lose half of your threads. I guess that's only a problem when you build your own kernels, distros are probably setting NR_CPUS high enough to cover all SMT2 systems anyway. I guess if the patch only set the "max cores" and described why, I'd (FWIW :D) be more comfortable. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: update ibm,client-architecture
On Fri, Dec 18, 2009 at 03:07:32PM -0600, Joel Schopp wrote: > In order to boot with more than 64 cores on machines that support the > ibm,client-architecture RTAS call a new field has been added to the > structure. This patch updates that field and adds a few others in the > process. It would be good if this could go in as a bugfix. But it's not really is it? What does it fix? > Signed-off-by: Joel Schopp > > Index: linux-2.6.git/arch/powerpc/kernel/prom_init.c > === > --- linux-2.6.git.orig/arch/powerpc/kernel/prom_init.c > +++ linux-2.6.git/arch/powerpc/kernel/prom_init.c > @@ -654,6 +654,9 @@ static void __init early_cmdline_parse(v > #define OV5_CMO 0x00 > #endif > > +/* Option Vector 6: IBM PAPR hints */ > +#define OV6_LINUX0x02/* Linux is our OS */ > + > /* > * The architecture vector has an array of PVR mask/value pairs, > * followed by # option vectors - 1, followed by the option vectors. > @@ -665,7 +668,7 @@ static unsigned char ibm_architecture_ve > W(0x), W(0x0f03), /* all 2.06-compliant */ > W(0x), W(0x0f02), /* all 2.05-compliant */ > W(0xfffe), W(0x0f01), /* all 2.04-compliant and earlier */ > - 5 - 1, /* 5 option vectors */ > + 6 - 1, /* 6 option vectors */ > > /* option vector 1: processor architectures supported */ > 3 - 2, /* length */ > @@ -697,12 +700,26 @@ static unsigned char ibm_architecture_ve > 0, /* don't halt */ > > /* option vector 5: PAPR/OF options */ > - 5 - 2, /* length */ > + 13 - 2, /* length */ > 0, /* don't ignore, don't halt */ > OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY | > OV5_DONATE_DEDICATE_CPU | OV5_MSI, > 0, > OV5_CMO, > + 0, /* reserved */ > + 0, /* reserved */ > + 0, /* reserved */ > + 0, /* reserved */ Not so much reserved, as unused by us. > + W(NR_CPUS/4), /* max cores supported */ 4? I can see a case for 2 or just plain NR_CPUS, but 4 is wrong. > + /* option vector 6: IBM PAPR hints */ > + 4 - 2, We all know this is a length, but please follow the style in this structure. > + 0, /* reserved */ > + 0, /* 1 == no secondary pteg */ I think the "1 == " confuses things. > + OV6_LINUX, Does filling in the vector actually let us boot on systems where we do not already? > + > + /* option vector 7: IBM PAPR OS identification */ > + /* a human readable ascii string will go here */ Either fill it in or leave the comments out. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE
On Tue, Sep 15, 2009 at 03:57:02PM +1000, Benjamin Herrenschmidt wrote: > diff --git a/arch/powerpc/relocs_check.pl b/arch/powerpc/relocs_check.pl > new file mode 100755 > index 000..215e966 > --- /dev/null > +++ b/arch/powerpc/relocs_check.pl > @@ -0,0 +1,57 @@ > +#!/usr/bin/perl > + > +# Copyright © 2009 IBM Corporation > + > +# This program is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public License > +# as published by the Free Software Foundation; either version > +# 2 of the License, or (at your option) any later version. > + > +# This script checks the relcoations of a vmlinux for "suspicious" > +# relocations. > + > +use strict; > +use warnings; > + > +if ($#ARGV != 1) { > + print "$#ARGV\n"; Ooops that line should have been taken out. Sorry. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: 2.6.31-rc5-git2 crash [net/core/flow.c:flow_cache_new_hashrnd]
On Fri, Aug 07, 2009 at 01:13:54PM +1000, Benjamin Herrenschmidt wrote: > I think Tony did yes. Not sure what's the status with the "enterprise" > distros. It's fixed in F11 and F12 (thanks to dwmw2), it's in my for-1.3.15 branch for yaboot. We're working on updateing the version in the enterprise, we'll see what the next release holds. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: Can't boot 2.6.30 powerpc kernel under qemu.
On Mon, Jun 29, 2009 at 06:34:06PM -0500, Rob Landley wrote: > Cool! Is there a reason it's hidden? (Or at least not listed in either > vger.kernel.org's list info page Because it's not hosted on vger :( ... I guess we're controll freaks! :D > or in the "Maling lists" page linked from > ozlabs.org's top level web page.) Ahh this is becuase we're currently on the process of moving the lists to "lists.ozlabs.org", there is an alias in place so the old address still works. So at some level it's just bad timing :( We'll do what we can to make this easier during the transition. >Just curious, I couldn't find it when I > looked in the obvious (to me) places. Not to be flipant but it's in the MAINTAINERS file: --- LINUX FOR POWERPC (32-BIT AND 64-BIT) P: Benjamin Herrenschmidt M: b...@kernel.crashing.org P: Paul Mackerras M: pau...@samba.org W: http://www.penguinppc.org/ L: linuxppc-...@ozlabs.org T: git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git S: Supported --- > P.S. Yes I tried google: top hit for "linux powerpc list" is penguinppc.org, > which links to mailing lists on the right which is the ozlabs.org page that > doesn't list linuxppc-dev. In fact the entire first page of google hits for > that search doesn't give a hint of the existence of that list, although some > of the later ones might if I clicked through more of them... Rats, not really sure what we can do about that :( Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] Re:[BUILD FAILURE 04/04] Next June 04:PPC64 randconfig [drivers/net/ucc_geth.o]
On Thu, Jun 11, 2009 at 07:26:04AM +0530, Subrata Modak wrote: > On Thu, 2009-06-11 at 11:05 +1000, Stephen Rothwell wrote: > > Hi Subrata, > > > > On Wed, 10 Jun 2009 23:13:23 +0530 Subrata Modak > > wrote: > > > > > > /* Find the TBI PHY. If it's not there, we don't support SGMII */ > > > - ph = of_get_property(np, "tbi-handle", NULL); > > > + ph = (phandle *)of_get_property(np, "tbi-handle", NULL); > > > > You don't need this cast because of_get_property() returns "void *". > > Stephen, > > True. But without this gcc complains: > > CC [M] drivers/net/ucc_geth.o > drivers/net/ucc_geth.c: In function ‘ucc_geth_probe’: > drivers/net/ucc_geth.c:3824: warning: assignment discards qualifiers > from pointer target type > > Else gcc just builds fine: > > CC [M] drivers/net/ucc_geth.o > > This is an just an extra caution to fix both the build and warning > regression(s). ph needs to be const. I think the following untested (and hence un-signed-off-by) patch is closer, however I also think that the whole SGMII setup code could use the various OF helper functions better :) diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index e2f2e91..796253d 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -3603,6 +3603,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma struct resource res; struct device_node *phy; int err, ucc_num, max_speed = 0; + const phandle *ph; const u32 *fixed_link; const unsigned int *prop; const char *sprop; @@ -3821,7 +3822,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma /* Find the TBI PHY. If it's not there, we don't support SGMII */ ph = of_get_property(np, "tbi-handle", NULL); if (ph) { - struct device_node *tbi = of_find_node_by_phandle(*ph); + struct device_node *tbi = of_find_node_by_phandle(*ph), *mdio; struct of_device *ofdev; struct mii_bus *bus; const unsigned int *id; Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 1/1] Remove __devinit annotation from pcibios_claim_one_bus()
pcibios_finish_adding_to_bus() is NOT annotated __devinit but it calls pcibios_claim_one_bus(). pcibios_finish_adding_to_bus() is called from at least the rpadlpar code which also is NOT annotated __devinit. The annotation seems bogus so remove it. Found by Jeremy Huddleston a reported at: http://bugzilla.kernel.org/show_bug.cgi?id=13228 Signed-off-by: Tony Breeds --- arch/powerpc/kernel/pci-common.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 0f41812..a9f988f 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -1469,7 +1469,7 @@ void __init pcibios_resource_survey(void) * rest of the code later, for now, keep it as-is as our main * resource allocation function doesn't deal with sub-trees yet. */ -void __devinit pcibios_claim_one_bus(struct pci_bus *bus) +void pcibios_claim_one_bus(struct pci_bus *bus) { struct pci_dev *dev; struct pci_bus *child_bus; -- 1.6.0.6 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: drivers/video/logo/logo_linux_mono.c build error
On Mon, Apr 27, 2009 at 02:50:31PM -0700, Andrew Morton wrote: > > powerpc allmodconfig, current mainline: > > drivers/video/logo/logo_linux_mono.c:11: error: logo_linux_mono_data causes a > section type conflict > > switching it from __initconst to __initdata "fixes" it. > > I'm (illegally) using gcc-4.1.0. You could use the compilers at: http://bakeyournoodle.com/cross/ Currently x86_64 hosted only, but i686 hosted compilers are building now :) Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: Fedora on the ibm power 275
On Fri, Apr 24, 2009 at 01:04:53AM +0100, Freeman Wiser wrote: > Hey I saw that Jim installed Fedora on the 275, can you tell me how? I just > bought one of the 275s and am not really ibm savvy, and was going to sell it > when I came across Jim's post here: > > http://lists.infradead.org/pipermail/fedora-ppc/2008-November/001114.html Hmm didn't know that list existed. Basially grabbibng the DVD or boot.iso for Fedora-10 should "just work". having said that I haven't tried it. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
[PATCH 1/1] Fix build failure drivers/parport/parport_pc.c for powerpc
In commit 51dcdfec6a274afc1c6fce180d582add9ff512c0 (parport: Use the PCI IRQ if offered) parport_pc_probe_port() gained an irqflags arg. This isn't being supplied on powerpc. This patch make powerpc fallback to the old behaviour, that is using "0" for irqflags. Fixes build failure: In file included from drivers/parport/parport_pc.c:68: arch/powerpc/include/asm/parport.h: In function 'parport_pc_find_nonpci_ports': arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port' arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port' arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port' make[3]: *** [drivers/parport/parport_pc.o] Error 1 Signed-off-by: Tony Breeds --- Resend due to MUA badness arch/powerpc/include/asm/parport.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/parport.h b/arch/powerpc/include/asm/parport.h index 414c50e..94942d6 100644 --- a/arch/powerpc/include/asm/parport.h +++ b/arch/powerpc/include/asm/parport.h @@ -29,7 +29,7 @@ static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) prop = of_get_property(np, "interrupts", NULL); if (!prop) continue; - if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL) != NULL) + if (parport_pc_probe_port(io1, io2, prop[0], autodma, NULL, 0) != NULL) count++; } return count; -- 1.6.0.6 ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH] Quieten arch/powerpc in a allmodconfig build.
On Fri, Apr 10, 2009 at 12:46:06AM +0200, Segher Boessenkool wrote: > -Wno-unused or -Wno-unused-pparameter and/or -Wno-unused-variable. But I > thought this was about uninitialised var warnings? -Wno-uninitialized > for that one. > If you are asking for a GCC option that will warn for all suspect cases > _except_ for the ones where it is obvious to you there is no problem: > you could try -Wesp. Ooops I was asking for -Wno-uninitialized. I'll try a build with: -Wno-uninitialized -Wesp and see how that goes. Thanks. Yours Tony ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev