Re: [PATCH 2/2] powerpc/64s: __find_linux_pte synchronization vs pmdp_invalidate

2019-06-07 Thread Nicholas Piggin
Christophe Leroy's on June 7, 2019 3:35 pm: > > > Le 07/06/2019 à 05:56, Nicholas Piggin a écrit : >> The change to pmdp_invalidate to mark the pmd with _PAGE_INVALID broke >> the synchronisation against lock free lookups, __find_linux_pte's >> pmd_none check no longer returns true for such

[PATCH] powerpc/scm: Mark the region volatile if cache flush not required

2019-06-07 Thread Aneesh Kumar K.V
The device tree node is documented as below: “ibm,cache-flush-required”: property name indicates Cache Flush Required for this Persistent Memory Segment to persist memory prop-encoded-array: None, this is a name only property. Signed-off-by: Aneesh Kumar K.V ---

[PATCH v2] powerpc/nvdimm: Add support for multibyte read/write for metadata

2019-06-07 Thread Aneesh Kumar K.V
SCM_READ/WRITE_MEATADATA hcall supports multibyte read/write. This patch updates the metadata read/write to use 1, 2, 4 or 8 byte read/write as mentioned in PAPR document. READ/WRITE_METADATA hcall supports the 1, 2, 4, or 8 bytes read/write. For other values hcall results H_P3. Hypervisor

Re: [PATCH 2/2] powerpc/64s/radix: ioremap use huge page mappings

2019-06-07 Thread Nicholas Piggin
Christophe Leroy's on June 7, 2019 4:56 pm: > > > Le 07/06/2019 à 08:19, Nicholas Piggin a écrit : >> powerpc/64s does not use ioremap_page_range, so it does not get huge >> vmap iomap mappings automatically. The radix kernel mapping function >> already allows larger page mappings that work with

[Bug 203837] Booting kernel under KVM immediately freezes host

2019-06-07 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203837 --- Comment #2 from Paul Mackerras (pau...@ozlabs.org) --- Just tried 5.1.7 in the host and got the guest locking up during boot. In xmon I see one cpu in pmdp_invalidate and another in handle_mm_fault. It seems very possible this is the bug that

[PATCH] powerpc/scm: Use a specific endian format for storing uuid from the device tree

2019-06-07 Thread Aneesh Kumar K.V
We used uuid_parse to convert uuid string from device tree to two u64 components. We want to make sure we look at the uuid read from device tree in an endian-neutral fashion. For now, I am picking little-endian to be format so that we don't end up doing an additional conversion. The reason to

Re: [PATCH] powerpc/32s: fix booting with CONFIG_PPC_EARLY_DEBUG_BOOTX

2019-06-07 Thread Mathieu Malaterre
On Wed, Jun 5, 2019 at 1:32 PM Mathieu Malaterre wrote: > > On Mon, Jun 3, 2019 at 3:00 PM Christophe Leroy > wrote: > > > > When booting through OF, setup_disp_bat() does nothing because > > disp_BAT are not set. By change, it used to work because BOOTX > > buffer is mapped 1:1 at address

Re: [PATCH] Powerpc/Watchpoint: Restore nvgprs while returning from exception

2019-06-07 Thread Ravi Bangoria
On 6/7/19 11:20 AM, Michael Ellerman wrote: > Ravi Bangoria writes: > >> Powerpc hw triggers watchpoint before executing the instruction. >> To make trigger-after-execute behavior, kernel emulates the >> instruction. If the instruction is 'load something into non- >> volatile register',

Re: [PATCH 1/2] powerpc/64s: Fix THP PMD collapse serialisation

2019-06-07 Thread Nicholas Piggin
Christophe Leroy's on June 7, 2019 3:34 pm: > > > Le 07/06/2019 à 05:56, Nicholas Piggin a écrit : >> Commit 1b2443a547f9 ("powerpc/book3s64: Avoid multiple endian conversion >> in pte helpers") changed the actual bitwise tests in pte_access_permitted >> by using pte_write() and pte_present()

