[PATCH 1/3] powerpc: Don't preempt_disable() in show_cpuinfo()

2018-01-09 Thread Benjamin Herrenschmidt
This causes warnings from cpufreq mutex code. This is also rather unnecessary and ineffective. If we really want to prevent concurrent unplug, we could take the unplug read lock but I don't see this being critical. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup-common.c | 11

[PATCH 3/3] powerpc: Cosmetic cleanup of cpuinfo_op

2018-01-09 Thread Benjamin Herrenschmidt
Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup-common.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index c1df4ba0094c..9f9524bdd3f1 100644 --- a/arch/powerpc/kernel/setup

[PATCH 2/3] powerpc: Make newline in cpuinfo unconditional

2018-01-09 Thread Benjamin Herrenschmidt
We used to not put the newline between the CPU part and the summary part on UP kernels. This is a rather pointless ifdef so take it out. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/setup-common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerp

Re: [PATCH v2] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread David Gibson
On Tue, Jan 09, 2018 at 08:21:20PM +1100, Paul Mackerras wrote: > This adds three new capabilities that give userspace information about > the underlying machine's level of vulnerability to the Meltdown and > Spectre attacks, and what instructions the hardware implements to > assist software to wor

[RFC] powerpc/mm: Enable TLB flush during native_register_proc_table()

2018-01-09 Thread Anshuman Khandual
From: Anshuman Khandual Any changes to the partition table must be followed by appropriate TLB flush which is not happening at present in native_register_proc_table() path. Fix this by calling mmu_partition_table_set_entry() which does take care of TLB flushing after the partition table update.

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Suraj Jitindar Singh
On Tue, 2018-01-09 at 23:44 +1100, Alexey Kardashevskiy wrote: > On 09/01/18 19:39, Suraj Jitindar Singh wrote: > > On Tue, 2018-01-09 at 15:48 +1100, Paul Mackerras wrote: > > > This adds three new capabilities that give userspace information > > > about > > > the underlying machine's level of vul

Re: [PATCH 10/13] ocxl: Add Makefile and Kconfig

2018-01-09 Thread Michael Ellerman
On 10 January 2018 2:45:56 am AEDT, Frederic Barrat wrote: > > >Le 03/01/2018 à 06:48, Andrew Donnellan a écrit : >> On 19/12/17 02:21, Frederic Barrat wrote: >>> OCXL_BASE triggers the platform support needed by the driver. >>> >>> Signed-off-by: Frederic Barrat >>> --- >>>   drivers/misc/Kco

Re: [linux-next][qla2xxx][85caa95]kernel BUG at lib/list_debug.c:31!

2018-01-09 Thread Madhani, Himanshu
Hello Abdul, > On Jan 9, 2018, at 7:54 AM, Bart Van Assche wrote: > > On Tue, 2018-01-09 at 14:44 +0530, Abdul Haleem wrote: >> Greeting's, >> >> Linux next kernel panics on powerpc when module qla2xxx is load/unload. >> >> Machine Type: Power 8 PowerVM LPAR >> Kernel : 4.15.0-rc2-next-20171

Re: [PATCH 07/11] powerpc/64s: Add support for RFI flush of L1-D cache

2018-01-09 Thread Michael Ellerman
Joel Stanley writes: > On Mon, Jan 8, 2018 at 8:54 AM, Michael Ellerman wrote: >> On some CPUs we can prevent the Meltdown vulnerability by flushing the >> L1-D cache on exit from kernel to user mode, and from hypervisor to >> guest. > > Super minor nitpicks below. Don't let this hold up your wo

Re: [PATCH 05/67] dma-mapping: replace PCI_DMA_BUS_IS_PHYS with a flag in struct dma_map_ops

2018-01-09 Thread Jesper Nilsson
On Fri, Dec 29, 2017 at 09:18:09AM +0100, Christoph Hellwig wrote: > The current PCI_DMA_BUS_IS_PHYS decided if a dma implementation is bound > by the dma mask in the device because it directly maps to a physical > address range (modulo an offset in the device), or if it is virtualized > by an iomm

Re: [PATCH 22/67] dma-mapping: clear harmful GFP_* flags in common code

2018-01-09 Thread Jesper Nilsson
On Fri, Dec 29, 2017 at 09:18:26AM +0100, Christoph Hellwig wrote: > Life the code from x86 so that we behave consistently. In the future we > should probably warn if any of these is set. > > Signed-off-by: Christoph Hellwig Acked-by: Jesper Nilsson > --- > arch/cris/arch-v32/drivers/pci/dma

