[PATCH] selftests/powerpc: Add a test of wild bctr

2018-07-23 Thread Michael Ellerman
This tests that a bctr (Branch to counter and link), ie. a function call, to a wildly out-of-bounds address is handled correctly. Some old kernel versions didn't handle it correctly, see eg: "powerpc/slb: Force a full SLB flush when we insert for a bad EA"

[PATCH kernel for v4.14 and v4.17 stable] KVM: PPC: Check if IOMMU page is contained in the pinned physical page

2018-07-23 Thread Alexey Kardashevskiy
A VM which has: - a DMA capable device passed through to it (eg. network card); - running a malicious kernel that ignores H_PUT_TCE failure; - capability of using IOMMU pages bigger that physical pages can create an IOMMU mapping that exposes (for example) 16MB of the host physical memory to

Re: [PATCH net-next] wan/fsl_ucc_hdlc: use IS_ERR_VALUE() to check return value of qe_muram_alloc

2018-07-23 Thread David Miller
From: YueHaibing Date: Mon, 23 Jul 2018 22:12:33 +0800 > qe_muram_alloc return a unsigned long integer,which should not > compared with zero. check it using IS_ERR_VALUE() to fix this. > > Fixes: c19b6d246a35 ("drivers/net: support hdlc function for QE-UCC") > Signed-off-by: YueHaibing

Re: [PATCH v07 2/9] hotplug/cpu: Add operation queuing function

2018-07-23 Thread Nathan Fontenot
On 07/13/2018 03:18 PM, Michael Bringmann wrote: migration/dlpar: This patch adds function dlpar_queue_action() which will queued up information about a CPU/Memory 'readd' operation according to resource type, action code, and DRC index. At a subsequent point, the list of operations can be

Re: [PATCH v07 1/9] hotplug/cpu: Conditionally acquire/release DRC index

2018-07-23 Thread Nathan Fontenot
On 07/13/2018 03:17 PM, Michael Bringmann wrote: powerpc/cpu: Modify dlpar_cpu_add and dlpar_cpu_remove to allow the skipping of DRC index acquire or release operations during the CPU add or remove operations. This is intended to support subsequent changes to provide a 'CPU readd' operation.

Re: [PATCH v4 00/11] hugetlb: Factorize hugetlb architecture primitives

2018-07-23 Thread Alex Ghiti
Ok will do and report when done. Thanks for your feedback, Alex On 07/23/2018 02:00 PM, Michael Ellerman wrote: Alex Ghiti writes: Does anyone have any suggestion about those patches ? Cross compiling it for some non-x86 arches would be a good start :) There are cross compilers available

[PATCH] net: ethernet: fs-enet: Use generic CRC32 implementation

2018-07-23 Thread Krzysztof Kozlowski
Use generic kernel CRC32 implementation because it: 1. Should be faster (uses lookup tables), 2. Removes duplicated CRC generation code, 3. Uses well-proven algorithm instead of coding it one more time. Suggested-by: Eric Biggers Signed-off-by: Krzysztof Kozlowski --- Not tested on hardware.

Re: [PATCH v07 2/9] hotplug/cpu: Add operation queuing function

2018-07-23 Thread John Allen
On Fri, Jul 13, 2018 at 03:18:01PM -0500, Michael Bringmann wrote: migration/dlpar: This patch adds function dlpar_queue_action() which will queued up information about a CPU/Memory 'readd' operation according to resource type, action code, and DRC index. At a subsequent point, the list of

Re: [PATCH v2 2/2] powerpc/pseries: Wait for completion of hotplug events during PRRN handling

2018-07-23 Thread John Allen
On Mon, Jul 23, 2018 at 11:41:24PM +1000, Michael Ellerman wrote: John Allen writes: While handling PRRN events, the time to handle the actual hotplug events dwarfs the time it takes to perform the device tree updates and queue the hotplug events. In the case that PRRN events are being queued

Re: powerpc/ps3: Set driver coherent_dma_mask

