[PATCH 3/6] powerpc/eeh: Do early EEH init only when required

2020-02-03 Thread Oliver O'Halloran
The pci hotplug helper (pci_hp_add_devices()) calls eeh_add_device_tree_early() to scan the device-tree for new PCI devices and do the early EEH probe before the device is scanned. This early probe is a no-op in a lot of cases because: a) The early init is only required to satisfy a PAPR

Re: [PATCH v5 6/6] powerpc/vdso: Switch VDSO to generic C implementation.

2020-02-03 Thread Arnd Bergmann
On Mon, Feb 3, 2020 at 12:28 PM kbuild test robot wrote: > > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot > > All errors (new ones prefixed by >>): > > >> arch/powerpc/kernel/vdso32/vgettimeofday.c:26:1: error: unknown type name > >> 'time_t'; did you mean

EEH init cleanup

2020-02-03 Thread Oliver O'Halloran
This series reworks how EEH devices are initialised. This mainly affects pseries since it moves the "early" EEH probe out of shared code and into pseries platform code. The goal here is to make the platform dependencies more explicit and to allow PowerNV to implement its own pci_dev <-> eeh_dev

[PATCH 4/6] powerpc/eeh: Remove PHB check in probe

2020-02-03 Thread Oliver O'Halloran
This check for a missing PHB has existing in various forms since the initial PPC64 port was upstreamed in 2002. The idea seems to be that we need to guard against creating pci-specific data structures for the non-pci children of a PCI device tree node (e.g. USB devices). However, we only create

[PATCH 2/6] powerpc/eeh: Remove eeh_add_device_tree_late()

2020-02-03 Thread Oliver O'Halloran
On pseries and PowerNV pcibios_bus_add_device() calls eeh_add_device_late() so there's no need to do a separate tree traversal to bind the eeh_dev and pci_dev together setting up the PHB at boot. As a result we can remove eeh_add_device_tree_late(). Signed-off-by: Oliver O'Halloran ---

Re: [PATCH v5 6/6] powerpc/vdso: Switch VDSO to generic C implementation.