Re: [linux-next][qla2xxx][85caa95]kernel BUG at lib/list_debug.c:31!

2018-01-09 Thread Bart Van Assche
On Tue, 2018-01-09 at 14:44 +0530, Abdul Haleem wrote: > Greeting's, > > Linux next kernel panics on powerpc when module qla2xxx is load/unload. > > Machine Type: Power 8 PowerVM LPAR > Kernel : 4.15.0-rc2-next-20171211 > gcc : version 4.8.5 > Test type: module load/unload few times > > Trace m

Re: [PATCH 34/67] cris: use dma-direct

2018-01-09 Thread Jesper Nilsson
On Fri, Dec 29, 2017 at 09:18:38AM +0100, Christoph Hellwig wrote: > cris currently has an incomplete direct mapping dma_map_ops implementation > is PCI support is enabled. Replace it with the fully feature generic > dma-direct implementation. > > Signed-off-by: Christoph Hellwig For CRIS: Ack

[PATCH V6] cxl: Add support for ASB_Notify on POWER9

2018-01-09 Thread Christophe Lombard
The POWER9 core supports a new feature: ASB_Notify which requires the support of the Special Purpose Register: TIDR. The ASB_Notify command, generated by the AFU, will attempt to wake-up the host thread identified by the particular LPID:PID:TID. This patch assign a unique TIDR (thread id) for the

Re: [PATCH 10/13] ocxl: Add Makefile and Kconfig

2018-01-09 Thread Frederic Barrat
Le 03/01/2018 à 06:48, Andrew Donnellan a écrit : On 19/12/17 02:21, Frederic Barrat wrote: OCXL_BASE triggers the platform support needed by the driver. Signed-off-by: Frederic Barrat ---   drivers/misc/Kconfig   |  1 +   drivers/misc/Makefile  |  1 +   drivers/misc/ocxl/Kconfig  |

Re: [PATCH 16/67] powerpc: rename dma_direct_ to dma_nommu_

2018-01-09 Thread Christoph Hellwig
On Thu, Jan 04, 2018 at 09:49:30AM +0100, Christoph Hellwig wrote: > On Tue, Jan 02, 2018 at 08:45:30PM +1100, Michael Ellerman wrote: > > Christoph Hellwig writes: > > > > > We want to use the dma_direct_ namespace for a generic implementation, > > > so rename powerpc to the second best choice:

Re: Sleep in preempt_disable on powernv with 'cat /proc/cpuinfo' on v4.15

