Re: ehea crash on boot

2016-10-11 Thread Jan Stancek
- Original Message - > From: "Michael Ellerman" > To: "Jan Stancek" , "Denis Kirjanov" > > Cc: linuxppc-dev@lists.ozlabs.org > Sent: Tuesday, 11 October, 2016 7:46:31 AM > Subject: Re: ehea crash on boot > > Jan Stancek writes: > > > Hi Denis / all, > > > > Do you know if there is

Re: ppc64 qemu test failure since commit f9aa67142 ("powerpc/64s: Consolidate Alignment 0x600 interrupt")

2016-10-11 Thread Nicholas Piggin
On Mon, 10 Oct 2016 07:15:11 -0700 Guenter Roeck wrote: > On 10/09/2016 10:49 PM, Nicholas Piggin wrote: > > On Sun, 9 Oct 2016 08:21:21 -0700 > > Guenter Roeck wrote: > > > >> Nicholas, > >> > >> some of my qemu tests for ppc64 started failing on mainline (and -next). > >> You can find a test

Re: [PATCH] Fix "ibm,processor-radix-AP-encodings"

2016-10-11 Thread Aneesh Kumar K.V
Michael Ellerman writes: > Oliver O'Halloran writes: > >> On Wed, Sep 28, 2016 at 12:43 PM, Aneesh Kumar K.V >> wrote: >>> Balbir Singh writes: >>> The top 3 bits of the lower order byte should contain the AP encoding, we assume the top 3 bits of the MSB. >> >> Balbir, could you rewo

[PATCH] powerpc/mm/hash64: Fix might_have_hea() check

2016-10-11 Thread Michael Ellerman
In commit 2b4e3ad8f579 ("powerpc/mm/hash64: Don't test for machine type to detect HEA special case") we changed the logic in might_have_hea() to check FW_FEATURE_SPLPAR rather than machine_is(pseries). However the check was incorrectly negated, leading to crashes on machines with HEA adapters, suc

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

2016-10-11 Thread Marcin Nowakowski
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 distinguish them easily. Signed-off-by: Marcin Nowakowski Cc: St

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

2016-10-11 Thread Marcin Nowakowski
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 Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/ftrace.h | 11 +++ arch/

Re: Oops on Power8 (was Re: [PATCH v2 1/7] workqueue: make workqueue available early during boot)

2016-10-11 Thread Michael Ellerman
Tejun Heo writes: > Hello, Michael. > > On Mon, Oct 10, 2016 at 09:22:55PM +1100, Michael Ellerman wrote: >> This patch seems to be causing one of my Power8 boxes not to boot. >> >> Specifically commit 3347fa092821 ("workqueue: make workqueue available >> early during boot") in linux-next. >> >

[PATCH] powerpc/64: Fix incorrect return value from __copy_tofrom_user

2016-10-11 Thread Paul Mackerras
Debugging a data corruption issue with virtio-net/vhost-net led to the observation that __copy_tofrom_user was occasionally returning a value 16 larger than it should. Since the return value from __copy_tofrom_user is the number of bytes not copied, this means that __copy_tofrom_user can occasiona

[PATCH 12/44] ibmvfc: Use fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Use fc_bsg_jobdone() directly instead of the struct bsg_job::job_done() callback. Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 8b55279

