Re: [PATCH v4 01/18] of: overlay: add tests to validate kfrees from overlay removal

2018-10-18 Thread Rob Herring
On Mon, Oct 15, 2018 at 07:37:21PM -0700, frowand.l...@gmail.com wrote: > From: Frank Rowand > > Add checks: > - attempted kfree due to refcount reaching zero before overlay > is removed > - properties linked to an overlay node when the node is removed > - node refcount > one during

Re: [PATCH kernel 3/3] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] [10de:1db1] subdriver

2018-10-18 Thread Alex Williamson
On Thu, 18 Oct 2018 11:31:33 +1100 Alexey Kardashevskiy wrote: > On 18/10/2018 08:52, Alex Williamson wrote: > > On Wed, 17 Oct 2018 12:19:20 +1100 > > Alexey Kardashevskiy wrote: > > > >> On 17/10/2018 06:08, Alex Williamson wrote: > >>> On Mon, 15 Oct 2018 20:42:33 +1100 > >>> Alexey

Re: [PATCH v4 04/18] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2018-10-18 Thread Rob Herring
On Mon, Oct 15, 2018 at 07:37:24PM -0700, frowand.l...@gmail.com wrote: > From: Frank Rowand > > "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" > added a missing of_node_get() to __of_attach_node_sysfs(). This > results in a refcount imbalance for nodes attached with >

Re: [PATCH kernel 3/3] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] [10de:1db1] subdriver

2018-10-18 Thread Piotr Jaroszynski
On 10/18/18 9:55 AM, Alex Williamson wrote: On Thu, 18 Oct 2018 11:31:33 +1100 Alexey Kardashevskiy wrote: On 18/10/2018 08:52, Alex Williamson wrote: On Wed, 17 Oct 2018 12:19:20 +1100 Alexey Kardashevskiy wrote: On 17/10/2018 06:08, Alex Williamson wrote: On Mon, 15 Oct 2018

[PATCH] powerpc/8xx: Add DT node for using the SEC engine of the MPC885

2018-10-18 Thread Christophe Leroy
The MPC885 has SEC engine version 1.2 with the following details: - Number of Crypto channels: 1 - Exec Units: DEU, MDEU and AESU - Available descriptors: 00010, 00100, 00110, 01000, 11000, 11010 It is also supposed to have descriptor 0, but it doesn't work properly so we keep it out for the

Re: [PATCH v4 02/18] of: overlay: add missing of_node_put() after add new node to changeset

2018-10-18 Thread Rob Herring
On Mon, Oct 15, 2018 at 07:37:22PM -0700, frowand.l...@gmail.com wrote: > From: Frank Rowand > > The refcount of a newly added overlay node decrements to one > (instead of zero) when the overlay changeset is destroyed. This > change will cause the final decrement be to zero. > > After applying

Re: [PATCH v4 02/18] of: overlay: add missing of_node_put() after add new node to changeset

2018-10-18 Thread Frank Rowand
On 10/18/18 10:05, Rob Herring wrote: > On Mon, Oct 15, 2018 at 07:37:22PM -0700, frowand.l...@gmail.com wrote: >> From: Frank Rowand >> >> The refcount of a newly added overlay node decrements to one >> (instead of zero) when the overlay changeset is destroyed. This >> change will cause the

Regression: compile error on mpc83xx

