Re: [PATCH v3 00/11] soc/fsl/qbman: Enable QBMan on ARM Platforms

2017-05-15 Thread Scott Wood
On Mon, 2017-05-01 at 17:30 -0400, Roy Pledge wrote: > This patch series enables DPAA1 QBMan devices for ARM and > ARM64 architectures. This allows the LS1043A and LS1046A to use > QBMan functionality. > > Changes since v2: > Fixed some misspellings > Added 'no-map' constraint to device tree

Re: [RFC 0/2] Consolidate patch_instruction

2017-05-15 Thread Anshuman Khandual
On 05/16/2017 09:19 AM, Balbir Singh wrote: > patch_instruction is enhanced in this RFC to support > patching via a different virtual address (text_poke_area). Why writing instruction directly into the address is not sufficient and need to go through this virtual address ? > The mapping of

Re: kernel BUG at mm/usercopy.c:72!

2017-05-15 Thread Anshuman Khandual
On 05/16/2017 10:14 AM, Balbir Singh wrote: > On Tue, 2017-05-16 at 09:30 +0530, Anshuman Khandual wrote: >> On 05/16/2017 12:49 AM, Breno Leitao wrote: >>> Hello, >>> >>> Kernel 4.12-rc1 is showing a bug when I try it on a POWER8 virtual >>> machine. Justing SSHing into the machine causes this

Re: kernel BUG at mm/usercopy.c:72!

2017-05-15 Thread Balbir Singh
On Tue, 2017-05-16 at 09:30 +0530, Anshuman Khandual wrote: > On 05/16/2017 12:49 AM, Breno Leitao wrote: > > Hello, > > > > Kernel 4.12-rc1 is showing a bug when I try it on a POWER8 virtual > > machine. Justing SSHing into the machine causes this issue. > > > > [23.138124] usercopy: kernel

Re: kernel BUG at mm/usercopy.c:72!

2017-05-15 Thread Anshuman Khandual
On 05/16/2017 12:49 AM, Breno Leitao wrote: > Hello, > > Kernel 4.12-rc1 is showing a bug when I try it on a POWER8 virtual > machine. Justing SSHing into the machine causes this issue. > > [23.138124] usercopy: kernel memory overwrite attempt detected to > d3d80030 (mm_struct)

[RFC 2/2] powerpc/kprobes: Move kprobes over to patch_instruction

2017-05-15 Thread Balbir Singh
arch_arm/disarm_probe use direct assignment for copying instructions, replace them with patch_instruction Signed-off-by: Balbir Singh --- arch/powerpc/kernel/kprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/kprobes.c

[RFC 1/2] powerpc/lib/code-patching: Enhance code patching

2017-05-15 Thread Balbir Singh
Today our patching happens via direct copy and patch_instruction. The patching code is well contained in the sense that copying bits are limited. While considering implementation of CONFIG_STRICT_RWX, the first requirement is to a create another mapping that will allow for patching. We create the

[RFC 0/2] Consolidate patch_instruction

2017-05-15 Thread Balbir Singh
patch_instruction is enhanced in this RFC to support patching via a different virtual address (text_poke_area). The mapping of text_poke_area->addr is RW and not RWX. This way the mapping allows write for patching and then we tear down the mapping. The downside is that we introduce a spinlock

Re: [PATCH 0/4] Support for the FSP2 476fpe board in arch/powerpc

2017-05-15 Thread Joel Stanley
Hey Ivan, Please use j...@jms.id.au when you cc me on patches. That other address won't work for most people. Cheers, Joel On Mon, May 15, 2017 at 10:37 PM, Ivan Mikhaylov wrote: > This adds support for the FSP2 (476fpe) board. This includes code in >

Re: [v3 9/9] s390: teach platforms not to zero struct pages memory

2017-05-15 Thread Pasha Tatashin
Ah OK, I will include the change. Thank you, Pasha On 05/15/2017 07:17 PM, Heiko Carstens wrote: Hello Pasha, Thank you for looking at this patch. I am worried to make the proposed change, because, as I understand in this case we allocate memory not for "struct page"s but for table that hold

Re: [v3 9/9] s390: teach platforms not to zero struct pages memory

2017-05-15 Thread Heiko Carstens
Hello Pasha, > Thank you for looking at this patch. I am worried to make the proposed > change, because, as I understand in this case we allocate memory not for > "struct page"s but for table that hold them. So, we will change the behavior > from the current one, where this table is allocated

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-15 Thread Pasha Tatashin
On 05/15/2017 03:38 PM, Michal Hocko wrote: On Mon 15-05-17 14:12:10, Pasha Tatashin wrote: Hi Michal, After looking at your suggested memblock_virt_alloc_core() change again, I decided to keep what I have. I do not want to inline memblock_virt_alloc_internal(), because it is not a

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-15 Thread Michal Hocko
On Mon 15-05-17 14:12:10, Pasha Tatashin wrote: > Hi Michal, > > After looking at your suggested memblock_virt_alloc_core() change again, I > decided to keep what I have. I do not want to inline > memblock_virt_alloc_internal(), because it is not a performance critical > path, and by inlining it

