Re: [PATCH] powerpc/eeh: Disable EEH stack dump by default

2017-09-20 Thread Andrew Donnellan
On 20/09/17 00:25, Jose Ricardo Ziviani wrote: Today, each EEH causes a stack dump to be printed in the logs. In production environment it's not quite necessary. Thus, this patch adds a new command line argument in order to enable the stack dump for debugging purposes. For example, instead of

Re: [PATCH 3/5] powerpc64: Add .opd based function descriptor dereference

2017-09-20 Thread Sergey Senozhatsky
On (09/20/17 11:51), Michael Ellerman wrote: [..] > > unlike ppc_function_entry(), printk() can get called on any symbol, > > not just function pointers. > > > > for example, > > > > cat /proc/kallsyms | grep shrinker_rwsem > > 81a4b1e0 d shrinker_rwsem > > Yep, good point. So your patch

Re: [PATCH] powerpc: make irq_chip const, __initdata and __initconst

2017-09-20 Thread Michael Ellerman
Bhumika Goyal writes: > Make ehv_pic_irq_chip, mpic_ipi_chip and mpic_tm_chip const as they are > used only as a copy operation. This usage is during init, so make them > __initconst too. > Make mpic_ipi_chip __initdata as it is only modified during the init > phase and there

[PATCH v3 5/5] powerpc/mce: hookup memory_failure for UE errors

2017-09-20 Thread Balbir Singh
If we are in user space and hit a UE error, we now have the basic infrastructure to walk the page tables and find out the effective address that was accessed, since the DAR is not valid. We use a work_queue content to hookup the bad pfn, any other context causes problems, since memory_failure

Re: [linux-next][Oops] memory hot-unplug results fault instruction address at /include/linux/list.h:104

2017-09-20 Thread Abdul Haleem
On Tue, 2017-09-12 at 12:11 +0530, abdul wrote: > Hi, > > Memory hot-unplug on PowerVM LPAR running next-20170911 results in > Faulting instruction address: 0xc02b56c4 > > which maps to the below code path: > > 0xc02b56c4 is in __rmqueue (./include/linux/list.h:104). > 99 *

[PATCH v3 1/5] powerpc/mce.c: Remove unused function get_mce_fault_addr()

2017-09-20 Thread Balbir Singh
There are no users of get_mce_fault_addr() Fixes: b63a0ff ("powerpc/powernv: Machine check exception handling.") Signed-off-by: Balbir Singh --- arch/powerpc/include/asm/mce.h | 2 -- arch/powerpc/kernel/mce.c | 39 --- 2 files

[PATCH v3 4/5] powerpc/mce: Hookup ierror (instruction) UE errors

2017-09-20 Thread Balbir Singh
Hookup instruction errors (UE) for memory offling via memory_failure() in a manner similar to load/store errors (derror). Since we have access to the NIP, the conversion is a one step process in this case. Signed-off-by: Balbir Singh --- arch/powerpc/kernel/mce_power.c |

Re: [PATCH] powerpc: make irq_chip const, __initdata and __initconst

2017-09-20 Thread Julia Lawall
On Wed, 20 Sep 2017, Michael Ellerman wrote: > Bhumika Goyal writes: > > > Make ehv_pic_irq_chip, mpic_ipi_chip and mpic_tm_chip const as they are > > used only as a copy operation. This usage is during init, so make them > > __initconst too. > > Make mpic_ipi_chip

Re: [PATCH] KVM: PPC: Book3S HV: Check for updated HDSISR on P9 HDSI exception

2017-09-20 Thread David Gibson
On Fri, Sep 15, 2017 at 03:26:14PM +1000, Michael Neuling wrote: > On POWER9 DD2.1 and below, sometimes on a Hypervisor Data Storage > Interrupt (HDSI) the HDSISR is not be updated at all. > > To work around this we put a canary value into the HDSISR before > returning to a guest and then check

[PATCH v3 2/5] powerpc/mce: align the print of physical address better

2017-09-20 Thread Balbir Singh
Use the same alignment as Effective address and rename phyiscal address to Page Frame Number Signed-off-by: Balbir Singh --- arch/powerpc/kernel/mce.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c

[PATCH] cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers

2017-09-20 Thread Vaibhav Jain
Access to PSL/XSL_DEBUG registers on the adapter provides easy access to the debug facilities provided by PSL/XSL. So this patch adds two new files (debug, xsl-debug) to the cxl-adapter specific debugfs folder located at /sys/kernel/debugfs/cxl/card, which will provide direct r/w access to

Re: [linux-next][EXT4][Oops]kernel panics when running fsfuzzer

2017-09-20 Thread Michael Ellerman
Abdul Haleem writes: > Hi, > > next kernel panics when running fsfuzzer test on ext4 file system. > > Machine Type: Power 7 PowerVM LPAR > kernel : 4.13.0-next-20170915 > config : attached > Test: fsfuzzer > > dmesg: > - > EXT4-fs (loop1): couldn't mount RDWR

[PATCH v3 0/5] Revisit MCE handling for UE Errors

2017-09-20 Thread Balbir Singh
This patch series is designed to hook up memory_failure on UE errors, this is specially helpful for user_mode UE errors. The first two patches cleanup bits, remove dead code. I could not find any users of get_mce_fault_addr(). The second one improves printing of physical address The third patch

[PATCH v3 3/5] powerpc/mce: Hookup derror (load/store) UE errors

2017-09-20 Thread Balbir Singh
Extract physical_address for UE errors by walking the page tables for the mm and address at the NIP, to extract the instruction. Then use the instruction to find the effective address via analyse_instr(). We might have page table walking races, but we expect them to be rare, the physical address

Re: [PATCH 0/6] crypto: talitos - various fixes

2017-09-20 Thread Christophe LEROY
Looks like the linux-crypto list and patchwork was out of order when I sent this. I will send again, sorry for the noise on the other lists. Le 19/09/2017 à 14:58, Christophe Leroy a écrit : This serie provide various fixes on the talitos driver. Christophe Leroy (6): crypto: talitos -

RE: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread David Laight
From: Helge Deller > Sent: 19 September 2017 21:08 ... > > Using 'unsigned long' for any kind of pointer is an accident > > waiting do happen. > > It also makes it difficult to typecheck the function calls. > > Using 'void *' isn't any better. > > Either a pointer to an undefined struct, or a

RE: [PATCH v1 1/3] powerpc: Align bytes before fall back to .Lshort in powerpc memcmp

2017-09-20 Thread David Laight
From: Simon Guo > Sent: 20 September 2017 10:57 > On Tue, Sep 19, 2017 at 10:12:50AM +, David Laight wrote: > > From: wei.guo.si...@gmail.com > > > Sent: 19 September 2017 11:04 > > > Currently memcmp() in powerpc will fall back to .Lshort (compare per byte > > > mode) if either src or dst

[PATCH 2/3] ASoC: fsl-asoc-card: Handle return value of devm_kasprintf

2017-09-20 Thread Arvind Yadav
devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- sound/soc/fsl/fsl-asoc-card.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 2db4d0c..86f240b

[PATCH 3/3] ASoC: omap-hdmi-audio: Handle return value of devm_kasprintf

2017-09-20 Thread Arvind Yadav
devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- sound/soc/omap/omap-hdmi-audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c index

Re: [PATCH v1 1/3] powerpc: Align bytes before fall back to .Lshort in powerpc memcmp

2017-09-20 Thread Simon Guo
On Tue, Sep 19, 2017 at 10:12:50AM +, David Laight wrote: > From: wei.guo.si...@gmail.com > > Sent: 19 September 2017 11:04 > > Currently memcmp() in powerpc will fall back to .Lshort (compare per byte > > mode) if either src or dst address is not 8 bytes aligned. It can be > > opmitized if

[PATCH 0/3] ASoC: Handle return value of devm_kasprintf

2017-09-20 Thread Arvind Yadav
devm_kasprintf() can fail here and we must check its return value. Arvind Yadav (3): [PATCH 1/3] ASoC: davinci-mcasp: Handle return value of devm_kasprintf [PATCH 2/3] ASoC: fsl-asoc-card: Handle return value of devm_kasprintf [PATCH 3/3] ASoC: omap-hdmi-audio: Handle return value of

Re: [PATCH] cxl: Provide debugfs access to PSL_DEBUG/XSL_DEBUG registers