2018-07-23 Thread Michael Ellerman
On Wed, 2018-07-18 at 22:08:33 UTC, Geoff Levand wrote: > Set the coherent_dma_mask for the PS3 ehci, ohci, and snd devices. > > Silences WARN_ON_ONCE messages emitted by the dma_alloc_attrs() routine. > > Reported-by: Fredrik Noring > Signed-off-by: Geoff Levand > Acked-by: Greg Kroah-Hartman

Re: [v2] powerpc/prom_init: remove linux,stdout-package property

2018-07-23 Thread Michael Ellerman
On Wed, 2018-07-18 at 16:15:44 UTC, Murilo Opsfelder Araujo wrote: > This property was added in 2004 and the only use of it, which was already > inside > `#if 0`, was removed a month later. > > Signed-off-by: Murilo Opsfelder Araujo Applied to powerpc next, thanks.

Re: powerpc/hugetlbpage: Rmove unhelpful HUGEPD_*_SHIFT macros

2018-07-23 Thread Michael Ellerman
On Tue, 2018-07-17 at 04:24:30 UTC, David Gibson wrote: > The HUGEPD_*_SHIFT macros are always defined to be PGDIR_SHIFT and > PUD_SHIFT, and have to have those values to work properly. They once used > to have different values, but that was really only because they were used > to mean different

Re: chrp/nvram.c: add MODULE_LICENSE()

2018-07-23 Thread Michael Ellerman
On Sat, 2018-07-14 at 04:27:48 UTC, Randy Dunlap wrote: > From: Randy Dunlap > > Add MODULE_LICENSE() to the chrp nvram.c driver to fix the build > warning message: > > WARNING: modpost: missing MODULE_LICENSE() in > arch/powerpc/platforms/chrp/nvram.o > > Signed-off-by: Randy Dunlap > Cc:

Re: [1/3] selftests/powerpc: Remove Power9 copy_unaligned test

2018-07-23 Thread Michael Ellerman
On Wed, 2018-07-11 at 07:10:15 UTC, Michael Ellerman wrote: > This is a test of the ISA 3.0 "copy" instruction. That instruction has > an L field, which if set to 1 specifies that "the instruction > identifies the beginning of a move group" (pp 858). That's also > referred to as "copy first" vs

Re: powerpc/8xx: fix handling of early NULL pointer dereference

2018-07-23 Thread Michael Ellerman
On Fri, 2018-07-13 at 13:10:47 UTC, Christophe Leroy wrote: > NULL pointers are pointers to user memory space. So user pagetable > has to be set in order to avoid random behaviour in case of NULL > pointer dereference, otherwise we may encounter random memory > access hence Machine Check Exception

Re: cxl: Fix wrong comparison in cxl_adapter_context_get()

2018-07-23 Thread Michael Ellerman
On Wed, 2018-07-04 at 15:28:33 UTC, Vaibhav Jain wrote: > Function atomic_inc_unless_negative() returns a bool to indicate > success/failure. However cxl_adapter_context_get() wrongly compares > the return value against '>=0' which will always be true. The patch > fixes this comparison to '==0'

Re: powerpc/mpic: Cleanup irq vector accounting

2018-07-23 Thread Michael Ellerman
On Fri, 2018-06-29 at 10:24:32 UTC, Bharat Bhushan wrote: > Available vector space accounts ipis and timer interrupts > while spurious vector was not accounted. Also later > mpic_setup_error_int() escape one more vector, seemingly it > assumes one spurious vector. > > Signed-off-by: Bharat

Re: [2/2] powernv/npu: Add a debugfs setting to change ATSD threshold

2018-07-23 Thread Michael Ellerman
On Tue, 2018-04-17 at 09:11:29 UTC, Alistair Popple wrote: > The threshold at which it becomes more efficient to coalesce a range of > ATSDs into a single per-PID ATSD is currently not well understood due to a > lack of real-world work loads. This patch adds a debugfs parameter allowing > the