2018-01-09 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On Mon, 2018-01-08 at 21:30 -0800, John Sperbeck wrote: >> The pnv_get_proc_freq() function was recently changed to call >> cpufreq_get(), instead of cpufreq_quick_get(), in order to fetch >> a more up-to-date value for the CPU frequency: >> >>cd77b5ce208c153

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Michael Ellerman
Greg Kurz writes: > On Tue, 9 Jan 2018 23:44:56 +1100 > Alexey Kardashevskiy wrote: > >> On 09/01/18 19:39, Suraj Jitindar Singh wrote: > [...] >> >> + rc = plpar_get_cpu_characteristics(&c); >> >> + if (rc == H_SUCCESS) { >> >> + if (!(c.behavior & >> > >> > s/behavior/behaviour >

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread kbuild test robot
Hi Paul, I love your patch! Yet something to improve: [auto build test ERROR on kvm/linux-next] [also build test ERROR on v4.15-rc7 next-20180109] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Greg Kurz
On Tue, 9 Jan 2018 23:44:56 +1100 Alexey Kardashevskiy wrote: > On 09/01/18 19:39, Suraj Jitindar Singh wrote: [...] > >> + rc = plpar_get_cpu_characteristics(&c); > >> + if (rc == H_SUCCESS) { > >> + if (!(c.behavior & > > > > s/behavior/behaviour > > Why? > https://dictionary.

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Alexey Kardashevskiy
On 09/01/18 19:39, Suraj Jitindar Singh wrote: > On Tue, 2018-01-09 at 15:48 +1100, Paul Mackerras wrote: >> This adds three new capabilities that give userspace information >> about >> the underlying machine's level of vulnerability to the Meltdown and >> Spectre attacks, and what instructions the

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread joserz
On Tue, Jan 09, 2018 at 12:57:26PM +0100, Michal Suchánek wrote: > On Tue, 09 Jan 2018 19:39:14 +1100 > Suraj Jitindar Singh wrote: > > > > > s/behavior/behaviour > > Nope. Either is valid and the shorter American spelling is actually > more common. > > If you must nickpick choose something ac

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Michal Suchánek
On Tue, 09 Jan 2018 19:39:14 +1100 Suraj Jitindar Singh wrote: > > s/behavior/behaviour Nope. Either is valid and the shorter American spelling is actually more common. If you must nickpick choose something actually broken :p Thanks Michal

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread kbuild test robot
Hi Paul, I love your patch! Yet something to improve: [auto build test ERROR on kvm/linux-next] [also build test ERROR on v4.15-rc7 next-20180109] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

[PATCH v2] powerpc/mm: Fix growth direction for hugepages mmaps with slice

2018-01-09 Thread Christophe Leroy
An application running with libhugetlbfs fails to allocate additional pages to HEAP due to the hugemap being done inconditionally as topdown mapping: mmap(0x1008, 1572864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4, -1, 0) = 0x73e8 [...] mmap(0x7400, 1048576, PROT_READ|PR

Re: [PATCH v2] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Suraj Jitindar Singh
On Tue, 2018-01-09 at 20:21 +1100, Paul Mackerras wrote: > This adds three new capabilities that give userspace information > about > the underlying machine's level of vulnerability to the Meltdown and > Spectre attacks, and what instructions the hardware implements to > assist software to work aro

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Paul Mackerras
On Tue, Jan 09, 2018 at 07:28:35PM +1100, Suraj Jitindar Singh wrote: [snip] > > + rc = plpar_get_cpu_characteristics(&c); > > + if (rc == H_SUCCESS) { > > + if (!(c.behavior & > > H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV)) > > s/H_GET_CPU_CHAR_BEHAV_L1_FLUSH_LOW_PRIV/H_CPU_BEHAV_L1D_F

[PATCH v2] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Paul Mackerras
This adds three new capabilities that give userspace information about the underlying machine's level of vulnerability to the Meltdown and Spectre attacks, and what instructions the hardware implements to assist software to work around the vulnerabilities. Each capability is a tri-state, where 0 i

[linux-next][qla2xxx][85caa95]kernel BUG at lib/list_debug.c:31!

2018-01-09 Thread Abdul Haleem
Greeting's, Linux next kernel panics on powerpc when module qla2xxx is load/unload. Machine Type: Power 8 PowerVM LPAR Kernel : 4.15.0-rc2-next-20171211 gcc : version 4.8.5 Test type: module load/unload few times Trace messages: --- qla2xxx [:00:00.0]-0005: : QLogic Fibre Channe

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Suraj Jitindar Singh
On Tue, 2018-01-09 at 15:48 +1100, Paul Mackerras wrote: > This adds three new capabilities that give userspace information > about > the underlying machine's level of vulnerability to the Meltdown and > Spectre attacks, and what instructions the hardware implements to > assist software to work aro

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Suraj Jitindar Singh
On Tue, 2018-01-09 at 15:48 +1100, Paul Mackerras wrote: > This adds three new capabilities that give userspace information > about > the underlying machine's level of vulnerability to the Meltdown and > Spectre attacks, and what instructions the hardware implements to > assist software to work aro

Re: [PATCH 09/11] powerpc/64s: Allow control of RFI flush via sysfs

2018-01-09 Thread Greg KH
On Tue, Jan 09, 2018 at 03:54:51AM +1100, Michael Ellerman wrote: > From: Nicholas Piggin > > Expose the state of the RFI flush (enabled/disabled) via sysfs, and > allow it to be enabled/dissabled at runtime. > > Signed-off-by: Nicholas Piggin > Signed-off-by: Michael Ellerman > --- > arch/po

Re: [PATCH 09/11] powerpc/64s: Allow control of RFI flush via sysfs

2018-01-09 Thread Jon Masters
On 01/09/2018 03:05 AM, Greg KH wrote: > On Tue, Jan 09, 2018 at 01:06:23AM -0500, Jon Masters wrote: >> Knowing that the IBM team was going to post with this sysfs interface, >> our trees contain the rfi_flush file. I mentioned it to some folks on >> this end (because we know we don't want to add

Re: [PATCH 09/11] powerpc/64s: Allow control of RFI flush via sysfs

2018-01-09 Thread Greg KH
On Tue, Jan 09, 2018 at 01:06:23AM -0500, Jon Masters wrote: > Knowing that the IBM team was going to post with this sysfs interface, > our trees contain the rfi_flush file. I mentioned it to some folks on > this end (because we know we don't want to add things in sysfs > generally, debugfs is a go