Re: Commit 1b7898ee276b "powerpc/boot: Use the pre-boot decompression API" breaks boot

2016-10-12 Thread Heiner Kallweit
Am 12.10.2016 um 06:26 schrieb Oliver O'Halloran: > On Tue, Oct 11, 2016 at 7:06 AM, Heiner Kallweit wrote: >>> IMHO in case of using cuboot no CONFIG_KERNEL_ config option >>> should be set and Makefile + code in arch/powerpc/boot should be able >>> to deal with this

Re: [PATCH v3 08/11] powerpc/tracing: fix compat syscall handling

2016-10-12 Thread Michael Ellerman
Marcin Nowakowski writes: > Adapt the code to make use of new syscall handling interface > > Signed-off-by: Marcin Nowakowski > Cc: Steven Rostedt > Cc: Ingo Molnar > Cc: Benjamin Herrenschmidt

Re: [PATCH] powerpc/64: option to force run-at-load to test relocation

2016-10-12 Thread Balbir Singh
On 12/10/16 17:57, Nicholas Piggin wrote: > This adds a config option that can help exercise the case when > the kernel is not running at PAGE_OFFSET. > > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/Kconfig | 9 + >

Re: [PATCH v3 03/11] tracing/syscalls: add compat syscall metadata

2016-10-12 Thread Michael Ellerman
Marcin Nowakowski writes: > Now that compat syscalls are properly distinguished from native calls, > we can add metadata for compat syscalls as well. > All the macros used to generate the metadata are the same as for > standard syscalls, but with a compat_ prefix to

[PATCH v2 3/7] PCI: layerscape: Remove redundant struct ls_pcie.dbi

2016-10-12 Thread Bjorn Helgaas
Remove the struct ls_pcie.dbi member, which is a duplicate of the generic pp.dbi_base member. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-layerscape.c | 24 +++- 1 file changed, 11 insertions(+), 13

Re: [PATCH v15 03/15] selftests/powerpc: Add ptrace tests for EBB

2016-10-12 Thread Simon Guo
On Fri, Oct 07, 2016 at 08:44:48AM +1100, Michael Ellerman wrote: > wei.guo.si...@gmail.com writes: > > > From: Anshuman Khandual > > > > This patch adds ptrace interface test for EBB/PMU specific > > registers. This also adds some generic ptrace interface > > based

Re: [PATCH] powerpc/mm: Prevent unlikely crash in copro_calculate_slb()

2016-10-12 Thread Frederic Barrat
ping? The patch still applies cleanly on recent trees. Fred Le 17/06/2016 à 18:53, Frederic Barrat a écrit : If a cxl adapter faults on an invalid address for a kernel context, we may enter copro_calculate_slb() with a NULL mm pointer (kernel context) and an effective address which looks

[PATCH v2 13/16] scsi: fc: use bsg_job_done

2016-10-12 Thread Johannes Thumshirn
fc_bsg_jobdone() and bsg_job_done() are 1:1 copies now so use the bsg-lib one instead of the FC private implementation. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 4 ++-- drivers/scsi/ibmvscsi/ibmvfc.c

[PATCH v2 1/7] PCI: layerscape: Add local struct device pointers

2016-10-12 Thread Bjorn Helgaas
Use a local "struct device *dev" for brevity and consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-layerscape.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff

[PATCH v2 05/16] scsi: fc: provide fc_bsg_to_shost() helper

2016-10-12 Thread Johannes Thumshirn
Provide fc_bsg_to_shost() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also use this little helper in the LLDDs. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 4 +-- drivers/scsi/bfa/bfad_bsg.c

[PATCH v2 0/7] PCI: layerscape: Cleanups

2016-10-12 Thread Bjorn Helgaas
- Add local "dev" pointers to reduce repetition of things like ">dev". - Remove platform drvdata because it appears unused (we called platform_set_drvdata() but not platform_get_drvdata()). - Remove redundant struct members. - Pass device-specific struct to internal functions

[PATCH v2 4/7] PCI: layerscape: Pass device-specific struct to internal functions

2016-10-12 Thread Bjorn Helgaas
Only interfaces used from outside the driver, e.g., those called by the DesignWare core, need to accept pointers to the generic struct pcie_port. Internal interfaces can accept pointers to the device-specific struct, which makes them more straightforward. No functional change intended.

