[PATCH v3] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-16 Thread Kamalesh Babulal
Livepatch re-uses module loader function apply_relocate_add() to write relocations, instead of managing them by arch-dependent klp_write_module_reloc() function. apply_relocate_add() doesn't understand livepatch symbols (marked with SHN_LIVEPATCH symbol section index) and assumes them to be local

Re: [PATCH] powerpc/watchdog: Convert timers to use timer_setup()

2017-10-16 Thread Michael Ellerman
Kees Cook writes: > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Benjamin Herrenschmidt >

Re: [PATCH v3 2/2] pseries/eeh: Add Pseries pcibios_bus_add_device

2017-10-16 Thread Michael Ellerman
"Bryant G. Ly" writes: > On 10/12/17 1:29 PM, Bjorn Helgaas wrote: ... >> >> If that's the case, how to you ever bind a driver to these VFs? The >> changelog says you don't want VF drivers to load *immediately*, so I >> assume you do want them to load eventually. >>

[PATCH 2/2] mm/mmu_notifier: avoid call to invalidate_range() in range_end()

2017-10-16 Thread jglisse
From: Jérôme Glisse This is an optimization patch that only affect mmu_notifier users which rely on the invalidate_range() callback. This patch avoids calling that callback twice in a row from inside __mmu_notifier_invalidate_range_end Existing pattern (before this patch):

[PATCH 1/2] mm/mmu_notifier: avoid double notification when it is useless v2

2017-10-16 Thread jglisse
From: Jérôme Glisse This patch only affects users of mmu_notifier->invalidate_range callback which are device drivers related to ATS/PASID, CAPI, IOMMUv2, SVM ... and it is an optimization for those users. Everyone else is unaffected by it. When clearing a pte/pmd we are

[PATCH 0/2] Optimize mmu_notifier->invalidate_range callback