Re: Mark ams driver as orphaned in MAINTAINERS

2018-07-23 Thread Michael Ellerman
On Mon, 2018-01-29 at 22:40:09 UTC, Michael Hanselmann wrote: > I no longer have any hardware with the Apple motion sensor and thus > relinquish maintainership of the driver. > > Signed-off-by: Michael Hanselmann Applied to powerpc next, thanks.

[PATCH 5/5] powerpc/powernv: Query firmware for count cache flush settings

2018-07-23 Thread Michael Ellerman
Look for fw-features properties to determine the appropriate settings for the count cache flush, and then call the generic powerpc code to set it up based on the security feature flags. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/powernv/setup.c | 7 +++ 1 file changed, 7

[PATCH 4/5] powerpc/pseries: Query hypervisor for count cache flush settings

2018-07-23 Thread Michael Ellerman
Use the existing hypercall to determine the appropriate settings for the count cache flush, and then call the generic powerpc code to set it up based on the security feature flags. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/hvcall.h | 2 ++

[PATCH 3/5] powerpc/64s: Add support for software count cache flush

2018-07-23 Thread Michael Ellerman
Some CPU revisions support a mode where the count cache needs to be flushed by software on context switch. Additionally some revisions may have a hardware accelerated flush, in which case the software flush sequence can be shortened. If we detect the appropriate flag from firmware we patch a

[PATCH 2/5] powerpc/64s: Add new security feature flags for count cache flush

2018-07-23 Thread Michael Ellerman
Add security feature flags to indicate the need for software to flush the count cache on context switch, and for the presence of a hardware assisted count cache flush. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/security_features.h | 6 ++ 1 file changed, 6 insertions(+)

[PATCH 1/5] powerpc/asm: Add a patch_site macro & helpers for patching instructions

2018-07-23 Thread Michael Ellerman
Add a macro and some helper C functions for patching single asm instructions. The gas macro means we can do something like: 1:nop patch_site 1b, patch__foo Which is less visually distracting than defining a GLOBAL symbol at 1, and also doesn't pollute the symbol table which can

Re: [PATCH v2 1/2] powerpc/pseries: Avoid blocking rtas polling handling multiple PRRN events

2018-07-23 Thread John Allen
On Mon, Jul 23, 2018 at 11:27:56PM +1000, Michael Ellerman wrote: Hi John, I'm a bit puzzled by this one. John Allen writes: When a PRRN event is being handled and another PRRN event comes in, the second event will block rtas polling waiting on the first to complete, preventing any further

Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required

2018-07-23 Thread Michal Hocko
On Thu 19-07-18 23:17:53, Baoquan He wrote: > Kexec has been a formal feature in our distro, and customers owning > those kind of very large machine can make use of this feature to speed > up the reboot process. On uefi machine, the kexec_file loading will > search place to put kernel under 4G

[PATCH net-next] wan/fsl_ucc_hdlc: use IS_ERR_VALUE() to check return value of qe_muram_alloc

2018-07-23 Thread YueHaibing
qe_muram_alloc return a unsigned long integer,which should not compared with zero. check it using IS_ERR_VALUE() to fix this. Fixes: c19b6d246a35 ("drivers/net: support hdlc function for QE-UCC") Signed-off-by: YueHaibing --- drivers/net/wan/fsl_ucc_hdlc.c | 6 +++--- 1 file changed, 3

Re: [PATCH v4 00/11] hugetlb: Factorize hugetlb architecture primitives

2018-07-23 Thread Michael Ellerman
Alex Ghiti writes: > Does anyone have any suggestion about those patches ? Cross compiling it for some non-x86 arches would be a good start :) There are cross compilers available here: https://mirrors.edge.kernel.org/pub/tools/crosstool/ cheers > On 07/09/2018 02:16 PM, Michal Hocko

Re: [PATCH v7 2/2] hwmon: ibmpowernv: Add attributes to enable/disable sensor groups