[PATCH v2 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-12 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 9 +-

[PATCH v2 10/16] scsi: change FC drivers to use 'struct bsg_job'

2016-10-12 Thread Johannes Thumshirn
Change FC drivers to use 'struct bsg_job' from bsg-lib.h instead of 'struct fc_bsg_job' from scsi_transport_fc.h and remove 'struct fc_bsg_job'. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_ext.h | 4 +-- drivers/s390/scsi/zfcp_fc.c | 15

[PATCH v2 04/16] scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done

2016-10-12 Thread Johannes Thumshirn
Unify the interfaces of fc_bsg_jobdone and bsg_job_done. This will reduce the diff when moving from 'struct fc_bsg_job' to a plain 'struct bsg_job' later on. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 6

Re: [PATCH v3 03/11] tracing/syscalls: add compat syscall metadata

2016-10-12 Thread Marcin Nowakowski
On 12.10.2016 10:50, Michael Ellerman wrote: <...> It's annoying that we have to duplicate all that just to do a + 1. How about this as a precursor? > <...> Thanks for the suggestion - unless anyone sees a reason to keep the current solution I'll change it. Marcin

[mm] c4344e8035: WARNING: CPU: 0 PID: 101 at mm/memory.c:303 __tlb_remove_page_size+0x25/0x99

2016-10-12 Thread kernel test robot
FYI, we noticed the following commit: https://github.com/0day-ci/linux Aneesh-Kumar-K-V/mm-Use-the-correct-page-size-when-removing-the-page/20161012-013446 commit c4344e80359420d7574b3b90fddf53311f1d24e6 ("mm: Remove the page size change check in tlb_remove_page") in testcase: boo

[PATCH v2 03/16] scsi: fc: Export fc_bsg_jobdone and use it in FC drivers

2016-10-12 Thread Johannes Thumshirn
Export fc_bsg_jobdone so drivers can use it directly instead of doing the round-trip via struct fc_bsg_job::job_done() and use it in the LLDDs. As we've converted all LLDDs over to use fc_bsg_jobdone() directly, we can remove the function pointer from struct fc_bsg_job as well. Signed-off-by:

Re: [PATCH v3 08/11] powerpc/tracing: fix compat syscall handling

2016-10-12 Thread Marcin Nowakowski
On 12.10.2016 11:59, Michael Ellerman wrote: I went to test this and noticed the exit and enter events appear to be reversed in time? (your series on top of 24532f768121) thanks for testing the patch - I've found a bug that has sneaked in while cleaning up the patches before submission ...

Re: [PATCH] powerpc: cmp -> cmpd for 64-bit

2016-10-12 Thread Segher Boessenkool
On Wed, Oct 12, 2016 at 02:05:19PM +1100, Michael Ellerman wrote: > Segher Boessenkool writes: > > > PowerPC's "cmp" instruction has four operands. Normally people write > > "cmpw" or "cmpd" for the second cmp operand 0 or 1. But, frequently > > people forget, and

[PATCH v2 6/7] PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg

2016-10-12 Thread Bjorn Helgaas
ls_add_pcie_port() doesn't use the platform_device pointer passed to it, so remove it. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-layerscape.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [mm] c4344e8035: WARNING: CPU: 0 PID: 101 at mm/memory.c:303 __tlb_remove_page_size+0x25/0x99

2016-10-12 Thread Ye Xiaolong
On 10/12, Aneesh Kumar K.V wrote: >kernel test robot <xiaolong...@intel.com> writes: > >> FYI, we noticed the following commit: >> >> https://github.com/0day-ci/linux >> Aneesh-Kumar-K-V/mm-Use-the-correct-page-size-when-removin

[PATCH v2 06/16] scsi: fc: provide fc_bsg_to_rport() helper

2016-10-12 Thread Johannes Thumshirn
Provide fc_bsg_to_rport() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also move all LLDDs to use the new helper. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 5 +++--

[PATCH v2 2/7] PCI: layerscape: Remove unused platform data

2016-10-12 Thread Bjorn Helgaas
The layerscape driver never uses the platform drvdata pointer, so don't bother setting it. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-layerscape.c |2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v2 5/7] PCI: layerscape: Move struct pcie_port setup to probe function

2016-10-12 Thread Bjorn Helgaas
Do the basic pcie_port setup in the probe function for consistency with other drivers. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-layerscape.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git

[PATCH v2 7/7] PCI: layerscape: Reorder struct ls_pcie

2016-10-12 Thread Bjorn Helgaas
Reorder struct ls_pcie to put generic fields first. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-layerscape.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-layerscape.c

[PATCH] powerpc/64: option to force run-at-load to test relocation

2016-10-12 Thread Nicholas Piggin
This adds a config option that can help exercise the case when the kernel is not running at PAGE_OFFSET. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 9 + arch/powerpc/kernel/head_64.S | 4 arch/powerpc/kernel/setup-common.c | 3

[PATCH] powerpc: link error on orphan sections

2016-10-12 Thread Nicholas Piggin
Add --orphan-handling=error to final link flags. This ensures we have to handle all sections. This would have caught subtle breakage such as 7de3b27bac47da9de08409df1d69664acbb72197 at build-time. Also bring some wayward sections into the fold: - .text.hot and .text.unlikely are compiler

Re: [PATCH v2 0/7] PCI: layerscape: Cleanups

2016-10-12 Thread Bjorn Helgaas
On Wed, Oct 12, 2016 at 08:57:22AM -0500, Bjorn Helgaas wrote: > - Add local "dev" pointers to reduce repetition of things like > ">dev". > > - Remove platform drvdata because it appears unused (we called > platform_set_drvdata() but not platform_get_drvdata()). > > - Remove

Re: [PATCH] powerpc: cmp -> cmpd for 64-bit

2016-10-12 Thread Vaidyanathan Srinivasan
* Segher Boessenkool [2016-10-12 08:26:48]: > On Wed, Oct 12, 2016 at 02:05:19PM +1100, Michael Ellerman wrote: > > Segher Boessenkool writes: > > [snip] > > > > --- a/arch/powerpc/include/asm/cpuidle.h > > > +++

[PATCH] powerpc/boot: fix boot on systems with uncompressed kernel image

2016-10-12 Thread Heiner Kallweit
This commit broke boot on systems with an uncompressed kernel image, namely systems using a cuImage. On such systems the compressed boot image (boot wrapper, uncompressed kernel image, ..) is decompressed by u-boot already, therefore the boot wrapper code sees an uncompressed kernel image. The

Re: [PATCH v2 0/7] PCI: layerscape: Cleanups

2016-10-12 Thread Roy Zang
On 10/12/2016 11:07 AM, Bjorn Helgaas wrote: > I applied these to pci/host-layerscape for v4.9. I hope to ask Linus to > pull them tomorrow, so if you see any issues, let me know soon. > good to me. Thanks. Roy

Re: [PATCH] powerpc/fadump: Fix the race in crash_fadump().

2016-10-12 Thread Mahesh Jagannath Salgaonkar
On 10/10/2016 04:22 PM, Michael Ellerman wrote: > Mahesh J Salgaonkar writes: > >> From: Mahesh Salgaonkar >> >> There are chances that multiple CPUs can call crash_fadump() simultaneously >> and would start duplicating same info to

[PATCH 03/10] mm: replace get_user_pages_unlocked() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages_unlocked() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo

[PATCH 02/10] mm: remove write/force parameters from __get_user_pages_unlocked()

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from __get_user_pages_unlocked() to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes ---

[PATCH 07/10] mm: replace get_user_pages_remote() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages_remote() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo

[PATCH 06/10] mm: replace get_user_pages() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes

[PATCH 10/10] mm: replace access_process_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write parameter from access_process_vm() and replaces it with a gup_flags parameter as use of this function previously _implied_ FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising

Re: [PATCH] powerpc/64: option to force run-at-load to test relocation

2016-10-12 Thread Nicholas Piggin
On Wed, 12 Oct 2016 18:35:21 +1100 Balbir Singh wrote: > On 12/10/16 17:57, Nicholas Piggin wrote: > > This adds a config option that can help exercise the case when > > the kernel is not running at PAGE_OFFSET. > > > > Signed-off-by: Nicholas Piggin >

[RFC][PATCH] kernel relocation for KVM exceptions

2016-10-12 Thread Nicholas Piggin
Hi Paul, I wonder what you think about this approach for applying relocation to KVM exceptions? It's not yet tested and I haven't attempted PR, but I'll keep at it if you think it's the right direction. The relocation branch requires ctr, but we can get away without more scratch storage by

[PATCH 01/10] mm: remove write/force parameters from __get_user_pages_locked()

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from __get_user_pages_locked() to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes --- mm/gup.c |

[PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_user_pages_locked() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo

[PATCH 08/10] mm: replace __access_remote_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write parameter from __access_remote_vm() and replaces it with a gup_flags parameter as use of this function previously _implied_ FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising

[PATCH] powerpc: make _ASM_NOKPROBE_SYMBOL a noop when KPROBES not defined

2016-10-12 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- The linker orphan sections error patch caught this arch/powerpc/include/asm/ppc_asm.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h index c73750b..ceec199

Re: [PATCH v2] cxl: Prevent adapter reset if an active context exists

2016-10-12 Thread Andrew Donnellan
On 12/10/16 15:17, Vaibhav Jain wrote: This patch prevents resetting the cxl adapter via sysfs in presence of one or more active cxl_context on it. This protects against an unrecoverable error caused by PSL owning a dirty cache line even after reset and host tries to touch the same cache line.

[PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-12 Thread Lorenzo Stoakes
This patch series adjusts functions in the get_user_pages* family such that desired FOLL_* flags are passed as an argument rather than implied by flags. The purpose of this change is to make the use of FOLL_FORCE explicit so it is easier to grep for and clearer to callers that this flag is being

[PATCH 05/10] mm: replace get_vaddr_frames() write/force parameters with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write and force parameters from get_vaddr_frames() and replaces them with a gup_flags parameter to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes

[PATCH 09/10] mm: replace access_remote_vm() write parameter with gup_flags

2016-10-12 Thread Lorenzo Stoakes
This patch removes the write parameter from access_remote_vm() and replaces it with a gup_flags parameter as use of this function previously _implied_ FOLL_FORCE, whereas after this patch callers explicitly pass this flag. We make this explicit as use of FOLL_FORCE can result in surprising

[PATCH] powerpc/64s: relocation, register save fixes for system reset interrupt

2016-10-12 Thread Nicholas Piggin
This patch does a couple of things. First of all, powernv immediately explodes when running a relocated kernel, because the system reset exception for handling sleeps does not do correct relocated branches. Secondly, the sleep handling code trashes the condition and cfar registers, which we would

[PATCH] powerpc/64s: reduce exception alignment

2016-10-12 Thread Nicholas Piggin
Exception handlers are aligned to 128 bytes (L1 cache) on 64s, which is overkill. It can reduce the icache footprint of any individual exception path. However taken as a whole, the expansion in icache footprint seems likely to be counter-productive and cause more total misses. Create

Re: [PATCH kernel v2 2/2] powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown

2016-10-12 Thread David Gibson
On Wed, Oct 12, 2016 at 03:58:28PM +1100, Alexey Kardashevskiy wrote: > At the moment the userspace tool is expected to request pinning of > the entire guest RAM when VFIO IOMMU SPAPR v2 driver is present. > When the userspace process finishes, all the pinned pages need to > be put; this is done

Re: [PATCH kernel v2 1/2] powerpc/iommu: Stop using @current in mm_iommu_xxx

2016-10-12 Thread David Gibson
On Wed, Oct 12, 2016 at 03:58:27PM +1100, Alexey Kardashevskiy wrote: > In some situations the userspace memory context may live longer than > the userspace process itself so if we need to do proper memory context > cleanup, we better cache @mm and use it later when the process is gone > (@current

[PATCH] powerpc/mm: Drop dump_numa_memory_topology()

2016-10-12 Thread Michael Ellerman
At boot we dump the NUMA memory topology in dump_numa_memory_topology(), at KERN_DEBUG level, resulting in output like: Node 0 Memory: 0x0-0x1 Node 1 Memory: 0x1-0x2 Which is nice enough, but immediately after that we iterate over each node and call setup_node_data(),

[PATCH 0/3][RFC] powerpc: relative exception tables, and build-time sort

2016-10-12 Thread Nicholas Piggin
This implements relative exception tables for powerpc, and converts it to use build-time sorting. I've tested 64s only so far, but 32-bit seems to build. Will obviously require some more testing and reviews. Thanks, Nick Nicholas Piggin (3): powerpc: EX_TABLE macro for exception tables

[PATCH 0/3][RFC] powerpc: relative exception tables, and build-time sort

2016-10-12 Thread Nicholas Piggin
This implements relative exception tables for powerpc, and converts it to use build-time sorting. I've tested 64s only so far, but 32-bit seems to build. Will obviously require some more testing and reviews. Thanks, Nick Nicholas Piggin (3): powerpc: EX_TABLE macro for exception tables

[PATCH 0/3][RFC] powerpc: relative exception tables, and build-time sort

2016-10-12 Thread Nicholas Piggin
This implements relative exception tables for powerpc, and converts it to use build-time sorting. I've tested 64s only so far, but 32-bit seems to build. Will obviously require some more testing and reviews. Thanks, Nick Nicholas Piggin (3): powerpc: EX_TABLE macro for exception tables

[PATCH 1/3] powerpc: EX_TABLE macro for exception tables

2016-10-12 Thread Nicholas Piggin
This macro is taken from s390, and allows more flexibility in changing exception table format. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/futex.h | 14 +- arch/powerpc/include/asm/io.h | 18 +- arch/powerpc/include/asm/linkage.h

[PATCH 2/3] powerpc: relative exception tables

2016-10-12 Thread Nicholas Piggin
This halves the exception table size on 64-bit builds, and it allows build-time sorting of exception tables to work on relocated kernels. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/linkage.h| 20 -

[PATCH 3/3] powerpc: build-time sort exception table

2016-10-12 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/module.h | 4 scripts/sortextable.c | 2 ++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index