2018-10-18 Thread Radu Rendec
Hi everyone, I'm getting the following compile error for mpc83xx in v4.9.115: arch/powerpc/sysdev/built-in.o: In function `fsl_of_msi_probe': fsl_msi.c:(.text+0x1548): undefined reference to `fsl_mpic_primary_get_version' This seems to have been fixed in v3.12-rc1 by commit df1024ad8728. Then,

Re: [PATCH kernel v2] powerpc/ioda/npu: Call skiboot's hot reset hook when disabling NPU2

2018-10-18 Thread Alistair Popple
> >>> wouldn't you also need to do that somewhere? Unless the driver > >>> does it at startup? > >> > >> VFIO performs GPU reset so I'd expect the GPUs to flush its caches > >> without any software interactions. Am I hoping for too much here? > > > > Sadly you are. It's not the GPU caches that

Re: macintosh/windfarm_smu_sat: Fix debug output

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 00:18:49 UTC, Benjamin Herrenschmidt wrote: > There's some antiquated debug output that's trying > to do a hand-made hexdump and turning into horrible > 1-byte-per-line output these days. > > Use print_hex_dump() instead > > Signed-off-by: Benjamin Herrenschmidt Applied

Re: [v3,1/2] powerpc/pseries: PAPR persistent memory support

2018-10-18 Thread Michael Ellerman
On Sun, 2018-10-14 at 23:18:27 UTC, Oliver O'Halloran wrote: > This patch implements support for discovering storage class memory > devices at boot and for handling hotplug of new regions via RTAS > hotplug events. > > Signed-off-by: Oliver O'Halloran Series applied to powerpc next, thanks.

Re: [08/12] powerpc/prom_init: Move const structures to __initconst

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 02:49:56 UTC, Benjamin Herrenschmidt wrote: > As they are no longer used past the end of prom_init > > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/d00e34b92cd7d8f1c10c2f0a8c1036 cheers

Re: [07/12] powerpc/prom_init: Move ibm_arch_vec to __prombss

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 02:49:55 UTC, Benjamin Herrenschmidt wrote: > Make the existing initialized definition constant and copy > it to a __prombss copy > > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/a614f52e75bd69b513707b4adc6721

Re: powerpc/traps: remove redundant in_interrupt panic in die()

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 07:38:10 UTC, Christophe Leroy wrote: > do_exit() already includes a test to panic() is in_interrupt() > > This patch removes powerpc one which is redundant. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks.

Re: [PATCH kernel 3/3] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] [10de:1db1] subdriver

2018-10-18 Thread Alexey Kardashevskiy
On 19/10/2018 05:05, Alex Williamson wrote: > On Thu, 18 Oct 2018 10:37:46 -0700 > Piotr Jaroszynski wrote: > >> On 10/18/18 9:55 AM, Alex Williamson wrote: >>> On Thu, 18 Oct 2018 11:31:33 +1100 >>> Alexey Kardashevskiy wrote: >>> On 18/10/2018 08:52, Alex Williamson wrote: >

Re: [2/4] powerpc: Add -Werror at arch/powerpc level

2018-10-18 Thread Michael Ellerman
On Wed, 2018-10-10 at 05:13:06 UTC, Michael Ellerman wrote: > Back when I added -Werror in commit ba55bd74360e ("powerpc: Add > configurable -Werror for arch/powerpc") I did it by adding it to most > of the arch Makefiles. > > At the time we excluded math-emu, because apparently it didn't build >

Re: [04/12] powerpc/prom_init: Replace __initdata with __prombss when applicable

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 02:49:52 UTC, Benjamin Herrenschmidt wrote: > This replaces all occurrences of __initdata for uninitialized > data with a new __prombss > > Currently __promdata is defined to be __initdata but we'll > eventually change that. > > Signed-off-by: Benjamin Herrenschmidt

Re: [06/12] powerpc/prom_init: Move prom_radix_disable to __prombss

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 02:49:54 UTC, Benjamin Herrenschmidt wrote: > Initialize it dynamically instead of statically > > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/c886087caee759790db47f345f8382 cheers

Re: [10/12] powerpc/prom_init: Move __prombss to it's own section and store it in .bss

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 02:49:58 UTC, Benjamin Herrenschmidt wrote: > This makes __prombss its own section, and for now store > it in .bss. > > This will give us the ability later to store it elsewhere > and/or free it after boot (it's about 8KB). > > Signed-off-by: Benjamin Herrenschmidt

Re: [11/12] powerpc: Check prom_init for disallowed sections

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 02:49:59 UTC, Benjamin Herrenschmidt wrote: > prom_init.c must not modify the kernel image outside > of the .bss.prominit section. Thus make sure that > prom_init.o doesn't have anything in any of these: > > .data > .bss > .init.data > > Signed-off-by:

Re: powerpc/book3e: redefine pte_mkprivileged() and pte_mkuser()

2018-10-18 Thread Michael Ellerman
On Wed, 2018-10-17 at 13:03:22 UTC, Christophe Leroy wrote: > Book3e defines both _PAGE_USER and _PAGE_PRIVILEGED, so the nohash > default pte_mkprivileged() and pte_mkuser() are not usable. > > This patch redefines them for book3e. > > In theorie, only pte_mkprivileged() needs to be redefined

Re: [PATCH kernel v2] powerpc/ioda/npu: Call skiboot's hot reset hook when disabling NPU2

2018-10-18 Thread Alexey Kardashevskiy
On 18/10/2018 12:05, Alistair Popple wrote: > Hi Alexey, > >>> wouldn't you also need to do that somewhere? Unless the driver >>> does it at startup? >> >> VFIO performs GPU reset so I'd expect the GPUs to flush its caches >> without any software interactions. Am I hoping for too much here? >

Re: [1/4] powerpc: Move core kernel logic into arch/powerpc/Kbuild

2018-10-18 Thread Michael Ellerman
On Wed, 2018-10-10 at 05:13:05 UTC, Michael Ellerman wrote: > This is a nice cleanup, arch/powerpc/Makefile is long and messy so > moving this out helps a little. > > It also allows us to do: > > $ make arch/powerpc > > Which can be helpful if you just want to compile test some changes to >

Re: [05/12] powerpc/prom_init: Remove support for OPAL v2

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 02:49:53 UTC, Benjamin Herrenschmidt wrote: > We removed support for running under any OPAL version > earlier than v3 in 2015 (they never saw the light of day > anyway), but we kept some leftovers of this support in > prom_init.c, so let's take it out. > > Signed-off-by:

Re: [09/12] powerpc/prom_init: Move a few remaining statics to appropriate sections

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 02:49:57 UTC, Benjamin Herrenschmidt wrote: > Signed-off-by: Benjamin Herrenschmidt Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/8ca2d5151e7f5cbef42eda780eac56 cheers

Re: [12/12] powerpc/prom_init: Generate "phandle" instead of "linux, phandle"

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 02:50:00 UTC, Benjamin Herrenschmidt wrote: > When creating the boot-time FDT from an actual Open Firmware live > tree, let's generate "phandle" properties for the phandles instead > of the old deprecated "linux,phandle". > > Signed-off-by: Benjamin Herrenschmidt Applied

Re: powerpc/traps: fix machine check handlers to use pr_cont()

2018-10-18 Thread Michael Ellerman
On Mon, 2018-10-15 at 07:20:45 UTC, Christophe Leroy wrote: > When printing the machine check cause, the cause appears on the > following line due to bad use of printk without \n: > > [ 33.663993] Machine check in kernel mode. > [ 33.664011] Caused by (from SRR1=9032): > [ 33.664036] Data

Re: powerpc/io: remove old GCC version implementation

2018-10-18 Thread Michael Ellerman
On Tue, 2018-10-16 at 12:33:40 UTC, Christophe Leroy wrote: > GCC 4.6 is the minimum supported now. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/a0e102914aa3f619a5bc68a0d33e17 cheers

Re: powerpc/mm: Make pte_pgprot return all pte bits

2018-10-18 Thread Michael Ellerman
On Thu, 2018-10-18 at 13:33:16 UTC, Michael Ellerman wrote: > From: "Aneesh Kumar K.V" > > Other archs do the same and instead of adding required pte bits (which > got masked out) in __ioremap_at(), make sure we filter only pfn bits > out. > > Fixes: 26973fa5ac0e ("powerpc/mm: use pte helpers

[PATCH] selftests/powerpc: Fix out-of-tree build errors

2018-10-18 Thread Michael Ellerman
Some of our Makefiles don't do the right thing when building the selftests with O=, fix them up. Signed-off-by: Michael Ellerman --- tools/testing/selftests/powerpc/cache_shape/Makefile | 2 -- tools/testing/selftests/powerpc/ptrace/Makefile| 2 --

[PATCH 1/6] powerpc/mm/radix: Fix off-by-one in split mapping logic

2018-10-18 Thread Michael Ellerman
When we have CONFIG_STRICT_KERNEL_RWX enabled, we try to split the kernel linear (1:1) mapping so that the kernel text is in a separate page to kernel data, so we can mark the former read-only. We could achieve that just by always using 64K pages for the linear mapping, but we try to be smarter.

[PATCH v5 03/18] of: overlay: add missing of_node_get() in __of_attach_node_sysfs

2018-10-18 Thread frowand . list
From: Frank Rowand There is a matching of_node_put() in __of_detach_node_sysfs() Remove misleading comment from function header comment for of_detach_node(). This patch may result in memory leaks from code that directly calls the dynamic node add and delete functions directly instead of using

[PATCH v5 02/18] of: overlay: add missing of_node_put() after add new node to changeset

2018-10-18 Thread frowand . list
From: Frank Rowand The refcount of a newly added overlay node decrements to one (instead of zero) when the overlay changeset is destroyed. This change will cause the final decrement be to zero. After applying this patch, new validation warnings will be reported from the devicetree unittest

[PATCH v5 06/18] of: overlay: do not duplicate properties from overlay for new nodes

2018-10-18 Thread frowand . list
From: Frank Rowand When allocating a new node, add_changeset_node() was duplicating the properties from the respective node in the overlay instead of allocating a node with no properties. When this patch is applied the errors reported by the devictree unittest from patch "of: overlay: add tests

[PATCH v5 10/18] of: overlay: make all pr_debug() and pr_err() messages unique

2018-10-18 Thread frowand . list
From: Frank Rowand Make overlay.c debug and error messages unique so that they can be unambiguously found by grep. Signed-off-by: Frank Rowand --- drivers/of/overlay.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c

[PATCH v5 05/18] of: overlay: use prop add changeset entry for property in new nodes

2018-10-18 Thread frowand . list
From: Frank Rowand The changeset entry 'update property' was used for new properties in an overlay instead of 'add property'. The decision of whether to use 'update property' was based on whether the property already exists in the subtree where the node is being spliced into. At the top level

[PATCH v5 17/18] of: unittest: find overlays[] entry by name instead of index

2018-10-18 Thread frowand . list
From: Frank Rowand One accessor of overlays[] was using a hard coded index value to find the correct array entry instead of searching for the entry containing the correct name. Signed-off-by: Frank Rowand --- drivers/of/unittest.c | 21 + 1 file changed, 17 insertions(+),

[PATCH v5 01/18] of: overlay: add tests to validate kfrees from overlay removal

2018-10-18 Thread frowand . list
From: Frank Rowand Add checks: - attempted kfree due to refcount reaching zero before overlay is removed - properties linked to an overlay node when the node is removed - node refcount > one during node removal in a changeset destroy, if the node was created by the changeset After

[PATCH v5 00/18] of: overlay: validation checks, subsequent fixes

2018-10-18 Thread frowand . list
From: Frank Rowand Add checks to (1) overlay apply process and (2) memory freeing triggered by overlay release. The checks are intended to detect possible memory leaks and invalid overlays. The checks revealed bugs in existing code. Fixed the bugs. While fixing bugs, noted other issues,

[PATCH v5 07/18] of: dynamic: change type of of_{at, de}tach_node() to void

2018-10-18 Thread frowand . list
From: Frank Rowand of_attach_node() and of_detach_node() always return zero, so their return value is meaningless. Change their type to void and fix all callers to ignore return value. Signed-off-by: Frank Rowand --- arch/powerpc/platforms/pseries/dlpar.c| 13 ++---

[PATCH v5 11/18] of: overlay: test case of two fragments adding same node

2018-10-18 Thread frowand . list
From: Frank Rowand Multiple overlay fragments adding or deleting the same node is not supported. An attempt to do so results in an incorrect devicetree. The node name will be munged for the second add. After adding this patch, the unittest messages will show: Duplicate name in motor-1,

[PATCH v5 13/18] of: overlay: check prevents multiple fragments touching same property

2018-10-18 Thread frowand . list
From: Frank Rowand Add test case of two fragments updating the same property. After adding the test case, the system hangs at end of boot, after after slub stack dumps from kfree() in crypto modprobe code. Multiple overlay fragments adding, modifying, or deleting the same property is not

[PATCH v5 16/18] of: unittest: allow base devicetree to have symbol metadata

2018-10-18 Thread frowand . list
From: Frank Rowand The overlay metadata nodes in the FDT created from testcases.dts are not handled properly. The __fixups__ and __local_fixups__ node were added to the live devicetree, but should not be. Only the first property in the /__symbols__ node was added to the live devicetree if the

[PATCH v5 09/18] of: overlay: validate overlay properties #address-cells and #size-cells

2018-10-18 Thread frowand . list
From: Frank Rowand If overlay properties #address-cells or #size-cells are already in the live devicetree for any given node, then the values in the overlay must match the values in the live tree. If the properties are already in the live tree then there is no need to create a changeset entry

[PATCH v5 12/18] of: overlay: check prevents multiple fragments add or delete same node

2018-10-18 Thread frowand . list
From: Frank Rowand Multiple overlay fragments adding or deleting the same node is not supported. Replace code comment of such, with check to detect the attempt and fail the overlay apply. Devicetree unittest where multiple fragments added the same node was added in the previous patch in the

[PATCH v5 15/18] of: overlay: set node fields from properties when add new overlay node

2018-10-18 Thread frowand . list
From: Frank Rowand Overlay nodes added by add_changeset_node() do not have the node fields name, phandle, and type set. The node passed to __of_attach_node() when the add node changeset entry is processed does not contain any properties. The node's properties are located in add property

[PATCH v5 04/18] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2018-10-18 Thread frowand . list
From: Frank Rowand "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" added a missing of_node_get() to __of_attach_node_sysfs(). This results in a refcount imbalance for nodes attached with dlpar_attach_node(). The calling sequence from dlpar_attach_node() to

[PATCH v5 08/18] of: overlay: reorder fields in struct fragment

2018-10-18 Thread frowand . list
From: Frank Rowand Order the fields of struct fragment in the same order as struct of_overlay_notify_data. The order in struct fragment is not significant. If both structs are ordered the same then when examining the data in a debugger or dump the human involved does not have to remember which

[PATCH v5 14/18] of: unittest: remove unused of_unittest_apply_overlay() argument

2018-10-18 Thread frowand . list
From: Frank Rowand Argument unittest_nr is not used in of_unittest_apply_overlay(), remove it. Signed-off-by: Frank Rowand --- drivers/of/unittest.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index

[PATCH v5 18/18] of: unittest: initialize args before calling of_*parse_*()

2018-10-18 Thread frowand . list
From: Frank Rowand Callers of of_irq_parse_one() blindly use the pointer args.np without checking whether of_irq_parse_one() had an error and thus did not set the value of args.np. Initialize args to zero so that using the format "%pOF" to show the value of args.np will show "(null)" when

Re: [PATCH] powerpc/uaccess: fix warning/error with access_ok()

2018-10-18 Thread kbuild test robot
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v4.19-rc8 next-20181018] [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

Re: [PATCH kernel 3/3] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] [10de:1db1] subdriver

2018-10-18 Thread Piotr Jaroszynski
On 10/18/18 11:05 AM, Alex Williamson wrote: On Thu, 18 Oct 2018 10:37:46 -0700 Piotr Jaroszynski wrote: On 10/18/18 9:55 AM, Alex Williamson wrote: On Thu, 18 Oct 2018 11:31:33 +1100 Alexey Kardashevskiy wrote: On 18/10/2018 08:52, Alex Williamson wrote: On Wed, 17 Oct 2018 12:19:20

Re: [PATCH kernel 3/3] vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] [10de:1db1] subdriver

2018-10-18 Thread Alex Williamson
On Thu, 18 Oct 2018 10:37:46 -0700 Piotr Jaroszynski wrote: > On 10/18/18 9:55 AM, Alex Williamson wrote: > > On Thu, 18 Oct 2018 11:31:33 +1100 > > Alexey Kardashevskiy wrote: > > > >> On 18/10/2018 08:52, Alex Williamson wrote: > >>> On Wed, 17 Oct 2018 12:19:20 +1100 > >>> Alexey

Re: [PATCH v4 01/18] of: overlay: add tests to validate kfrees from overlay removal

2018-10-18 Thread Frank Rowand
On 10/18/18 10:03, Rob Herring wrote: > On Mon, Oct 15, 2018 at 07:37:21PM -0700, frowand.l...@gmail.com wrote: >> From: Frank Rowand >> >> Add checks: >> - attempted kfree due to refcount reaching zero before overlay >> is removed >> - properties linked to an overlay node when the node

Re: [PATCH v4 04/18] powerpc/pseries: add of_node_put() in dlpar_detach_node()

2018-10-18 Thread Frank Rowand
On 10/18/18 10:09, Rob Herring wrote: > On Mon, Oct 15, 2018 at 07:37:24PM -0700, frowand.l...@gmail.com wrote: >> From: Frank Rowand >> >> "of: overlay: add missing of_node_get() in __of_attach_node_sysfs" >> added a missing of_node_get() to __of_attach_node_sysfs(). This >> results in a

Re: [PATCH v4 09/18] of: overlay: validate overlay properties #address-cells and #size-cells

2018-10-18 Thread Frank Rowand
On 10/18/18 11:13, Rob Herring wrote: > On Mon, Oct 15, 2018 at 07:37:29PM -0700, frowand.l...@gmail.com wrote: >> From: Frank Rowand >> >> If overlay properties #address-cells or #size-cells are already in >> the live devicetree for any given node, then the values in the >> overlay must match

Re: [PATCH v4 09/18] of: overlay: validate overlay properties #address-cells and #size-cells

2018-10-18 Thread Rob Herring
On Mon, Oct 15, 2018 at 07:37:29PM -0700, frowand.l...@gmail.com wrote: > From: Frank Rowand > > If overlay properties #address-cells or #size-cells are already in > the live devicetree for any given node, then the values in the > overlay must match the values in the live tree. > > If the

Re: [PATCH v4 01/18] of: overlay: add tests to validate kfrees from overlay removal

2018-10-18 Thread Alan Tull
On Wed, Oct 17, 2018 at 4:30 PM Alan Tull wrote: > > On Mon, Oct 15, 2018 at 9:39 PM wrote: > > Hi Frank, > > > > > From: Frank Rowand > > > > Add checks: > > - attempted kfree due to refcount reaching zero before overlay > > is removed > > - properties linked to an overlay node when

[PATCH] powerpc/time: Fix clockevent_decrementer initalisation for PR KVM

2018-10-18 Thread Michael Ellerman
In the recent commit 8b78fdb045de ("powerpc/time: Use clockevents_register_device(), fixing an issue with large decrementer") we changed the way we initialise the decrementer clockevent(s). We no longer initialise the mult & shift values of decrementer_clockevent itself. This has the effect of

Re: [PATCH v5 00/18] of: overlay: validation checks, subsequent fixes

2018-10-18 Thread Frank Rowand
On 10/18/18 15:46, frowand.l...@gmail.com wrote: > From: Frank Rowand > > Add checks to (1) overlay apply process and (2) memory freeing > triggered by overlay release. The checks are intended to detect > possible memory leaks and invalid overlays. > > The checks revealed bugs in existing

Re: [PATCH 4/8] PCI: consolidate PCI config entry in drivers/pci

2018-10-18 Thread Max Filippov
Hi Christoph, On Wed, Oct 17, 2018 at 1:03 AM Christoph Hellwig wrote: > diff --git a/arch/xtensa/configs/iss_defconfig > b/arch/xtensa/configs/iss_defconfig > index 4bb5b76d9524..818849bb7736 100644 > --- a/arch/xtensa/configs/iss_defconfig > +++ b/arch/xtensa/configs/iss_defconfig > @@ -4,7

[PATCH] powerpc/mm: Fix page table dump to work on Radix

2018-10-18 Thread Michael Ellerman
When we're running on Book3S with the Radix MMU enabled the page table dump currently prints the wrong addresses because it uses the wrong start address. Fix it to use PAGE_OFFSET rather than KERN_VIRT_START. Signed-off-by: Michael Ellerman --- arch/powerpc/mm/dump_linuxpagetables.c | 12

Re: [PATCH 7/8] eisa: consolidate EISA Kconfig entry in drivers/eisa

2018-10-18 Thread Masahiro Yamada
On Wed, Oct 17, 2018 at 5:03 PM Christoph Hellwig wrote: > > Let architectures opt into EISA support by selecting HAS_EISA and Nit. HAS_EISA -> HAVE_EISA since you renamed it in this version. > handle everything else in drivers/eisa. > > Signed-off-by: Christoph Hellwig > Acked-by: Thomas

[PATCH 3/6] powerpc/mm/radix: Fix small page at boundary when splitting

2018-10-18 Thread Michael Ellerman
When we have CONFIG_STRICT_KERNEL_RWX enabled, we want to split the linear mapping at the text/data boundary so we can map the kernel text read only. Currently we always use a small page at the text/data boundary, even when that's not necessary: Mapped 0x-0x00e0

[PATCH 4/6] powerpc/mm/radix: Remove the retry in the split mapping logic

2018-10-18 Thread Michael Ellerman
When we have CONFIG_STRICT_KERNEL_RWX enabled, we want to split the linear mapping at the text/data boundary so we can map the kernel text read only. The current logic uses a goto inside the for loop, which works, but is hard to reason about. When we hit the goto retry case we set

Re: [PATCH 7/8] eisa: consolidate EISA Kconfig entry in drivers/eisa

2018-10-18 Thread Masahiro Yamada
On Wed, Oct 17, 2018 at 5:03 PM Christoph Hellwig wrote: > > Let architectures opt into EISA support by selecting HAS_EISA and > handle everything else in drivers/eisa. > > Signed-off-by: Christoph Hellwig > Acked-by: Thomas Gleixner > --- > index 60e37b9a715d..c90a1a4d6079 100644 > ---

Re: [PATCH 6/8] rapidio: consolidate RAPIDIO config entry in drivers/rapidio

2018-10-18 Thread Masahiro Yamada
On Wed, Oct 17, 2018 at 5:03 PM Christoph Hellwig wrote: > > There is no good reason to duplicate the RAPIDIO menu in various > architectures. Instead provide a selectable HAS_RAPIDIO symbol Nit. HAS_RAPIDIO -> HAVE_RAPIDIO. > that indicates native availability of RAPIDIO support and the

[PATCH 2/6] powerpc/mm/radix: Fix overuse of small pages in splitting logic

2018-10-18 Thread Michael Ellerman
When we have CONFIG_STRICT_KERNEL_RWX enabled, we want to split the linear mapping at the text/data boundary so we can map the kernel text read only. But the current logic uses small pages for the entire text section, regardless of whether a larger page size would fit. eg. with the boundary at

[PATCH 5/6] powerpc/mm/radix: Simplify split mapping logic

2018-10-18 Thread Michael Ellerman
If we look closely at the logic in create_physical_mapping(), when we're doing STRICT_KERNEL_RWX, we do the following steps: - determine the gap from where we are to the end of the range - choose an appropriate mapping_size based on the gap - check if that mapping_size would overlap the

[PATCH 6/6] powerpc/mm/radix: Display if mappings are exec or not

2018-10-18 Thread Michael Ellerman
At boot we print the ranges we've mapped for the linear mapping and what page size we've used. Also track whether the range is mapped executable or not and display that as well. Signed-off-by: Michael Ellerman --- arch/powerpc/mm/pgtable-radix.c | 29 + 1 file

Re: [PATCH 4/8] PCI: consolidate PCI config entry in drivers/pci

2018-10-18 Thread Masahiro Yamada
On Wed, Oct 17, 2018 at 5:04 PM Christoph Hellwig wrote: > > There is no good reason to duplicate the PCI menu in every architecture. > Instead provide a selectable HAS_PCI symbol that indicates availability HAS_PCI -> HAVE_PCI > of PCI support and the handle the rest in drivers/pci. > > Note

Re: [PATCH] powerpc: Add missing include

2018-10-18 Thread Mathieu Malaterre
On Thu, Oct 18, 2018 at 6:37 AM Christophe LEROY wrote: > > > > Le 17/10/2018 à 21:25, Mathieu Malaterre a écrit : > > In commit 88b0fe175735 ("powerpc: Add show_user_instructions()") the > > function show_user_instructions was added. > > > > This commit adds an include of header file to provide

[PATCH kernel 2/2] powerpc/powernv/pseries: Rework device adding to IOMMU groups

2018-10-18 Thread Alexey Kardashevskiy
The powernv platform registers IOMMU groups and adds devices to them from the pci_controller_ops::setup_bridge() hook except one case when virtual functions (SRIOV VFs) are added from a bus notifier. The pseries platform registers IOMMU groups from the pci_controller_ops::dma_bus_setup() hook and

Re: [PATCH] powerpc/uaccess: fix warning/error with access_ok()

2018-10-18 Thread Christophe LEROY
Le 18/10/2018 à 10:48, Christophe Leroy a écrit : With the following peace of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE : VERIFY_READ; if

[PATCH kernel 0/2] powerpc/iommu: Redo iommu groups

2018-10-18 Thread Alexey Kardashevskiy
The aim is to: 1. simplify the code 2. get rid of iommu_table_group_link. Now: iommu_table points to a list of iommu_table_group_link which point to iommu_table_group (powerpc specific part of an IOMMU group); one iommu_table_group_link per iommu_table_group per IODA PE. Plan: add support of

[PATCH] powerpc/uaccess: fix warning/error with access_ok()

2018-10-18 Thread Christophe Leroy
With the following peace of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE : VERIFY_READ; if (!access_ok(verify, ioarg, _IOC_SIZE(ioc))) {

[PATCH kernel 1/2] powerpc/pseries: Remove IOMMU API support for non-LPAR systems

2018-10-18 Thread Alexey Kardashevskiy
The pci_dma_bus_setup_pSeries and pci_dma_dev_setup_pSeries hooks are registered for the pseries platform which does not have FW_FEATURE_LPAR; these would be pre-powernv platforms which we never supported PCI pass through for anyway so remove it. Signed-off-by: Alexey Kardashevskiy --- Propably

Re: [PATCH] powerpc: Don't print kernel instructions in show_user_instructions()

2018-10-18 Thread Christophe LEROY
Le 05/10/2018 à 15:21, Michael Ellerman a écrit : Recently we implemented show_user_instructions() which dumps the code around the NIP when a user space process dies with an unhandled signal. This was modelled on the x86 code, and we even went so far as to implement the exact same bug, namely

Re: SV: MPC8321 boot failure

2018-10-18 Thread gre...@linuxfoundation.org
On Thu, Oct 18, 2018 at 08:51:46AM +, David Gounaris wrote: > Hi, I can also confirm that it works after cherry-picking the proposed commit. > > Reported-and-tested-by: David Gounaris > mailto:david.gouna...@infinera.com>> > Now queued up, thanks. greg k-h

[PATCH v2] powerpc/uaccess: fix warning/error with access_ok()

2018-10-18 Thread Christophe Leroy
With the following peace of code, the following compilation warning is encountered: if (_IOC_DIR(ioc) != _IOC_NONE) { int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE : VERIFY_READ; if (!access_ok(verify, ioarg, _IOC_SIZE(ioc))) {

Re: [PATCH] powerpc: Don't print kernel instructions in show_user_instructions()

2018-10-18 Thread Christophe LEROY
Le 18/10/2018 à 13:12, Jann Horn a écrit : On Thu, Oct 18, 2018 at 11:28 AM Christophe LEROY wrote: Le 05/10/2018 à 15:21, Michael Ellerman a écrit : Recently we implemented show_user_instructions() which dumps the code around the NIP when a user space process dies with an unhandled

[bug report] powerpc/perf: Add nest IMC PMU support

2018-10-18 Thread Dan Carpenter
Hello Anju T Sudhakar, The patch 885dcd709ba9: "powerpc/perf: Add nest IMC PMU support" from Jul 19, 2017, leads to the following static checker warning: arch/powerpc/perf/imc-pmu.c:506 nest_imc_event_init() warn: 'pcni' can't be NULL. arch/powerpc/perf/imc-pmu.c 485

Re: [PATCH 29/36] dt-bindings: arm: Convert Renesas board/soc bindings to json-schema

2018-10-18 Thread Simon Horman
On Mon, Oct 08, 2018 at 09:05:58AM -0500, Rob Herring wrote: > On Mon, Oct 8, 2018 at 3:02 AM Simon Horman wrote: > > > > On Fri, Oct 05, 2018 at 11:58:41AM -0500, Rob Herring wrote: > > > Convert Renesas SoC bindings to DT schema format using json-schema. > > > > > > Cc: Simon Horman > > > Cc:

Re: [PATCH 05/36] dt-bindings: arm: renesas: Move 'renesas,prr' binding to its own doc

2018-10-18 Thread Simon Horman
On Mon, Oct 08, 2018 at 09:59:19AM -0500, Rob Herring wrote: > On Mon, Oct 8, 2018 at 2:05 AM Geert Uytterhoeven > wrote: > > > > Hi Rob, > > > > On Fri, Oct 5, 2018 at 6:58 PM Rob Herring wrote: > > > In preparation to convert board-level bindings to json-schema, move > > > various misc SoC

Re: [PATCH] powerpc: Don't print kernel instructions in show_user_instructions()

2018-10-18 Thread Michael Ellerman
Christophe LEROY writes: > Le 05/10/2018 à 15:21, Michael Ellerman a écrit : >> Recently we implemented show_user_instructions() which dumps the code >> around the NIP when a user space process dies with an unhandled >> signal. This was modelled on the x86 code, and we even went so far as >> to

[PATCH] powerpc/mm: Make pte_pgprot return all pte bits

2018-10-18 Thread Michael Ellerman
From: "Aneesh Kumar K.V" Other archs do the same and instead of adding required pte bits (which got masked out) in __ioremap_at(), make sure we filter only pfn bits out. Fixes: 26973fa5ac0e ("powerpc/mm: use pte helpers in generic code") Reviewed-by: Christophe Leroy Signed-off-by: Aneesh