2018-07-23 Thread Michael Ellerman
Shilpasri G Bhat writes: > diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c > index f829dad..99afbf7 100644 > --- a/drivers/hwmon/ibmpowernv.c > +++ b/drivers/hwmon/ibmpowernv.c > @@ -292,12 +344,126 @@ static u32 get_sensor_hwmon_index(struct sensor_data > *sdata, >

Re: [PATCH v2 2/2] powerpc/pseries: Wait for completion of hotplug events during PRRN handling

2018-07-23 Thread Michael Ellerman
John Allen writes: > While handling PRRN events, the time to handle the actual hotplug events > dwarfs the time it takes to perform the device tree updates and queue the > hotplug events. In the case that PRRN events are being queued continuously, > hotplug events have been observed to be queued

Re: [PATCH v2 1/2] powerpc/pseries: Avoid blocking rtas polling handling multiple PRRN events

2018-07-23 Thread Michael Ellerman
Hi John, I'm a bit puzzled by this one. John Allen writes: > When a PRRN event is being handled and another PRRN event comes in, the > second event will block rtas polling waiting on the first to complete, > preventing any further rtas events from being handled. This can be > especially

Re: [PATCH 4/7] x86,tlb: make lazy TLB mode lazier

2018-07-23 Thread Rik van Riel
On Fri, 2018-07-20 at 10:30 +0200, Peter Zijlstra wrote: > On Thu, Jul 19, 2018 at 10:04:09AM -0700, Andy Lutomirski wrote: > > I added some more arch maintainers. The idea here is that, on x86 > > at > > least, task->active_mm and all its refcounting is pure > > overhead. When > > a process

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-23 Thread Michael S. Tsirkin
On Mon, Jul 23, 2018 at 11:58:23AM +0530, Anshuman Khandual wrote: > On 07/20/2018 06:46 PM, Michael S. Tsirkin wrote: > > On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: > >> This patch series is the follow up on the discussions we had before about > >> the RFC titled [RFC,V2]

Re: [PATCH] scsi: prevent ISA driver from building on PPC32

2018-07-23 Thread Christoph Hellwig
On Sat, Jul 21, 2018 at 12:58:21PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Prevent drivers from building on PPC32 if they use isa_bus_to_virt(), > isa_virt_to_bus(), or isa_page_to_bus(), which are not available and > thus cause build errors. Please don't introduce weird arch

Re: [PATCH] scsi: prevent ISA driver from building on PPC32

2018-07-23 Thread Christoph Hellwig
On Mon, Jul 23, 2018 at 01:18:11AM -0700, Christoph Hellwig wrote: > On Sat, Jul 21, 2018 at 12:58:21PM -0700, Randy Dunlap wrote: > > From: Randy Dunlap > > > > Prevent drivers from building on PPC32 if they use isa_bus_to_virt(), > > isa_virt_to_bus(), or isa_page_to_bus(), which are not

Re: [PATCH 2/3] [v2] m68k: mac: use time64_t in RTC handling

2018-07-23 Thread Geert Uytterhoeven
Hi Finn, On Sun, Jul 22, 2018 at 1:56 PM Finn Thain wrote: > On Wed, 18 Jul 2018, I wrote: > > On Wed, 18 Jul 2018, Arnd Bergmann wrote: > > > I'd suggest we do it like below to make it consistent with the rest > > > again, using the 1904..2040 range of dates and no warning for invalid > > >

[RFC 1/1] cpuidle : Move saving and restoring of sprs to opal

2018-07-23 Thread Abhishek Goel
This patch moves the saving and restoring of sprs for P9 cpuidle from kernel to opal. This patch still uses existing code to detect first thread in core. In an attempt to make the powernv idle code backward compatible, and to some extent forward compatible, add support for pre-stop entry and

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-23 Thread Anshuman Khandual
On 07/20/2018 06:46 PM, Michael S. Tsirkin wrote: > On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: >> This patch series is the follow up on the discussions we had before about >> the RFC titled [RFC,V2] virtio: Add platform specific DMA API translation >> for virito devices