[PATCH] mm/nvdimm: Fix endian conversion issues 

2019-06-07 Thread Aneesh Kumar K.V
nd_label->dpa issue was observed when trying to enable the namespace created with little-endian kernel on a big-endian kernel. That made me run `sparse` on the rest of the code and other changes are the result of that. Signed-off-by: Aneesh Kumar K.V --- drivers/nvdimm/btt.c| 8

[PATCH 2/2] powerpc/64s/radix: ioremap use huge page mappings

2019-06-07 Thread Nicholas Piggin
powerpc/64s does not use ioremap_page_range, so it does not get huge vmap iomap mappings automatically. The radix kernel mapping function already allows larger page mappings that work with huge vmap, so wire that up to allow huge pages to be used for ioremap mappings. Signed-off-by: Nicholas

[PATCH 1/2] powerpc/64s/radix: Enable HAVE_ARCH_HUGE_VMAP

2019-06-07 Thread Nicholas Piggin
This sets the HAVE_ARCH_HUGE_VMAP option, and defines the required page table functions. This will not enable huge iomaps, because powerpc/64 ioremap does not call ioremap_page_range. That is done in a later change. HAVE_ARCH_HUGE_VMAP facilities will be used to enable huge pages for vmalloc

Re: [PATCH 2/2] powerpc/64s/radix: ioremap use huge page mappings