2017-10-16 Thread jglisse
From: Jérôme Glisse (Andrew you already have v1 in your queue of patch 1, patch 2 is new, i think you can drop it patch 1 v1 for v2, v2 is bit more conservative and i fixed typos) All this only affect user of invalidate_range callback (at this time CAPI

Re: [PATCH] powerpc/watchdog: Convert timers to use timer_setup()

2017-10-16 Thread Nicholas Piggin
On Mon, 16 Oct 2017 16:47:10 -0700 Kees Cook wrote: > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: Benjamin

Re: BUG_ON() in irq_work_run_list

2017-10-16 Thread Michael Ellerman
Chandan Rajendra writes: > Executing fstests' generic/036 test in a loop on next-20171013 kernel causes > BUG_ON()'s condition to evaluate to true, Did it used to work? ie. the bug just started happening? If so is there a next tag which *doesn't* have the bug. > run

Re: [PATCH v2 2/2] vgaarb: Factor out EFI and fallback default device selection

2017-10-16 Thread Daniel Axtens
Bjorn Helgaas writes: > The default VGA device is normally set in vga_arbiter_add_pci_device() when > we call it for the first enabled device that can be accessed with the > legacy VGA resources ([mem 0xa-0xb], etc.) > > That default device can be overridden by an

[PATCH 55/58] net: fs_enet: Remove unused timer

2017-10-16 Thread Kees Cook
Removes unused timer and its old initialization call. Cc: Pantelis Antoniou Cc: Vitaly Bordug Cc: linuxppc-dev@lists.ozlabs.org Cc: net...@vger.kernel.org Signed-off-by: Kees Cook ---

[PATCH] powerpc/watchdog: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael

[PATCH] crypto: vmx - Use skcipher for ctr fallback

2017-10-16 Thread Paulo Flabiano Smorigo
Signed-off-by: Paulo Flabiano Smorigo --- drivers/crypto/vmx/aes_ctr.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/crypto/vmx/aes_ctr.c b/drivers/crypto/vmx/aes_ctr.c index 17d8421..fc60d00 100644

Re: [PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-16 Thread Joe Perches
On Mon, 2017-10-16 at 21:35 +0300, Jarkko Sakkinen wrote: > A minor complaint: all commits are missing "Fixes:" tag. None of these patches fix anything. All are trivial changes without much of any impact.

Re: [PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-16 Thread SF Markus Elfring
> A minor complaint: all commits are missing "Fixes:" tag. * Do you require it to be added to the commit messages? * Would you like to get a finer patch granularity then? * Do you find any more information missing? Regards, Markus

Re: [PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-16 Thread Jarkko Sakkinen
On Mon, Oct 16, 2017 at 09:31:39PM +0300, Jarkko Sakkinen wrote: > On Mon, Oct 16, 2017 at 07:30:13PM +0200, SF Markus Elfring wrote: > > From: Markus Elfring > > Date: Mon, 16 Oct 2017 19:12:34 +0200 > > > > A few update suggestions were taken into account > >

Re: [PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-16 Thread Jarkko Sakkinen
On Mon, Oct 16, 2017 at 07:30:13PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 16 Oct 2017 19:12:34 +0200 > > A few update suggestions were taken into account > from static source code analysis. > > Markus Elfring (4): > Delete an error

[PATCH 4/4] char/tpm: Less checks in tpm_ibmvtpm_probe() after error detection

2017-10-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Oct 2017 19:00:34 +0200 Two pointer checks could be repeated by the tpm_ibmvtpm_probe() function during error handling even if the relevant properties can be determined for the involved variables before by source code analysis. *

[PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Oct 2017 18:28:17 +0200 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

[PATCH 2/4] char/tpm: Delete an error message for a failed memory allocation in tpm_ibmvtpm_probe()

2017-10-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Oct 2017 18:08:23 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 1/4] char/tpm: Delete an error message for a failed memory allocation in tpm_ascii_bios_measurements_show()

2017-10-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Oct 2017 17:43:55 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH 0/4] char-TPM: Adjustments for ten function implementations

2017-10-16 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 16 Oct 2017 19:12:34 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Delete an error message for a failed memory allocation in tpm_ascii_bios_measurements_show()

Re: [PATCH 2/2] powerpc/perf/imc: use NUMA_NO_NODE for alloc_pages_node

2017-10-16 Thread Madhavan Srinivasan
On Monday 16 October 2017 07:48 AM, Balbir Singh wrote: On Mon, 16 Oct 2017 00:13:42 +0530 Madhavan Srinivasan wrote: alloc_pages_node() when passed NUMA_NO_NODE for the node_id, could get memory from closest node. Cleanup core imc and thread imc memory init

[Part1 PATCH v6 09/17] resource: Provide resource struct in resource walk callback

2017-10-16 Thread Brijesh Singh
From: Tom Lendacky In prep for a new function that will need additional resource information during the resource walk, update the resource walk callback to pass the resource structure. Since the current callback start and end arguments are pulled from the resource

Re: [PATCH0/8] Support for ibm, dynamic-memory-v2 device tree property

2017-10-16 Thread Nathan Fontenot
On 10/06/2017 04:58 PM, Michael Ellerman wrote: > Nathan Fontenot writes: >> This patch set provides a set of updates to de-couple the LMB information >> provided in the ibm,dynamic-memory device tree property from the device >> tree property format. The goal is to

Re: [PATCH v2] cxl: Dump PSL_FIR register on PSL9 error irq

2017-10-16 Thread christophe lombard
Le 11/10/2017 à 08:14, Vaibhav Jain a écrit : For PSL9 currently we aren't dumping the PSL FIR register when a PSL error interrupt is triggered. Contents of this register are useful in debugging AFU issues. This patch fixes issue by adding a new service_layer_ops callback

Re: [PATCH 2/2] powerpc/hotplug: Ensure nodes initialized for hotplug

2017-10-16 Thread Michael Ellerman
Michael Bringmann writes: > powerpc/hotplug: On systems like PowerPC which allow 'hot-add' of CPU, > it may occur that the new resources are to be inserted into nodes > that were not used for memory resources at bootup. Many different > configurations of PowerPC

Re: [PATCH] cxl: Rename register PSL9_FIR2 to PSL9_FIR_MASK

2017-10-16 Thread christophe lombard
Le 09/10/2017 à 19:56, Vaibhav Jain a écrit : PSL9 doesn't have a FIR2 register as was the case with PSL8. However currently the register definitions in 'cxl.h' have a definition for PSL9_FIR2 that actually points to PSL9_FIR_MASK register in the P1 area at offset 0x308. So this patch renames

Re: refactor dma_cache_sync V2

2017-10-16 Thread Christoph Hellwig
On Tue, Oct 03, 2017 at 12:49:51PM +0100, Robin Murphy wrote: > Reviewed-by: Robin Murphy Thanks Robin. I've heard very little from the arch maintainers, but if people remain silent I will apply the whole series to the dma-mapping tree in the next days.

Re: [PATCH 1/2] powerpc/nodes: Ensure enough nodes avail for operations

2017-10-16 Thread Michael Ellerman
Michael Bringmann writes: > powerpc/nodes: On systems like PowerPC which allow 'hot-add' of CPU This is a powerpc-only patch, so saying "systems like PowerPC" is confusing. What you should be saying is "On pseries systems". > or memory resources, it may occur that the

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

2017-10-16 Thread Michael Ellerman
Balbir Singh writes: > On Mon, Oct 16, 2017 at 4:38 PM, Michael Ellerman wrote: >> Balbir Singh writes: >> >>> If we are in user space and hit a UE error, we now have the >>> basic infrastructure to walk the page tables and

Re: [PATCH kernel] RFC: prom_init: Fetch flatten device tree from the system firmware

2017-10-16 Thread Michael Ellerman
Alexey Kardashevskiy writes: > At the moment, on 256CPU + 256 PCI devices guest, it takes the guest > about 8.5sec to read the entire device tree. Some explanation can be > found here: https://patchwork.ozlabs.org/patch/826124/ but mostly it is > because the kernel traverses the

Re: [PATCH kernel] RFC: prom_init: Fetch flatten device tree from the system firmware

2017-10-16 Thread Alexey Kardashevskiy
On 16/10/17 21:20, Segher Boessenkool wrote: > On Mon, Oct 16, 2017 at 06:07:06PM +1100, Alexey Kardashevskiy wrote: >> On 16/10/17 17:46, David Gibson wrote: > >> +/* Fixup the boot cpuid */ >> +hdr->boot_cpuid_phys = cpu_to_be32(prom.cpu); > > If

[PATCH v3] KVM: PPC: Book3S PR: only install valid SLBs during KVM_SET_SREGS

2017-10-16 Thread Greg Kurz
Userland passes an array of 64 SLB descriptors to KVM_SET_SREGS, some of which are valid (ie, SLB_ESID_V is set) and the rest are likely all-zeroes (with QEMU at least). Each of them is then passed to kvmppc_mmu_book3s_64_slbmte(), which assumes to find the SLB index in the 3 lower bits of its rb

Re: [PATCH kernel] RFC: prom_init: Fetch flatten device tree from the system firmware

2017-10-16 Thread Segher Boessenkool
On Mon, Oct 16, 2017 at 06:07:06PM +1100, Alexey Kardashevskiy wrote: > On 16/10/17 17:46, David Gibson wrote: > +/* Fixup the boot cpuid */ > +hdr->boot_cpuid_phys = cpu_to_be32(prom.cpu); > >>> > >>> If SLOF is generating a tree it really should get

Re: [PATCH] cxl: Rename register PSL9_FIR2 to PSL9_FIR_MASK

2017-10-16 Thread christophe lombard
Le 09/10/2017 à 19:56, Vaibhav Jain a écrit : PSL9 doesn't have a FIR2 register as was the case with PSL8. However currently the register definitions in 'cxl.h' have a definition for PSL9_FIR2 that actually points to PSL9_FIR_MASK register in the P1 area at offset 0x308. So this patch renames

Re: [PATCH kernel] RFC: prom_init: Fetch flatten device tree from the system firmware

2017-10-16 Thread David Gibson
On Mon, Oct 16, 2017 at 06:07:06PM +1100, Alexey Kardashevskiy wrote: > On 16/10/17 17:46, David Gibson wrote: > > On Mon, Oct 16, 2017 at 05:22:55PM +1100, Alexey Kardashevskiy wrote: > >> On 16/10/17 17:11, David Gibson wrote: > >>> On Mon, Oct 16, 2017 at 04:49:17PM +1100, Alexey Kardashevskiy

Re: [PATCH v3 3/3] powerpc:selftest update memcmp_64 selftest for VMX implementation

2017-10-16 Thread Simon Guo
Hi Cyril, Thanks for the review. On Mon, Oct 16, 2017 at 02:32:58PM +1100, Cyril Bur wrote: > On Fri, 2017-10-13 at 12:30 +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > This patch adjust selftest memcmp_64 so that memcmp selftest can be > > compiled

[PATCH] powerpc/mm/radix: Drop unneeded NULL check

2017-10-16 Thread Aneesh Kumar K.V
From: Michael Ellerman We call these functions with non-NULL mm or vma. Hence we can skip the NULL check in these functions. We also remove now unused function __local_flush_hugetlb_page(). Signed-off-by: Aneesh Kumar K.V ---

Re: [PATCH kernel] RFC: prom_init: Fetch flatten device tree from the system firmware

2017-10-16 Thread Alexey Kardashevskiy
On 16/10/17 17:46, David Gibson wrote: > On Mon, Oct 16, 2017 at 05:22:55PM +1100, Alexey Kardashevskiy wrote: >> On 16/10/17 17:11, David Gibson wrote: >>> On Mon, Oct 16, 2017 at 04:49:17PM +1100, Alexey Kardashevskiy wrote: At the moment, on 256CPU + 256 PCI devices guest, it takes the

[PATCH] powerpc/mm/hash: Add pr_fmt() to hash_utils64.c

2017-10-16 Thread Aneesh Kumar K.V
Make the printks look a bit nicer by adding a prefix. Radix config now do radix-mmu: Page sizes from device-tree: radix-mmu: Page size shift = 12 AP=0x0 radix-mmu: Page size shift = 16 AP=0x5 radix-mmu: Page size shift = 21 AP=0x1 radix-mmu: Page size shift = 30 AP=0x2 This patch update

Re: [PATCH kernel] RFC: prom_init: Fetch flatten device tree from the system firmware

2017-10-16 Thread David Gibson
On Mon, Oct 16, 2017 at 05:22:55PM +1100, Alexey Kardashevskiy wrote: > On 16/10/17 17:11, David Gibson wrote: > > On Mon, Oct 16, 2017 at 04:49:17PM +1100, Alexey Kardashevskiy wrote: > >> At the moment, on 256CPU + 256 PCI devices guest, it takes the guest > >> about 8.5sec to read the entire

Re: [PATCH kernel] RFC: prom_init: Fetch flatten device tree from the system firmware

2017-10-16 Thread Alexey Kardashevskiy
On 16/10/17 17:11, David Gibson wrote: > On Mon, Oct 16, 2017 at 04:49:17PM +1100, Alexey Kardashevskiy wrote: >> At the moment, on 256CPU + 256 PCI devices guest, it takes the guest >> about 8.5sec to read the entire device tree. Some explanation can be >> found here:

Re: [PATCH kernel] RFC: prom_init: Fetch flatten device tree from the system firmware

2017-10-16 Thread David Gibson
On Mon, Oct 16, 2017 at 04:49:17PM +1100, Alexey Kardashevskiy wrote: > At the moment, on 256CPU + 256 PCI devices guest, it takes the guest > about 8.5sec to read the entire device tree. Some explanation can be > found here: https://patchwork.ozlabs.org/patch/826124/ but mostly it is > because