[PATCH v3 powerpc] perf/hv-24x7 fail 24x7 initcall if create_events_from_catalog() fails

2015-04-13 Thread Li Zhong
-by: Li Zhong --- arch/powerpc/perf/hv-24x7.c | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c index 9445a82..ead1420 100644 --- a/arch/powerpc/perf/hv-24x7.c +++ b/arch/powerpc/perf

Re: [PATCH v2] powerpc: Fix warning reported by verify_cpu_node_mapping()

2014-08-26 Thread Li Zhong
On 二, 2014-08-26 at 08:10 -0500, Nathan Fontenot wrote: > On 08/25/2014 02:22 AM, Li Zhong wrote: > > With commit 2fabf084b, during boottime, cpu_numa_callback() is called > > earlier(before their online) for each cpu, and verify_cpu_node_mapping() > > uses cpu_to_node() to c

Re: [PATCH v2] powerpc: Fix warning reported by verify_cpu_node_mapping()

2014-08-27 Thread Li Zhong
On 三, 2014-08-27 at 09:41 +0800, Li Zhong wrote: > On 二, 2014-08-26 at 08:10 -0500, Nathan Fontenot wrote: > > On 08/25/2014 02:22 AM, Li Zhong wrote: > > > With commit 2fabf084b, during boottime, cpu_numa_callback() is called > > > earlier(before thei

[RFC PATCH v3 1/3] powerpc: Fix warning reported by verify_cpu_node_mapping()

2014-08-27 Thread Li Zhong
: [0.00] CPU thread siblings 1/2/3 and 0 don't belong to the same node! As we don't actually do the checking during this early stage, so maybe we could directly call numa_setup_cpu() in do_init_bootmem(). Cc: Nishanth Aravamudan Cc: Nathan Fontenot Signed-off-by: Li Zhong --- arc

[RFC PATCH v3 2/3] powerpc: Only set numa node information for present cpus at boottime

2014-08-27 Thread Li Zhong
not present cpus, their numa information will be set up after they are started, as the original code did before commit 2fabf084b6ad. Cc: Nishanth Aravamudan Cc: Nathan Fontenot Signed-off-by: Li Zhong --- arch/powerpc/kernel/smp.c | 10 -- arch/powerpc/mm/numa.c| 2 +- 2 files

[RFC PATCH v3 3/3] powerpc: some changes in numa_setup_cpu()

2014-08-27 Thread Li Zhong
first online node to numa_cpu_lookup_table instead of 0 ( in case 0 might not be an online node? ) Cc: Nishanth Aravamudan Cc: Nathan Fontenot Signed-off-by: Li Zhong --- arch/powerpc/mm/numa.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/mm

Re: [RFC PATCH v3 1/3] powerpc: Fix warning reported by verify_cpu_node_mapping()

2014-10-07 Thread Li Zhong
back to 3.17-stable, as they fix some annoying > > > splats > > > during boot (non-fatal afaict, though)? > > > > Up to you really, I don't know how often/bad they were. I haven't added CC > > stable tags to the commits, so if you want them in stabl

Re: [PATCH] powerpc: Reimplement __get_SP() as a function not a define

2014-10-08 Thread Li Zhong
On 三, 2014-10-01 at 15:10 +1000, Anton Blanchard wrote: > Li Zhong points out an issue with our current __get_SP() > implementation. If ftrace function tracing is enabled (ie -pg > profiling using _mcount) we spill a stack frame on 64bit all the > time. > > If a function ca

Re: [RFC PATCH v3 1/3] powerpc: Fix warning reported by verify_cpu_node_mapping()

2014-10-13 Thread Li Zhong
back to 3.17-stable, as they fix some annoying > > > splats > > > during boot (non-fatal afaict, though)? > > > > Up to you really, I don't know how often/bad they were. I haven't added CC > > stable tags to the commits, so if you want them in stabl

Re: [RFC PATCH v3 1/3] powerpc: Fix warning reported by verify_cpu_node_mapping()

2014-10-15 Thread Li Zhong
On 二, 2014-10-14 at 15:35 +1100, Michael Ellerman wrote: > On Tue, 2014-10-14 at 10:39 +0800, Li Zhong wrote: > > On 二, 2014-10-07 at 08:33 -0700, Nishanth Aravamudan wrote: > > > On 07.10.2014 [17:28:38 +1100], Michael Ellerman wrote: > > > > On Fri, 2014-10-03 at 16

[PATCH powerpc] init nvram_pstore_info's buf_lock

2014-11-16 Thread Li Zhong
It seems nvram_pstore_info's buf_lock is not initialized before registering, which causes some strange behavior when trying to obtain the lock during kdump process. Signed-off-by: Li Zhong --- arch/powerpc/platforms/pseries/nvram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

Re: [powerpc] init nvram_pstore_info's buf_lock

2014-11-17 Thread Li Zhong
On 二, 2014-11-18 at 15:33 +1100, Michael Ellerman wrote: > On Mon, 2014-17-11 at 02:52:30 UTC, Li Zhong wrote: > > It seems nvram_pstore_info's buf_lock is not initialized before > > registering, which causes some strange behavior when trying to obtain > > the lock durin

[PATCH] powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning again

2013-05-06 Thread Li Zhong
Saw this warning again, and this time from the ret_from_fork path. It seems we could clear the back chain earlier in copy_thread(), which could cover both path, and also fix potential lockdep usage in schedule_tail(), or exception occurred before we clear the back chain. Signed-off-by: Li Zhong

Re: [PATCH] powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning again

2013-05-07 Thread Li Zhong
On Tue, 2013-05-07 at 10:32 +0800, Li Zhong wrote: > Saw this warning again, and this time from the ret_from_fork path. > > It seems we could clear the back chain earlier in copy_thread(), which > could cover both path, and also fix potential lockdep usage in > schedule_tail(

[PATCH v2] powerpc: Fix MAX_STACK_TRACE_ENTRIES too low warning again

2013-05-07 Thread Li Zhong
Saw this warning again, and this time from the ret_from_fork path. It seems we could clear the back chain earlier in copy_thread(), which could cover both path, and also fix potential lockdep usage in schedule_tail(), or exception occurred before we clear the back chain. Signed-off-by: Li Zhong

[RFC PATCH v3 0/5] powerpc: Support context tracking for Power pSeries

2013-05-12 Thread Li Zhong
exception are pulled into 3.10, so there is no dependency on tip tree. So patch #2 and #6 in previous version_2 is merged together. Li Zhong (5): powerpc: Syscall hooks for context tracking subsystem powerpc: Exception hooks for context tracking subsystem powerpc: Exit user context on

[RFC PATCH v3 1/5] powerpc: Syscall hooks for context tracking subsystem

2013-05-12 Thread Li Zhong
. TIF_NOHZ is added to _TIF_SYCALL_T_OR_A, so it is better for it to be in the same 16 bits with others in the group, so in the asm code, andi. with this group could work. Signed-off-by: Li Zhong Acked-by: Frederic Weisbecker --- arch/powerpc/include/asm/thread_info.h |7 +-- arch/powerpc

[RFC PATCH v3 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-12 Thread Li Zhong
6c1e0256fad84a843d915414e4b5973b7443d48d context_tracking: Restore correct previous context state on exception exit it is able for exception hooks to use the generic code above instead of a redundant arch implementation. Signed-off-by: Li Zhong --- arch/powerpc/kernel/traps.c | 91

[RFC PATCH v3 3/5] powerpc: Exit user context on notify resume

2013-05-12 Thread Li Zhong
This patch allows RCU usage in do_notify_resume, e.g. signal handling. It corresponds to [PATCH] x86: Exit RCU extended QS on notify resume commit edf55fda35c7dc7f2d9241c3abaddaf759b457c6 Signed-off-by: Li Zhong --- arch/powerpc/kernel/signal.c |5 + 1 file changed, 5 insertions

[RFC PATCH v3 4/5] powerpc: Use the new schedule_user API on userspace preemption

2013-05-12 Thread Li Zhong
This patch corresponds to [PATCH] x86: Use the new schedule_user API on userspace preemption commit 0430499ce9d78691f3985962021b16bf8f8a8048 Signed-off-by: Li Zhong --- arch/powerpc/include/asm/context_tracking.h | 10 ++ arch/powerpc/kernel/entry_64.S |3 ++- 2

[RFC PATCH v3 5/5] powerpc: select HAVE_CONTEXT_TRACKING for pSeries

2013-05-12 Thread Li Zhong
Start context tracking support from pSeries. Signed-off-by: Li Zhong --- arch/powerpc/platforms/pseries/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 9a0941b..023b288 100644 --- a/arch

Re: [RFC PATCH v3 0/5] powerpc: Support context tracking for Power pSeries

2013-05-13 Thread Li Zhong
On Mon, 2013-05-13 at 15:51 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2013-05-13 at 13:21 +0800, Li Zhong wrote: > > These patches try to support context tracking for Power arch, beginning with > > 64-bit pSeries. The codes are ported from that of the x86_64, and in each >

Re: [RFC PATCH v3 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-13 Thread Li Zhong
On Mon, 2013-05-13 at 15:57 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2013-05-13 at 13:21 +0800, Li Zhong wrote: > > int recover = 0; > > + enum ctx_state prev_state; > > + > > + prev_state = exception_enter(); > > Please make it nicer: >

Re: [RFC PATCH v3 0/5] powerpc: Support context tracking for Power pSeries

2013-05-13 Thread Li Zhong
On Mon, 2013-05-13 at 18:59 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2013-05-13 at 16:03 +0800, Li Zhong wrote: > > > > To my understanding, it is used to enable RCU user extended quiescent > > state, so RCU on that cpu doesn't need scheduler ticks. And togethe

Re: [RFC PATCH v3 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-13 Thread Li Zhong
On Mon, 2013-05-13 at 19:06 +1000, Benjamin Herrenschmidt wrote: > On Mon, 2013-05-13 at 16:44 +0800, Li Zhong wrote: > > Yes, the above and hash_page() are two C functions for a same exception. > > And the exception hooks enable RCU usage in those C codes. But for asm > > co

[RFC PATCH v4 0/5] powerpc: Support context tracking for Power pSeries

2013-05-13 Thread Li Zhong
These patches try to support context tracking for Power arch, beginning with 64-bit pSeries. The codes are ported from that of the x86_64, and in each patch, I listed the corresponding patch for x86. v4: fixed some cosmetic issues suggested by Ben. Li Zhong (5): powerpc: Syscall hooks for

[RFC PATCH v4 1/5] powerpc: Syscall hooks for context tracking subsystem

2013-05-13 Thread Li Zhong
. TIF_NOHZ is added to _TIF_SYCALL_T_OR_A, so it is better for it to be in the same 16 bits with others in the group, so in the asm code, andi. with this group could work. Signed-off-by: Li Zhong Acked-by: Frederic Weisbecker --- arch/powerpc/include/asm/thread_info.h |7 +-- arch/powerpc

[RFC PATCH v4 2/5] powerpc: Exception hooks for context tracking subsystem

2013-05-13 Thread Li Zhong
6c1e0256fad84a843d915414e4b5973b7443d48d context_tracking: Restore correct previous context state on exception exit it is able for exception hooks to use the generic code above instead of a redundant arch implementation. Signed-off-by: Li Zhong --- arch/powerpc/kernel/traps.c | 80

[RFC PATCH v4 3/5] powerpc: Exit user context on notify resume

2013-05-13 Thread Li Zhong
This patch allows RCU usage in do_notify_resume, e.g. signal handling. It corresponds to [PATCH] x86: Exit RCU extended QS on notify resume commit edf55fda35c7dc7f2d9241c3abaddaf759b457c6 Signed-off-by: Li Zhong --- arch/powerpc/kernel/signal.c |5 + 1 file changed, 5 insertions

[RFC PATCH v4 4/5] powerpc: Use the new schedule_user API on userspace preemption

2013-05-13 Thread Li Zhong
This patch corresponds to [PATCH] x86: Use the new schedule_user API on userspace preemption commit 0430499ce9d78691f3985962021b16bf8f8a8048 Signed-off-by: Li Zhong --- arch/powerpc/include/asm/context_tracking.h | 10 ++ arch/powerpc/kernel/entry_64.S |3 ++- 2

[RFC PATCH v4 5/5] powerpc: select HAVE_CONTEXT_TRACKING for pSeries

2013-05-13 Thread Li Zhong
Start context tracking support from pSeries. Signed-off-by: Li Zhong --- arch/powerpc/platforms/pseries/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 9a0941b..023b288 100644 --- a/arch

[RFC PATCH powerpc] Set cpu sibling mask before online cpu

2013-05-16 Thread Li Zhong
6a002a <7d69582a> f97f 7d4a002a e93e0010 [0.100559] ---[ end trace 31fd0ba7d8756001 ]--- This patch tries to move the sibling maps updating before notify_cpu_starting() and cpu online, and a write barrier there to make sure sibling maps are updated before active and online mask. Signe

Re: [RFC PATCH powerpc] Set cpu sibling mask before online cpu

2013-06-13 Thread Li Zhong
On Tue, 2013-06-11 at 14:03 +0530, Srivatsa S. Bhat wrote: > On 06/11/2013 12:30 PM, Benjamin Herrenschmidt wrote: > > On Thu, 2013-05-16 at 18:20 +0800, Li Zhong wrote: > >> It seems following race is possible: > >> > > > > .../... > &

[PATCH powerpc] Fix compiling error in rng.c

2013-11-14 Thread Li Zhong
) ... Signed-off-by: Li Zhong --- arch/powerpc/platforms/pseries/rng.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries/rng.c b/arch/powerpc/platforms/pseries/rng.c index a702f1c..62c7838 100644 --- a/arch/powerpc/platforms/pseries/rng.

Re: [REGRESSION][3.8.-rc1][ INFO: possible circular locking dependency detected ]

2012-12-26 Thread Li Zhong
.}, at: [] > console_callback+0x20/0x194 > [ 97.803112] > [ 97.803112] which lock already depends on the new lock. > > ...and on it goes. Please see the URL above for the whole dmesg and > .config. > > @Li Zhong: I have applied your fix for the "MAX_STACK_TRACE_EN

Re: [RFC PATCH powerpc ] Protect smp_processor_id() in arch_spin_unlock_wait()

2013-01-09 Thread Li Zhong
On Thu, 2013-01-10 at 17:02 +1100, Benjamin Herrenschmidt wrote: > On Mon, 2012-11-19 at 14:16 +0800, Li Zhong wrote: > > This patch tries to disable preemption for using smp_processor_id() in > > arch_spin_unlock_wait(), > > to avoid following report: > > .../.

[PATCH powerpc ] Avoid debug_smp_processor_id() check in arch_spin_unlock_wait()

2013-01-10 Thread Li Zhong
Use local_paca directly in arch_spin_unlock_wait(), as all processors have the same value for the field shared_proc, so we don't need care racy here. Reported-by: Paul E. McKenney Signed-off-by: Li Zhong --- arch/powerpc/lib/locks.c |2 +- 1 file changed, 1 insertion(+), 1 del

Re: 3.7-rc7: BUG: MAX_STACK_TRACE_ENTRIES too low!

2013-01-14 Thread Li Zhong
On Sat, 2013-01-12 at 12:43 -0800, Christian Kujau wrote: > On Wed, 28 Nov 2012 at 16:41, Li Zhong wrote: > > On Tue, 2012-11-27 at 19:22 -0800, Christian Kujau wrote: > > > On Tue, 27 Nov 2012 at 19:06, Christian Kujau wrote: > > > > the same thing[0] happened again

Re: [PATCH powerpc ] Avoid debug_smp_processor_id() check in arch_spin_unlock_wait()

2013-01-24 Thread Li Zhong
On Thu, 2013-01-24 at 14:47 +1100, Benjamin Herrenschmidt wrote: > On Thu, 2013-01-10 at 17:00 +0800, Li Zhong wrote: > > Use local_paca directly in arch_spin_unlock_wait(), as all processors have > > the > > same value for the field shared_proc, so we don't need care

[PATCH v2 powerpc ] Avoid debug_smp_processor_id() check in SHARED_PROCESSOR

2013-01-24 Thread Li Zhong
Use local_paca directly in macro SHARED_PROCESSOR, as all processors have the same value for the field shared_proc, so we don't need care racy here. Reported-by: Paul E. McKenney Signed-off-by: Li Zhong --- arch/powerpc/include/asm/spinlock.h |2 +- 1 files changed, 1 insertions(

[PATCH powerpc] Use VPA subfunction macros instead of numbers for vpa calls

2013-01-25 Thread Li Zhong
Use macros in vpa calls. Signed-off-by: Li Zhong --- arch/powerpc/platforms/pseries/plpar_wrappers.h | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h index

[RFC PATCH 0/5] powerpc: Support context tracking for Power pSeries

2013-02-01 Thread Li Zhong
These patches try to support context tracking for Power arch, beginning with 64-bit pSeries. The codes are ported from that of the x86_64, and in each patch, I listed the corresponding patch for x86. Would you please help review and give your comments? Thanks, Zhong Li Zhong (5): powerpc

[RFC PATCH 1/5] powerpc: Syscall hooks for context tracking subsystem

2013-02-01 Thread Li Zhong
. TIF_NOHZ is added to _TIF_SYCALL_T_OR_A, so it is better for it to be in the same 16 bits with others in the group, so in the asm code, andi. with this group could work. Signed-off-by: Li Zhong --- arch/powerpc/include/asm/thread_info.h |7 +-- arch/powerpc/kernel/ptrace.c |5

[RFC PATCH 2/5] powerpc: Exception hooks for context tracking subsystem

2013-02-01 Thread Li Zhong
for userspace RCU extended QS commit 6ba3c97a38803883c2eee489505796cb0a727122 Signed-off-by: Li Zhong --- arch/powerpc/include/asm/context_tracking.h | 20 +++ arch/powerpc/kernel/exceptions-64s.S|4 +- arch/powerpc/kernel/traps.c | 79

[RFC PATCH 3/5] powerpc: Exit user context on notify resume

2013-02-01 Thread Li Zhong
This patch allows RCU usage in do_notify_resume, e.g. signal handling. It corresponds to [PATCH] x86: Exit RCU extended QS on notify resume commit edf55fda35c7dc7f2d9241c3abaddaf759b457c6 Signed-off-by: Li Zhong --- arch/powerpc/kernel/signal.c |5 + 1 file changed, 5 insertions

[RFC PATCH 4/5] powerpc: Use the new schedule_user API on userspace preemption

2013-02-01 Thread Li Zhong
This patch corresponds to [PATCH] x86: Use the new schedule_user API on userspace preemption commit 0430499ce9d78691f3985962021b16bf8f8a8048 Signed-off-by: Li Zhong --- arch/powerpc/include/asm/context_tracking.h | 11 +++ arch/powerpc/kernel/entry_64.S |3 ++- 2

[RFC PATCH 5/5] powerpc: select HAVE_CONTEXT_TRACKING for pSeries

2013-02-01 Thread Li Zhong
Start context tracking support from pSeries. Signed-off-by: Li Zhong --- arch/powerpc/platforms/pseries/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 837cf49..a9570fe 100644 --- a/arch

Re: [RFC PATCH 1/5] powerpc: Syscall hooks for context tracking subsystem

2013-02-07 Thread Li Zhong
On Thu, 2013-02-07 at 01:29 +0100, Frederic Weisbecker wrote: > 2013/2/1 Li Zhong : > > This is the syscall slow path hooks for context tracking subsystem, > > corresponding to > > [PATCH] x86: Syscall hooks for userspace RCU extended QS > > commit bf5a3c13b9398

Re: [RFC PATCH 2/5] powerpc: Exception hooks for context tracking subsystem

2013-02-16 Thread Li Zhong
On Sun, 2013-02-10 at 15:10 +0100, Frederic Weisbecker wrote: > 2013/2/1 Li Zhong : > > This is the exception hooks for context tracking subsystem, including > > data access, program check, single step, instruction breakpoint, machine > > check, > > alignment, fp

[RFC PATCH powerpc] try secondary hash before BUG in kernel_map_linear_page()

2013-02-25 Thread Li Zhong
<0b00> 7f63db78 48785781 6000 [ 543.076224] ---[ end trace bd5807e8d6ae186b ]--- The code is borrowed from that in __hash_page_huge(). Signed-off-by: Li Zhong --- arch/powerpc/mm/hash_utils_64.c | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/powerpc/mm/h

[RFC PATCH v2 0/6] powerpc: Support context tracking for Power pSeries

2013-03-29 Thread Li Zhong
rch/common code merging. And it might also make future changes easier. Thanks, Zhong Li Zhong (6): powerpc: Syscall hooks for context tracking subsystem powerpc: Exception hooks for context tracking subsystem powerpc: Exit user context on notify resume powerpc: Use the new schedule_u

[RFC PATCH v2 1/6] powerpc: Syscall hooks for context tracking subsystem

2013-03-29 Thread Li Zhong
. TIF_NOHZ is added to _TIF_SYCALL_T_OR_A, so it is better for it to be in the same 16 bits with others in the group, so in the asm code, andi. with this group could work. Signed-off-by: Li Zhong Acked-by: Frederic Weisbecker --- arch/powerpc/include/asm/thread_info.h |7 +-- arch/powerpc

[RFC PATCH v2 2/6] powerpc: Exception hooks for context tracking subsystem

2013-03-29 Thread Li Zhong
for userspace RCU extended QS commit 6ba3c97a38803883c2eee489505796cb0a727122 Signed-off-by: Li Zhong --- arch/powerpc/include/asm/context_tracking.h | 28 + arch/powerpc/kernel/exceptions-64s.S|4 +- arch/powerpc/kernel/traps.c | 83

[RFC PATCH v2 3/6] powerpc: Exit user context on notify resume

2013-03-29 Thread Li Zhong
This patch allows RCU usage in do_notify_resume, e.g. signal handling. It corresponds to [PATCH] x86: Exit RCU extended QS on notify resume commit edf55fda35c7dc7f2d9241c3abaddaf759b457c6 Signed-off-by: Li Zhong --- arch/powerpc/kernel/signal.c |5 + 1 file changed, 5 insertions

[RFC PATCH v2 4/6] powerpc: Use the new schedule_user API on userspace preemption

2013-03-29 Thread Li Zhong
This patch corresponds to [PATCH] x86: Use the new schedule_user API on userspace preemption commit 0430499ce9d78691f3985962021b16bf8f8a8048 Signed-off-by: Li Zhong --- arch/powerpc/include/asm/context_tracking.h | 11 +++ arch/powerpc/kernel/entry_64.S |3 ++- 2

[RFC PATCH v2 6/6] powerpc: Use generic code for exception handling

2013-03-29 Thread Li Zhong
exception exit it is able for this patch to replace the implementation in arch code with the generic code in above commits. Signed-off-by: Li Zhong --- arch/powerpc/include/asm/context_tracking.h | 29 --- arch/powerpc/kernel/exceptions-64s.S|4 +-- arch/powerpc/kernel

[RFC PATCH v2 5/6] powerpc: select HAVE_CONTEXT_TRACKING for pSeries

2013-03-29 Thread Li Zhong
Start context tracking support from pSeries. Signed-off-by: Li Zhong --- arch/powerpc/platforms/pseries/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 9a0941b..023b288 100644 --- a/arch

Re: [RFC PATCH v2 2/6] powerpc: Exception hooks for context tracking subsystem

2013-04-08 Thread Li Zhong
On Fri, 2013-04-05 at 13:50 +1100, Paul Mackerras wrote: > On Fri, Mar 29, 2013 at 06:00:17PM +0800, Li Zhong wrote: > > This is the exception hooks for context tracking subsystem, including > > data access, program check, single step, instruction breakpoint, machine > > che

Re: [RFC PATCH powerpc] try secondary hash before BUG in kernel_map_linear_page()

2013-04-09 Thread Li Zhong
On Wed, 2013-04-10 at 12:21 +1000, Michael Ellerman wrote: > On Mon, Feb 25, 2013 at 05:29:35PM +0800, Li Zhong wrote: > > This patch tries to fix following issue when CONFIG_DEBUG_PAGEALLOC > > is enabled: > > > > [ 543.075675] [ cut here ] &g

Re: [RFC PATCH v2 6/6] powerpc: Use generic code for exception handling

2013-04-09 Thread Li Zhong
On Wed, 2013-04-10 at 14:56 +1000, Michael Ellerman wrote: > On Fri, Mar 29, 2013 at 06:00:21PM +0800, Li Zhong wrote: > > After the exception handling moved to generic code, and some changes in > ... > > diff --git a/arch/powerpc/mm/hash_utils_64.c > > b/arch/powerpc/mm/h

Re: [RFC PATCH v2 6/6] powerpc: Use generic code for exception handling

2013-04-09 Thread Li Zhong
On Wed, 2013-04-10 at 13:32 +0800, Li Zhong wrote: > On Wed, 2013-04-10 at 14:56 +1000, Michael Ellerman wrote: > > On Fri, Mar 29, 2013 at 06:00:21PM +0800, Li Zhong wrote: > > > After the exception handling moved to generic code, and some changes in > > ... > >

[RFC PATCH v2 0/4] try secondary hash before BUG in kernel_map_linear_page()

2013-04-11 Thread Li Zhong
code out of the repeating loop, so the splitting is easier. Patch #3 removes the HPTE_V_BOLTED flag in kernel_map_linear_page(), it seems not needed based on my understanding. Changes are split into smaller ones, so each one did only one thing. Thanks, Zhong Li Zhong (4): powerpc: Mov

[RFC PATCH v2 2/4] powerpc: Split the code trying to insert hpte repeatedly as an helper function

2013-04-11 Thread Li Zhong
Move the logical trying to insert hpte in __hash_page_huge() to an helper function, so it could also be used by others. Signed-off-by: Li Zhong --- arch/powerpc/mm/hash_utils_64.c | 35 ++ arch/powerpc/mm/hugetlbpage-hash64.c | 31

[RFC PATCH v2 1/4] powerpc: Move the setting of rflags out of loop in __hash_page_huge

2013-04-11 Thread Li Zhong
It seems that rflags don't get changed in the repeating loop, so move it out of the loop. Signed-off-by: Li Zhong --- arch/powerpc/mm/hugetlbpage-hash64.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/hugetlbpage-hash64.c b/arch/power

[RFC PATCH v2 3/4] powerpc: Don't bolt the hpte in kernel_map_linear_page()

2013-04-11 Thread Li Zhong
It seems that in kernel_unmap_linear_page(), it only checks whether there is a map in the linear_map_hash_slots array, so seems we don't need bolt the hpte. Signed-off-by: Li Zhong --- arch/powerpc/mm/hash_utils_64.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[RFC PATCH v2 4/4] powerpc: Try to insert the hptes repeatedly in kernel_map_linear_page()

2013-04-11 Thread Li Zhong
<0b00> 7f63db78 48785781 6000 [ 543.076224] ---[ end trace bd5807e8d6ae186b ]--- Signed-off-by: Li Zhong --- arch/powerpc/mm/hash_utils_64.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64

Re: [RFC PATCH v2 3/4] powerpc: Don't bolt the hpte in kernel_map_linear_page()

2013-04-15 Thread Li Zhong
On Mon, 2013-04-15 at 08:56 +0200, Benjamin Herrenschmidt wrote: > On Mon, 2013-04-15 at 13:50 +1000, Paul Mackerras wrote: > > On Fri, Apr 12, 2013 at 10:16:59AM +0800, Li Zhong wrote: > > > It seems that in kernel_unmap_linear_page(), it only checks whether there >

Re: [RFC PATCH v2 1/4] powerpc: Move the setting of rflags out of loop in __hash_page_huge

2013-04-15 Thread Li Zhong
On Mon, 2013-04-15 at 16:32 +1000, Michael Ellerman wrote: > On Fri, Apr 12, 2013 at 10:16:57AM +0800, Li Zhong wrote: > > It seems that rflags don't get changed in the repeating loop, so move > > it out of the loop. > You've also changed the way new_pte is ha

Re: [RFC PATCH v2 4/4] powerpc: Try to insert the hptes repeatedly in kernel_map_linear_page()

2013-04-15 Thread Li Zhong
On Mon, 2013-04-15 at 16:36 +1000, Michael Ellerman wrote: > On Fri, Apr 12, 2013 at 10:17:00AM +0800, Li Zhong wrote: > > This patch tries to fix following issue when CONFIG_DEBUG_PAGEALLOC > > is enabled: > > Please include a better changelog. OK, I'll use the foll

Re: [RFC PATCH v2 3/4] powerpc: Don't bolt the hpte in kernel_map_linear_page()

2013-04-15 Thread Li Zhong
On Mon, 2013-04-15 at 13:27 +0200, Benjamin Herrenschmidt wrote: > On Mon, 2013-04-15 at 16:15 +0800, Li Zhong wrote: > > > So the code is implemented in ppc_md.hpte_remove(), may be called by > > __hash_huge_page(), and asm code htab_call_hpte_remove? > > > > &g

[RFC PATCH v3 1/3] powerpc: Move the setting of rflags out of loop in __hash_page_huge

2013-04-15 Thread Li Zhong
It seems that new_pte and rflags don't get changed in the repeating loop, so move their assignment out of the loop. Signed-off-by: Li Zhong --- arch/powerpc/mm/hugetlbpage-hash64.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/hugetlbpage-h

[RFC PATCH v3 2/3] powerpc: Split the code trying to insert hpte repeatedly as an helper function

2013-04-15 Thread Li Zhong
Move the logic trying to insert hpte in __hash_page_huge() to an helper function, so it could also be used by others. Signed-off-by: Li Zhong --- arch/powerpc/mm/hash_utils_64.c | 35 ++ arch/powerpc/mm/hugetlbpage-hash64.c | 31

[RFC PATCH v3 3/3] powerpc: Try to insert the hptes repeatedly in kernel_map_linear_page()

2013-04-15 Thread Li Zhong
f63db78 48785781 6000 [ 543.076224] ---[ end trace bd5807e8d6ae186b ]--- Signed-off-by: Li Zhong --- arch/powerpc/mm/hash_utils_64.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index

Re: [RFC PATCH powerpc] make CONFIG_NUMA depends on CONFIG_SMP

2013-04-18 Thread Li Zhong
On Thu, 2013-04-18 at 11:46 +1000, Michael Ellerman wrote: > On Wed, May 30, 2012 at 05:31:58PM +0800, Li Zhong wrote: > > I'm not sure whether it makes sense to add this dependency to avoid > > CONFI_NUMA && !CONFIG_SMP. > > > > I want to do this beca

[RFC PATCH] Fix Oops in rtas_stop_self()

2014-04-25 Thread Li Zhong
[ 247.194751] ---[ end trace d1d21584135396ba ]--- Signed-off-by: Li Zhong --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index

Re: [RFC PATCH] Fix Oops in rtas_stop_self()

2014-04-27 Thread Li Zhong
e catch. RTAS is 32bit and if your box has more than 4GB RAM then > your stack could easily be outside 32bit range. Ah, yes, the stack here is obviously at a much higher address than 4GB. > > You can add: > > Signed-off-by: Anton Blanchard > > And also: > >

[PATCH] powerpc: Fix Oops in rtas_stop_self()

2014-04-27 Thread Li Zhong
-off-by: Li Zhong Signed-off-by: Anton Blanchard Cc: sta...@vger.kernel.org # 3.14+ --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c

[RFC PATCH] powerpc: fix wrong sp saved in save_stack_trace()

2014-05-08 Thread Li Zhong
log. I don't know how to specify in C that the embedded asm be compiled after r1 being added back to the original value. But as a workaround, maybe we could move this embedded asm into save_context_stack(). Signed-off-by: Li Zhong --- arch/powerpc/kernel/stacktrace.c | 9 - 1 file

[PATCH 1/4] powerpc: implement vmemmap_list_free()

2014-06-11 Thread Li Zhong
memory when continuous doing memory hot-plug/remove operations, but didn't reclaim the pages already allocated, so the memory usage will only increase, but won't exceed the value for the largest memory configuration. Signed-off-by: Li Zhong Cc: Nathan Fontenot --- arch/powerpc/mm/init_6

[PATCH 2/4] powerpc: implement vmemmap_remove_mapping() for BOOK3S

2014-06-11 Thread Li Zhong
This is to be called in vmemmap_free(), leave the implementation on BOOK3E empty as before. Signed-off-by: Li Zhong Cc: Nathan Fontenot --- arch/powerpc/mm/hash_utils_64.c |2 +- arch/powerpc/mm/init_64.c | 22 ++ 2 files changed, 23 insertions(+), 1 deletion

[PATCH 3/4] powerpc: implement vmemmap_free()

2014-06-11 Thread Li Zhong
vmemmap_free() does the opposite of vmemap_populate(). This patch also puts vmemmap_free() and vmemmap_list_free() into CONFIG_MEMMORY_HOTPLUG. Signed-off-by: Li Zhong Cc: Nathan Fontenot --- arch/powerpc/mm/init_64.c | 85 ++--- 1 file changed, 64

[PATCH 4/4] powerpc: start loop at section start of start in vmemmap_populated()

2014-06-11 Thread Li Zhong
above. After we adjust start to be the start of the section, it also means it's aligned with vmemmap as of the sizeof struct page, so we could use page_to_pfn directly in the loop. Signed-off-by: Li Zhong Cc: Nathan Fontenot --- arch/powerpc/mm/init_64.c |3 ++- 1 file changed, 2 insert

[PATCH powerpc] Fix parameter restoring issue in commit 752a6422f

2014-06-24 Thread Li Zhong
0 %DAR: 01a3fcf00020b4ac Virtual PID = 0 ok Signed-off-by: Li Zhong --- diff --git a/arch/powerpc/platforms/powernv/opal-takeover.S b/arch/powerpc/platforms/powernv/opal-takeover.S index 11a3169..9093540 100644 --- a/arch/powerpc/platforms/powernv/opal-takeover.S +++ b/arch/powerpc/plat

Re: [PATCH powerpc] Fix parameter restoring issue in commit 752a6422f

2014-06-24 Thread Li Zhong
DaYu just reminded me that Michael already had a patch removing all the related code. Please ignore this patch.. Thanks, Zhong On Wed, 2014-06-25 at 12:00 +0800, Li Zhong wrote: > In commit 752a6422f, new stack frame is created for parameters. > > However, the r1 is added back

[PATCH powerpc] use _GLOBAL_TOC for memmove

2014-07-21 Thread Li Zhong
path_openat+0x100/0x810 [c00073f97ce0] c0272ea8 do_filp_open+0x58/0xd0 [c00073f97dc0] c025ade8 do_sys_open+0x1b8/0x300 [c00073f97e30] c000a008 syscall_exit+0x0/0x7c --- Exception: c01 (System Call) at 3fffaabe2854 Signed-off-by: Li Zhong --- arch/powerpc/lib

[PATCH powerpc] use machine_subsys_initcall() for opal_hmi_handler_init()

2014-08-12 Thread Li Zhong
As opal_message_init() uses machine_early_initcall(powernv, ), and opal_hmi_handler_init() depends on that early initcall, so it also needs use machine_* to check the machine_id. Signed-off-by: Li Zhong --- arch/powerpc/platforms/powernv/opal-hmi.c | 3 ++- 1 file changed, 2 insertions(+), 1

[RFC PATCH powerpc] Fix warning reported by verify_cpu_node_mapping()

2014-08-21 Thread Li Zhong
node! As we don't actually do the checking during this early stage, so maybe we could directly call numa_setup_cpu() in do_init_bootmem()? Signed-off-by: Li Zhong --- arch/powerpc/mm/numa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/po

Re: [RFC PATCH powerpc] Fix warning reported by verify_cpu_node_mapping()

2014-08-21 Thread Li Zhong
On 四, 2014-08-21 at 08:45 -0700, Nishanth Aravamudan wrote: > On 21.08.2014 [16:14:02 +0800], Li Zhong wrote: > > With commit 2fabf084b, during boottime, cpu_numa_callback() is called > > earlier(before their online) for each cpu, and verify_cpu_node_mapping() > > uses c

Re: [RFC PATCH powerpc] Fix warning reported by verify_cpu_node_mapping()

2014-08-24 Thread Li Zhong
On 五, 2014-08-22 at 15:04 -0700, Nishanth Aravamudan wrote: > On 22.08.2014 [10:12:56 +0800], Li Zhong wrote: > > On ???, 2014-08-21 at 08:45 -0700, Nishanth Aravamudan wrote: > > > On 21.08.2014 [16:14:02 +0800], Li Zhong wrote: > > > > With commit 2fabf084b, duri

[PATCH v2] powerpc: Fix warning reported by verify_cpu_node_mapping()

2014-08-25 Thread Li Zhong
de! As we don't actually do the checking during this early stage, so maybe we could directly call numa_setup_cpu() in do_init_bootmem(). Also, as Nish suggested, here it's better to use present cpu mask instead of possible mask to avoid warning in numa_setup_cpu(). Signed-off-by: Li Zhong -

[RFC PATCH powerpc] Fix compiling error in powernv/rng.c

2013-11-14 Thread Li Zhong
This is seen when CONFIG_SMP is not enabled: arch/powerpc/platforms/powernv/rng.c: In function 'rng_init_per_cpu': arch/powerpc/platforms/powernv/rng.c:74: error: implicit declaration of function 'cpu_to_chip_id' Signed-off-by: Li Zhong --- arch/powerpc/platforms/

[RFC PATCH powerpc] Fix a dma_mask issue of vio

2013-11-19 Thread Li Zhong
I encountered following issue: [0.283035] ibmvscsi 3015: couldn't initialize event pool [5.688822] ibmvscsi: probe of 3015 failed with error -1 which prevents the storage from being recognized, and the machine from booting. After some digging, it seems that it is caused by commit

Re: [RFC PATCH powerpc] Fix compiling error in powernv/rng.c

2013-11-19 Thread Li Zhong
On Tue, 2013-11-19 at 15:04 +1100, Michael Ellerman wrote: > On Fri, Nov 15, 2013 at 03:36:04PM +0800, Li Zhong wrote: > > This is seen when CONFIG_SMP is not enabled: > > > > arch/powerpc/platforms/powernv/rng.c: In function 'rng_init_per_cpu': > > arch/powe

Re: [RFC PATCH powerpc] Fix a dma_mask issue of vio

2013-11-19 Thread Li Zhong
On Wed, 2013-11-20 at 12:28 +1100, Benjamin Herrenschmidt wrote: > On Tue, 2013-11-19 at 16:11 +0800, Li Zhong wrote: > > I encountered following issue: > > [0.283035] ibmvscsi 3015: couldn't initialize event pool > > [5.688822] ibmvscsi: probe of 300

Re: [RFC PATCH powerpc] Fix a dma_mask issue of vio

2013-11-20 Thread Li Zhong
tly */ > > - dma_set_mask_and_coherent(&viodev->dev, DMA_BIT_MASK(64)); > > + viodev->dev.coherent_dma_mask = DMA_BIT_MASK(64); > > + viodev->dev.dma_mask = &viodev->dev.coherent_dma_mask; > > } > > > > /

[PATCH powerpc] Revert c6102609 and replace it with the correct fix for vio dma mask setting

2013-11-27 Thread Li Zhong
This patch reverts my previous "fix", and replace it with the correct fix from Russell. And as Russell pointed out -- dma_set_mask_and_coherent() (and the other dma_set_mask() functions) are really supposed to be used by drivers only. Signed-off-by: Li Zhong --- arch/powerpc/ke

[RFC PATCH powerpc 1/2] fix using page adddress as the page stucture pointer in __pte_free_tlb()

2013-12-02 Thread Li Zhong
dump: [0.563433] 635a0d00 3b61 2fbc 41fe0014 e8810070 7f83e378 486543c1 6000 [0.563450] e81e0022 829f0018 92810090 eaff0010 <7efd012a> a1210090 8aa10093 3809 [0.563469] ---[ end trace 3be1fd3d950f1716 ]--- Signed-off-by: Li Zhong --- arch/powerpc/inclu

[RFC PATCH powerpc 2/2] adjust the variable type and name in __pte_free_tlb()

2013-12-02 Thread Li Zhong
The patch adjusts the variable type and name for page in __pte_free_tlb(), which now seems a little confusing. Signed-off-by: Li Zhong --- arch/powerpc/include/asm/pgalloc-64.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/pgalloc-64.h b

[RFC PATCH powerpc] Fix compile error of pgtable-ppc64.h

2014-01-16 Thread Li Zhong
xt/arch/powerpc/include/asm/pgtable-ppc64.h:563: note: previous declaration of 'spinlock_t' was here Signed-off-by: Li Zhong --- arch/powerpc/include/asm/pgtable-ppc64.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/pgtable-ppc64.

Re: [RFC PATCH powerpc] Fix compile error of pgtable-ppc64.h

2014-01-17 Thread Li Zhong
On Fri, 2014-01-17 at 12:27 +0530, Aneesh Kumar K.V wrote: > Li Zhong writes: > > > It seems that forward declaration couldn't work well with typedef, use > > struct spinlock directly to avoiding following build errors: > > > > In file includ

  1   2   >