[PATCH] of: Fix export of of_find_matching_node_and_match()
Commit 50c8af4cf9, of: introduce for_each_matching_node_and_match() renamed of_find_matching_node() to of_find_matching_node_and_match() and created a new static inline of_find_matching_node() wrapper around the new name. However, the change neglected to change the EXPORT_SYMBOL() reference causing build errors for modules. This patch fixes the EXPORT_SYMBOL() statement. Discovered on a PowerPC Efika build with the mpc52xx_uart driver being built as a module. Reported-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Grant Likely grant.lik...@secretlab.ca Cc: Stephen Warren swar...@nvidia.com Cc: Rob Herring rob.herr...@calxeda.com Cc: Anatolij Gustschin ag...@denx.de --- I'll push this patch out to my tree ASAP. drivers/of/base.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index db8d211..2390ddb 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -629,7 +629,7 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from, read_unlock(devtree_lock); return np; } -EXPORT_SYMBOL(of_find_matching_node); +EXPORT_SYMBOL(of_find_matching_node_and_match); /** * of_modalias_node - Lookup appropriate modalias for a device node -- 1.7.10.4 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] of: Fix export of of_find_matching_node_and_match()
On Wed, Dec 19, 2012 at 10:58 AM, Grant Likely grant.lik...@secretlab.ca wrote: Commit 50c8af4cf9, of: introduce for_each_matching_node_and_match() renamed of_find_matching_node() to of_find_matching_node_and_match() and created a new static inline of_find_matching_node() wrapper around the new name. However, the change neglected to change the EXPORT_SYMBOL() reference causing build errors for modules. This patch fixes the EXPORT_SYMBOL() statement. Discovered on a PowerPC Efika build with the mpc52xx_uart driver being built as a module. Reported-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Grant Likely grant.lik...@secretlab.ca Cc: Stephen Warren swar...@nvidia.com Cc: Rob Herring rob.herr...@calxeda.com Cc: Anatolij Gustschin ag...@denx.de Rob, I've just pushed this out to my devicetree/merge branch. If you've got any fixes queued up for Linus, then please pull this in before sending them on to him. Otherwise I'll send Linus a pull req for this fix this evening. Ether way, please reply to let me know what you're going to do. g. The following changes since commit 752451f01c4567b506bf4343082682dbb8fb30dd: Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux (2012-12-18 16:51:10 -0800) are available in the git repository at: git://git.secretlab.ca/git/linux-2.6 devicetree/merge for you to fetch changes up to 80c2022e5645a1a789531d13010292c5c18bf1db: of: Fix export of of_find_matching_node_and_match() (2012-12-19 10:58:53 +) Grant Likely (1): of: Fix export of of_find_matching_node_and_match() drivers/of/base.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- I'll push this patch out to my tree ASAP. drivers/of/base.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index db8d211..2390ddb 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -629,7 +629,7 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from, read_unlock(devtree_lock); return np; } -EXPORT_SYMBOL(of_find_matching_node); +EXPORT_SYMBOL(of_find_matching_node_and_match); /** * of_modalias_node - Lookup appropriate modalias for a device node -- 1.7.10.4 -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] of: Fix export of of_find_matching_node_and_match()
On 12/19/2012 05:02 AM, Grant Likely wrote: On Wed, Dec 19, 2012 at 10:58 AM, Grant Likely grant.lik...@secretlab.ca wrote: Commit 50c8af4cf9, of: introduce for_each_matching_node_and_match() renamed of_find_matching_node() to of_find_matching_node_and_match() and created a new static inline of_find_matching_node() wrapper around the new name. However, the change neglected to change the EXPORT_SYMBOL() reference causing build errors for modules. This patch fixes the EXPORT_SYMBOL() statement. Discovered on a PowerPC Efika build with the mpc52xx_uart driver being built as a module. Reported-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Grant Likely grant.lik...@secretlab.ca Cc: Stephen Warren swar...@nvidia.com Cc: Rob Herring rob.herr...@calxeda.com Cc: Anatolij Gustschin ag...@denx.de Rob, I've just pushed this out to my devicetree/merge branch. If you've got any fixes queued up for Linus, then please pull this in before sending them on to him. Otherwise I'll send Linus a pull req for this fix this evening. Ether way, please reply to let me know what you're going to do. The only item on my todo is this one: of: define struct device in of_platform.h if !OF_DEVICE and !OF_ADDRESS But I'm not going to get to it today if you want to pick it up. Rob g. The following changes since commit 752451f01c4567b506bf4343082682dbb8fb30dd: Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux (2012-12-18 16:51:10 -0800) are available in the git repository at: git://git.secretlab.ca/git/linux-2.6 devicetree/merge for you to fetch changes up to 80c2022e5645a1a789531d13010292c5c18bf1db: of: Fix export of of_find_matching_node_and_match() (2012-12-19 10:58:53 +) Grant Likely (1): of: Fix export of of_find_matching_node_and_match() drivers/of/base.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- I'll push this patch out to my tree ASAP. drivers/of/base.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/base.c b/drivers/of/base.c index db8d211..2390ddb 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -629,7 +629,7 @@ struct device_node *of_find_matching_node_and_match(struct device_node *from, read_unlock(devtree_lock); return np; } -EXPORT_SYMBOL(of_find_matching_node); +EXPORT_SYMBOL(of_find_matching_node_and_match); /** * of_modalias_node - Lookup appropriate modalias for a device node -- 1.7.10.4 -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ___ devicetree-discuss mailing list devicetree-disc...@lists.ozlabs.org https://lists.ozlabs.org/listinfo/devicetree-discuss ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] of: Fix export of of_find_matching_node_and_match()
On Wed, 19 Dec 2012 07:50:00 -0600, Rob Herring robherri...@gmail.com wrote: On 12/19/2012 05:02 AM, Grant Likely wrote: On Wed, Dec 19, 2012 at 10:58 AM, Grant Likely grant.lik...@secretlab.ca wrote: Commit 50c8af4cf9, of: introduce for_each_matching_node_and_match() renamed of_find_matching_node() to of_find_matching_node_and_match() and created a new static inline of_find_matching_node() wrapper around the new name. However, the change neglected to change the EXPORT_SYMBOL() reference causing build errors for modules. This patch fixes the EXPORT_SYMBOL() statement. Discovered on a PowerPC Efika build with the mpc52xx_uart driver being built as a module. Reported-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Grant Likely grant.lik...@secretlab.ca Cc: Stephen Warren swar...@nvidia.com Cc: Rob Herring rob.herr...@calxeda.com Cc: Anatolij Gustschin ag...@denx.de Rob, I've just pushed this out to my devicetree/merge branch. If you've got any fixes queued up for Linus, then please pull this in before sending them on to him. Otherwise I'll send Linus a pull req for this fix this evening. Ether way, please reply to let me know what you're going to do. The only item on my todo is this one: of: define struct device in of_platform.h if !OF_DEVICE and !OF_ADDRESS But I'm not going to get to it today if you want to pick it up. I don't see that one anywhere. Where did it come from? g. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] powerpc: Add support for context switching the TAR register
On Dec 19, 2012, at 12:03 AM, Ian Munsie wrote: From: Ian Munsie imun...@au1.ibm.com This patch adds support for enabling and context switching the Target Address Register in Power8. The TAR is a new special purpose register that can be used for computed branches with the bctar[l] (branch conditional to TAR) instruction in the same manner as the count and link registers. Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Matt Evans m...@ozlabs.org --- arch/powerpc/include/asm/cputable.h |3 ++- arch/powerpc/include/asm/processor.h |1 + arch/powerpc/include/asm/reg.h|3 +++ arch/powerpc/kernel/asm-offsets.c |1 + arch/powerpc/kernel/cpu_setup_power.S |7 +++ arch/powerpc/kernel/entry_64.S| 16 6 files changed, 30 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index 74458e69..cbbec56a 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h @@ -172,6 +172,7 @@ extern const char *powerpc_base_platform; #define CPU_FTR_ICSWX LONG_ASM_CONST(0x1000) #define CPU_FTR_VMX_COPY LONG_ASM_CONST(0x2000) #define CPU_FTR_TMLONG_ASM_CONST(0x4000) +#define CPU_FTR_BCTAR LONG_ASM_CONST(0x8000) #ifndef __ASSEMBLY__ @@ -417,7 +418,7 @@ extern const char *powerpc_base_platform; CPU_FTR_DSCR | CPU_FTR_SAO | \ CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD | \ CPU_FTR_ICSWX | CPU_FTR_CFAR | CPU_FTR_HVMODE | CPU_FTR_VMX_COPY | \ - CPU_FTR_DBELL | CPU_FTR_TM_COMP) + CPU_FTR_DBELL | CPU_FTR_TM_COMP | CPU_FTR_BCTAR) #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 8b2bf7a..cbbd82d 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -275,6 +275,7 @@ struct thread_struct { unsigned long dscr; int dscr_inherit; #endif + unsigned long tar; This needs a #ifdef CONFIG_PPC64 and personally I'd rather it be a CONFIG_PPC_BOOK3S_64. This will also ripple into other locations like asm-offsets.c. }; #define ARCH_MIN_TASKALIGN 16 diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index 5c9fe38..1fa8a56 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h @@ -257,6 +257,9 @@ #define SPRN_HRMOR0x139 /* Real mode offset register */ #define SPRN_HSRR00x13A /* Hypervisor Save/Restore 0 */ #define SPRN_HSRR10x13B /* Hypervisor Save/Restore 1 */ +#define SPRN_FSCR0x099 /* Facility Status Control Register */ +#define FSCR_TAR (18) /* Enable Target Adress Register */ +#define SPRN_TAR 0x32f /* Target Address Register */ #define SPRN_LPCR 0x13E /* LPAR Control Register */ #define LPCR_VPM0 (1ul (63-0)) #define LPCR_VPM1 (1ul (63-1)) diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 42a4243..77e941e 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -145,6 +145,7 @@ int main(void) DEFINE(TM_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16); #endif /* CONFIG_TRANSACTIONAL_MEM */ + DEFINE(THREAD_TAR, offsetof(struct thread_struct, tar)); DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags)); diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S index 57cf140..d29facb 100644 --- a/arch/powerpc/kernel/cpu_setup_power.S +++ b/arch/powerpc/kernel/cpu_setup_power.S @@ -56,6 +56,7 @@ _GLOBAL(__setup_cpu_power8) mfspr r3,SPRN_LPCR orisr3, r3, LPCR_AIL_3@h bl __init_LPCR + bl __init_FSCR bl __init_TLB mtlrr11 blr @@ -112,6 +113,12 @@ __init_LPCR: isync blr +__init_FSCR: + mfspr r3,SPRN_FSCR + ori r3,r3,FSCR_TAR + mtspr SPRN_FSCR,r3 + blr + __init_TLB: /* Clear the TLB */ li r6,128 diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index b3590c3..253885d 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S @@ -451,6 +451,17 @@ END_FTR_SECTION_IFSET(CPU_FTR_DSCR) std r23,_CCR(r1) std r1,KSP(r3) /* Set old stack pointer */ +BEGIN_FTR_SECTION + /* + * Back up the TAR across context switches. Note that the TAR is not + * available for use in the
Re: [PATCH] of: Fix export of of_find_matching_node_and_match()
On 12/19/2012 03:58 AM, Grant Likely wrote: Commit 50c8af4cf9, of: introduce for_each_matching_node_and_match() renamed of_find_matching_node() to of_find_matching_node_and_match() and created a new static inline of_find_matching_node() wrapper around the new name. However, the change neglected to change the EXPORT_SYMBOL() reference causing build errors for modules. This patch fixes the EXPORT_SYMBOL() statement. Discovered on a PowerPC Efika build with the mpc52xx_uart driver being built as a module. Oops. The patch is obviously correct, Reviewed-by: Stephen Warren swar...@nvidia.com I guess none of the ARM defconfigs enable any module that uses this, since I have built all of them multiple times recently:-( ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: PS3 platform is broken on Linux 3.7.0
On Fri, 2012-12-14 at 16:35 +0400, Phileas Fogg wrote: Hi, I wanted to bring to your attention the fact that the PS3 platform is broken on Linux 3.7.0. i'm not able to boot Linux 3.7.0 on my PS3 slim. Linux 3.6.10 boots just fine but not 3.7.0 When i try to boot Linux 3.7.0 then my PS3 shuts down. So i cloned the Linux powerpc GIT repository and tried to find out which commits broke the PS3 platform. After some time I tracked it down to 2 commits: Aneesh, do you have any idea what might be going on there ? Can you look at the PS3 hash code ? It's a bit different from the rest, you might have missed an update or two... Michael, same deal with PACA... Cheers, Ben. - commit 407821a34fce89b4f0b031dbab5cec7d059f46bc Author: Michael Ellerman mich...@ellerman.id.au Date: Fri Sep 7 15:31:44 2012 + powerpc: Initialise paca.data_offset with poison It's possible for the cpu_possible_mask to change between the time we initialise the pacas and the time we setup per_cpu areas. Obviously impossible cpus shouldn't ever be running, but stranger things have happened. So be paranoid and initialise data_offset with a poison value in case we don't set it up later. Based on a patch from Anton Blanchard. Signed-off-by: Michael Ellerman mich...@ellerman.id.au Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org commit 048ee0993ec8360abb0b51bdf8f8721e9ed62ec4 Author: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Date: Mon Sep 10 02:52:55 2012 + powerpc/mm: Add 64TB support Increase max addressable range to 64TB. This is not tested on real hardware yet. Reviewed-by: Paul Mackerras pau...@samba.org Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org -- The first commit causes my PS3 to shut down. If i revert it then i'm able to boot Linux 3.7.0 and even see some boot messages on my screen. But then it hangs. The second commit is the reason for the hang as i figured it out. I reverted both commits in current Linux 3.7.0 and was able to boot Linux 3.7.0 on my PS3 slim successfully. Regards ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev ___ 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 Tue, 2012-12-18 at 10:02 -0800, Linus Torvalds wrote: Anyway, I've pulled it in, but got a conflict on the kernel_thread cleanups from Al. And since the conflict was in the powerpc assembly code that I don't really know the details of, I did the straightforward resolve of it, but I'd like you to check it out. (I haven't pushed it out yet, I'm waiting for the allmodconfig to finish compiling, so if you see this email quickly, but don't see the powerpc merge yet, just wait a few minutes) Sorry for the delay, I verified that it looked right yesterday but didn't manage to actually test it until today due to a problem with our test farm. It's all good, thanks ! Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] powerpc: enable ARCH_USE_BUILTIN_BSWAP
By using the compiler intrinsics instead of hand-crafted opaque inline assembler for byte-swapping, we let the compiler see what's actually happening and it gets to use lwbrx/stwbrx instructions instead of a normal load/store coupled with a sequence of rlwimi instructions to move bits around. Compiled-tested only. It gave a code size reduction of almost 4% for ext2, and more like 2.5% for ext3/ext4. Signed-off-by: David Woodhouse david.woodho...@intel.com Acked-by: H. Peter Anvin h...@linux.intel.com --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 951a517..064e418 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -146,6 +146,7 @@ config PPC select MODULES_USE_ELF_RELA select GENERIC_KERNEL_EXECVE select CLONE_BACKWARDS + select ARCH_USE_BUILTIN_BSWAP config EARLY_PRINTK bool -- 1.8.0.1 -- dwmw2 smime.p7s Description: S/MIME cryptographic signature ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/5] perf/POWER7: Make generic event translations available in sysfs
On Tue, Dec 18, 2012 at 11:28:49PM -0800, Sukadev Bhattiprolu wrote: [PATCH 3/5] perf/POWER7: Make generic event translations available in sysfs Make the generic perf events in POWER7 available via sysfs. $ ls /sys/bus/event_source/devices/cpu/events branch-instructions branch-misses cache-misses cache-references cpu-cycles instructions stalled-cycles-backend stalled-cycles-frontend $ cat /sys/bus/event_source/devices/cpu/events/cache-misses event=0x400f0 This patch is based on commits that implement this functionality on x86. Eg: commit a47473939db20e3961b200eb00acf5fcf084d755 Author: Jiri Olsa jo...@redhat.com Date: Wed Oct 10 14:53:11 2012 +0200 perf/x86: Make hardware event translations available in sysfs Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- arch/powerpc/include/asm/perf_event_server.h | 25 +++ arch/powerpc/perf/core-book3s.c | 12 + arch/powerpc/perf/power7-pmu.c | 34 ++ 3 files changed, 71 insertions(+), 0 deletions(-) As you are adding new sysfs files, you must also add new Documentation/ABI entries at the same time. Please also do this for the other patches in this series that add new sysfs files. thanks, greg k-h ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 3/5] perf/POWER7: Make generic event translations available in sysfs
Greg KH [g...@kroah.com] wrote: | On Tue, Dec 18, 2012 at 11:28:49PM -0800, Sukadev Bhattiprolu wrote: | | [PATCH 3/5] perf/POWER7: Make generic event translations available in sysfs | | As you are adding new sysfs files, you must also add new | Documentation/ABI entries at the same time. Please also do this for the | other patches in this series that add new sysfs files. Ok. Will wait for any other review comments on this patchset and repost with the ABI info. Sukadev ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev