Re: [PATCH] powerpc/mm: Invalidate partition table cache on host proc tbl base update

2017-08-02 Thread Michael Ellerman
Suraj Jitindar Singh writes: > The host process table base is stored in the partition table by calling > the function native_register_process_table(). Currently this just sets > the entry in memory and is missing a proceeding cache invalidation > instruction. Any update to the partition table sho

Re: [PATCH V3 2/6] crypto/nx: Create nx842_configure_crb function

2017-08-02 Thread Herbert Xu
On Fri, Jul 21, 2017 at 09:57:39PM -0700, Haren Myneni wrote: > > Configure CRB is moved to nx842_configure_crb() so that it can > be used for icswx and VAS exec functions. VAS function will be > added later with P9 support. > > Signed-off-by: Haren Myneni Your patch does not apply against cryp

Re: [v4 09/15] sparc64: optimized struct page zeroing

2017-08-02 Thread kbuild test robot
Hi Pavel, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.13-rc3 next-20170802] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Pavel-Tatashin/complete-deferred-page

Re: [v4 13/15] mm: stop zeroing memory during allocation in vmemmap

2017-08-02 Thread kbuild test robot
Hi Pavel, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.13-rc3] [cannot apply to next-20170802] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Pavel-Tatashin/complete

Re: [PATCH v9 07/14] powerpc: Modify soft_enable from flag to mask

2017-08-02 Thread Nicholas Piggin
Hi Maddy, I've gone over this series a few times and it looks pretty good to me. I'd like others to have a look before I do any more bike shedding of it :) Just with this one there are still a couple of places where this is comparing the entire mask and not the LINUX bit: > @@ -156,7 +156,7 @@ s

Re: [v4 04/15] mm: discard memblock data later

2017-08-02 Thread kbuild test robot
Hi Pavel, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.13-rc3 next-20170802] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Pavel-Tatashin/complete-deferred-page

Re: [v4 14/15] mm: optimize early system hash allocations

2017-08-02 Thread kbuild test robot
Hi Pavel, [auto build test ERROR on mmotm/master] [also build test ERROR on v4.13-rc3] [cannot apply to next-20170802] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Pavel-Tatashin/complete

[PATCH] powerpc/mm: Invalidate partition table cache on host proc tbl base update

2017-08-02 Thread Suraj Jitindar Singh
The host process table base is stored in the partition table by calling the function native_register_process_table(). Currently this just sets the entry in memory and is missing a proceeding cache invalidation instruction. Any update to the partition table should be followed by a cache invalidation

[PATCH v9 4/4] irqchip/qeic: remove PPCisms for QEIC

2017-08-02 Thread Zhao Qiang
QEIC was supported on PowerPC, and dependent on PPC, Now it is supported on other platforms, so remove PPCisms. Signed-off-by: Zhao Qiang --- arch/powerpc/platforms/83xx/km83xx.c | 1 - arch/powerpc/platforms/83xx/misc.c| 1 - arch/powerpc/platforms/83xx/mpc832x_mds.c

[PATCH v9 3/4] irqchip/qeic: merge qeic_of_init into qe_ic_init

2017-08-02 Thread Zhao Qiang
qeic_of_init just get device_node of qeic from dtb and call qe_ic_init, pass the device_node to qe_ic_init. So merge qeic_of_init into qe_ic_init to get the qeic node in qe_ic_init. Signed-off-by: Zhao Qiang --- drivers/irqchip/irq-qeic.c | 90 -- incl

[PATCH v9 2/4] irqchip/qeic: merge qeic init code from platforms to a common function

2017-08-02 Thread Zhao Qiang
The codes of qe_ic init from a variety of platforms are redundant, merge them to a common function and put it to irqchip/irq-qeic.c For non-p1021_mds mpc85xx_mds boards, use "qe_ic_init(np, 0, qe_ic_cascade_low_mpic, qe_ic_cascade_high_mpic);" instead of "qe_ic_init(np, 0, qe_ic_cascade_muxed_mpic

[PATCH v9 1/4] irqchip/qeic: move qeic driver from drivers/soc/fsl/qe

