[PATCH 3/3] powerpc: ps3: Add missing set_freezable() for ps3_probe_thread()

2023-12-20 Thread Kevin Hao
The kernel thread function ps3_probe_thread() invokes the try_to_freeze() in its loop. But all the kernel threads are non-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao --- arch/powerpc

[PATCH 2/3] powerpc: mpc83xx: Use wait_event_freezable() for freezable kthread

2023-12-20 Thread Kevin Hao
wait_event_freezable() and then eliminate a function call. Signed-off-by: Kevin Hao --- arch/powerpc/platforms/83xx/suspend.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c index eed325ed08cc

[PATCH 1/3] powerpc: mpc83xx: Add the missing set_freezable() for agent_thread_fn()

2023-12-20 Thread Kevin Hao
The kernel thread function agent_thread_fn() invokes the try_to_freeze() in its loop. But all the kernel threads are non-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao --- arch/powerpc/platforms

[PATCH 0/3] powerpc: Fixes and optimization for the freezable kthread

2023-12-20 Thread Kevin Hao
Hi, The main changes include: - Invoke set_freezable() for the kthread which could be frozen - Drop redundant try_to_freeze() invocation Kevin Hao (3): powerpc: mpc83xx: Add the missing set_freezable() for agent_thread_fn() powerpc: mpc83xx: Use wait_event_freezable() for freezable

[PATCH] powerpc: Export mmu_feature_keys[] as non-GPL

2022-03-29 Thread Kevin Hao
_keys[] to the non-GPL modules too. Reported-by: Nathaniel Filardo Signed-off-by: Kevin Hao --- arch/powerpc/kernel/cputable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index ae0fdef0ac11..3a8cd40b6368 10

Re: [PATCH 3/5] of/platform: introduce a generic way to declare a platform bus

2016-08-27 Thread Kevin Hao
On Thu, Aug 25, 2016 at 08:44:56AM -0500, Rob Herring wrote: > On Mon, Aug 22, 2016 at 9:06 PM, Kevin Hao wrote: > > The specific buses which need to be probed at boot time are different > > between platforms. Instead of put all the buses into the default > > of_default_bu

[PATCH 5/5] powerpc/83xx: enable the default of probe

2016-08-22 Thread Kevin Hao
Use the default of probe function of_platform_default_populate_init() to kill the arch specific duplicated codes. Signed-off-by: Kevin Hao --- arch/powerpc/platforms/83xx/asp834x.c | 2 -- arch/powerpc/platforms/83xx/km83xx.c | 2 -- arch/powerpc/platforms/83xx/misc.c| 25

[PATCH 4/5] powerpc/83xx: factor out the common codes of setup arch functions

2016-08-22 Thread Kevin Hao
function even there is no such invocation in its original setup arch function. Signed-off-by: Kevin Hao --- arch/powerpc/platforms/83xx/asp834x.c | 4 +--- arch/powerpc/platforms/83xx/km83xx.c | 5 + arch/powerpc/platforms/83xx/misc.c| 8 arch/powerpc/platforms/83xx

[PATCH 3/5] of/platform: introduce a generic way to declare a platform bus

2016-08-22 Thread Kevin Hao
The specific buses which need to be probed at boot time are different between platforms. Instead of put all the buses into the default of_default_bus_match_table[] match tables, this patch introduces a general way to declare a platform bus. Signed-off-by: Kevin Hao --- drivers/of/platform.c

[PATCH 2/5] powerpc: introduce arch_enable_default_of_probe()

2016-08-22 Thread Kevin Hao
We can use this function to enable the default of probe for one board. Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/setup.h | 1 + arch/powerpc/kernel/of_platform.c | 9 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/setup.h b/arch

[PATCH 1/5] of/platform: introduce arch_want_default_of_probe()

2016-08-22 Thread Kevin Hao
k function arch_want_default_of_probe(), we can override it in arch specific code to enable/disable the default of probe per board. Signed-off-by: Kevin Hao --- arch/powerpc/kernel/of_platform.c | 5 + drivers/of/platform.c | 9 ++--- include/linux/of_platform.h | 1 + 3 files c

[PATCH 0/5] ppc32: use the default of_platform_default_populate_init() for 83xx boards

2016-08-22 Thread Kevin Hao
this method for the of probe. [1] https://patchwork.ozlabs.org/patch/658531/ Kevin Hao (5): of/platform: introduce arch_want_default_of_probe() powerpc: introduce arch_enable_default_of_probe() of/platform: introduce a generic way to declare a platform bus powerpc/83xx: factor out the common

Re: [PATCH] powerpc: populate the default bus with machine_arch_initcall

2016-08-11 Thread Kevin Hao
On Fri, Aug 12, 2016 at 02:39:32PM +1000, Michael Ellerman wrote: > Kevin Hao writes: > > > With the commit 44a7185c2ae6 ("of/platform: Add common method to > > populate default bus"), a default function is introduced to populate > > the default bus a