2017-09-20 Thread Andrew Donnellan
On 20/09/17 16:23, Vaibhav Jain wrote: Access to PSL/XSL_DEBUG registers on the adapter provides easy access to the debug facilities provided by PSL/XSL. So this patch adds two new files (debug, xsl-debug) to the cxl-adapter specific debugfs folder located at /sys/kernel/debugfs/cxl/card, which

Re: [PATCH v1 0/3] powerpc: memcmp() optimization

2017-09-20 Thread Simon Guo
Hi Chris, On Tue, Sep 19, 2017 at 02:21:33PM +0200, Christophe LEROY wrote: > Hi > > Could you in the email/patch subject and in the commit texts write > powerpc/64 instead of powerpc as it doesn't apply to powerpc/32 > > Christophe > Sure. I will update in v2. BR, - Simon

[PATCH 1/3] ASoC: davinci-mcasp: Handle return value of devm_kasprintf

2017-09-20 Thread Arvind Yadav
devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- sound/soc/davinci/davinci-mcasp.c | 12 1 file changed, 12 insertions(+) diff --git a/sound/soc/davinci/davinci-mcasp.c

[PATCH] powerpc/livepatch: Fix livepatch stack access

2017-09-20 Thread Kamalesh Babulal
While running stress test with livepatch module loaded, kernel bug was triggered. cpu 0x5: Vector: 400 (Instruction Access) at [c000eb9d3b60] pc: c000eb9d3e30 lr: c000eb9d3e30 sp: c000eb9d3de0 msr: 80001280b033 current = 0xc000dbd38700 paca=

