Re: [PATCH v2 3/3] powerpc/64s/radix: Fix process table entry cache invalidation

2017-10-25 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > According to the architecture, the process table entry cache must be > flushed with tlbie RIC=2. > > Currently the process table entry is set to invalid right before the > PID is returned to the allocator, with no invalidation. This works on > existing implementations th

Re: [PATCH v2 2/3] powerpc/64s/radix: tlbie improve preempt handling

2017-10-25 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > Preempt should be consistently disabled for mm_is_thread_local tests, > so bring the rest of these under preempt_disable(). > > Preempt does not need to be disabled for the mm->context.id tests, > which allows simplification and removal of gotos. > Reviewed-by: Aneesh K

Re: [PATCH v2 1/3] powerpc/64s/radix: fix preempt imbalance in TLB flush

2017-10-25 Thread Aneesh Kumar K.V
Nicholas Piggin writes: Reviewed-by: Aneesh Kumar K.V > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/mm/tlb-radix.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/tlb-radix.c > index 3a07d7a5e2fe..892544ebc2d2 1

Re: [PATCH 3/7] powerpc: Free up four 64K PTE bits in 4K backed HPTE pages

2017-10-25 Thread Ram Pai
On Wed, Oct 25, 2017 at 11:18:49AM +0200, Michael Ellerman wrote: > Ram Pai writes: > > On Mon, Oct 23, 2017 at 02:17:39PM +0530, Aneesh Kumar K.V wrote: > >> Michael Ellerman writes: > >> > Ram Pai writes: > ... > >> > Should be: > >> > /* > >> > * Initialize all hidx entries to invalid valu

Re: [PATCH] powerpc: Fix check for copy/paste instructions in alignment handler

2017-10-25 Thread Nicholas Piggin
On Thu, 26 Oct 2017 09:41:32 +1100 Paul Mackerras wrote: > On Thu, Oct 26, 2017 at 01:22:37AM +1000, Nicholas Piggin wrote: > > On Wed, 25 Oct 2017 18:16:53 +1100 > > Paul Mackerras wrote: > > > > > Commit 07d2a628bc00 ("powerpc/64s: Avoid cpabort in context switch > > > when possible", 2017-

Re: [PATCH] powerpc/tm: fix live state of vs0/32 in tm_reclaim

2017-10-25 Thread Cyril Bur
On Wed, 2017-07-05 at 11:02 +1000, Michael Neuling wrote: > On Tue, 2017-07-04 at 16:45 -0400, Gustavo Romero wrote: > > Currently tm_reclaim() can return with a corrupted vs0 (fp0) or vs32 (v0) > > due to the fact vs0 is used to save FPSCR and vs32 is used to save VSCR. > Hi Mikey, This complet

Re: [PATCH] powerpc: Fix check for copy/paste instructions in alignment handler

2017-10-25 Thread Paul Mackerras
On Thu, Oct 26, 2017 at 01:22:37AM +1000, Nicholas Piggin wrote: > On Wed, 25 Oct 2017 18:16:53 +1100 > Paul Mackerras wrote: > > > Commit 07d2a628bc00 ("powerpc/64s: Avoid cpabort in context switch > > when possible", 2017-06-09) changed the definition of PPC_INST_COPY > > and in so doing inadve

[PATCH 3/3] cxlflash: Derive pid through accessors

2017-10-25 Thread Uma Krishnan
From: "Matthew R. Ochs" The cxlflash driver tracks process IDs alongside contexts to validate context ownership. Currently, the process IDs are derived by directly accessing values from the 'current' task pointer. While this method of access is fine for the current process, it is incorrect when t

[PATCH 2/3] cxlflash: Allow cards without WWPN VPD to configure

2017-10-25 Thread Uma Krishnan
From: "Matthew R. Ochs" Currently, all adapters that cxlflash supports must have WWPN VPD keywords to complete configuration. This was required as cards with external FC ports needed to be programmed with WWPNs. Newer supported cards do not have an external FC interface and therefore do not requ

[PATCH 1/3] cxlflash: Use derived maximum write same length

2017-10-25 Thread Uma Krishnan
From: "Matthew R. Ochs" The existing write same routine within the cxlflash driver uses a statically defined value for the maximum write same transfer length. While this is close to the value reflected by the original device that was supported by cxlflash, newer devices are capable of much larger

[PATCH 0/3] cxlflash: Miscellaneous fixes

2017-10-25 Thread Uma Krishnan
This patch series contains miscellaneous fixes. All three patches resolve minor issues. This series is intended for 4.15 and is bisectable. Matthew R. Ochs (3): cxlflash: Use derived maximum write same length cxlflash: Allow cards without WWPN VPD to configure cxlflash: Derive pid through a

Re: [PATCH 3/4] powerpc/kprobes: Blacklist emulate_update_regs() from kprobes

2017-10-25 Thread Masami Hiramatsu
On Mon, 23 Oct 2017 22:07:40 +0530 "Naveen N. Rao" wrote: > Commit 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't > modify *regs") introduced emulate_update_regs() to perform part of what > emulate_step() was doing earlier. However, this function was not added > to the kprobes blackl

Re: [PATCH 4/4] powerpc/kprobes: refactor kprobe_lookup_name for safer string operations

2017-10-25 Thread Masami Hiramatsu
On Mon, 23 Oct 2017 22:07:41 +0530 "Naveen N. Rao" wrote: > Use safer string manipulation functions when dealing with a > user-provided string in kprobe_lookup_name(). > What would you mean "safer" here? using strnchr()? Could you please show at least an example case that causes problem in orig

Re: [PATCH] powerpc/powernv: Enable reset_devices parameter to issue a PHB reset

2017-10-25 Thread Guilherme G. Piccoli
V2 just sent to linuxppc-dev[0] list, with some simplifications. This one is then officially dropped! Thanks, Guilherme [0] http://patchwork.ozlabs.org/patch/830320

[PATCH v2] powerpc/powernv: Add pci_reset_phbs parameter to issue a PHB reset

2017-10-25 Thread Guilherme G. Piccoli
During a kdump kernel boot in PowerPC, we request a reset of the PHBs to the FW. It makes sense, since if we are booting a kdump kernel it means we had some trouble before and we cannot rely in the adapters' health; they could be in a bad state, hence the reset is needed. But this reset is useful

Re: [PATCH] powerpc: Fix check for copy/paste instructions in alignment handler

2017-10-25 Thread Nicholas Piggin
On Wed, 25 Oct 2017 18:16:53 +1100 Paul Mackerras wrote: > Commit 07d2a628bc00 ("powerpc/64s: Avoid cpabort in context switch > when possible", 2017-06-09) changed the definition of PPC_INST_COPY > and in so doing inadvertently broke the check for copy/paste > instructions in the alignment fault

Re: lpar issue for ZONE_DEVICE p2pmem in 4.14-rc

2017-10-25 Thread Oliver
On Tue, Oct 24, 2017 at 7:17 AM, Stephen Bates wrote: > >> [3.537780] lpar: Attempting to resize HPT to shift 21 >> [3.539251] Unable to resize hash page table to target order 21: -1 >> [3.541079] Unable to create mapping for hot added memory >> 0xc0002100..0xc00021000400

Re: [PATCH] powerpc/64: set DSCR default initially from SPR

2017-10-25 Thread Nicholas Piggin
On Wed, 25 Oct 2017 12:01:10 +0200 Michael Ellerman wrote: > Nicholas Piggin writes: > > > Take the DSCR value set by firmware as the dscr_default value, > > rather than zero. > > > > POWER9 recommends DSCR default to a non-zero value. > > > > From: Nicholas Piggin > > --- > > This has a probl

Re: [PATCH] powernv: Avoid checkstop on HMI and MCE

2017-10-25 Thread Balbir Singh
On Tue, 24 Oct 2017 20:20:05 +1100 Michael Neuling wrote: > On an unrecoverable HMI or MCE only generate an checkstop (via > PLATFORM ERROR opal reboot call) when panic_on_oops is set. > > We currently generate an checkstop as an attempt for the FSP to grab a > dump and then reboot us. Unfortuna

Re: [PATCH] powernv: Avoid checkstop on HMI and MCE

2017-10-25 Thread Nicholas Piggin
cc'ing skiboot On Wed, 25 Oct 2017 21:59:42 +1100 Michael Neuling wrote: > On Wed, 2017-10-25 at 12:16 +0200, Michael Ellerman wrote: > > Michael Neuling writes: > > > > > On an unrecoverable HMI or MCE only generate an checkstop (via > > > PLATFORM ERROR opal reboot call) when panic_on_oops

Re: [PATCH] powernv: Avoid checkstop on HMI and MCE

2017-10-25 Thread Michael Neuling
On Wed, 2017-10-25 at 12:16 +0200, Michael Ellerman wrote: > Michael Neuling writes: > > > On an unrecoverable HMI or MCE only generate an checkstop (via > > PLATFORM ERROR opal reboot call) when panic_on_oops is set. > > > > We currently generate an checkstop as an attempt for the FSP to grab a

Re: [PATCH] powerpc/vio: dispose of virq mapping on vdevice unregister

2017-10-25 Thread Michael Ellerman
Tyrel Datwyler writes: > Ping... > > Anybody, see any issues with this patch? No it looks OK to me. I'll put it in next. I'm going to drop the stable tag for now, I'd like it to get some more testing. We can request a backport later. cheers

[PATCH] powerpc/powernv: Enable tunneled operations

2017-10-25 Thread Philippe Bergheaud
P9 supports PCI tunneled operations (atomics and as_notify). This patch adds support for tunneled operations on powernv, by adding a new API to be called by drivers: pnv_pci_get_tunnel_ind() -- tell driver the 16-bit ASN indication set by kernel. pnv_pci_set_tunnel_bar() -- tell kernel the Tunne

Re: [PATCH] bitmap: Fix optimization of bitmap_set/clear for big-endian machines

2017-10-25 Thread Michael Ellerman
Paul Mackerras writes: > On Wed, Oct 25, 2017 at 07:39:48AM +, Matthew Wilcox wrote: >> Hang on, don't tell me you found this by inspection. Are you not >> running the bitmap testcase, enabled by CONFIG_TEST_BITMAP? Either >> that should be producing an error, or there's a missing test case,

Re: [PATCH] powernv: Avoid checkstop on HMI and MCE

2017-10-25 Thread Michael Ellerman
Michael Neuling writes: > On an unrecoverable HMI or MCE only generate an checkstop (via > PLATFORM ERROR opal reboot call) when panic_on_oops is set. > > We currently generate an checkstop as an attempt for the FSP to grab a > dump and then reboot us. Unfortunately this never works and no one N

[PATCH] scsi: ibmvscsi: Convert timers to use timer_setup()

2017-10-25 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: "Martin K. Petersen" Cc: Tyrel Datwyler Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael El

Re: [PATCH] powerpc/64: set DSCR default initially from SPR

2017-10-25 Thread Michael Ellerman
Nicholas Piggin writes: > Take the DSCR value set by firmware as the dscr_default value, > rather than zero. > > POWER9 recommends DSCR default to a non-zero value. > > From: Nicholas Piggin > --- > This has a problem that OS which set the DSCR to non-default > then kexec to Linux will be used a

RE: [PATCH] bitmap: Fix optimization of bitmap_set/clear for big-endian machines

2017-10-25 Thread Matthew Wilcox
From: Paul Mackerras [mailto:pau...@ozlabs.org] > On Wed, Oct 25, 2017 at 07:39:48AM +, Matthew Wilcox wrote: > > Hang on, don't tell me you found this by inspection. Are you not running > > the > bitmap testcase, enabled by CONFIG_TEST_BITMAP? Either that should be > producing an error, or

RE: [PATCH] bitmap: Fix optimization of bitmap_set/clear for big-endian machines

2017-10-25 Thread Matthew Wilcox
Hang on, don't tell me you found this by inspection. Are you not running the bitmap testcase, enabled by CONFIG_TEST_BITMAP? Either that should be producing an error, or there's a missing test case, or your inspection is wrong ... > -Original Message- > From: Paul Mackerras [mailto:pa

Re: [PATCH 08/25] powerpc: sys_pkey_alloc() and sys_pkey_free() system calls

2017-10-25 Thread Michael Ellerman
Ram Pai writes: > On Tue, Oct 24, 2017 at 05:48:15PM +0200, Michael Ellerman wrote: >> Ram Pai writes: >> >> > Finally this patch provides the ability for a process to >> > allocate and free a protection key. >> >> This must be the last patch in the series. >> >> We don't want to expose a hal

Re: [PATCH 3/7] powerpc: Free up four 64K PTE bits in 4K backed HPTE pages

2017-10-25 Thread Michael Ellerman
Ram Pai writes: > On Mon, Oct 23, 2017 at 02:17:39PM +0530, Aneesh Kumar K.V wrote: >> Michael Ellerman writes: >> > Ram Pai writes: ... >> > Should be: >> >/* >> > * Initialize all hidx entries to invalid value, the first time >> > * the PTE is about to allocate a 4K HPTE. >> >

Re: [PATCH v2 3/8] powerpc/mm: Separate ibm, dynamic-memory data from DT format

2017-10-25 Thread Michael Ellerman
Nathan Fontenot writes: > On 10/24/2017 01:08 AM, Michael Ellerman wrote: >> Nathan Fontenot writes: >> >>> diff --git a/arch/powerpc/mm/drmem.c b/arch/powerpc/mm/drmem.c >>> new file mode 100644 >>> index ..8ad7cf36b2c4 >>> --- /dev/null >>> +++ b/arch/powerpc/mm/drmem.c >>> @@ -0,

Re: [PATCH] bitmap: Fix optimization of bitmap_set/clear for big-endian machines

2017-10-25 Thread Paul Mackerras
On Wed, Oct 25, 2017 at 07:39:48AM +, Matthew Wilcox wrote: > Hang on, don't tell me you found this by inspection. Are you not running the > bitmap testcase, enabled by CONFIG_TEST_BITMAP? Either that should be > producing an error, or there's a missing test case, or your inspection is > w

[PATCH] powerpc: Fix check for copy/paste instructions in alignment handler

2017-10-25 Thread Paul Mackerras
Commit 07d2a628bc00 ("powerpc/64s: Avoid cpabort in context switch when possible", 2017-06-09) changed the definition of PPC_INST_COPY and in so doing inadvertently broke the check for copy/paste instructions in the alignment fault handler. The check currently matches no instructions. This fixes