Re: [PATCH] powerpc: populate the default bus with machine_arch_initcall

2016-08-11 Thread Kevin Hao
On Thu, Aug 11, 2016 at 08:17:52AM -0500, Rob Herring wrote: > On Thu, Aug 11, 2016 at 6:09 AM, Kevin Hao wrote: > > With the commit 44a7185c2ae6 ("of/platform: Add common method to > > populate default bus"), a default function is introduced to populate > > the d

[PATCH] powerpc: populate the default bus with machine_arch_initcall

2016-08-11 Thread Kevin Hao
at a lower level than arch_initcall_sync. Since not all powerpc specific buses are added to the of_default_bus_match_table[], this causes some powerpc specific bus are not probed. Fix this by using a more preceding initcall. Signed-off-by: Kevin Hao --- Of course we can adjust the powerpc arch codes

Re: [PATCH for-4.8 V2 08/10] powerpc: use the jump label for cpu_has_feature

2016-07-25 Thread Kevin Hao
On Mon, Jul 25, 2016 at 04:28:49PM +1000, Nicholas Piggin wrote: > On Sat, 23 Jul 2016 14:42:41 +0530 > "Aneesh Kumar K.V" wrote: > > > From: Kevin Hao > > > > The cpu features are fixed once the probe of cpu features are done. > > And the function

Re: [PATCH v2 0/3] powerpc: tweak the kernel options for CRASH_DUMP and RELOCATABLE

2016-07-12 Thread Kevin Hao
Please ignore this. Forgot the CC list. Thanks, Kevin On Wed, Jul 13, 2016 at 09:12:53AM +0800, Kevin Hao wrote: > v2: > Compare to v1 [1], the main differences are: > - Still automatically select RELOCATABLE when CRASH_DUMP is enabled. > - Add a new patch to kill RELOCATABLE_PP

[PATCH v2 3/3] powerpc32: kill RELOCATABLE_PPC32

2016-07-12 Thread Kevin Hao
It is seldom used in the kernel code and can be easily replaced by either RELOCATABLE or PPC32. So there is no reason to keep a separate kernel option for this. Signed-off-by: Kevin Hao --- arch/powerpc/Kconfig | 4 arch/powerpc/include/asm/page.h | 6 +++--- arch/powerpc

[PATCH v2 2/3] powerpc: merge the RELOCATABLE config entries for ppc32 and ppc64

2016-07-12 Thread Kevin Hao
It makes no sense to keep two separate RELOCATABLE config entries for ppc32 and ppc64 respectively. Merge them into one and move it to a common place. Signed-off-by: Kevin Hao --- arch/powerpc/Kconfig | 65 ++-- 1 file changed, 27 insertions

[PATCH v2 1/3] powerpc32: booke: fix the build error when CRASH_DUMP is enabled

2016-07-12 Thread Kevin Hao
t doesn't have any strong reasons to make the RELOCATABLE depend on ADVANCED_OPTIONS. So remove this dependency to fix this issue. Signed-off-by: Kevin Hao --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kc

[PATCH v2 0/3] powerpc: tweak the kernel options for CRASH_DUMP and RELOCATABLE

2016-07-12 Thread Kevin Hao
anup for RELOCATABLE option. Kevin Hao (3): powerpc32: booke: fix the build error when CRASH_DUMP is enabled powerpc: merge the RELOCATABLE config entries for ppc32 and ppc64 powerpc32: kill RELOCATABLE_PPC32 arch/powerpc/Kconfig | 61 +++ arch

[PATCH v2 0/3] powerpc: tweak the kernel options for CRASH_DUMP and RELOCATABLE

2016-07-12 Thread Kevin Hao
anup for RELOCATABLE option. Kevin Hao (3): powerpc32: booke: fix the build error when CRASH_DUMP is enabled powerpc: merge the RELOCATABLE config entries for ppc32 and ppc64 powerpc32: kill RELOCATABLE_PPC32 arch/powerpc/Kconfig | 61 +++ arch

[PATCH v3] powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry

2015-10-22 Thread Kevin Hao
erate the race that we may get the wrong value and overwrite the tlb entry just updated by the other thread. We observe better performance using option b. So reserve an additional register to save the value of the esel_next. Signed-off-by: Kevin Hao --- v3: Move the load of TCD_ESEL_NEXT o

Re: [v2] powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry

2015-10-22 Thread Kevin Hao
On Fri, Oct 16, 2015 at 07:01:55PM -0500, Scott Wood wrote: > On Tue, Aug 18, 2015 at 03:55:56PM +0800, Kevin Hao wrote: > > diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S > > index e4185581c5a7..3a5b89dfb5a1 100644 > > --- a/arch/powerpc/mm/tlb_low

Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

2015-09-21 Thread Kevin Hao
On Mon, Sep 21, 2015 at 09:16:59PM -0500, Scott Wood wrote: > On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote: > > With the reimplementation of probe_kernel_address() in commit > > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using > > probe_kernel_read()