kernel BUG at mm/usercopy.c:72!

2017-05-15 Thread Breno Leitao
Hello, Kernel 4.12-rc1 is showing a bug when I try it on a POWER8 virtual machine. Justing SSHing into the machine causes this issue. [23.138124] usercopy: kernel memory overwrite attempt detected to d3d80030 (mm_struct) (560 bytes) [23.138195] [ cut here

Re: [v3 9/9] s390: teach platforms not to zero struct pages memory

2017-05-15 Thread Pasha Tatashin
Hi Heiko, Thank you for looking at this patch. I am worried to make the proposed change, because, as I understand in this case we allocate memory not for "struct page"s but for table that hold them. So, we will change the behavior from the current one, where this table is allocated zeroed,

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-15 Thread Pasha Tatashin
Hi Michal, After looking at your suggested memblock_virt_alloc_core() change again, I decided to keep what I have. I do not want to inline memblock_virt_alloc_internal(), because it is not a performance critical path, and by inlining it we will unnecessarily increase the text size on all

[PATCH] powerpc/kprobes: Fix handling of instruction emulation on probe re-entry

2017-05-15 Thread Naveen N. Rao
Commit 22d8b3dec214c ("powerpc/kprobes: Emulate instructions on kprobe handler re-entry") enabled emulating instructions on kprobe re-entry, rather than single-stepping always. However, we didn't update the single stepping code to only be run if the emulation fails. Also, we missed re-enabling

[PATCH 2/2] powerpc/jprobes: Validate break handler invocation as being due to a jprobe_return()

2017-05-15 Thread Naveen N. Rao
Fix a circa 2005 FIXME by implementing a check to ensure that we actually got into the jprobe break handler() due to the trap in jprobe_return(). Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 20 +--- 1 file changed, 9

[PATCH 1/2] powerpc/jprobes: Save and restore the parameter save area

2017-05-15 Thread Naveen N. Rao
As pointed out in x86 setjmp_pre_handler(), we need to save and restore the parameter save area since the jprobe hook might overwrite it. Since there is no easy way to identify the size of the parameter save area, we choose to save/restore a fixed 16 [double]word-sized area including the stack

Re: [patch 09/18] cpufreq/pasemi: Adjust system_state check

2017-05-15 Thread Steven Rostedt
On Mon, 15 May 2017 10:54:03 +0530 Viresh Kumar wrote: > On 14-05-17, 20:27, Thomas Gleixner wrote: > > To enable smp_processor_id() and might_sleep() debug checks earlier, it's > > required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. > > > > Adjust

Re: [PATCH] dt-bindings: net: move FMan binding

2017-05-15 Thread David Miller
From: Madalin Bucur Date: Mon, 15 May 2017 16:36:38 +0300 > Besides the PPC SoCs, the QorIQ DPAA FMan is also present on ARM SoCs, > moving the device tree binding document into the bindings/net folder. > > Signed-off-by: Madalin Bucur What tree

[PATCH] dt-bindings: net: move FMan binding

2017-05-15 Thread Madalin Bucur
Besides the PPC SoCs, the QorIQ DPAA FMan is also present on ARM SoCs, moving the device tree binding document into the bindings/net folder. Signed-off-by: Madalin Bucur --- Documentation/devicetree/bindings/net/fsl-fman.txt | 657 +

[PATCH 3/4] arch/powerpc/44x/fsp2: add defconfig for fsp2 board

2017-05-15 Thread Ivan Mikhaylov
this patch adds default fsp2 config for main usage. Signed-off-by: Ivan Mikhaylov --- arch/powerpc/configs/44x/fsp2_defconfig | 126 +++ 1 files changed, 126 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/configs/44x/fsp2_defconfig

[PATCH 1/4] arch/powerpc/44x/fsp2: platform support for fsp2(476fpe) board

2017-05-15 Thread Ivan Mikhaylov
Add platform code support for FSP2 (476fpe) board. Signed-off-by: Ivan Mikhaylov --- arch/powerpc/platforms/44x/Kconfig | 12 +++ arch/powerpc/platforms/44x/Makefile |1 + arch/powerpc/platforms/44x/fsp2.c | 62 +++ 3 files

[PATCH 2/4] arch/powerpc/44x/fsp2: add device tree for fsp2 board

2017-05-15 Thread Ivan Mikhaylov
Add a device tree for fsp2 board (476 based). Signed-off-by: Ivan Mikhaylov --- arch/powerpc/boot/dts/fsp2.dts | 608 1 files changed, 608 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/fsp2.dts diff --git

[PATCH 4/4] arch/powerpc/44x/fsp2: wdt tcr update instead of whole rewrite

2017-05-15 Thread Ivan Mikhaylov
Prevent a kernel panic caused by unintentionally clearing TCR watchdog bits. At this point in the kernel boot, the watchdog has already been enabled by u-boot. The original code's attempt to write to the TCR register results in an inadvertent clearing of the watchdog configuration bits, causing

[PATCH 0/4] Support for the FSP2 476fpe board in arch/powerpc

2017-05-15 Thread Ivan Mikhaylov
This adds support for the FSP2 (476fpe) board. This includes code in arch/powerpc/platforms/44x for board initialization. Only uImage is supported by now. Also there was some problem with whole watchdog TCR rewrite which causing unexpected very early panic and fixed by 4 patch. dts and defconfig

Re: [PATCH 1/1] futex: remove duplicated code

2017-05-15 Thread Will Deacon
Hi Jiri, On Mon, May 15, 2017 at 03:07:42PM +0200, Jiri Slaby wrote: > There is code duplicated over all architecture's headers for > futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, > and comparison of the result. > > Remove this duplication and leave up to the arches only

[PATCH 1/1] futex: remove duplicated code

2017-05-15 Thread Jiri Slaby
There is code duplicated over all architecture's headers for futex_atomic_op_inuser. Namely op decoding, access_ok check for uaddr, and comparison of the result. Remove this duplication and leave up to the arches only the needed assembly which is now in arch_futex_atomic_op_inuser. Note that

Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-15 Thread Thomas Gleixner
On Mon, 15 May 2017, Madhavan Srinivasan wrote: > On Wednesday 10 May 2017 05:39 PM, Thomas Gleixner wrote: > > On Thu, 4 May 2017, Anju T Sudhakar wrote: > > > + /* > > > + * Update the cpumask with the target cpu and > > > + * migrate the context if needed > > > + */ > > > + if (target >= 0

Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-15 Thread Madhavan Srinivasan
Sorry for delayed response. On Wednesday 10 May 2017 05:39 PM, Thomas Gleixner wrote: On Thu, 4 May 2017, Anju T Sudhakar wrote: +/* + * nest_init : Initializes the nest imc engine for the current chip. + * by default the nest engine is disabled. + */ +static void nest_init(int *cpu_opal_rc)

Re: [PATCH] powerpc/64s: dt_cpu_ftrs boot time setup option

2017-05-15 Thread Michael Ellerman
Paul Clarke writes: > On 05/11/2017 10:46 PM, Michael Ellerman wrote: >> Paul Clarke writes: >>> On 05/11/2017 06:24 AM, Nicholas Piggin wrote: Provide a dt_cpu_ftrs= cmdline option to disable the dt_cpu_ftrs CPU feature discovery, and fall back to

Re: [PATCH 2/2] selftests/powerpc: Test TM and VMX register state

2017-05-15 Thread Michael Ellerman
Michael Neuling writes: > diff --git a/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c > b/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c > new file mode 100644 > index 00..137185ba49 > --- /dev/null > +++ b/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c

Re: [PATCH v5 2/2] powerpc/fadump: update documentation about 'fadump_append=' parameter

2017-05-15 Thread Michal Suchánek
Hello, On Mon, 15 May 2017 12:59:46 +0530 Hari Bathini wrote: > On Friday 12 May 2017 09:12 PM, Michal Suchánek wrote: > > On Fri, 12 May 2017 15:15:33 +0530 > > Hari Bathini wrote: > > > >> On Thursday 11 May 2017 06:46 PM, Michal

Re: [PATCH] powerpc/modules: If mprofile-kernel is enabled add it to vermagic

2017-05-15 Thread Michael Ellerman
Jessica Yu writes: > +++ Michael Ellerman [10/05/17 16:57 +1000]: >>On powerpc we can build the kernel with two different ABIs for mcount(), which >>is used by ftrace. Kernels built with one ABI do not know how to load modules >>built with the other ABI. The new style ABI is

Re: [PATCH 1/2] powerpc/tm: Fix FP and VMX register corruption

2017-05-15 Thread Michael Ellerman
Cyril Bur writes: > On Mon, 2017-05-08 at 17:16 +1000, Michael Neuling wrote: >> In this commit: >> commit dc3106690b20305c3df06b42456fe386dd632ac9 >> Author: Cyril Bur >> powerpc: tm: Always use fp_state and vr_state to store live registers >> >>

Re: [patch 06/18] powerpc: Adjust system_state check

2017-05-15 Thread Michael Ellerman
Thomas Gleixner writes: > To enable smp_processor_id() and might_sleep() debug checks earlier, it's > required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING. > > Adjust the system_state check in smp_generic_cpu_bootable() to handle the > extra states. > >

Re: [PATCH v5 2/2] powerpc/fadump: update documentation about 'fadump_append=' parameter

2017-05-15 Thread Hari Bathini
On Friday 12 May 2017 09:12 PM, Michal Suchánek wrote: On Fri, 12 May 2017 15:15:33 +0530 Hari Bathini wrote: On Thursday 11 May 2017 06:46 PM, Michal Suchánek wrote: On Thu, 11 May 2017 02:00:11 +0530 Hari Bathini wrote: Hello