[PATCH 04/44] ibmvfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-11 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/scsi/ibmvscsi/ibmvfc.c | 22 -- 1 file changed, 12 insertions(+

[PATCH 17/44] scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done

2016-10-11 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 ++-- drivers/scsi/i

[PATCH 24/44] ibmvfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 1001d4a..f7b50af 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvsc

[PATCH 32/44] ibmvfc: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index f7b50af..35114d9 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/i

[PATCH 36/44] scsi: change FC drivers to use 'struct bsg_job'

2016-10-11 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_fc.c | 15 drivers/scsi/bfa/bfad_bsg.c | 10 +++--- drivers/scsi/bfa/bf

[PATCH 41/44] scsi: fc: use bsg_job_done

2016-10-11 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 | 2 +- drivers/sc

Re: Oops on Power8 (was Re: [PATCH v2 1/7] workqueue: make workqueue available early during boot)

2016-10-11 Thread Balbir Singh
On 11/10/16 22:22, Michael Ellerman wrote: > Tejun Heo writes: > >> Hello, Michael. >> >> On Mon, Oct 10, 2016 at 09:22:55PM +1100, Michael Ellerman wrote: >>> This patch seems to be causing one of my Power8 boxes not to boot. >>> >>> Specifically commit 3347fa092821 ("workqueue: make workqueue

Re: [PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-11 Thread Balbir Singh
On 07/10/16 05:36, Reza Arbab wrote: > Currently, CONFIG_MOVABLE_NODE depends on X86_64. In preparation to > enable it for other arches, we need to factor a detail which is unique > to x86 out of the generic mm code. > > Specifically, as documented in kernel-parameters.txt, the use of > "movable

Re: ppc64 qemu test failure since commit f9aa67142 ("powerpc/64s: Consolidate Alignment 0x600 interrupt")

2016-10-11 Thread Guenter Roeck
On 10/11/2016 12:47 AM, Nicholas Piggin wrote: On Mon, 10 Oct 2016 07:15:11 -0700 Guenter Roeck wrote: On 10/09/2016 10:49 PM, Nicholas Piggin wrote: On Sun, 9 Oct 2016 08:21:21 -0700 Guenter Roeck wrote: Nicholas, some of my qemu tests for ppc64 started failing on mainline (and -next). Y

Re: [PATCH v4 5/5] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-10-11 Thread Balbir Singh
On 07/10/16 05:36, Reza Arbab wrote: > To support movable memory nodes (CONFIG_MOVABLE_NODE), at least one of > the following must be true: > > 1. We're on x86. This arch has the capability to identify movable nodes >at boot by parsing the ACPI SRAT, if the movable_node option is used. > >

Re: [PATCH v4 2/5] drivers/of: do not add memory for unavailable nodes

2016-10-11 Thread Rob Herring
On Thu, Oct 6, 2016 at 1:36 PM, Reza Arbab wrote: > Respect the standard dt "status" property when scanning memory nodes in > early_init_dt_scan_memory(), so that if the node is unavailable, no > memory will be added. > > The use case at hand is accelerator or device memory, which may be > unusabl

[RFC PATCH 4/5] mm: Add tlb_remove_check_page_size_change to track page size change

2016-10-11 Thread Aneesh Kumar K.V
With commit e77b0852b551 ("mm/mmu_gather: track page size with mmu gather and force flush if page size change") we added the ability to force a tlb flush when the page size change in a mmu_gather loop. We did that by checking for a page size change every time we added a page to mmu_gather for lazy

[RFC PATCH 5/5] mm: Remove the page size change check in tlb_remove_page

2016-10-11 Thread Aneesh Kumar K.V
Now that we check for page size change early in the loop, we can partially revert e9d55e157034a9efd99405c99c1565d64619d82b ("mm: change the interface for __tlb_remove_page"). This simplies the code much, by removing the need to track the last address with which we adjusted the range. We also go ba

[RFC PATCH 1/5] mm: Use the correct page size when removing the page

2016-10-11 Thread Aneesh Kumar K.V
We are removing a pmd hugepage here. Use the correct page size. Signed-off-by: Aneesh Kumar K.V --- mm/huge_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 53ae6d00656a..3c9efdda0893 100644 --- a/mm/huge_memory.c +++ b/mm

[RFC PATCH 2/5] mm: Update mmu_gather range correctly

2016-10-11 Thread Aneesh Kumar K.V
We use __tlb_adjust_range to update range convered by mmu_gather struct. We later use the 'start' and 'end' to do a mmu_notifier_invalidate_range in tlb_flush_mmu_tlbonly(). Update the 'end' correctly in __tlb_adjust_range so that we call mmu_notifier_invalidate_range with the correct range values.

[RFC PATCH 3/5] mm/hugetlb: add tlb_remove_hugetlb_entry for handling hugetlb pages

2016-10-11 Thread Aneesh Kumar K.V
This add tlb_remove_hugetlb_entry similar to tlb_remove_pmd_tlb_entry. Signed-off-by: Aneesh Kumar K.V --- arch/arm/include/asm/tlb.h | 2 ++ arch/ia64/include/asm/tlb.h | 3 +++ arch/s390/include/asm/tlb.h | 2 ++ arch/sh/include/asm/tlb.h | 3 +++ arch/um/include/asm/tlb.h | 3 +++ includ

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

2016-10-11 Thread Michael Ellerman
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 write "cmp" with just three operands. > > With older binutils this is silently accepted as if this was "cm

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

2016-10-11 Thread Vaibhav Jain
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. In case a force reset of the card is requir

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

2016-10-11 Thread 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 situation: >> - don't copy and build the decompression stuff >> - use an alternative

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

2016-10-11 Thread Aneesh Kumar K.V
kernel test robot writes: > 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

[PATCH kernel v2 0/2] powerpc/spapr/vfio: Put pages on VFIO container shutdown

2016-10-11 Thread Alexey Kardashevskiy
These 2 patches are to fix a bug when pages stay pinned hours after QEMU which requested pinning exited. Please comment. Thanks. Alexey Kardashevskiy (2): powerpc/iommu: Stop using @current in mm_iommu_xxx powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown arch/powerpc/inclu

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

2016-10-11 Thread Alexey Kardashevskiy
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 or @current->mm are NULL). This changes mm_iommu_xxx API to receive mm_struct

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

2016-10-11 Thread Alexey Kardashevskiy
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 as a part of the userspace memory context (MM) destruction which happens on the

Re: [PATCH 2/2] powernv: Pass PSSCR value and mask to power9_idle_stop

2016-10-11 Thread Stewart Smith
Gautham R Shenoy writes: > On Tue, Oct 04, 2016 at 10:33:27PM +1100, Balbir Singh wrote: >> >> >> On 04/10/16 21:32, Michael Ellerman wrote: >> > "Gautham R. Shenoy" writes: >> > >> >> From: "Gautham R. Shenoy" >> >> >> >> The power9_idle_stop method currently takes only the requested stop >>

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

2016-10-11 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 +++ 3 files changed,