Re: [PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

2015-09-21 Thread Kevin Hao
On Tue, Sep 22, 2015 at 12:08:17PM +1000, Michael Ellerman wrote: > On Mon, 2015-09-21 at 17:22 +0800, Kevin Hao wrote: > > With the reimplementation of probe_kernel_address() in commit > > ecc83243e1d4 ("uaccess: reimplement probe_kernel_address() using > > probe_kernel

[PATCH] powerpc: fsl_pci: cast the regs->nip to void * when passing it to probe_kernel_address()

2015-09-21 Thread Kevin Hao
ithout a cast [-Werror] ret = probe_kernel_address(regs->nip, inst); ^ Signed-off-by: Kevin Hao --- This is against linux-next. arch/powerpc/sysdev/fsl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c ind

Re: [v2,3/6] powerpc: kill mfvtb()

2015-09-07 Thread Kevin Hao
On Mon, Sep 07, 2015 at 07:29:42PM +1000, Michael Ellerman wrote: > On Mon, 2015-24-08 at 11:20:25 UTC, Kevin Hao wrote: > > This function is only used by get_vtb(). They are almost the same > > except the reading from the real register. Move the mfspr() to > > get_vtb()

[PATCH v2 6/6] powerpc: use jump label for mmu_has_feature

2015-08-24 Thread Kevin Hao
enabled b xxx if MMU_FTR_XXX is not enabled Signed-off-by: Kevin Hao --- v2: Use the open-coded definition and initialization for mmu_feat_keys[]. arch/powerpc/include/asm/mmu.h | 29 + arch/powerpc/kernel/cputable.c | 17 + arch/powerpc/kernel

[PATCH v2 5/6] powerpc: use the jump label for cpu_has_feature

2015-08-24 Thread Kevin Hao
enabled b xxx if CPU_FTR_XXX is not enabled Signed-off-by: Kevin Hao --- v2: Use the open-coded definition and initialization for cpu_feat_keys[]. arch/powerpc/include/asm/cpufeatures.h | 20 arch/powerpc/include/asm/cputable.h| 8 arch/powerpc/kernel

[PATCH v2 4/6] powerpc: move the cpu_has_feature to a separate file

2015-08-24 Thread Kevin Hao
will introduces various recursive inclusion. And it is very hard to fix that. So we choose to move the function cpu_has_feature to a separate header file before using the jump label for it. No functional change. Signed-off-by: Kevin Hao --- v2: No change. arch/powerpc/include/asm/cacheflush.h

[PATCH v2 3/6] powerpc: kill mfvtb()

2015-08-24 Thread Kevin Hao
of jump label for cpu_has_feature(). Signed-off-by: Kevin Hao --- v2: No change. arch/powerpc/include/asm/reg.h | 9 - arch/powerpc/include/asm/time.h | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h

[PATCH v2 2/6] powerpc: invoke jump_label_init() in a much earlier stage

2015-08-24 Thread Kevin Hao
So we can use static_key for cpu_has_feature() and mmu_has_feature(). Signed-off-by: Kevin Hao --- v2: No change. arch/powerpc/kernel/setup_32.c | 2 ++ arch/powerpc/kernel/setup_64.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel

[PATCH v2 1/6] jump_label: make it possible for the archs to invoke jump_label_init() much earlier

2015-08-24 Thread Kevin Hao
For some archs (such as powerpc) would want to invoke jump_label_init() in a much earlier stage. So check static_key_initialized in order to make sure this function run only once. Signed-off-by: Kevin Hao --- v2: No change. kernel/jump_label.c | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v2 0/6] powerpc: use jump label for {cpu,mmu}_has_feature()

2015-08-24 Thread Kevin Hao
/pipermail/linuxppc-dev/2013-September/111026.html Kevin Hao (6): jump_label: make it possible for the archs to invoke jump_label_init() much earlier powerpc: invoke jump_label_init() in a much earlier stage powerpc: kill mfvtb() powerpc: move the cpu_has_feature to a separate file powerpc

Re: [PATCH 3/8] jump_label: introduce DEFINE_STATIC_KEY_{TRUE,FALSE}_ARRAY macros

2015-08-20 Thread Kevin Hao
On Fri, Aug 21, 2015 at 08:40:59AM +0200, Ingo Molnar wrote: > Please also Cc: peterz and me to the next submission of the series - static > key > (and jump label) changes go through the locking tree normally, and there's a > number of changes pending already for v4.3: Sure. Thanks, Kevin pg

Re: [PATCH 3/8] jump_label: introduce DEFINE_STATIC_KEY_{TRUE,FALSE}_ARRAY macros

2015-08-20 Thread Kevin Hao
On Fri, Aug 21, 2015 at 08:28:26AM +0200, Ingo Molnar wrote: > > * Kevin Hao wrote: > > > These are used to define a static_key_{true,false} array. > > > > Signed-off-by: Kevin Hao > > --- > > include/linux/jump_label.h | 6 ++ > > 1 file c

Re: [PATCH 3/8] jump_label: introduce DEFINE_STATIC_KEY_{TRUE,FALSE}_ARRAY macros

2015-08-20 Thread Kevin Hao
On Thu, Aug 20, 2015 at 08:31:58PM +0200, Peter Zijlstra wrote: > On Thu, Aug 20, 2015 at 08:14:31PM +0800, Kevin Hao wrote: > > These are used to define a static_key_{true,false} array. > > Yes but why... > > there might have been some clue in the patches you didn'

Re: [PATCH 1/8] jump_label: no need to acquire the jump_label_mutex in jump_lable_init()

2015-08-20 Thread Kevin Hao
On Thu, Aug 20, 2015 at 08:29:03PM +0200, Peter Zijlstra wrote: > On Thu, Aug 20, 2015 at 08:14:29PM +0800, Kevin Hao wrote: > > The jump_label_init() run in a very early stage, even before the > > sched_init(). So there is no chance for concurrent access of the > > jump labe

[PATCH 8/8] powerpc: use jump label for mmu_has_feature

2015-08-20 Thread Kevin Hao
enabled b xxx if MMU_FTR_XXX is not enabled Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/mmu.h | 29 + arch/powerpc/kernel/cputable.c | 15 +++ arch/powerpc/kernel/setup_32.c | 1 + arch/powerpc/kernel/setup_64.c | 1 + 4 files changed, 46

[PATCH 7/8] powerpc: use the jump label for cpu_has_feature

2015-08-20 Thread Kevin Hao
enabled b xxx if CPU_FTR_XXX is not enabled Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/cpufeatures.h | 20 arch/powerpc/include/asm/cputable.h| 8 arch/powerpc/kernel/cputable.c | 18 ++ arch/powerpc/kernel/setup_32.c

[PATCH 6/8] powerpc: move the cpu_has_feature to a separate file

2015-08-20 Thread Kevin Hao
will introduces various recursive inclusion. And it is very hard to fix that. So we choose to move the function cpu_has_feature to a separate header file before using the jump label for it. No functional change. Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/cacheflush.h | 1 + arch

[PATCH 5/8] powerpc: kill mfvtb()

2015-08-20 Thread Kevin Hao
of jump label for cpu_has_feature(). Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/reg.h | 9 - arch/powerpc/include/asm/time.h | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index

[PATCH 4/8] powerpc: invoke jump_label_init() in a much earlier stage

2015-08-20 Thread Kevin Hao
So we can use static_key for cpu_has_feature() and mmu_has_feature(). Signed-off-by: Kevin Hao --- arch/powerpc/kernel/setup_32.c | 2 ++ arch/powerpc/kernel/setup_64.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index

[PATCH 3/8] jump_label: introduce DEFINE_STATIC_KEY_{TRUE, FALSE}_ARRAY macros

2015-08-20 Thread Kevin Hao
These are used to define a static_key_{true,false} array. Signed-off-by: Kevin Hao --- include/linux/jump_label.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 7f653e8f6690..5c1d6a49dd6b 100644 --- a/include/linux

[PATCH 2/8] jump_label: make it possible for the archs to invoke jump_label_init() much earlier

2015-08-20 Thread Kevin Hao
For some archs (such as powerpc) would want to invoke jump_label_init() in a much earlier stage. So check static_key_initialized in order to make sure this function run only once. Signed-off-by: Kevin Hao --- kernel/jump_label.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel

[PATCH 1/8] jump_label: no need to acquire the jump_label_mutex in jump_lable_init()

2015-08-20 Thread Kevin Hao
The jump_label_init() run in a very early stage, even before the sched_init(). So there is no chance for concurrent access of the jump label table. Signed-off-by: Kevin Hao --- kernel/jump_label.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/jump_label.c b/kernel/jump_label.c

[PATCH 0/8] powerpc: use jump label for {cpu,mmu}_has_feature()

2015-08-20 Thread Kevin Hao
(qemu). This patch series is against linux-next. [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2013-September/111026.html Kevin Hao (8): jump_label: no need to acquire the jump_label_mutex in jump_lable_init() jump_label: make it possible for the archs to invoke jump_label_init

[PATCH v2] powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry

2015-08-18 Thread Kevin Hao
erate the race that we may get the wrong value and overwrite the tlb entry just updated by the other thread. We observe better performance using option b. So reserve an additional register to save the value of the esel_next. Signed-off-by: Kevin Hao --- v2: Use an additional register for s

Re: [PATCH 3/3] powerpc/e6500: hw tablewalk: order the memory access when acquire/release tcd lock

2015-08-17 Thread Kevin Hao
On Fri, Aug 14, 2015 at 07:44:23PM -0500, Scott Wood wrote: > On Fri, 2015-08-14 at 15:13 +0800, Kevin Hao wrote: > > On Thu, Aug 13, 2015 at 10:39:19PM -0500, Scott Wood wrote: > > > On Thu, 2015-08-13 at 19:51 +0800, Kevin Hao wrote: > > > > I didn't find anyth

Re: [PATCH 2/3] powerpc/e6500: hw tablewalk: optimize a bit for tcd lock acquiring codes

2015-08-17 Thread Kevin Hao
On Fri, Aug 14, 2015 at 09:44:28PM -0500, Scott Wood wrote: > I tried a couple different benchmarks and didn't find a significant > difference, relative to the variability of the results running on the same > kernel. A patch that claims to "optimize a bit" as its main purpose ought to > show so

Re: [PATCH 3/3] powerpc/e6500: hw tablewalk: order the memory access when acquire/release tcd lock

2015-08-14 Thread Kevin Hao
On Thu, Aug 13, 2015 at 10:39:19PM -0500, Scott Wood wrote: > On Thu, 2015-08-13 at 19:51 +0800, Kevin Hao wrote: > > I didn't find anything unusual. But I think we do need to order the > > load/store of esel_next when acquire/release tcd lock. For acquire, > > add a da

Re: [PATCH 2/3] powerpc/e6500: hw tablewalk: optimize a bit for tcd lock acquiring codes

2015-08-14 Thread Kevin Hao
On Thu, Aug 13, 2015 at 01:44:43PM -0500, Scott Wood wrote: > On Thu, 2015-08-13 at 19:51 +0800, Kevin Hao wrote: > > It makes no sense to put the instructions for calculating the lock > > value (cpu number + 1) and the clearing of eq bit of cr1 in lbarx/stbcx > > loop.

[PATCH 3/3] powerpc/e6500: hw tablewalk: order the memory access when acquire/release tcd lock

2015-08-13 Thread Kevin Hao
ee any memory access order. So we still need "lwsync" for the two stores for lock and esel_next. Signed-off-by: Kevin Hao --- arch/powerpc/mm/tlb_low_64e.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S index e4185581c

[PATCH 2/3] powerpc/e6500: hw tablewalk: optimize a bit for tcd lock acquiring codes

2015-08-13 Thread Kevin Hao
the comparing for these two lock values in the lbz/bne loop. Signed-off-by: Kevin Hao --- arch/powerpc/mm/tlb_low_64e.S | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S index 765b419883f2..e4185581c5a7

[PATCH 1/3] powerpc/e6500: remove the stale TCD_LOCK macro

2015-08-13 Thread Kevin Hao
Since we moved the "lock" to be the first element of struct tlb_core_data in commit 82d86de25b9c ("powerpc/e6500: Make TLB lock recursive), this macro is not used by any code. Just delete it. Signed-off-by: Kevin Hao --- arch/powerpc/kernel/asm-offsets.c | 1 - 1 file chan

[PATCH] powerpc: pci: use %pR for printing struct resource

2015-06-11 Thread Kevin Hao
Use %pR to simplify the debug code. This also make the debug info more readable. Signed-off-by: Kevin Hao --- arch/powerpc/kernel/pci-common.c | 72 +++- 1 file changed, 19 insertions(+), 53 deletions(-) diff --git a/arch/powerpc/kernel/pci-common.c b/arch

[PATCH] powerpc: mpc85xx: flush the l1 cache before cpu down in kexec

2015-05-17 Thread Kevin Hao
proposing patch for this support [1]. Hope we can fix this issue for e500mc after that merged. [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2014-March/115830.html Signed-off-by: Kevin Hao --- arch/powerpc/platforms/85xx/smp.c | 51 +-- 1 file changed, 1

Re: [PATCH 1/2] powerpc: fix the dependency issue for CRASH_DUMP

2015-05-04 Thread Kevin Hao
On Mon, May 04, 2015 at 05:17:17PM -0500, Scott Wood wrote: > On Thu, 2015-04-30 at 20:29 +0800, Kevin Hao wrote: > > In the current code, the RELOCATABLE will be forcedly enabled when > > enabling CRASH_DUMP. But for ppc32, the RELOCABLE also depend on > > ADVANC

[PATCH 2/2] powerpc: merge the RELOCATABLE config entries for ppc32 and ppc64

2015-04-30 Thread Kevin Hao
It makes no sense to keep two separate RELOCATABLE config entries for ppc32 and ppc64 respectively. Merge them into one and move it to a common place. The dependency on ADVANCED_OPTIONS for ppc32 seems unnecessary, also drop it. Signed-off-by: Kevin Hao --- arch/powerpc/Kconfig | 65

[PATCH 1/2] powerpc: fix the dependency issue for CRASH_DUMP

2015-04-30 Thread Kevin Hao
t select is only for non-visible symbols and for symbols with no dependencies. As for a symbol like RELOCATABLE, it is definitely not suitable to select it. So choose to depend on it. Also enable the RELOCATABLE explicitly for the defconfigs which has CRASH_DUMP enabled. Signed-off-by: Kevin Hao -

[PATCH 0/2] powerpc: tweak the kernel options for CRASH_DUMP and RELOCATABLE

2015-04-30 Thread Kevin Hao
Hi, The first patch fixes a build error when CRASH_DUMP=y && ADVANCED_OPTIONS=n for ppc32. The second does some cleanup for RELOCATABLE option. Kevin Hao (2): powerpc: fix the dependency issue for CRASH_DUMP powerpc: merge the RELOCATABLE config entries for ppc32 and ppc64 arch

[PATCH 3/3] powerpc: add ticket spinlock

2015-03-16 Thread Kevin Hao
Convert the simple spinlock to ticket-based. This is based on arm64 codes and only cover the systems which doesn't support shared processors (a physical processor is multiplexed between several virtual processors). Signed-off-by: Kevin Hao --- arch/powerpc/Kconfig

[PATCH 2/3] powerpc: spinlock: refactor codes wrapped by PPC_HAS_LOCK_OWNER

2015-03-16 Thread Kevin Hao
Move all of them to one place. No function change. Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/spinlock.h | 71 - 1 file changed, 30 insertions(+), 41 deletions(-) diff --git a/arch/powerpc/include/asm/spinlock.h b/arch/powerpc/include/asm

[PATCH 1/3] powerpc: introduce PPC_HAS_LOCK_OWNER

2015-03-16 Thread Kevin Hao
ernel, we unconditionally encode the lock owner into the lock token for all the ppc64 platforms no matter it is a shared processor or not. This introduces a new kernel option to distinguish the platforms which need this hack. Signed-off-by: Kevin Hao --- arch/powerpc/Kconfig

[PATCH 0/3] powerpc: add ticket spinlock

2015-03-16 Thread Kevin Hao
]: 3.139 3.144 So the overhead for the 2 cpus platform is also trivial. Kevin Hao (3): powerpc: introduce PPC_HAS_LOCK_OWNER powerpc: spinlock: refactor codes wrapped by PPC_HAS_LOCK_OWNER powerpc: add ticket spinlock arch/powerpc/Kconfig | 8 ++ arch/powerpc

Re: [RFC] powerpc: use ticket spin lock for !CONFIG_PPC_SPLPAR

2015-03-12 Thread Kevin Hao
On Thu, Mar 12, 2015 at 04:24:10PM +0100, Torsten Duwe wrote: > But generally, which platforms would benefit most from this change? In theory, the more cpus the platform has, the more serious the thundering herd problem is. So the latest platforms which has more cpus would benefit most. Thanks, K

Re: [RFC] powerpc: use ticket spin lock for !CONFIG_PPC_SPLPAR

2015-03-12 Thread Kevin Hao
On Thu, Mar 12, 2015 at 10:13:27PM +1100, Benjamin Herrenschmidt wrote: > I would do the ifdef'ing differently, something like > > CONFIG_PPC_HAS_LOCK_OWNER > > CONFIG_PPC_TICKET_LOCKS depends on !PPC_HAS_LOCK_OWNER > > and use these two in the code... with SPLPAR select'ing HAS_LOCK_OWNER OK,

[PATCH v3 9/9] powerpc: kill PPC_OF

2015-03-12 Thread Kevin Hao
oes make no sense to keep such a option in the current kernel. Just kill it. Signed-off-by: Kevin Hao Acked-by: Benjamin Herrenschmidt --- arch/powerpc/Kconfig | 3 --- arch/powerpc/Kconfig.debug | 2 +- arch/powerpc/kernel/Makefile | 4 ++-- 3 files changed, 3 insertions(+), 6 deleti

[PATCH v3 8/9] fbdev: kconfig: replace PPC_OF with PPC

2015-03-12 Thread Kevin Hao
Signed-off-by: Kevin Hao Acked-by: Benjamin Herrenschmidt Acked-by: Tomi Valkeinen --- drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 3b818d7a0983..109462303087 100644 --- a/drivers/v

[PATCH v3 7/9] fbdev: remove the unnecessary includes of ppc specific header files

2015-03-12 Thread Kevin Hao
In the current kernel, we don't need to include these arch specific header files for ppc. Signed-off-by: Kevin Hao Acked-by: Benjamin Herrenschmidt Acked-by: Tomi Valkeinen --- drivers/video/fbdev/core/fbmon.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/video/fbdev

[PATCH v3 6/9] fbdev: riva: remove the dependency on PPC_OF

2015-03-12 Thread Kevin Hao
The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao Acked-by: Benjamin Herrenschmidt Acked-by:

[PATCH v3 5/9] fbdev: nvidia: remove the dependency on PPC_OF

2015-03-12 Thread Kevin Hao
The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao Acked-by: Benjamin Herrenschmidt Acked-by:

[PATCH v3 4/9] fbdev: imsttfb: remove the dependency on PPC_OF

2015-03-12 Thread Kevin Hao
The OF functionality has moved to a common place and be used by many archs. So we don't need to depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao Acked-by: Benjamin Herrenschmidt Acked-by: Tomi Valkeinen --- drivers/video/fbdev/imsttfb.

[PATCH v3 3/9] fbdev: radeon: replace PPC_OF with PPC

2015-03-12 Thread Kevin Hao
Signed-off-by: Kevin Hao Acked-by: Benjamin Herrenschmidt Acked-by: Tomi Valkeinen --- drivers/video/fbdev/Kconfig | 2 +- drivers/video/fbdev/aty/radeon_base.c| 24 drivers/video/fbdev/aty/radeon_monitor.c | 20 ++-- drivers/video

[PATCH v3 2/9] fbdev: aty128fb: replace PPC_OF with PPC

2015-03-12 Thread Kevin Hao
Signed-off-by: Kevin Hao Acked-by: Benjamin Herrenschmidt Acked-by: Tomi Valkeinen --- drivers/video/fbdev/aty/aty128fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index aedf2fbf9bf6..0156954bf

[PATCH v3 1/9] sata_svw: remove the dependency on PPC_OF

2015-03-12 Thread Kevin Hao
The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao Acked-by: Tejun Heo Acked-by: Ben

[PATCH v3 0/9] powerpc: kill PPC_OF

2015-03-12 Thread Kevin Hao
ave dependency issue if we put this series into 4.1. v3: No codes change, just add the acks from Ben and Tomi. Kevin Hao (9): sata_svw: remove the dependency on PPC_OF fbdev: aty128fb: replace PPC_OF with PPC fbdev: radeon: replace PPC_OF with PPC fbdev: imsttfb: remove the dependency on PP

[RFC] powerpc: use ticket spin lock for !CONFIG_PPC_SPLPAR

2015-03-12 Thread Kevin Hao
ozlabs.org/pipermail/linuxppc-dev/2014-February/115195.html [2] http://patchwork.ozlabs.org/patch/447563/ Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/spinlock.h | 79 ++- arch/powerpc/include/asm/spinlock_types.h | 16 +++ arch/powerpc/l

Re: [PATCH 03/15] fbdev: aty128fb: replace PPC_OF with PPC

2015-03-10 Thread Kevin Hao
On Tue, Mar 10, 2015 at 02:23:12PM +0200, Tomi Valkeinen wrote: > > I just sent out a v2 [1] a few hours earlier with some minor updates. We > > plan > > to merge this patch series via the powerpc tree in 4.1 cycle if I can > > collect > > all the acks from the corresponding driver maintainers. >

[PATCH v2] powerpc: book3e_64: fix the align size for paca_struct

2015-03-10 Thread Kevin Hao
s: 46 */ /* sum members: 1667, holes: 4, sum holes: 13 */ /* padding: 48 */ Signed-off-by: Kevin Hao --- v2: Only update the commit log. arch/powerpc/include/asm/paca.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/paca.h b/arch/powerpc/in

Re: [PATCH] powerpc64: use fixed lock token for !CONFIG_PPC_SPLPAR

2015-03-10 Thread Kevin Hao
On Tue, Mar 10, 2015 at 11:15:18AM +1100, Michael Ellerman wrote: > On Mon, 2015-03-09 at 17:53 +1100, Benjamin Herrenschmidt wrote: > > On Sat, 2015-03-07 at 19:19 +0800, Kevin Hao wrote: > > > It makes no sense to use a variant lock token on a platform which > > >

Re: [PATCH] powerpc: book3e_64: fix the align size for paca_struct

2015-03-10 Thread Kevin Hao
On Mon, Mar 09, 2015 at 06:31:25PM +1100, Benjamin Herrenschmidt wrote: > On Mon, 2015-03-09 at 09:13 +0800, Kevin Hao wrote: > > On Sun, Mar 08, 2015 at 08:13:26PM +1100, Benjamin Herrenschmidt wrote: > > > On Sat, 2015-03-07 at 19:14 +0800, Kevin Hao wrote: > > > >

Re: [PATCH] powerpc: book3e_64: fix the align size for paca_struct

2015-03-08 Thread Kevin Hao
On Sun, Mar 08, 2015 at 08:13:26PM +1100, Benjamin Herrenschmidt wrote: > On Sat, 2015-03-07 at 19:14 +0800, Kevin Hao wrote: > > All the cache line size of the current book3e 64bit SoCs are 64 bytes. > > So we should use this size to align the member of paca_struct. > > Wit

[PATCH] powerpc64: use fixed lock token for !CONFIG_PPC_SPLPAR

2015-03-07 Thread Kevin Hao
It makes no sense to use a variant lock token on a platform which doesn't support for shared-processor logical partitions. Actually we can eliminate a memory load by using a fixed lock token on these platforms. Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/spinlock.h | 8 ++

[PATCH] powerpc: book3e_64: fix the align size for paca_struct

2015-03-07 Thread Kevin Hao
, cachelines: 30, members: 46 */ /* sum members: 1667, holes: 6, sum holes: 141 */ /* padding: 112 */ After: /* size: 1728, cachelines: 27, members: 46 */ /* sum members: 1667, holes: 4, sum holes: 13 */ /* padding: 48 */ Signed-off-by: Kevin Hao --- arch

Re: [PATCH 03/15] fbdev: aty128fb: replace PPC_OF with PPC

2015-02-26 Thread Kevin Hao
On Fri, Feb 27, 2015 at 11:11:15AM +1100, Benjamin Herrenschmidt wrote: > On Sat, 2015-01-31 at 21:47 +0800, Kevin Hao wrote: > > The PPC_OF is a ppc specific option which is used to mean that the > > firmware device tree access functions are available. Since all the > >

[PATCH v2 11/11] powerpc: kill PPC_OF

2015-02-26 Thread Kevin Hao
oes make no sense to keep such a option in the current kernel. Just kill it. Signed-off-by: Kevin Hao --- v2: No change. arch/powerpc/Kconfig | 3 --- arch/powerpc/Kconfig.debug | 2 +- arch/powerpc/kernel/Makefile | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/

[PATCH v2 10/11] tty: kconfig: remove the superfluous dependency on PPC_OF

2015-02-26 Thread Kevin Hao
In the current kernel, the CONFIG_PPC_OF is always 'y' for the ppc arch. So we don't need to check it with other ppc specific options. Signed-off-by: Kevin Hao --- v2: No change. drivers/tty/serial/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH v2 09/11] mmc: kconfig: replace PPC_OF with PPC

2015-02-26 Thread Kevin Hao
Signed-off-by: Kevin Hao --- v2: No change. drivers/mmc/host/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 61ac63a3776a..7858d7a52818 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig

[PATCH v2 08/11] fbdev: kconfig: replace PPC_OF with PPC

2015-02-26 Thread Kevin Hao
Signed-off-by: Kevin Hao --- v2: No change. drivers/video/fbdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 3b818d7a0983..109462303087 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbd

[PATCH v2 07/11] fbdev: remove the unnecessary includes of ppc specific header files

2015-02-26 Thread Kevin Hao
In the current kernel, we don't need to include these arch specific header files for ppc. Signed-off-by: Kevin Hao --- v2: No change. drivers/video/fbdev/core/fbmon.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fb

[PATCH v2 06/11] fbdev: riva: remove the dependency on PPC_OF

2015-02-26 Thread Kevin Hao
The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao --- v2: No change. drivers/video/fbdev

[PATCH v2 05/11] fbdev: nvidia: remove the dependency on PPC_OF

2015-02-26 Thread Kevin Hao
The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao --- v2: No change. drivers/video/fbdev/n

[PATCH v2 04/11] fbdev: imsttfb: remove the dependency on PPC_OF

2015-02-26 Thread Kevin Hao
The OF functionality has moved to a common place and be used by many archs. So we don't need to depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao --- v2: Only print the error log when CONFIG_OF is enabled. drivers/video/fbdev/imsttfb.

[PATCH v2 03/11] fbdev: radeon: replace PPC_OF with PPC

2015-02-26 Thread Kevin Hao
Signed-off-by: Kevin Hao --- v2: No change. drivers/video/fbdev/Kconfig | 2 +- drivers/video/fbdev/aty/radeon_base.c| 24 drivers/video/fbdev/aty/radeon_monitor.c | 20 ++-- drivers/video/fbdev/aty/radeon_pm.c | 16 ---

[PATCH v2 02/11] fbdev: aty128fb: replace PPC_OF with PPC

2015-02-26 Thread Kevin Hao
Signed-off-by: Kevin Hao --- v2: No change. drivers/video/fbdev/aty/aty128fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index aedf2fbf9bf6..0156954bf340 100644 --- a/drivers/video/fbdev/aty/

[PATCH v2 01/11] sata_svw: remove the dependency on PPC_OF

2015-02-26 Thread Kevin Hao
The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao Acked-by: Tejun Heo --- v2: Add the ack from

[PATCH v2 00/11] powerpc: kill PPC_OF

2015-02-26 Thread Kevin Hao
f0b66a2cf68e ("PCI: Add pci_device_to_OF_node() stub for !CONFIG_OF") - Add the ack in v1 cycle. - Resolve the comments in v1 cycle. We plan to merge this patch series via the powerpc tree in 4.1 cycle. So please ack the corresponding patches if you are OK with these changes.

Re: [PATCH 1/3] powerpc/dma: Always configure ZONE_DMA32 correctly

2015-02-21 Thread Kevin Hao
On Sun, Feb 22, 2015 at 09:23:51AM +1100, Benjamin Herrenschmidt wrote: > No it won't, or am I missing something ? Ie, limit_zone_pfn() will only > reduce the size of the window, never increase it. Yes, you are right. Just overlook this. Sorry for the noise. Thanks, Kevin pgpH0IxyneZ4n.pgp Desc

  1   2   3   4   >