2020-02-03 Thread kbuild test robot
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20200130] [cannot apply to powerpc/next tip/timers/vdso mpe/next v5.5 v5.5-rc7 v5.5-rc6 v5.5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW,

Re: [linuxppc-dev] Patch notification: 1 patch updated

2020-02-03 Thread Segher Boessenkool
On Mon, Feb 03, 2020 at 07:21:52AM +0100, Christophe Leroy wrote: > Le 03/02/2020 à 02:00, Patchwork a écrit : > >The following patch (submitted by you) has been updated in Patchwork: > > > > * linuxppc-dev: powerpc/nohash: Don't flush all TLBs when flushing one > > page > > -

[PATCH 1/6] powerpc/eeh: Add sysfs files in late probe

2020-02-03 Thread Oliver O'Halloran
Move creating the EEH specific sysfs files into eeh_add_device_late() rather than being open-coded all over the place. Calling the function is generally done immediately after calling eeh_add_device_late() anyway. The two cases where it's not done there (OF based PCI probing and the pseries VFs)

[PATCH 6/6] powerpc/eeh: Rework eeh_ops->probe()

2020-02-03 Thread Oliver O'Halloran
With the EEH early probe now being pseries specific there's no need for eeh_ops->probe() to take a pci_dn. Instead, we can make it take a pci_dev and use the probe function to map a pci_dev to an eeh_dev. This allows the platform to implement it's own method for finding (or creating) an eeh_dev

Re: [PATCH v2 12/27] nvdimm/ocxl: Read the capability registers & wait for device ready

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:40 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > This patch reads timeouts & firmware version from the controller, and > uses those timeouts to wait for the controller to report that it is ready > before handing the memory over to libnvdimm. > >

Re: [PATCH 3/5] libnvdimm/namespace: Enforce memremap_compat_align()

2020-02-03 Thread Aneesh Kumar K.V
Dan Williams writes: > The pmem driver on PowerPC crashes with the following signature when > instantiating misaligned namespaces that map their capacity via > memremap_pages(). > > BUG: Unable to handle kernel data access at 0xc00100040600 > Faulting instruction address:

Re: [PATCH 4/5] libnvdimm/region: Introduce NDD_LABELING

2020-02-03 Thread Aneesh Kumar K.V
Dan Williams writes: > The NDD_ALIASING flag is used to indicate where pmem capacity might > alias with blk capacity and require labeling. It is also used to > indicate whether the DIMM supports labeling. Separate this latter > capability into its own flag so that the NDD_ALIASING flag is scoped

[PATCH 2/2] ARM: add multi_v7_lpae_defconfig

2020-02-03 Thread Nicolas Saenz Julienne
The only missing configuration option preventing us from using multi_v7_defconfig with the Raspberry Pi 4 is ARM_LPAE. It's needed as the PCIe controller found on the SoC depends on 64bit addressing, yet can't be included as not all v7 boards support LPAE. Introduce multi_v7_lpae_defconfig, built

[PATCH 0/2] ARM: Introduce multi_v7_lpae_defconfig

2020-02-03 Thread Nicolas Saenz Julienne
This series introduces a new configuration target, multi_v7_lpae_defconfig, built by merging the config fragment lpae.config with mult_v7_defconfig. Ultimately needed in order for Raspberry Pi 4's PCIe bus to work on arm builds, but which may benefit other boards out there. --- Changes since

[PATCH] powerpc/32s: Slenderize _tlbia() for powerpc 603/603e

2020-02-03 Thread Christophe Leroy
_tlbia() is a function used only on 603/603e core, ie on CPUs which don't have a hash table. _tlbia() uses the tlbia macro which implements a loop of 1024 tlbie. On the 603/603e core, flushing the entire TLB requires no more than 32 tlbie. Replace tlbia by a loop of 32 tlbie. Signed-off-by:

Re: [PATCH 1/5] mm/memremap_pages: Kill unused __devm_memremap_pages()

2020-02-03 Thread Aneesh Kumar K.V
Dan Williams writes: > Kill this definition that was introduced in commit 41e94a851304 ("add > devm_memremap_pages") add never used. > Reviewed-by: Aneesh Kumar K.V > Cc: Christoph Hellwig > Signed-off-by: Dan Williams > --- > include/linux/io.h |2 -- > 1 file changed, 2 deletions(-)

[PATCH 1/2] kbuild: Add config fragment merge functionality

2020-02-03 Thread Nicolas Saenz Julienne
So far this function was only used locally in powerpc, some other architectures might benefit from it. Move it into scripts/Makefile.defconf. Signed-off-by: Nicolas Saenz Julienne --- arch/powerpc/Makefile| 12 +--- scripts/Makefile.defconf | 15 +++ 2 files changed, 16

Re: [PATCH 2/5] mm/memremap_pages: Introduce memremap_compat_align()

2020-02-03 Thread Aneesh Kumar K.V
Dan Williams writes: > The "sub-section memory hotplug" facility allows memremap_pages() users > like libnvdimm to compensate for hardware platforms like x86 that have a > section size larger than their hardware memory mapping granularity. The > compensation that sub-section support affords is

Re: [PATCH 5/5] libnvdimm/region: Introduce an 'align' attribute

2020-02-03 Thread Aneesh Kumar K.V
Dan Williams writes: > The align attribute applies an alignment constraint for namespace > creation in a region. Whereas the 'align' attribute of a namespace > applied alignment padding via an info block, the 'align' attribute > applies alignment constraints to the free space allocation. > > The

Re: [PATCH] powerpc/32s: Slenderize _tlbia() for powerpc 603/603e

2020-02-03 Thread Christophe Leroy
Le 03/02/2020 à 17:57, Joakim Tjernlund a écrit : On Mon, 2020-02-03 at 16:47 +, Christophe Leroy wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. _tlbia() is a

Re: [PATCH] powerpc/32s: Slenderize _tlbia() for powerpc 603/603e

2020-02-03 Thread Joakim Tjernlund
On Mon, 2020-02-03 at 16:47 +, Christophe Leroy wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > _tlbia() is a function used only on 603/603e core, ie on

Re: [PATCH v2 13/27] nvdimm/ocxl: Add support for Admin commands

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:41 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > This patch requests the metadata required to issue admin commands, as well > as some helper functions to construct and check the completion of the > commands. > > Signed-off-by: Alastair D'Silva A few

Re: [PATCH v2 24/27] nvdimm/ocxl: Implement Overwrite

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:52 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > The near storage command 'Secure Erase' overwrites all data on the > media. > > This patch hooks it up to the security function 'overwrite'. > > Signed-off-by: Alastair D'Silva A few things to tidy up in

Re: [PATCH v2 10/27] nvdimm: Add driver for OpenCAPI Storage Class Memory

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:38 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > This driver exposes LPC memory on OpenCAPI SCM cards > as an NVDIMM, allowing the existing nvram infrastructure > to be used. > > Namespace metadata is stored on the media itself, so >

[PATCH 5/6] powerpc/eeh: Make early EEH init pseries specific

2020-02-03 Thread Oliver O'Halloran
The eeh_ops->probe() function is called from two different contexts: 1. On pseries, where set set EEH_PROBE_MODE_DEVTREE, it's called in eeh_add_device_early() which is supposed to run before we create a pci_dev. 2. On PowerNV, where we set EEH_PROBE_MODE_DEV, it's called in

Re: [PATCH v2 07/27] ocxl: Add functions to map/unmap LPC memory

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:35 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > Add functions to map/unmap LPC memory > > Signed-off-by: Alastair D'Silva > --- > drivers/misc/ocxl/config.c| 4 +++ > drivers/misc/ocxl/core.c | 50 +++ >

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-03 Thread Christophe Leroy
Le 02/02/2020 à 12:26, Qian Cai a écrit : On Jan 30, 2020, at 9:13 AM, Christophe Leroy wrote: config DEBUG_VM_PGTABLE bool "Debug arch page table for semantics compliance" if ARCH_HAS_DEBUG_VM_PGTABLE || EXPERT depends on MMU default 'n' if !ARCH_HAS_DEBUG_VM_PGTABLE

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-02-03 Thread Qian Cai
On Mon, 2020-02-03 at 16:14 +0100, Christophe Leroy wrote: > > Le 02/02/2020 à 12:26, Qian Cai a écrit : > > > > > > > On Jan 30, 2020, at 9:13 AM, Christophe Leroy > > > wrote: > > > > > > config DEBUG_VM_PGTABLE > > > bool "Debug arch page table for semantics compliance" if > > >

Re: [PATCH v2 06/27] ocxl: Tally up the LPC memory on a link & allow it to be mapped

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:34 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > Tally up the LPC memory on an OpenCAPI link & allow it to be mapped > > Signed-off-by: Alastair D'Silva Hi Alastair, A few trivial comments inline. Jonathan > --- > drivers/misc/ocxl/core.c |

Re: [PATCH v2 14/27] nvdimm/ocxl: Add support for near storage commands

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:42 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > Similar to the previous patch, this adds support for near storage commands. > > Signed-off-by: Alastair D'Silva > --- > drivers/nvdimm/ocxl/scm.c | 6 + > drivers/nvdimm/ocxl/scm_internal.c

Re: [PATCH v2 08/27] ocxl: Save the device serial number in ocxl_fn

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:36 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > This patch retrieves the serial number of the card and makes it available > to consumers of the ocxl driver via the ocxl_fn struct. > > Signed-off-by: Alastair D'Silva > Acked-by: Frederic Barrat >

[PATCH v2 2/3] selftests/powerpc: Add tm-signal-pagefault test

2020-02-03 Thread Gustavo Luiz Duarte
This test triggers a TM Bad Thing by raising a signal in transactional state and forcing a pagefault to happen in kernelspace when the kernel signal handling code first touches the user signal stack. This is inspired by the test tm-signal-context-force-tm but uses userfaultfd to make the test

[PATCH v2 3/3] selftests/powerpc: Don't rely on segfault to rerun the test

2020-02-03 Thread Gustavo Luiz Duarte
The test case tm-signal-context-force-tm expects a segfault to happen on returning from signal handler, and then does a setcontext() to run the test again. However, the test doesn't always segfault, causing the test to run a single time. This patch fixes the test by putting it within a loop and

Re: [PATCH v2 22/27] nvdimm/ocxl: Implement the heartbeat command

2020-02-03 Thread Jonathan Cameron
On Tue, 3 Dec 2019 14:46:50 +1100 Alastair D'Silva wrote: > From: Alastair D'Silva > > The heartbeat admin command is a simple admin command that exercises > the communication mechanisms within the controller. > > This patch issues a heartbeat command to the card during init to ensure > we

[PATCH v2 1/3] powerpc/tm: Clear the current thread's MSR[TS] after treclaim

2020-02-03 Thread Gustavo Luiz Duarte
After a treclaim, we expect to be in non-transactional state. If we don't immediately clear the current thread's MSR[TS] and we get preempted, then tm_recheckpoint_new_task() will recheckpoint and we get rescheduled in suspended transaction state. When handling a signal caught in transactional

Re: [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup

2020-02-03 Thread Scott Cheloha
On Thu, Jan 30, 2020 at 10:09:32AM -0600, Fontenot, Nathan wrote: > On 1/29/2020 12:10 PM, Scott Cheloha wrote: > > On Tue, Jan 28, 2020 at 05:56:55PM -0600, Nathan Lynch wrote: > >> Scott Cheloha writes: > >>> LMB lookup is currently an O(n) linear search. This scales poorly when > >>> there

Re: Latest Git kernel: avahi-daemon[2410]: ioctl(): Inappropriate ioctl for device

2020-02-03 Thread Jakub Kicinski
On Sun, 2 Feb 2020 16:02:18 +0100, Christian Zigotzky wrote: > On 02 February 2020 at 09:19 am, Christophe Leroy wrote: > > Hello, > > > > Le 02/02/2020 à 01:08, Christian Zigotzky a écrit : > >> Hello, > >> > >> We regularly compile and test Linux kernels every day during the > >> merge

Re: [PATCH v6 00/10] mm/memory_hotplug: Shrink zones before removing memory

2020-02-03 Thread Andrew Morton
On Fri, 31 Jan 2020 10:18:34 +0100 David Hildenbrand wrote: > On 31.01.20 05:40, Andrew Morton wrote: > > On Tue, 3 Dec 2019 14:36:38 +0100 Oscar Salvador wrote: > > > >> On Mon, Dec 02, 2019 at 10:09:51AM +0100, David Hildenbrand wrote: > >>> @Michal, @Oscar, can some of you at least have a

[powerpc:next-test] BUILD SUCCESS 4c25df5640ae6e4491ee2c50d3f70c1559ef037d

2020-02-03 Thread kbuild test robot
randconfig-a003-20200202 i386 randconfig-a001-20200202 i386 randconfig-a002-20200202 i386 randconfig-a003-20200202 x86_64 randconfig-a001-20200203 x86_64 randconfig-a002-20200203 i386

[PATCH 1/4] uaccess: Add user_read_access_begin/end and user_write_access_begin/end

2020-02-03 Thread Christophe Leroy
Some architectures like powerpc64 have the capability to separate read access and write access protection. For get_user() and copy_from_user(), powerpc64 only open read access. For put_user() and copy_to_user(), powerpc64 only open write access. But when using unsafe_get_user() or

[PATCH 2/4] uaccess: Selectively open read or write user access

2020-02-03 Thread Christophe Leroy
When opening user access to only perform reads, only open read access. When opening user access to only perform writes, only open write access. Signed-off-by: Christophe Leroy --- fs/readdir.c| 12 ++-- kernel/compat.c | 12 ++-- kernel/exit.c | 12

Re: [PATCH 2/3] powerpc/sysfs: Show idle_purr and idle_spurr for every CPU

2020-02-03 Thread Naveen N. Rao
Gautham R Shenoy wrote: Hi Naveen, On Thu, Dec 05, 2019 at 10:23:58PM +0530, Naveen N. Rao wrote: >diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c >index 80a676d..42ade55 100644 >--- a/arch/powerpc/kernel/sysfs.c >+++ b/arch/powerpc/kernel/sysfs.c >@@ -1044,6 +1044,36 @@

[PATCH 3/4] drm/i915/gem: Replace user_access_begin by user_write_access_begin

2020-02-03 Thread Christophe Leroy
When i915_gem_execbuffer2_ioctl() is using user_access_begin(), that's only to perform unsafe_put_user() so use user_write_access_begin() in order to only open write access. Signed-off-by: Christophe Leroy --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 11 ++- 1 file changed, 6

[PATCH 4/4] powerpc/uaccess: Implement user_read_access_begin and user_write_access_begin

2020-02-03 Thread Christophe Leroy
Add support for selective read or write user access with user_read_access_begin/end and user_write_access_begin/end. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/kup.h | 4 ++-- arch/powerpc/include/asm/kup.h | 14 +-