Re: [RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Joe Perches
On Thu, 2017-09-21 at 01:29 +0900, Sergey Senozhatsky wrote: > We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart > enough to handle function pointer dereference on platforms where such > dereference is required. > > checkpatch warning example: > > WARNING: Use '%pS/%ps'

Re: [RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Helge Deller
On 20.09.2017 19:38, Joe Perches wrote: On Thu, 2017-09-21 at 01:29 +0900, Sergey Senozhatsky wrote: We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart enough to handle function pointer dereference on platforms where such dereference is required. checkpatch warning

Re: [RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Joe Perches
On Wed, 2017-09-20 at 19:53 +0200, Helge Deller wrote: > On 20.09.2017 19:38, Joe Perches wrote: > > On Thu, 2017-09-21 at 01:29 +0900, Sergey Senozhatsky wrote: > > > We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart > > > enough to handle function pointer dereference on

[RFC][PATCH v2 0/7] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread Sergey Senozhatsky
Hello RFC On some arches C function pointers are indirect and point to a function descriptor, which contains the actual pointer to the code. This mostly doesn't matter, except for cases when people want to print out function pointers in symbolic format, because the usual

[RFC][PATCH v2 2/7] sections: split dereference_function_descriptor()

2017-09-20 Thread Sergey Senozhatsky
There are two format specifiers to print out a pointer in symbolic format: '%pS/%ps' and '%pF/%pf'. On most architectures, the two mean exactly the same thing, but some architectures (ia64, ppc64, parisc64) use an indirect pointer for C function pointers, where the function pointer points to a

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread Sergey Senozhatsky
On (09/20/17 12:20), Helge Deller wrote: [..] > > I've not looked at the specifics case... > > > > Another option is using a struct with a single member and > > passing it by value. > > Actually, we do already have correct structs which could be referenced: > parisc: struct Elf64_Fdesc > ia64:

Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus

2017-09-20 Thread Tyrel Datwyler
On 09/20/2017 04:39 AM, Michael Ellerman wrote: > Rob Herring writes: > >> On Fri, Sep 15, 2017 at 6:04 AM, abdul wrote: >>> Hi, >>> >>> Mainline kernel panics during DLPAR CPU add/remove operation. >>> >>> Machine Type: Power8 PowerVM LPAR >>>

Re: [PATCH] powerpc/eeh: Disable EEH stack dump by default

2017-09-20 Thread joserz
On Wed, Sep 20, 2017 at 02:47:08PM +1000, Michael Ellerman wrote: > Jose Ricardo Ziviani writes: > > > Today, each EEH causes a stack dump to be printed in the logs. In > > production environment it's not quite necessary. Thus, this patch > > I'm unconvinced. A

[RFC][PATCH v2 6/7] symbol lookup: use new kernel and module dereference functions

2017-09-20 Thread Sergey Senozhatsky
Call appropriate function descriptor dereference ARCH callbacks: - dereference_kernel_function_descriptor() if the pointer is a kernel symbol; - dereference_module_function_descriptor() if the pointer is a module symbol. This patch also removes dereference_function_descriptor() from

[RFC][PATCH v2 5/7] parisc64: Add .opd based function descriptor dereference

2017-09-20 Thread Sergey Senozhatsky
We are moving towards separate kernel and module function descriptor dereference callbacks. This patch enables it for parisc64. For pointers that belong to the kernel - Added __start_opd and __end_opd pointers, to track the kernel .opd section address range; - Added

Re: Machine Check in P2010(e500v2)

2017-09-20 Thread Joakim Tjernlund
On Sat, 2017-09-09 at 14:45 +0200, Joakim Tjernlund wrote: > On Fri, 2017-09-08 at 22:27 +, Leo Li wrote: > > > -Original Message- > > > From: Joakim Tjernlund [mailto:joakim.tjernl...@infinera.com] > > > Sent: Friday, September 08, 2017 7:51 AM > > > To: linuxppc-dev@lists.ozlabs.org;

irq 26: nobody cared, caused by mpc85xx_pci_isr on P2010 and T1042

2017-09-20 Thread Joakim Tjernlund
Some PCIe errors, don't know which(possibly by PCIe 4 in http://pdf1.solecsy.com/61/5af9fd2d-652c-4331-b49c-807c7c47f4f7.pdf) causes endless IRQ for EDAC's PCIe routine: [ 17.690716] irq 26: nobody cared (try booting with the "irqpoll" option) [ 17.697417] CPU: 0 PID: 0 Comm: swapper Not

Re: [RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Sergey Senozhatsky
On (09/21/17 01:29), Sergey Senozhatsky wrote: > We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart > enough to handle function pointer dereference on platforms where such > dereference is required. > > checkpatch warning example: > > WARNING: Use '%pS/%ps' instead. This

[RFC][PATCH v2 4/7] powerpc64: Add .opd based function descriptor dereference

2017-09-20 Thread Sergey Senozhatsky
We are moving towards separate kernel and module function descriptor dereference callbacks. This patch enables it for powerpc64. For pointers that belong to the kernel - Added __start_opd and __end_opd pointers, to track the kernel .opd section address range; - Added

[RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Sergey Senozhatsky
We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart enough to handle function pointer dereference on platforms where such dereference is required. checkpatch warning example: WARNING: Use '%pS/%ps' instead. This pointer extension was deprecated: '%pF' Signed-off-by: Sergey

[RFC][PATCH v2 1/7] switch dereference_function_descriptor() to `unsigned long'

2017-09-20 Thread Sergey Senozhatsky
Convert dereference_function_descriptor() to accept and return `unsigned long'. There will be two new ARCH function for kernel and module function pointer dereference, which will work with `unsigned long', so the patch unifies interfaces. Besides, dereference_function_descriptor() mostly work

[RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Sergey Senozhatsky
We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart enough to handle function pointer dereference on platforms where such dereference is required. checkpatch warning example: WARNING: Use '%pS/%ps' instead. This pointer extension was deprecated: '%pF' Signed-off-by: Sergey

[PATCH v9 11/12] arm64/kasan: use kasan_map_populate()

2017-09-20 Thread Pavel Tatashin
To optimize the performance of struct page initialization, vmemmap_populate() will no longer zero memory. Therefore, we must use a new interface to allocate and map kasan shadow memory, that also zeroes memory for us. Signed-off-by: Pavel Tatashin ---

[PATCH 2/2] powerpc/pseries: fix parent_dn reference leak in add_dt_node()

2017-09-20 Thread Tyrel Datwyler
A reference to the parent device node is held by add_dt_node() for the node to be added. If the call to dlpar_configure_connector() fails add_dt_node() returns ENOENT and that reference is not freed. Add a call to of_node_put(parent_dn) prior to bailing out after a failed

Re: [linux-next][Oops] memory hot-unplug results fault instruction address at /include/linux/list.h:104

2017-09-20 Thread Kees Cook
On Wed, Sep 20, 2017 at 12:40 AM, Abdul Haleem wrote: > On Tue, 2017-09-12 at 12:11 +0530, abdul wrote: >> Hi, >> >> Memory hot-unplug on PowerVM LPAR running next-20170911 results in >> Faulting instruction address: 0xc02b56c4 >> >> which maps to the below

Re: [RFC][PATCH v2 0/7] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread Helge Deller
On 20.09.2017 18:29, Sergey Senozhatsky wrote: This patch set attempts to move ia64/ppc64/parisc64 C function pointer ABI details out of printk() to arch code. Function dereference code now checks if a pointer belongs to a .opd ELF section and dereferences that pointer only if it does.

[PATCH v9 01/12] x86/mm: setting fields in deferred pages

2017-09-20 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, however, we set fields in

[PATCH v9 09/12] mm/kasan: kasan specific map populate function

2017-09-20 Thread Pavel Tatashin
During early boot, kasan uses vmemmap_populate() to establish its shadow memory. But, that interface is intended for struct pages use. Because of the current project, vmemmap won't be zeroed during allocation, but kasan expects that memory to be zeroed. We are adding a new kasan_map_populate()

[PATCH v9 10/12] x86/kasan: use kasan_map_populate()

2017-09-20 Thread Pavel Tatashin
To optimize the performance of struct page initialization, vmemmap_populate() will no longer zero memory. Therefore, we must use a new interface to allocate and map kasan shadow memory, that also zeroes memory for us. Signed-off-by: Pavel Tatashin ---

[PATCH v9 12/12] mm: stop zeroing memory during allocation in vmemmap

2017-09-20 Thread Pavel Tatashin
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. Replace allocators in sprase-vmemmap to use the non-zeroing version. So, we will get the performance improvement

Re: [PATCH 1/3] RTC: rv3029: fix vendor string

2017-09-20 Thread Rob Herring
On Fri, Sep 15, 2017 at 04:00:02AM +0200, Alexandre Belloni wrote: > The vendor string for Microcrystal is microcrystal. > > Signed-off-by: Alexandre Belloni > --- > Documentation/devicetree/bindings/trivial-devices.txt | 2 +- > drivers/rtc/rtc-rv3029c2.c

Re: [PATCH 0/6] crypto: talitos - various fixes

2017-09-20 Thread christophe leroy
What's going wrong ? I have resent it and it the same again, the serie is not dispatched on the linux-crypto list, but when I answer to a mail of the serie, the answer shows up. What could be the issue ? Christophe Le 20/09/2017 à 10:35, Christophe LEROY a écrit : Looks like the linux-crypto

[PATCH v9 04/12] sparc64: simplify vmemmap_populate

2017-09-20 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

[PATCH v9 07/12] sparc64: optimized struct page zeroing

2017-09-20 Thread Pavel Tatashin
Add an optimized mm_zero_struct_page(), so struct page's are zeroed without calling memset(). We do eight to ten regular stores based on the size of struct page. Compiler optimizes out the conditions of switch() statement. SPARC-M6 with 15T of memory, single thread performance:

[PATCH v9 03/12] mm: deferred_init_memmap improvements

2017-09-20 Thread Pavel Tatashin
This patch fixes two issues in deferred_init_memmap = 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

[PATCH v9 08/12] mm: zero reserved and unavailable struct pages

2017-09-20 Thread Pavel Tatashin
Some memory is reserved but unavailable: not present in memblock.memory (because not backed by physical pages), but present in memblock.reserved. Such memory has backing struct pages, but they are not initialized by going through __init_single_page(). In some cases these struct pages are accessed

[PATCH 1/2] powerpc/pseries: fix "OF: ERROR: Bad of_node_put() on /cpus" during DLPAR

2017-09-20 Thread Tyrel Datwyler
Commit 215ee763f8cb ("powerpc: pseries: remove dlpar_attach_node dependency on full path") reworked dlpar_attach_node() to no longer look up the parent node "/cpus", but instead to have the parent node passed by the caller in the function parameter list. As a result dlpar_attach_node() is no

[PATCH v9 00/12] complete deferred page initialization

2017-09-20 Thread Pavel Tatashin
Changelog: v9 - v8 - Addressed comments raised by Mark Rutland and Ard Biesheuvel: changed kasan implementation. Added a new function: kasan_map_populate() that zeroes the allocated and mapped memory v8 - v7 - Added Acked-by's from Dave Miller for SPARC changes - Fixed a minor compiling issue

[PATCH v9 02/12] sparc64/mm: setting fields in deferred pages

2017-09-20 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

[PATCH v9 05/12] mm: defining memblock_virt_alloc_try_nid_raw

2017-09-20 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 * optimize early system hash allocations Clients can call alloc_large_system_hash() with flag: HASH_ZERO to specify

[PATCH v9 06/12] mm: zero struct pages during initialization

2017-09-20 Thread Pavel Tatashin
Add struct page zeroing as a part of initialization of other fields in __init_single_page(). This single thread performance collected on: Intel(R) Xeon(R) CPU E7-8895 v3 @ 2.60GHz with 1T of memory (268400646 pages in 8 nodes): BASEFIX sparse_init

[PATCH v2 19/31] timer: Remove open-coded casts for .data and .function

2017-09-20 Thread Kees Cook
This standardizes the callback and data prototypes in several places that perform casting, in an effort to remove more open-coded .data and .function uses in favor of setup_timer(). Cc: Samuel Ortiz Cc: Tyrel Datwyler Cc: Benjamin Herrenschmidt

[PATCH 6/7] KVM: PPC: Cocci spatch "vma_pages"

2017-09-20 Thread Thomas Meyer
Use vma_pages function on vma object instead of explicit computation. Found by coccinelle spatch "api/vma_pages.cocci" Signed-off-by: Thomas Meyer --- diff -u -p a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c --- a/arch/powerpc/kvm/e500_mmu_host.c +++

Re: [RFC][PATCH v2 0/7] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread Sergey Senozhatsky
On (09/20/17 22:14), Helge Deller wrote: > On 20.09.2017 18:29, Sergey Senozhatsky wrote: > > This patch set attempts to move ia64/ppc64/parisc64 C function > > pointer ABI details out of printk() to arch code. Function dereference > > code now checks if a pointer belongs to a .opd ELF

Re: [RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Sergey Senozhatsky
On (09/20/17 10:38), Joe Perches wrote: > On Thu, 2017-09-21 at 01:29 +0900, Sergey Senozhatsky wrote: > > We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart > > enough to handle function pointer dereference on platforms where such > > dereference is required. > > > >

Re: powerpc/sysrq: Fix oops whem ppmu is not registered

2017-09-20 Thread Michael Ellerman
On Tue, 2017-09-19 at 06:17:06 UTC, Ravi Bangoria wrote: > Kernel crashes if power pmu is not registered and user tries to dump > regs with 'echo p > /proc/sysrq-trigger'. Sample log: > > Unable to handle kernel paging request for data at address 0x0008 > Faulting instruction address:

Re: powerpc/sstep: mullw should calculate a 64 bit signed result

2017-09-20 Thread Michael Ellerman
On Tue, 2017-09-19 at 23:32:19 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > mullw should do a 32 bit signed multiply and create a 64 bit signed > result. It currently truncates the result to 32 bits. > > Signed-off-by: Anton Blanchard Applied to

Re: powerpc/kprobes: Update optprobes to use emulate_update_regs()

2017-09-20 Thread Michael Ellerman
On Fri, 2017-09-15 at 10:08:21 UTC, "Naveen N. Rao" wrote: > Optprobes depended on an updated regs->nip from analyse_instr() to > identify the location to branch back from the optprobes trampoline. > However, since commit 3cdfcbfd32b9d ("powerpc: Change analyse_instr so > it doesn't modify

Re: powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline

2017-09-20 Thread Michael Ellerman
On Thu, 2017-08-31 at 11:47:41 UTC, "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > commit 24be85a23d1f ("powerpc/powernv: Clear PECE1 in LPCR via > stop-api only on Hotplug") clears the PECE1 bit of the LPCR via > stop-api during CPU-Hotplug to prevent wakeup

Re: [PATCH 2/2] powerpc: Handle MCE on POWER9 with only DSISR bit 33 set

2017-09-20 Thread Michael Neuling
> > +   /* > > +* On POWER9 DD2.1 and below, it's possible to get machine > > +* check where only DSISR bit 33 is set. This will result in > > +* the MCE handler seeing an unknown event and us crashing. > > +* Change this to mark as handled on these revisions.

Re: [33/46] powerpc/configs: Update for CONFIG_SND changes

2017-09-20 Thread Michael Ellerman
On Wed, 2017-08-23 at 05:37:53 UTC, Michael Ellerman wrote: > Commit eb3b705aaed9 ("ALSA: Make CONFIG_SND_OSSEMUL user-selectable") > means we need to set CONFIG_SND_OSSEMUL in our configs, otherwise we > lose some of the SND symbols. > > And commit 0181307abc1d ("ALSA: seq: Reorganize kconfig

[PATCH v2] powerpc: Handle MCE on POWER9 with only DSISR bit 33 set

2017-09-20 Thread Michael Neuling
On POWER9 DD2.1 and below, it's possible to get Machine Check Exception (MCE) where only DSISR bit 33 is set. This will result in the linux MCE handler seeing an unknown event, which triggers linux to crash. We change this by detecting unknown events in the MCE handler and marking them as handled

Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized

2017-09-20 Thread Russell Currey
On Wed, 2017-09-20 at 20:59 +1000, Michael Ellerman wrote: > Benjamin Herrenschmidt writes: > > > Otherwise we end up not yet having computed the right > > diag data size on powernv where EEH initialization > > is delayed, thus causing memory corruption later on > >

Re: [RFC][PATCH v2 7/7] checkpatch: add pF/pf deprecation warning

2017-09-20 Thread Joe Perches
On Thu, 2017-09-21 at 09:27 +0900, Sergey Senozhatsky wrote: > On (09/20/17 10:38), Joe Perches wrote: > > On Thu, 2017-09-21 at 01:29 +0900, Sergey Senozhatsky wrote: > > > We deprecated '%pF/%pf' printk specifiers, since '%pS/%ps' is now smart > > > enough to handle function pointer dereference

Re: [PATCH] powerpc/perf: Fix for core/nest imc call trace on cpuhotplug

2017-09-20 Thread Michael Ellerman
Anju T Sudhakar writes: > Nest/core pmu units are enabled only when it is used. A reference count is > maintained for the events which uses the nest/core pmu units. Currently in > *_imc_counters_release function a WARN() is used for notification of any > underflow of ref

Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized

2017-09-20 Thread Michael Ellerman
Russell Currey writes: > On Wed, 2017-09-20 at 20:59 +1000, Michael Ellerman wrote: >> Benjamin Herrenschmidt writes: >> >> > Otherwise we end up not yet having computed the right >> > diag data size on powernv where EEH initialization >> > is

[PATCH v2 2/3] ASoC: fsl-asoc-card: Handle return value of devm_kasprintf

2017-09-20 Thread Arvind Yadav
devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav --- changes in v2: Set return 'ret' to -ENOMEM. sound/soc/fsl/fsl-asoc-card.c | 4 1 file changed, 4 insertions(+) diff --git

Re: [v2] powerpc/tm: Flush TM only if CPU has TM feature

2017-09-20 Thread Michael Ellerman
On Thu, 2017-09-14 at 02:13:48 UTC, Gustavo Romero wrote: > Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") > added code to access TM SPRs in flush_tmregs_to_thread(). However > flush_tmregs_to_thread() does not check if TM feature is available on > CPU before trying to access TM

Re: [1/2] powerpc/sstep: Fix issues with set_cr0()

2017-09-20 Thread Michael Ellerman
On Tue, 2017-09-19 at 10:45:52 UTC, Anton Blanchard wrote: > From: Anton Blanchard > > set_cr0() broke when we changed analyse_instr() to not modify the > register state. Instead of looking at regs->gpr[x] which has not > been updated yet, we need to look at op->val. > > Fixes:

[RFC PATCH] powerpc: introduce CPU version quirks

2017-09-20 Thread Nicholas Piggin
The CPU feature bitmask is shared among all powerpcs, which is not very suitable for adding quirks of particular implementations. Introduce CPU version specific quirks, which provides alternate instruction patching and static branches. This can be used to clear out the cpu features space. The

[PATCH] powerpc: Add PPC_EMULATED_STATS to powernv_defconfig

2017-09-20 Thread Michael Neuling
This is useful, especially for developers. Signed-off-by: Michael Neuling --- arch/powerpc/configs/powernv_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig index

Re: [PATCH v3 4/4] powerpc/64s: idle ESL=0 stop can avoid MSR and save/restore overhead

2017-09-20 Thread Nicholas Piggin
On Fri, 01 Sep 2017 19:39:41 +1000 Michael Ellerman wrote: > Nicholas Piggin writes: > > > On Wed, 30 Aug 2017 21:25:59 +1000 > > Michael Ellerman wrote: > > > >> Nicholas Piggin writes: > >> > >> > When

[RFC][PATCH v2 3/7] ia64: Add .opd based function descriptor dereference

2017-09-20 Thread Sergey Senozhatsky
We are moving towards separate kernel and module function descriptor dereference callbacks. This patch enables it for IA64. For pointers that belong to the kernel - Added __start_opd and __end_opd pointers, to track the kernel .opd section address range; - Added

Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized

2017-09-20 Thread Benjamin Herrenschmidt
On Wed, 2017-09-20 at 20:59 +1000, Michael Ellerman wrote: > Benjamin Herrenschmidt writes: > > > Otherwise we end up not yet having computed the right > > diag data size on powernv where EEH initialization > > is delayed, thus causing memory corruption later on > >

Re: [PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers

2017-09-20 Thread Helge Deller
On 20.09.2017 10:41, David Laight wrote: From: Helge Deller Sent: 19 September 2017 21:08 ... Using 'unsigned long' for any kind of pointer is an accident waiting do happen. It also makes it difficult to typecheck the function calls. Using 'void *' isn't any better. Either a pointer to an

Re: [PATCH 1/2] powerpc/eeh: Create PHB PEs after EEH is initialized

2017-09-20 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > Otherwise we end up not yet having computed the right > diag data size on powernv where EEH initialization > is delayed, thus causing memory corruption later on > when calling OPAL. When did this break? Do we have a commit we can tag

Re: [PATCH] powerpc/livepatch: Fix livepatch stack access

2017-09-20 Thread Naveen N . Rao
On 2017/09/20 03:49PM, Kamalesh Babulal wrote: > While running stress test with livepatch module loaded, kernel > bug was triggered. > > cpu 0x5: Vector: 400 (Instruction Access) at [c000eb9d3b60] > pc: c000eb9d3e30 > lr: c000eb9d3e30 > sp: c000eb9d3de0 >msr:

Re: [linux-next][DLPAR CPU][Oops] Bad kernel stack pointer

2017-09-20 Thread Michael Ellerman
Abdul Haleem writes: > Hi, > > Dynamic CPU remove operation resulted in Kernel Panic on today's > next-20170915 kernel. > > Machine Type: Power 7 PowerVM LPAR > Kernel : 4.13.0-next-20170915 > config : attached > test: DLPAR CPU remove > > > dmesg logs: > --

Re: [PATCH] powerpc: make irq_chip const, __initdata and __initconst

2017-09-20 Thread Michael Ellerman
Julia Lawall writes: > On Wed, 20 Sep 2017, Michael Ellerman wrote: > >> Bhumika Goyal writes: >> >> > Make ehv_pic_irq_chip, mpic_ipi_chip and mpic_tm_chip const as they are >> > used only as a copy operation. This usage is during init, so make them >>

Re: [mainline][DLPAR][Oops] OF: ERROR: Bad of_node_put() on /cpus

2017-09-20 Thread Michael Ellerman
Rob Herring writes: > On Fri, Sep 15, 2017 at 6:04 AM, abdul wrote: >> Hi, >> >> Mainline kernel panics during DLPAR CPU add/remove operation. >> >> Machine Type: Power8 PowerVM LPAR >> kernel 4.13.0 > > Did 4.12 work or when was it last working?

Re: [PATCH 2/2] powerpc: Handle MCE on POWER9 with only DSISR bit 33 set

2017-09-20 Thread Michael Ellerman
Michael Neuling writes: > On POWER9 DD2.1 and below, it's possible to get Machine Check > Exception (MCE) where only DSISR bit 33 is set. This will result in > the linux MCE handler seeing an unknown event, which triggers linux to > crash. Why do we get a machine check with