2019-06-07 Thread Christophe Leroy
Le 07/06/2019 à 08:19, Nicholas Piggin a écrit : powerpc/64s does not use ioremap_page_range, so it does not get huge vmap iomap mappings automatically. The radix kernel mapping function already allows larger page mappings that work with huge vmap, so wire that up to allow huge pages to be

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-07 Thread Stephen Rothwell
Hi Anshuman, On Fri, 7 Jun 2019 16:04:15 +0530 Anshuman Khandual wrote: > > +static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs, > + unsigned int trap) > +{ > + int ret = 0; > + > + /* > + * To be potentially processing a

[RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-07 Thread Anshuman Khandual
Very similar definitions for notify_page_fault() are being used by multiple architectures duplicating much of the same code. This attempts to unify all of them into a generic implementation, rename it as kprobe_page_fault() and then move it to a common header. kprobes_built_in() can detect

[Bug 203839] Kernel 5.2-rc3 fails to boot on a PowerMac G4 3,6: systemd[1]: Failed to bump fs.file-max, ignoring: invalid argument

2019-06-07 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=203839 --- Comment #3 from Christophe Leroy (christophe.le...@c-s.fr) --- Could you try and revert the following commits ? 38b4564cf042 powerpc/32: don't do syscall stuff in transfer_to_handler 1a4b739bbb4f powerpc/32: implement fast entry for syscalls

Re: [PATCH v3 7/9] KVM: PPC: Ultravisor: Restrict LDBAR access

2019-06-07 Thread Claudio Carvalho
On 6/7/19 1:48 AM, Madhavan Srinivasan wrote: > > On 06/06/19 11:06 PM, Claudio Carvalho wrote: >> When the ultravisor firmware is available, it takes control over the >> LDBAR register. In this case, thread-imc updates and save/restore >> operations on the LDBAR register are handled by

Re: [Bug 203839] Kernel 5.2-rc3 fails to boot on a PowerMac G4 3,6: systemd[1]: Failed to bump fs.file-max, ignoring: invalid argument

2019-06-07 Thread Christophe Leroy
Could you try and revert the following commits ? 38b4564cf042 powerpc/32: don't do syscall stuff in transfer_to_handler 1a4b739bbb4f powerpc/32: implement fast entry for syscalls on BOOKE b86fb88855ea powerpc/32: implement fast entry for syscalls on non BOOKE Thanks Christophe On 06/07/2019

Re: [RFC/RFT PATCH] Revert "ASoC: fsl_esai: ETDR and TX0~5 registers are non volatile"

2019-06-07 Thread Mark Brown
On Thu, Jun 06, 2019 at 04:01:05PM -0700, Nicolin Chen wrote: > This reverts commit 8973112aa41b8ad956a5b47f2fe17bc2a5cf2645. Please use subject lines matching the style for the subsystem. This makes it easier for people to identify relevant patches. > 1) Though ETDR and TX0~5 are not volatile

Re: [PATCH] powerpc/pseries: fix oops in hotplug memory notifier

2019-06-07 Thread Michael Ellerman
Nathan Lynch writes: > During post-migration device tree updates, we can oops in > pseries_update_drconf_memory if the source device tree has an > ibm,dynamic-memory-v2 property and the destination has a > ibm,dynamic_memory (v1) property. The notifier processes an "update" > for the

Re: [PATCH] powerpc/pseries: fix oops in hotplug memory notifier

2019-06-07 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch writes: > >> During post-migration device tree updates, we can oops in >> pseries_update_drconf_memory if the source device tree has an >> ibm,dynamic-memory-v2 property and the destination has a >> ibm,dynamic_memory (v1) property. The notifier processes

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-07 Thread Christoph Hellwig
I don't think we should work around this in the driver, we need to fix it in the core. I'm curious why my previous patch didn't work. Can you throw in a few printks what failed? I.e. did dma_direct_supported return false? Did the actual allocation fail?

[RFC PATCH 1/1] powerpc/pseries/svm: Unshare all pages before kexecing a new kernel

2019-06-07 Thread Ram Pai
powerpc/pseries/svm: Unshare all pages before kexecing a new kernel. A new kernel deserves a clean slate. Any pages shared with the hypervisor is unshared before invoking the new kernel. However there are exceptions. If the new kernel is invoked to dump the current kernel, or if there is a

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-07 Thread Dave Hansen
On 6/7/19 3:34 AM, Anshuman Khandual wrote: > +static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs, > + unsigned int trap) > +{ > + int ret = 0; > + > + /* > + * To be potentially processing a kprobe fault and to be allowed > +

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-07 Thread Christophe Leroy
Le 07/06/2019 à 12:34, Anshuman Khandual a écrit : Very similar definitions for notify_page_fault() are being used by multiple architectures duplicating much of the same code. This attempts to unify all of them into a generic implementation, rename it as kprobe_page_fault() and then move it

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-07 Thread Larry Finger
On 6/5/19 5:50 PM, Aaro Koskinen wrote: Hi, When upgrading from v5.0 -> v5.1 on G4 PowerBook, I noticed WLAN does not work anymore: [ 42.004303] b43legacy-phy0: Loading firmware version 0x127, patch level 14 (2005-04-18 02:36:27) [ 42.184837] b43legacy-phy0 debug: Chip initialized [

[PATCH net 1/3] ibmvnic: Do not close unopened driver during reset

2019-06-07 Thread Thomas Falcon
Check driver state before halting it during a reset. If the driver is not running, do nothing. Otherwise, a request to deactivate a down link can cause an error and the reset will fail. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH net 2/3] ibmvnic: Refresh device multicast list after reset

2019-06-07 Thread Thomas Falcon
It was observed that multicast packets were no longer received after a device reset. The fix is to resend the current multicast list to the backing device after recovery. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH net 3/3] ibmvnic: Fix unchecked return codes of memory allocations

2019-06-07 Thread Thomas Falcon
The return values for these memory allocations are unchecked, which may cause an oops if the driver does not handle them after a failure. Fix by checking the function's return code. Signed-off-by: Thomas Falcon --- drivers/net/ethernet/ibm/ibmvnic.c | 13 +++-- 1 file changed, 7

[PATCH net 0/3] ibmvnic: Fixes for device reset handling

2019-06-07 Thread Thomas Falcon
This series contains three unrelated fixes to issues seen during device resets. The first patch fixes an error when the driver requests to deactivate the link of an uninitialized device, resulting in a failure to reset. Next, a patch to fix multicast transmission failures seen after a driver

[PATCH v3 06/20] docs: mark orphan documents as such

2019-06-07 Thread Mauro Carvalho Chehab
Sphinx doesn't like orphan documents: Documentation/accelerators/ocxl.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/overview.rst: WARNING: document isn't included in any toctree Documentation/arm/stm32/stm32f429-overview.rst: WARNING: document isn't

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-07 Thread Larry Finger
On 6/7/19 12:29 PM, Christoph Hellwig wrote: I don't think we should work around this in the driver, we need to fix it in the core. I'm curious why my previous patch didn't work. Can you throw in a few printks what failed? I.e. did dma_direct_supported return false? Did the actual allocation

[PATCH v3 15/20] docs: move protection-keys.rst to the core-api book

2019-06-07 Thread Mauro Carvalho Chehab
This document is used by multiple architectures: $ echo $(git grep -l pkey_mprotect arch|cut -d'/' -f 2|sort|uniq) alpha arm arm64 ia64 m68k microblaze mips parisc powerpc s390 sh sparc x86 xtensa So, let's move it to the core book and adjust the links to it accordingly.

Re: [RFC V3] mm: Generalize and rename notify_page_fault() as kprobe_page_fault()

2019-06-07 Thread Matthew Wilcox
Before: > @@ -46,23 +46,6 @@ kmmio_fault(struct pt_regs *regs, unsigned long addr) > return 0; > } > > -static nokprobe_inline int kprobes_fault(struct pt_regs *regs) > -{ > - if (!kprobes_built_in()) > - return 0; > - if (user_mode(regs)) > - return 0; >

Re: [PATCH v3 1/9] KVM: PPC: Ultravisor: Add PPC_UV config option

2019-06-07 Thread Leonardo Bras
On Thu, 2019-06-06 at 14:36 -0300, Claudio Carvalho wrote: > From: Anshuman Khandual > > CONFIG_PPC_UV adds support for ultravisor. > > Signed-off-by: Anshuman Khandual > Signed-off-by: Bharata B Rao > Signed-off-by: Ram Pai > [Update config help and commit message] > Signed-off-by:

Re: [PATCH] powerpc/pseries: fix oops in hotplug memory notifier

2019-06-07 Thread Tyrel Datwyler
On 06/06/2019 10:04 PM, Nathan Lynch wrote: > During post-migration device tree updates, we can oops in > pseries_update_drconf_memory if the source device tree has an > ibm,dynamic-memory-v2 property and the destination has a > ibm,dynamic_memory (v1) property. The notifier processes an "update"

[RFC/RFT PATCH v2] ASoC: fsl_esai: Revert "ETDR and TX0~5 registers are non volatile"

2019-06-07 Thread Nicolin Chen
Commit 8973112aa41b ("ASoC: fsl_esai: ETDR and TX0~5 registers are non volatile") removed TX data registers from the volatile_reg list and appended default values for them. However, being data registers of TX, they should not have been removed from the list because they should not be cached -- see

Re: [RFC/RFT PATCH] Revert "ASoC: fsl_esai: ETDR and TX0~5 registers are non volatile"

2019-06-07 Thread Nicolin Chen
Hello Mark, On Fri, Jun 07, 2019 at 12:12:44PM +0100, Mark Brown wrote: > On Thu, Jun 06, 2019 at 04:01:05PM -0700, Nicolin Chen wrote: > > This reverts commit 8973112aa41b8ad956a5b47f2fe17bc2a5cf2645. > > Please use subject lines matching the style for the subsystem. This > makes it easier for

Re: [PATCH] powerpc/pseries: fix oops in hotplug memory notifier

2019-06-07 Thread Nathan Lynch
Tyrel Datwyler writes: > On 06/06/2019 10:04 PM, Nathan Lynch wrote: >> During post-migration device tree updates, we can oops in >> pseries_update_drconf_memory if the source device tree has an >> ibm,dynamic-memory-v2 property and the destination has a >> ibm,dynamic_memory (v1) property. The

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-07 Thread Benjamin Herrenschmidt
> Please try the attached patch. I'm not really pleased with it and I will > continue to determine why the fallback to a 30-bit mask fails, but at least > this > one works for me. Your patch only makes sense if the device is indeed capable of addressing 31-bits. So either the driver is