2017-08-02 Thread Zhao Qiang
move the driver from drivers/soc/fsl/qe to drivers/irqchip, merge qe_ic.h and qe_ic.c into irq-qeic.c. Signed-off-by: Zhao Qiang --- MAINTAINERS| 6 ++ drivers/irqchip/Makefile | 1 + drivers/{soc/fsl/qe/qe_ic.c => irqchip/irq

[PATCH v9 0/4] this patchset is to remove PPCisms for QEIC

2017-08-02 Thread Zhao Qiang
QEIC is supported more than just powerpc boards, so remove PPCisms. changelog: Changes for v8: - use IRQCHIP_DECLARE() instead of subsys_initcall in qeic driver - remove include/soc/fsl/qe/qe_ic.h Changes for v9: - rebase - fix the compile issue whe

[PATCH v9 03/14] powerpc: Use soft_enabled_set api to update paca->soft_enabled

2017-08-02 Thread Madhavan Srinivasan
Force use of soft_enabled_set() wrapper to update paca-soft_enabled wherever possisble. Also add a new wrapper function, soft_enabled_set_return(), added to force the paca->soft_enabled updates. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 14 ++ arch/p

[PATCH v9 14/14] powerpc: rewrite local_t using soft_irq

2017-08-02 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of this patch

[PATCH v9 13/14] powerpc: Add new set of soft_disable_mask_ functions

2017-08-02 Thread Madhavan Srinivasan
To support disabling and enabling of irq with PMI, set of new powerpc_local_irq_pmu_save() and powerpc_local_irq_restore() functions are added. And powerpc_local_irq_save() implemented, by adding a new soft_disable_mask manipulation function soft_disable_mask_or_return(). Local_irq_pmu_* macros ar

[PATCH v9 12/14] powerpc:Add new kconfig IRQ_DEBUG_SUPPORT

2017-08-02 Thread Madhavan Srinivasan
New Kconfig is added "CONFIG_IRQ_DEBUG_SUPPORT" to add warn_on to alert the invalid transitions. Also moved the code under the CONFIG_TRACE_IRQFLAGS in arch_local_irq_restore() to new Kconfig. Reviewed-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/Kconfig | 4

[PATCH v9 11/14] Add support to mask perf interrupts and replay them

2017-08-02 Thread Madhavan Srinivasan
Two new bit mask field "IRQ_DISABLE_MASK_PMU" is introduced to support the masking of PMI and "IRQ_DISABLE_MASK_ALL" to aid interrupt masking checking. Couple of new irq #defs "PACA_IRQ_PMI" and "SOFTEN_VALUE_0xf0*" added to use in the exception code to check for PMI interrupts. In the masked_int

[PATCH v9 10/14] powerpc: Add support to take additional parameter in MASKABLE_* macro

2017-08-02 Thread Madhavan Srinivasan
To support addition of "bitmask" to MASKABLE_* macros, factor out the EXCPETION_PROLOG_1 macro. Make it explicit the interrupt masking supported by a gievn interrupt handler. Patch correspondingly extends the MASKABLE_* macros with an addition's parameter. "bitmask" parameter is passed to SOFTEN_T

[PATCH v9 09/14] powerpc: Avoid using EXCEPTION_PROLOG_1 macro in MASKABLE_*

2017-08-02 Thread Madhavan Srinivasan
Currently we use both EXCEPTION_PROLOG_1 and __EXCEPTION_PROLOG_1 in the MASKABLE_* macros. As a cleanup, this patch makes MASKABLE_* to use only __EXCEPTION_PROLOG_1. There is not logic change. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/exception-64s.h | 6 +++--- 1 file ch

[PATCH v9 07/14] powerpc: Modify soft_enable from flag to mask

2017-08-02 Thread Madhavan Srinivasan
"paca->soft_enabled" is used as a flag to mask some of interrupts. Currently supported flags values and their details: soft_enabledMSR[EE] 0 0 Disabled (PMI and HMI not masked) 1 1 Enabled "paca->soft_enabled" is initialized to 1 to make the interripts

[PATCH v9 08/14] powerpc: Rename soft_enabled to soft_disable_mask

2017-08-02 Thread Madhavan Srinivasan
Rename the paca->soft_enabled to paca->soft_disable_mask as it is no more used as a flag for interrupt state. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 24 arch/powerpc/include/asm/kvm_ppc.h | 2 +- arch/powerpc/include/asm/paca.h|

[PATCH v9 06/14] powerpc/irq: Fix arch_local_irq_disable() in book3s

2017-08-02 Thread Madhavan Srinivasan
In powerpc book3s, arch_local_irq_disable() function is not a "void" when compared to other arch. And only user for this function is arch_local_irq_save(). Patch modify the arch_local_irq_save() and makes arch_local_irq_disable() to use arch_local_irq_save() instead. Suggested-by: Nicholas Piggin

[PATCH v9 05/14] powerpc/irq: Cleanup hard_irq_disable() macro

2017-08-02 Thread Madhavan Srinivasan
Minor cleanup to use helper function for manipulating paca->soft_enabled variable. Suggested-by: Nicholas Piggin Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h

[PATCH v9 04/14] powerpc: Add soft_enabled manipulation functions

2017-08-02 Thread Madhavan Srinivasan
Add new soft_enabled_* manipulation function and implement arch_local_* using the soft_enabled_* wrappers. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hw_irq.h | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/

[PATCH v9 02/14] powerpc: move set_soft_enabled() and rename

2017-08-02 Thread Madhavan Srinivasan
Move set_soft_enabled() from powerpc/kernel/irq.c to asm/hw_irq.c, to force updates to paca-soft_enabled done via these access function. Add "memory" clobber to hint compiler since paca->soft_enabled memory is the target here Renaming it as soft_enabled_set() will make namespaces works better as p

[PATCH v9 01/14] powerpc: Add #defs for paca->soft_enabled flags

2017-08-02 Thread Madhavan Srinivasan
Two #defs IRQ_ENABLED and IRQ_DISABLED are added to be used when updating paca->soft_enabled. Replace the hardcoded values used when updating paca->soft_enabled with IRQ_[EN/DIS]ABLED #def. No logic change. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/exception-64s.h | 2 +-

[PATCH v9 00/14]powerpc: "paca->soft_enabled" based local atomic operation implementation

2017-08-02 Thread Madhavan Srinivasan
Local atomic operations are fast and highly reentrant per CPU counters. Used for percpu variable updates. Local atomic operations only guarantee variable modification atomicity wrt the CPU which owns the data and these needs to be executed in a preemption safe way. Here is the design of the patchs

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-02 Thread Benjamin Herrenschmidt
On Thu, 2017-08-03 at 10:01 +1000, Michael Ellerman wrote: > Benjamin Herrenschmidt writes: > > > On Wed, 2017-08-02 at 18:43 +0200, Cédric Le Goater wrote: > > > If xive_find_target_in_mask() fails to find a cpu, the fuzz value used > > > in xive_pick_irq_target() is decremented and reused in th

Re: [PATCH 03/24] powerpc/6xx: Handle DABR match before calling do_page_fault

2017-08-02 Thread Benjamin Herrenschmidt
On Thu, 2017-08-03 at 10:19 +1000, Michael Ellerman wrote: > arch/powerpc/kernel/entry_32.S:(.text+0x7ac): undefined reference to > `do_break' > > For now I've just wrapped the asm above in: > > +#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE) || > defined(CONFIG_PPC_8xx)) > > But would b

[PATCH] powerpc: xive: ensure active irqd when setting affinity

2017-08-02 Thread Sukadev Bhattiprolu
>From fd0abf5c61b6041fdb75296e8580b86dc91d08d6 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 1 Aug 2017 20:54:41 -0500 Subject: [PATCH] powerpc: xive: ensure active irqd when setting affinity Ensure irqd is active before attempting to set affinity. This should make the set affi

Re: [PATCH 03/24] powerpc/6xx: Handle DABR match before calling do_page_fault

2017-08-02 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On legacy 6xx 32-bit procesors, we checked for the DABR match bit > in DSISR from do_page_fault(), in the middle of a pile of ifdef's > because all other CPU types do it in assembly prior to calling > do_page_fault. Fix that. > > Signed-off-by: Benjamin Herrenschm

Re: [PATCH] perf/python: Add ppc64le to audit uname list

2017-08-02 Thread Michael Ellerman
Paul Clarke writes: > Coincidentally, I just saw a developer stumble upon this within the last > week. Could this be pushed upstream soon? acme's tree is upstream for perf. I assume you mean into Linus' tree? If so this should land in 4.14. cheers

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-02 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On Wed, 2017-08-02 at 18:43 +0200, Cédric Le Goater wrote: >> If xive_find_target_in_mask() fails to find a cpu, the fuzz value used >> in xive_pick_irq_target() is decremented and reused in the last >> returning call to xive_find_target_in_mask(). This can result

Re: [PATCH 3/3] powerpc/mm/hash64: Make vmalloc 56T on hash

2017-08-02 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > Michael Ellerman writes: > >> On 64-bit book3s, with the hash MMU, we currently define the kernel >> virtual space (vmalloc, ioremap etc.), to be 16T in size. This is a >> leftover from pre v3.7 when our user VM was also 16T. >> >> Of that 16T we split it 50/50, with

Re: [PATCH v3 7/7] ima: Support module-style appended signatures for appraisal

2017-08-02 Thread Mimi Zohar
On Wed, 2017-08-02 at 14:42 -0300, Thiago Jung Bauermann wrote: > Mimi Zohar writes: > > > On Thu, 2017-07-06 at 19:17 -0300, Thiago Jung Bauermann wrote: > >> --- a/security/integrity/ima/ima_appraise.c > >> +++ b/security/integrity/ima/ima_appraise.c > >> @@ -200,18 +200,40 @@ int ima_read_xatt

Re: [PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-02 Thread Benjamin Herrenschmidt
On Wed, 2017-08-02 at 18:43 +0200, Cédric Le Goater wrote: > If xive_find_target_in_mask() fails to find a cpu, the fuzz value used > in xive_pick_irq_target() is decremented and reused in the last > returning call to xive_find_target_in_mask(). This can result in such > WARNINGs if the initial fuz

Re: [PATCH] PCI: Convert to using %pOF instead of full_name

2017-08-02 Thread Bjorn Helgaas
On Tue, Jul 18, 2017 at 04:43:21PM -0500, Rob Herring wrote: > Now that we have a custom printf format specifier, convert users of > full_name to use %pOF instead. This is preparation to remove storing > of the full path string for each node. > > Signed-off-by: Rob Herring > Cc: Thomas Petazzoni

Re: [PATCH 1/3] powerpc/mm/book3s64: Make KERN_IO_START a variable

2017-08-02 Thread Balbir Singh
On Tue, Aug 1, 2017 at 8:29 PM, Michael Ellerman wrote: > Currently KERN_IO_START is defined as: > > #define KERN_IO_START (KERN_VIRT_START + (KERN_VIRT_SIZE >> 1)) > > Although it looks like a constant, both the components are actually > variables, to allow us to have a different value between

[PATCH] powerpc/macintosh: constify wf_sensor_ops structures

2017-08-02 Thread Julia Lawall
The wf_sensor_ops structures are only stored in the ops field of a wf_sensor structure, which is declared as const. Thus the wf_sensor_ops structures themselves can be const. Done with the help of Coccinelle. // @r disable optional_qualifier@ identifier i; position p; @@ static struct wf_sensor

Re: [PATCH] perf/python: Add ppc64le to audit uname list

2017-08-02 Thread Paul Clarke
Coincidentally, I just saw a developer stumble upon this within the last week. Could this be pushed upstream soon? PC On 08/02/2017 10:06 AM, Arnaldo Carvalho de Melo wrote: > Em Wed, Aug 02, 2017 at 08:12:16PM +0530, Naveen N. Rao escreveu: >> Before patch: >> $ uname -m >> ppc64le > > Tha

[v4 12/15] mm: explicitly zero pagetable memory

2017-08-02 Thread Pavel Tatashin
Soon vmemmap_alloc_block() will no longer zero the block, so zero memory at its call sites for everything except struct pages. Struct page memory is zero'd by struct page initialization. Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco

[v4 07/15] mm: defining memblock_virt_alloc_try_nid_raw

2017-08-02 Thread Pavel Tatashin
A new variant of memblock_virt_alloc_* allocations: memblock_virt_alloc_try_nid_raw() - Does not zero the allocated memory - Does not panic if request cannot be satisfied Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco --- in

[v4 04/15] mm: discard memblock data later

2017-08-02 Thread Pavel Tatashin
There is existing use after free bug when deferred struct pages are enabled: The memblock_add() allocates memory for the memory array if more than 128 entries are needed. See comment in e820__memblock_setup(): * The bootstrap memblock region count maximum is 128 entries * (INIT_MEMBLOCK_REGI

[v4 15/15] mm: debug for raw alloctor

2017-08-02 Thread Pavel Tatashin
When CONFIG_DEBUG_VM is enabled, this patch sets all the memory that is returned by memblock_virt_alloc_try_nid_raw() to ones to ensure that no places excpect zeroed memory. Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco --- mm/memb

[v4 08/15] mm: zero struct pages during initialization

2017-08-02 Thread Pavel Tatashin
Add struct page zeroing as a part of initialization of other fields in __init_single_page(). Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco --- include/linux/mm.h | 9 + mm/page_alloc.c| 1 + 2 files changed, 10 insertio

[v4 11/15] arm64/kasan: explicitly zero kasan shadow memory

2017-08-02 Thread Pavel Tatashin
To optimize the performance of struct page initialization, vmemmap_populate() will no longer zero memory. We must explicitly zero the memory that is allocated by vmemmap_populate() for kasan, as this memory does not go through struct page initialization path. Signed-off-by: Pavel Tatashin Review

[v4 14/15] mm: optimize early system hash allocations

2017-08-02 Thread Pavel Tatashin
Clients can call alloc_large_system_hash() with flag: HASH_ZERO to specify that memory that was allocated for system hash needs to be zeroed, otherwise the memory does not need to be zeroed, and client will initialize it. If memory does not need to be zero'd, call the new memblock_virt_alloc_raw()

[v4 13/15] mm: stop zeroing memory during allocation in vmemmap

2017-08-02 Thread Pavel Tatashin
Replace allocators in sprase-vmemmap to use the non-zeroing version. So, we will get the performance improvement by zeroing the memory in parallel when struct pages are zeroed. Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco --- mm/s

[v4 05/15] mm: don't accessed uninitialized struct pages

2017-08-02 Thread Pavel Tatashin
In deferred_init_memmap() where all deferred struct pages are initialized we have a check like this: if (page->flags) { VM_BUG_ON(page_zone(page) != zone); goto free_range; } This way we are checking if the current deferred page has already been initialized. It wor

[v4 02/15] x86/mm: setting fields in deferred pages

2017-08-02 Thread Pavel Tatashin
Without deferred struct page feature (CONFIG_DEFERRED_STRUCT_PAGE_INIT), flags and other fields in "struct page"es are never changed prior to first initializing struct pages by going through __init_single_page(). With deferred struct page feature enabled there is a case where we set some fields pr

[v4 10/15] x86/kasan: explicitly zero kasan shadow memory

2017-08-02 Thread Pavel Tatashin
To optimize the performance of struct page initialization, vmemmap_populate() will no longer zero memory. We must explicitly zero the memory that is allocated by vmemmap_populate() for kasan, as this memory does not go through struct page initialization path. Signed-off-by: Pavel Tatashin Review

[v4 01/15] x86/mm: reserve only exiting low pages

2017-08-02 Thread Pavel Tatashin
Struct pages are initialized by going through __init_single_page(). Since the existing physical memory in memblock is represented in memblock.memory list, struct page for every page from this list goes through __init_single_page(). The second memblock list: memblock.reserved, manages the allocated

[v4 00/15] complete deferred page initialization

2017-08-02 Thread Pavel Tatashin
Changelog: v3 - v2 - Rewrote code to zero sturct pages in __init_single_page() as suggested by Michal Hocko - Added code to handle issues related to accessing struct page memory before they are initialized. v2 - v3 - Addressed David Miller comments about one change per patch: * Splited cha

[v4 09/15] sparc64: optimized struct page zeroing

2017-08-02 Thread Pavel Tatashin
Add an optimized mm_zero_struct_page(), so struct page's are zeroed without calling memset(). We do eight regular stores, thus avoid cost of membar. Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco --- arch/sparc/include/asm/pgtable_6

[v4 06/15] sparc64: simplify vmemmap_populate

2017-08-02 Thread Pavel Tatashin
Remove duplicating code by using common functions vmemmap_pud_populate and vmemmap_pgd_populate. Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco --- arch/sparc/mm/init_64.c | 23 ++- 1 file changed, 6 insertions(+

[v4 03/15] sparc64/mm: setting fields in deferred pages

2017-08-02 Thread Pavel Tatashin
Without deferred struct page feature (CONFIG_DEFERRED_STRUCT_PAGE_INIT), flags and other fields in "struct page"es are never changed prior to first initializing struct pages by going through __init_single_page(). With deferred struct page feature enabled there is a case where we set some fields pr

[PATCH v3 3/3] cxl: Add memory barrier to guarantee TLBI scope

2017-08-02 Thread Frederic Barrat
With the hash memory model, all TLBIs become global when the cxl driver is active, i.e. as soon as one context is open. It is theoretically possible to send a TLBI with the wrong scope as there's currently no memory barrier between when the driver is marked as in use, and attaching a context to the

[PATCH v3 2/3] cxl: Mark context requiring global TLBIs

2017-08-02 Thread Frederic Barrat
The PSL and XSL need to see all TLBIs pertinent to the memory contexts used on the adapter. For the hash memory model, it is done by making all TLBIs global as soon as the cxl driver is in use. For radix, we need something similar, but we can refine and only convert to global the invalidations for

[PATCH v3 1/3] powerpc/mm: Add marker for contexts requiring global TLB invalidations

2017-08-02 Thread Frederic Barrat
Introduce a new 'flags' attribute per context and define its first bit to be a marker requiring all TLBIs for that context to be broadcasted globally. Once that marker is set on a context, it cannot be removed. Such a marker is useful for memory contexts used by devices behind the NPU and CAPP/PSL

[PATCH v3 0/3] powerpc/mm: Mark memory contexts requiring global TLBIs

2017-08-02 Thread Frederic Barrat
capi2 and opencapi require the TLB invalidations being sent for addresses used on the cxl adapter or opencapi device to be global, as there's a translation cache in the PSL (for capi2) or NPU (for opencapi). The CAPP, on behalf of the PSL, and NPU snoop the power bus. This is not new: for the hash

[PATCH v3 2/2] powerpc/xmon: Disable tracing when entering xmon

2017-08-02 Thread Breno Leitao
If tracing is enabled and you get into xmon, the tracing buffer continues to be updated, causing possible loss of data and unnecessary tracing information coming from xmon functions. This patch simple disables tracing when entering xmon, and re-enables it if the kernel is resumed (with 'x'). Sign

[PATCH v3 1/2] powerpc/xmon: Dump ftrace buffers for the current CPU only

2017-08-02 Thread Breno Leitao
Current xmon 'dt' command dumps the tracing buffer for all the CPUs, which makes it very hard to read due to the fact that most of powerpc machines currently have many CPUs. Other than that, the CPU lines are interleaved in the ftrace log. This new option just dumps the ftrace buffer for the curre

RE: [PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc

2017-08-02 Thread Leo Li
> -Original Message- > From: Julia Lawall [mailto:julia.law...@lip6.fr] > Sent: Wednesday, August 02, 2017 10:29 AM > To: Leo Li > Cc: kernel-janit...@vger.kernel.org; Felipe Balbi ; Greg > Kroah-Hartman ; linux-...@vger.kernel.org; > linuxppc-dev@lists.ozlabs.org; linux-ker...@vger.kern

Re: [GIT PULL] Please pull JSON files for Power9 PMU events

2017-08-02 Thread Arnaldo Carvalho de Melo
Em Wed, Aug 02, 2017 at 10:46:17AM -0700, Sukadev Bhattiprolu escreveu: > Hi Arnaldo, > > Please pull some updates/cleanups to the POWER9 PMU events. > > The following changes since commit 81e3d8b2af2e7417f1d5164aab5c1a75955e8a5d: > > perf trace beautify ioctl: Beautify perf ioctl's 'cmd' arg

[PATCH] powerpc/xmon: Exclude all of xmon/ from ftrace

2017-08-02 Thread Naveen N. Rao
Exclude core xmon files from ftrace (along with an xmon xive helper outside of xmon/) to minimize impact of ftrace while within xmon. Before patch: root@ubuntu:/sys/kernel/debug/tracing# cat available_filter_functions | grep -i xmon xmon_xive_do_dump xmon_dbgfs_get xmon_print_symbol xmo

[PATCH] powerpc/pseries: Check memory device state before onlining/offlining

2017-08-02 Thread Nathan Fontenot
When DLPAR adding or removing memory we need to check the device offline status before trying to online/offline the memory. This is needed because calls device_online() and device_offline() will return non-zero for memory that is already online and offline respectively. This update resolves two sc

Re: [PATCH v6 1/4] of: remove *phandle properties from expanded device tree

2017-08-02 Thread Frank Rowand
Hi Michael, In Rob's reply to you email, he said: I'd like to move towards dropping 'linux,phandle' including changing dtc to stop generating both properties by default. Perhaps we should just be more explicit that we are doing that. Stop exposing it first and then change how phand

[PATCH] powerpc: add const to bin_attribute structures

2017-08-02 Thread Bhumika Goyal
Declare bin_attribute structures as const as they are only passed as an argument to the function sysfs_create_bin_file. This argument is of type const, so declare the structure as const. Signed-off-by: Bhumika Goyal --- arch/powerpc/platforms/powernv/opal-flash.c | 2 +- arch/powerpc/sysdev/mv64

[GIT PULL] Please pull JSON files for Power9 PMU events

2017-08-02 Thread Sukadev Bhattiprolu
Hi Arnaldo, Please pull some updates/cleanups to the POWER9 PMU events. The following changes since commit 81e3d8b2af2e7417f1d5164aab5c1a75955e8a5d: perf trace beautify ioctl: Beautify perf ioctl's 'cmd' arg (2017-08-01 13:33:50 -0300) are available in the git repository at: https://github

Re: [PATCH v3 7/7] ima: Support module-style appended signatures for appraisal

2017-08-02 Thread Thiago Jung Bauermann
Mimi Zohar writes: > On Thu, 2017-07-06 at 19:17 -0300, Thiago Jung Bauermann wrote: >> --- a/security/integrity/ima/ima_appraise.c >> +++ b/security/integrity/ima/ima_appraise.c >> @@ -200,18 +200,40 @@ int ima_read_xattr(struct dentry *dentry, >> */ >> int ima_appraise_measurement(enum ima_

Re: [PATCH v3 1/7] integrity: Introduce struct evm_hmac_xattr

2017-08-02 Thread Thiago Jung Bauermann
Hello Mimi, Thanks for your review! The patch at the end of the email implements your suggestions, what do you think? Mimi Zohar writes: > On Thu, 2017-07-06 at 19:17 -0300, Thiago Jung Bauermann wrote: >> A separate struct evm_hmac_xattr is introduced, with the original >> definition of evm_i

[PATCH] powerpc/xive: fix the fuzz value in xive_pick_irq_target()

2017-08-02 Thread Cédric Le Goater
If xive_find_target_in_mask() fails to find a cpu, the fuzz value used in xive_pick_irq_target() is decremented and reused in the last returning call to xive_find_target_in_mask(). This can result in such WARNINGs if the initial fuzz value is zero : [0.094480] WARNING: CPU: 10 PID: 1 at ..

Re: RCU lockup issues when CONFIG_SOFTLOCKUP_DETECTOR=n - any one else seeing this?

2017-08-02 Thread Jonathan Cameron
On Tue, 1 Aug 2017 11:46:46 -0700 "Paul E. McKenney" wrote: > On Mon, Jul 31, 2017 at 04:27:57PM +0100, Jonathan Cameron wrote: > > On Mon, 31 Jul 2017 08:04:11 -0700 > > "Paul E. McKenney" wrote: > > > > > On Mon, Jul 31, 2017 at 12:08:47PM +0100, Jonathan Cameron wrote: > > > > On Fri, 28

Re: [PATCH 2/2] powerpc/xmon: Disable tracing when entering xmon

2017-08-02 Thread Naveen N. Rao
On 2017/08/02 11:58AM, Breno Leitao wrote: > If tracing is enabled and you get into xmon, the tracing buffer > continues to be updated, causing possible loss of data and unnecessary > tracing information coming from xmon functions. > > This patch simple disables tracing when entering xmon, and ree

Re: [PATCH 1/2] powerpc/xmon: Dump ftrace buffers for the current CPU

2017-08-02 Thread Naveen N. Rao
On 2017/08/02 11:58AM, Breno Leitao wrote: > Current xmon 'dt' command dumps the tracing buffer for all the CPUs, > which makes it very hard to read due to the fact that most of > powerpc machines currently have many CPUs. Other than that, the CPU > lines are interleaved in the ftrace log. > > Thi

[PATCH] usb: gadget: fsl_qe_udc: constify qe_ep0_desc

2017-08-02 Thread Julia Lawall
qe_ep0_desc is only passed as the second argument to qe_ep_init, which is const, so qe_ep0_desc can be const too. Done with the help of Coccinelle. Signed-off-by: Julia Lawall --- I got a lot of warnings when compiling this file, but none seemed to be related to the change. drivers/usb/gadget

Re: [PATCH 1/3] powerpc/xmon: Dump ftrace buffers for the current CPU

2017-08-02 Thread kbuild test robot
Hi Breno, [auto build test ERROR on powerpc/next] [also build test ERROR on v4.13-rc3 next-20170802] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Breno-Leitao/powerpc-xmon-Dump-ftrace-buffers

Re: [PATCH] perf/python: Add ppc64le to audit uname list

2017-08-02 Thread Arnaldo Carvalho de Melo
Em Wed, Aug 02, 2017 at 08:12:16PM +0530, Naveen N. Rao escreveu: > Before patch: > $ uname -m > ppc64le Thanks, applied, - Arnaldo > $ ./perf script -s ./scripts/python/syscall-counts.py > Install the audit-libs-python package to get syscall names. > For example: > # apt-get insta

[PATCH 2/2] powerpc/xmon: Disable tracing when entering xmon

2017-08-02 Thread Breno Leitao
If tracing is enabled and you get into xmon, the tracing buffer continues to be updated, causing possible loss of data and unnecessary tracing information coming from xmon functions. This patch simple disables tracing when entering xmon, and reenables it if the kernel is resumed (with 'x'). Signe

[PATCH 1/2] powerpc/xmon: Dump ftrace buffers for the current CPU

2017-08-02 Thread Breno Leitao
Current xmon 'dt' command dumps the tracing buffer for all the CPUs, which makes it very hard to read due to the fact that most of powerpc machines currently have many CPUs. Other than that, the CPU lines are interleaved in the ftrace log. This new option just dumps the ftrace buffer for the curre

Re: [RFC PATCH] powerpc: Disabling MEMORY_HOTPLUG_DEFAULT_ONLINE option for PPC64 arch

2017-08-02 Thread Nathan Fontenot
On 08/02/2017 05:55 AM, Daniel Henrique Barboza wrote: > > On 08/01/2017 11:39 AM, Daniel Henrique Barboza wrote: >> >> On 08/01/2017 11:05 AM, Nathan Fontenot wrote: >> >>> At this point I don't think we need this patch to disable auto online >>> for ppc64. I would be curious if this is still bro

Re: [PATCH 2/3] powerpc/xmon: Disable and enable tracing command

2017-08-02 Thread Breno Leitao
On Wed, Aug 02, 2017 at 06:51:24PM +0530, Naveen N. Rao wrote: > On 2017/08/01 11:21AM, Breno Leitao wrote: > > Hi Naveen, > > > > On Tue, Aug 01, 2017 at 12:10:24PM +0530, Naveen N. Rao wrote: > > > On 2017/07/31 02:22PM, Breno Leitao wrote: > > > > If tracing is enabled and you get into xmon, th

[PATCH] perf/python: Add ppc64le to audit uname list

2017-08-02 Thread Naveen N. Rao
Before patch: $ uname -m ppc64le $ ./perf script -s ./scripts/python/syscall-counts.py Install the audit-libs-python package to get syscall names. For example: # apt-get install python-audit (Ubuntu) # yum install audit-libs-python (Fedora) etc. Press control+C to stop and

Re: [PATCH v1 3/3] arch/powerpc/net/bpf: Basic EBPF support

2017-08-02 Thread Naveen N. Rao
> arch/powerpc/net/bpf: Basic EBPF support Perhaps: powerpc/bpf: Set JIT memory read-only On 2017/08/01 09:25PM, Balbir Singh wrote: > Signed-off-by: Balbir Singh > --- > arch/powerpc/net/bpf_jit_comp64.c | 13 + > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/ar

[PATCH v3 4/5] powerpc/mm: declare some local functions static

2017-08-02 Thread Christophe Leroy
get_pteptr() and __mapin_ram_chunk() are only used locally, so define them static Signed-off-by: Christophe Leroy --- v3: no change arch/powerpc/include/asm/book3s/32/pgtable.h | 3 --- arch/powerpc/include/asm/nohash/32/pgtable.h | 3 --- arch/powerpc/mm/pgtable_32.c | 4 ++--

[PATCH v3 5/5] powerpc/mm: Simplify __set_fixmap()

2017-08-02 Thread Christophe Leroy
__set_fixmap() uses __fix_to_virt() then does the boundary checks by it self. Instead, we can use fix_to_virt() which does the verification at build time. For this, we need to use it inline so that GCC can see the real value of idx at buildtime. In the meantime, we remove the 'fixmaps' variable. T

[PATCH v3 3/5] powerpc/mm: Implement STRICT_KERNEL_RWX on PPC32

2017-08-02 Thread Christophe Leroy
This patch implements STRICT_KERNEL_RWX on PPC32. As for CONFIG_DEBUG_PAGEALLOC, it deactivates BAT and LTLB mappings in order to allow page protection setup at the level of each page. As BAT/LTLB mappings are deactivated, there might be a performance impact. Signed-off-by: Christophe Leroy ---

[PATCH v3 2/5] powerpc/mm: Fix kernel RAM protection after freeing unused memory on PPC32

2017-08-02 Thread Christophe Leroy
As seen below, allthough the init sections have been freed, the associated memory area is still marked as executable in the page tables. ~ dmesg [5.860093] Freeing unused kernel memory: 592K (c057 - c0604000) ~ cat /sys/kernel/debug/kernel_page_tables ---[ Start of kernel VM ]--- 0xc0

[PATCH v3 1/5] powerpc/mm: Ensure change_page_attr() doesn't invalidate pinned TLBs

2017-08-02 Thread Christophe Leroy
__change_page_attr() uses flush_tlb_page(). flush_tlb_page() uses tlbie instruction, which also invalidates pinned TLBs, which is not what we expect. This patch modifies the implementation to use flush_tlb_kernel_range() instead. This will make use of tlbia which will preserve pinned TLBs. Signed

[PATCH v3 0/5] powerpc/mm: Fix kernel protection and implement STRICT_KERNEL_RWX on PPC32

2017-08-02 Thread Christophe Leroy
This patch set implements STRICT_KERNEL_RWX on Powerpc32 after fixing a few issues related to kernel code page protection. At the end we take the opportunity to get rid of some unneccessary/outdated fixmap stuff. Changes from v2 to v3: * Rebased on latest linux-powerpc/merge branch * Function rem

Re: [PATCH 2/3] powerpc/xmon: Disable and enable tracing command

2017-08-02 Thread Naveen N. Rao
On 2017/08/01 11:21AM, Breno Leitao wrote: > Hi Naveen, > > On Tue, Aug 01, 2017 at 12:10:24PM +0530, Naveen N. Rao wrote: > > On 2017/07/31 02:22PM, Breno Leitao wrote: > > > If tracing is enabled and you get into xmon, the tracing buffer > > > continues to be updated, causing possible loss of da

Re: [RFC PATCH 16/17] powerpc/mm/pseries: Move slot based bulk remove to helper

2017-08-02 Thread Segher Boessenkool
Hi Aneesh, On Wed, Aug 02, 2017 at 11:10:15AM +0530, Aneesh Kumar K.V wrote: > +static int plpar_bluk_remove(unsigned long *param, int index, unsigned long > slot, s/bluk/bulk/ :-) Segher

Re: [PATCH 0/5] tpm: tpm_ibmvtpm: - style fix

2017-08-02 Thread Jarkko Sakkinen
On Sat, Jul 29, 2017 at 03:24:28PM +0800, SZ Lin wrote: > Fix styling WARNINGs and Errors of tpm_ibmvtpm.c driver by using checkpatch.pl Changes are great but you should revise the patch series so that you expain in each commit what goes wrong instead of copy paste of the checkpatch output and why

Re: [PATCH 3/3] powerpc/mm: Mark __init memory no-execute when STRICT_KERNEL_RWX=y

2017-08-02 Thread Christophe LEROY
Le 14/07/2017 à 08:51, Michael Ellerman a écrit : Currently even with STRICT_KERNEL_RWX we leave the __init text marked executable after init, which is bad. Add a hook to mark it NX (no-execute) before we free it, and implement it for radix and hash. Note that we use __init_end as the end add

Re: [RFC PATCH] powerpc: Disabling MEMORY_HOTPLUG_DEFAULT_ONLINE option for PPC64 arch

2017-08-02 Thread Daniel Henrique Barboza
On 08/01/2017 11:39 AM, Daniel Henrique Barboza wrote: On 08/01/2017 11:05 AM, Nathan Fontenot wrote: At this point I don't think we need this patch to disable auto online for ppc64. I would be curious if this is still broken with the latest mainline code though. If the auto_online featu

Re: [PATCH v1 1/3] arch/powerpc/set_memory: Implement set_memory_xx routines

2017-08-02 Thread Balbir Singh
On Wed, Aug 2, 2017 at 8:09 PM, Aneesh Kumar K.V wrote: > Balbir Singh writes: > >> Add support for set_memory_xx routines. With the STRICT_KERNEL_RWX >> feature support we got support for changing the page permissions >> for pte ranges. This patch adds support for both radix and hash >> so that

Re: [PATCH v1 1/3] arch/powerpc/set_memory: Implement set_memory_xx routines

2017-08-02 Thread Aneesh Kumar K.V
Balbir Singh writes: > Add support for set_memory_xx routines. With the STRICT_KERNEL_RWX > feature support we got support for changing the page permissions > for pte ranges. This patch adds support for both radix and hash > so that we can change their permissions via set/clear masks. > > A new h

Re: [RFC v6 21/62] powerpc: introduce execute-only pkey

2017-08-02 Thread Michael Ellerman
Thiago Jung Bauermann writes: > Michael Ellerman writes: > >> Thiago Jung Bauermann writes: >>> Ram Pai writes: >> ... + + /* We got one, store it and use it from here on out */ + if (need_to_set_mm_pkey) + mm->context.execute_only_pkey = execute_only_pkey;

Re: [PATCH v4 2/3] powerpc/mm/hugetlb: Add support for reserving gigantic huge pages via kernel command line

2017-08-02 Thread Christophe LEROY
Le 02/08/2017 à 10:10, Christophe LEROY a écrit : Le 02/08/2017 à 09:31, Aneesh Kumar K.V a écrit : Christophe LEROY writes: Hi, Le 28/07/2017 à 07:01, Aneesh Kumar K.V a écrit : With commit aa888a74977a8 ("hugetlb: support larger than MAX_ORDER") we added support for allocating giganti

  1   2   >