Re: [PATCH v4 32/47] serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe()

2019-11-14 Thread Rasmus Villemoes
On 15/11/2019 05.25, Timur Tabi wrote: > On Fri, Nov 8, 2019 at 7:03 AM Rasmus Villemoes > wrote: >> >> + if (of_property_read_u32(np, "cell-index", &val) && >> + of_property_read_u32(np, "device-id", &val)) { > > I know that this is technically correct, but it's obfuscated IMHO.

Re: [PATCH v4 46/47] net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32

2019-11-14 Thread Rasmus Villemoes
On 15/11/2019 06.44, Li Yang wrote: > On Thu, Nov 14, 2019 at 10:37 PM Timur Tabi wrote: >> >> On Fri, Nov 8, 2019 at 7:04 AM Rasmus Villemoes >> wrote: >>> >>> Currently, QUICC_ENGINE depends on PPC32, so this in itself does not >>> change anything. In order to allow removing the PPC32 dependenc

Re: [PATCH v4 45/47] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K

2019-11-14 Thread Rasmus Villemoes
On 15/11/2019 05.41, Timur Tabi wrote: > On Fri, Nov 8, 2019 at 7:04 AM Rasmus Villemoes > wrote: > >> diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c >> index 8d13586bb774..f029eaa7cfc0 100644 >> --- a/drivers/net/wan/fsl_ucc_hdlc.c >> +++ b/drivers/net/wan/fsl_ucc_h

Re: [4.14] Backport request: powerpc/perf: Fix IMC_MAX_PMU macro

2019-11-14 Thread Greg KH
On Fri, Nov 15, 2019 at 04:43:05PM +1100, Andrew Donnellan wrote: > On 15/11/19 4:37 pm, Andrew Donnellan wrote: > > Dear stable team > > > > Please backport the following patch. > > > > Commit: 7029d1eb0c2c7ee093dc625c679fc277c8eb623b > > ("powerpc/perf: Fix IMC_MAX_PMU macro") > > Whoops,

[-merge] BUG followed by oops running ndctl tests

2019-11-14 Thread Sachin Sant
Following Oops is seen on latest (commit 3b4852888d) powerpc merge branch code while running ndctl (test_namespace) tests 85c5b0984e was good. (06/12) avocado-misc-tests/memory/ndctl.py:NdctlTest.test_namespace: [ 213.570536] memmap_init_zone_device initialised 1636608 pages in 10ms [ 213.57

[PATCH v5 23/24] selftests/vm: run_vmtests: invoke gup_benchmark with basic FOLL_PIN coverage

2019-11-14 Thread John Hubbard
It's good to have basic unit test coverage of the new FOLL_PIN behavior. Fortunately, the gup_benchmark unit test is extremely fast (a few milliseconds), so adding it the the run_vmtests suite is going to cause no noticeable change in running time. So, add two new invocations to run_vmtests: 1) R

[PATCH v5 21/24] mm/gup_benchmark: use proper FOLL_WRITE flags instead of hard-coding "1"

2019-11-14 Thread John Hubbard
Fix the gup benchmark flags to use the symbolic FOLL_WRITE, instead of a hard-coded "1" value. Also, clean up the filtering of gup flags a little, by just doing it once before issuing any of the get_user_pages*() calls. This makes it harder to overlook, instead of having little "gup_flags & 1" phr

[PATCH v5 20/24] powerpc: book3s64: convert to pin_user_pages() and put_user_page()

2019-11-14 Thread John Hubbard
1. Convert from get_user_pages() to pin_user_pages(). 2. As required by pin_user_pages(), release these pages via put_user_page(). In this case, do so via put_user_pages_dirty_lock(). That has the side effect of calling set_page_dirty_lock(), instead of set_page_dirty(). This is probably more acc

[PATCH v5 22/24] mm/gup_benchmark: support pin_user_pages() and related calls

2019-11-14 Thread John Hubbard
Up until now, gup_benchmark supported testing of the following kernel functions: * get_user_pages(): via the '-U' command line option * get_user_pages_longterm(): via the '-L' command line option * get_user_pages_fast(): as the default (no options required) Add test coverage for the new correspon

[PATCH v5 17/24] mm/gup: track FOLL_PIN pages

2019-11-14 Thread John Hubbard
Add tracking of pages that were pinned via FOLL_PIN. As mentioned in the FOLL_PIN documentation, callers who effectively set FOLL_PIN are required to ultimately free such pages via put_user_page(). The effect is similar to FOLL_GET, and may be thought of as "FOLL_GET for DIO and/or RDMA use". Pag

[PATCH v5 15/24] fs/io_uring: set FOLL_PIN via pin_user_pages()

2019-11-14 Thread John Hubbard
Convert fs/io_uring to use the new pin_user_pages() call, which sets FOLL_PIN. Setting FOLL_PIN is now required for code that requires tracking of pinned pages, and therefore for any code that calls put_user_page(). In partial anticipation of this work, the io_uring code was already calling put_us

[PATCH v5 14/24] drm/via: set FOLL_PIN via pin_user_pages_fast()

2019-11-14 Thread John Hubbard
Convert drm/via to use the new pin_user_pages_fast() call, which sets FOLL_PIN. Setting FOLL_PIN is now required for code that requires tracking of pinned pages, and therefore for any code that calls put_user_page(). In partial anticipation of this work, the drm/via driver was already calling put_

[PATCH v5 12/24] IB/{core, hw, umem}: set FOLL_PIN via pin_user_pages*(), fix up ODP

2019-11-14 Thread John Hubbard
Convert infiniband to use the new pin_user_pages*() calls. Also, revert earlier changes to Infiniband ODP that had it using put_user_page(). ODP is "Case 3" in Documentation/core-api/pin_user_pages.rst, which is to say, normal get_user_pages() and put_page() is the API to use there. The new pin_u

[PATCH v5 24/24] mm, tree-wide: rename put_user_page*() to unpin_user_page*()

2019-11-14 Thread John Hubbard
In order to provide a clearer, more symmetric API for pinning and unpinning DMA pages. This way, pin_user_pages*() calls match up with unpin_user_pages*() calls, and the API is a lot closer to being self-explanatory. Signed-off-by: John Hubbard --- Documentation/core-api/pin_user_pages.rst |

[PATCH v5 08/24] media/v4l2-core: set pages dirty upon releasing DMA buffers

2019-11-14 Thread John Hubbard
After DMA is complete, and the device and CPU caches are synchronized, it's still required to mark the CPU pages as dirty, if the data was coming from the device. However, this driver was just issuing a bare put_page() call, without any set_page_dirty*() call. Fix the problem, by calling set_page_

[PATCH v5 03/24] mm/gup: move try_get_compound_head() to top, fix minor issues

2019-11-14 Thread John Hubbard
An upcoming patch uses try_get_compound_head() more widely, so move it to the top of gup.c. Also fix a tiny spelling error and a checkpatch.pl warning. Reviewed-by: Jan Kara Reviewed-by: Ira Weiny Signed-off-by: John Hubbard --- mm/gup.c | 29 +++-- 1 file changed, 15

[PATCH v5 00/24] mm/gup: track dma-pinned pages: FOLL_PIN

2019-11-14 Thread John Hubbard
Hi, Please note that two of these patches are also out for review separately, and may go in earlier than this series. This series requires those, so to ease review and testing, they are also included here: patches 4 and 5, the devmap cleanups. There is a git repo and branch, for convenience:

[PATCH v5 07/24] IB/umem: use get_user_pages_fast() to pin DMA pages

2019-11-14 Thread John Hubbard
And get rid of the mmap_sem calls, as part of that. Note that get_user_pages_fast() will, if necessary, fall back to __gup_longterm_unlocked(), which takes the mmap_sem as needed. Reviewed-by: Jason Gunthorpe Reviewed-by: Ira Weiny Signed-off-by: John Hubbard --- drivers/infiniband/core/umem.c

[PATCH v5 13/24] mm/process_vm_access: set FOLL_PIN via pin_user_pages_remote()

2019-11-14 Thread John Hubbard
Convert process_vm_access to use the new pin_user_pages_remote() call, which sets FOLL_PIN. Setting FOLL_PIN is now required for code that requires tracking of pinned pages. Also, release the pages via put_user_page*(). Also, rename "pages" to "pinned_pages", as this makes for easier reading of p

[PATCH v5 11/24] goldish_pipe: convert to pin_user_pages() and put_user_page()

2019-11-14 Thread John Hubbard
1. Call the new global pin_user_pages_fast(), from pin_goldfish_pages(). 2. As required by pin_user_pages(), release these pages via put_user_page(). In this case, do so via put_user_pages_dirty_lock(). That has the side effect of calling set_page_dirty_lock(), instead of set_page_dirty(). This i

[PATCH v5 10/24] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-14 Thread John Hubbard
Introduce pin_user_pages*() variations of get_user_pages*() calls, and also pin_longterm_pages*() variations. For now, these are placeholder calls, until the various call sites are converted to use the correct get_user_pages*() or pin_user_pages*() API. These variants will eventually all set FOLL

[PATCH v5 05/24] mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages

2019-11-14 Thread John Hubbard
An upcoming patch changes and complicates the refcounting and especially the "put page" aspects of it. In order to keep everything clean, refactor the devmap page release routines: * Rename put_devmap_managed_page() to page_is_devmap_managed(), and limit the functionality to "read only": return

[PATCH v5 02/24] mm/gup: factor out duplicate code from four routines

2019-11-14 Thread John Hubbard
There are four locations in gup.c that have a fair amount of code duplication. This means that changing one requires making the same changes in four places, not to mention reading the same code four times, and wondering if there are subtle differences. Factor out the common code into static functi

[PATCH v5 01/24] mm/gup: pass flags arg to __gup_device_* functions

2019-11-14 Thread John Hubbard
A subsequent patch requires access to gup flags, so pass the flags argument through to the __gup_device_* functions. Also placate checkpatch.pl by shortening a nearby line. Reviewed-by: Jan Kara Reviewed-by: Jérôme Glisse Reviewed-by: Ira Weiny Cc: Kirill A. Shutemov Signed-off-by: John Hubba

[PATCH v5 06/24] goldish_pipe: rename local pin_user_pages() routine

2019-11-14 Thread John Hubbard
1. Avoid naming conflicts: rename local static function from "pin_user_pages()" to "pin_goldfish_pages()". An upcoming patch will introduce a global pin_user_pages() function. Reviewed-by: Jérôme Glisse Reviewed-by: Ira Weiny Signed-off-by: John Hubbard --- drivers/platform/goldfish/goldfish_

[PATCH v5 04/24] mm: Cleanup __put_devmap_managed_page() vs ->page_free()

2019-11-14 Thread John Hubbard
From: Dan Williams After the removal of the device-public infrastructure there are only 2 ->page_free() call backs in the kernel. One of those is a device-private callback in the nouveau driver, the other is a generic wakeup needed in the DAX case. In the hopes that all ->page_free() callbacks ca

[PATCH v5 16/24] net/xdp: set FOLL_PIN via pin_user_pages()

2019-11-14 Thread John Hubbard
Convert net/xdp to use the new pin_longterm_pages() call, which sets FOLL_PIN. Setting FOLL_PIN is now required for code that requires tracking of pinned pages. In partial anticipation of this work, the net/xdp code was already calling put_user_page() instead of put_page(). Therefore, in order to

[PATCH v5 18/24] media/v4l2-core: pin_user_pages (FOLL_PIN) and put_user_page() conversion

2019-11-14 Thread John Hubbard
1. Change v4l2 from get_user_pages() to pin_user_pages(). 2. Because all FOLL_PIN-acquired pages must be released via put_user_page(), also convert the put_page() call over to put_user_pages_dirty_lock(). Acked-by: Hans Verkuil Cc: Ira Weiny Signed-off-by: John Hubbard --- drivers/media/v4l2-

[PATCH v5 19/24] vfio, mm: pin_user_pages (FOLL_PIN) and put_user_page() conversion

2019-11-14 Thread John Hubbard
1. Change vfio from get_user_pages_remote(), to pin_user_pages_remote(). 2. Because all FOLL_PIN-acquired pages must be released via put_user_page(), also convert the put_page() call over to put_user_pages_dirty_lock(). Note that this effectively changes the code's behavior in vfio_iommu_type1.c:

[PATCH v5 09/24] vfio, mm: fix get_user_pages_remote() and FOLL_LONGTERM

2019-11-14 Thread John Hubbard
As it says in the updated comment in gup.c: current FOLL_LONGTERM behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the FS DAX check requirement on vmas. However, the corresponding restriction in get_user_pages_remote() was slightly stricter than is actually required: it forbade all

Re: [PATCH v4 46/47] net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32

2019-11-14 Thread Li Yang
On Thu, Nov 14, 2019 at 10:37 PM Timur Tabi wrote: > > On Fri, Nov 8, 2019 at 7:04 AM Rasmus Villemoes > wrote: > > > > Currently, QUICC_ENGINE depends on PPC32, so this in itself does not > > change anything. In order to allow removing the PPC32 dependency from > > QUICC_ENGINE and avoid allmodc

Re: [4.14] Backport request: powerpc/perf: Fix IMC_MAX_PMU macro

2019-11-14 Thread Andrew Donnellan
On 15/11/19 4:37 pm, Andrew Donnellan wrote: Dear stable team Please backport the following patch. Commit: 7029d1eb0c2c7ee093dc625c679fc277c8eb623b ("powerpc/perf: Fix IMC_MAX_PMU macro") Whoops, this was a local SHA - I meant 73ce9aec65b17433e18163d07eb5cb6bf114bd6c. There's also 110

[4.14] Backport request: powerpc/perf: Fix IMC_MAX_PMU macro

2019-11-14 Thread Andrew Donnellan
Dear stable team Please backport the following patch. Commit: 7029d1eb0c2c7ee093dc625c679fc277c8eb623b ("powerpc/perf: Fix IMC_MAX_PMU macro") Stable tree targeted: 4.14 (applies cleanly) Justification: This fixes some Oopses observed on boot on one of our POWER9 boxes. Fix was identi

Re: [PATCH v4 07/47] soc: fsl: qe: qe.c: guard use of pvr_version_is() with CONFIG_PPC32

2019-11-14 Thread Timur Tabi
On Fri, Nov 8, 2019 at 7:04 AM Rasmus Villemoes wrote: > > +static bool qe_general4_errata(void) > +{ > +#ifdef CONFIG_PPC32 > + return pvr_version_is(PVR_VER_836x) || pvr_version_is(PVR_VER_832x); > +#endif > + return false; > +} > + > /* Program the BRG to the given sampling rate an

Re: WARN_ONCE does not warn once

2019-11-14 Thread Michael Ellerman
Michal Suchánek writes: > On Thu, Nov 14, 2019 at 05:46:55PM +0100, Michal Suchánek wrote: >> Hello, >> >> on powernv with 5.3.8 kernel I get flood of messages on boot. >> >> The messages match WARN_ONCE(1, "opal: OPAL_CONSOLE_FLUSH missing.\n"); > > Asking around it was pointed out that WARN_ON

Re: [PATCH v4 45/47] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K

2019-11-14 Thread Timur Tabi
On Fri, Nov 8, 2019 at 7:04 AM Rasmus Villemoes wrote: > diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c > index 8d13586bb774..f029eaa7cfc0 100644 > --- a/drivers/net/wan/fsl_ucc_hdlc.c > +++ b/drivers/net/wan/fsl_ucc_hdlc.c > @@ -245,6 +245,11 @@ static int uhdlc_ini

Re: [PATCH v4 46/47] net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32

2019-11-14 Thread Timur Tabi
On Fri, Nov 8, 2019 at 7:04 AM Rasmus Villemoes wrote: > > Currently, QUICC_ENGINE depends on PPC32, so this in itself does not > change anything. In order to allow removing the PPC32 dependency from > QUICC_ENGINE and avoid allmodconfig build failures, add this explicit > dependency. Can you add

Re: [PATCH 02/10] nvdimm: remove prototypes for nonexistent functions

2019-11-14 Thread Dan Williams
On Thu, Oct 24, 2019 at 9:49 PM Alastair D'Silva wrote: > > From: Alastair D'Silva > > These functions don't exist, so remove the prototypes for them. > > Signed-off-by: Alastair D'Silva Looks good, applied.

Re: [PATCH] powerpc/powernv: Disable native PCIe port management

2019-11-14 Thread Michael Ellerman
Tyrel Datwyler writes: > Nothing but pedantic spelling and grammar nits of the commit log follow. Thanks, they were annoying me :) cheers > On 11/13/19 1:40 AM, Oliver O'Halloran wrote: >> On PowerNV the PCIe topology is (currently) managed the powernv platform > > s/the powernv/by the powernv

Re: [PATCH v4 32/47] serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe()

2019-11-14 Thread Timur Tabi
On Fri, Nov 8, 2019 at 7:03 AM Rasmus Villemoes wrote: > > + if (of_property_read_u32(np, "cell-index", &val) && > + of_property_read_u32(np, "device-id", &val)) { I know that this is technically correct, but it's obfuscated IMHO. 'val' is set correctly only when of_property_read_

Re: [PATCH 00/50] Add log level to show_stack()

2019-11-14 Thread Sergey Senozhatsky
On (19/11/13 10:39), Steven Rostedt wrote: [..] > > void show_stack(struct task_struct *task, unsigned long *sp, int log_level) > > { > > printk_emergency_enter(log_level); > > __show_stack(task, sp); > > printk_emergency_exit(); > > } > > // - - - - - - - - - - - - - - - - - - - - - -

Re: [PATCH v2 1/2] mm: remove the memory isolate notifier

2019-11-14 Thread Greg Kroah-Hartman
On Thu, Nov 14, 2019 at 02:19:10PM +0100, David Hildenbrand wrote: > Luckily, we have no users left, so we can get rid of it. Cleanup > set_migratetype_isolate() a little bit. > > Cc: Greg Kroah-Hartman > Cc: "Rafael J. Wysocki" > Cc: Andrew Morton > Cc: Pavel Tatashin > Cc: Michal Hocko > Cc

Re: [alsa-devel] [PATCH V3 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm

2019-11-14 Thread Shengjiu Wang
Hi Rob On Fri, Nov 15, 2019 at 5:14 AM Rob Herring wrote: > > On Mon, Nov 11, 2019 at 05:18:22PM +0800, Shengjiu Wang wrote: > > Add compatible string "fsl,imx8qm-asrc" for imx8qm platform. > > > > There are two asrc modules in imx8qm, the clock mapping is > > different for each other, so add new

Re: [PATCH v4 0/3] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-14 Thread AKASHI Takahiro
Bhupesh, On Fri, Nov 15, 2019 at 01:24:17AM +0530, Bhupesh Sharma wrote: > Hi Akashi, > > On Wed, Nov 13, 2019 at 12:11 PM AKASHI Takahiro > wrote: > > > > Hi Bhupesh, > > > > Do you have a corresponding patch for userspace tools, > > including crash util and/or makedumpfile? > > Otherwise, we c

Re: [PATCH 00/50] Add log level to show_stack()

2019-11-14 Thread Sergey Senozhatsky
On (19/11/13 16:40), Dmitry Safonov wrote: > It's also not very fun for me to create those patches. > But they fix console_loglevel issues (I hope we could un-export it in > the end) and also I need it for my other patches those will produce > warnings with debug loglevel when configured through sy

[RFC PATCH] soc: fsl: qe: qe_uart_set_mctrl() can be static

2019-11-14 Thread kbuild test robot
Fixes: 116af8542b17 ("soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE") Signed-off-by: kbuild test robot --- ucc_uart.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index a5330582b6103..58891

Re: [PATCH v3 36/36] soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE

2019-11-14 Thread kbuild test robot
Hi Rasmus, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.4-rc7 next-20191114] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '-

Re: [PATCH V3 1/2] ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm

2019-11-14 Thread Rob Herring
On Mon, Nov 11, 2019 at 05:18:22PM +0800, Shengjiu Wang wrote: > Add compatible string "fsl,imx8qm-asrc" for imx8qm platform. > > There are two asrc modules in imx8qm, the clock mapping is > different for each other, so add new property "fsl,asrc-clk-map" > to distinguish them. What's the clock m

Re: [PATCH v2 1/2] kasan: support instrumented bitops combined with generic bitops

2019-11-14 Thread Marco Elver
On Mon, 28 Oct 2019 at 14:56, Daniel Axtens wrote: > > Hi all, > > Would it be possible to get an Ack from a KASAN maintainter? mpe is > happy to take this through powerpc but would like an ack first. > > Regards, > Daniel > > >> Currently bitops-instrumented.h assumes that the architecture provid

[PATCH] of: unittest: fix memory leak in attach_node_and_children

2019-11-14 Thread Erhard Furtner
In attach_node_and_children memory is allocated for full_name via kasprintf. If the condition of the 1st if is not met the function returns early without freeing the memory. Add a kfree() to fix that. Signed-off-by: Erhard Furtner --- drivers/of/unittest.c | 4 +++- 1 file changed, 3 insertions(

Re: [PATCH v4 0/3] Append new variables to vmcoreinfo (TCR_EL1.T1SZ for arm64 and MAX_PHYSMEM_BITS for all archs)

2019-11-14 Thread Bhupesh Sharma
Hi Akashi, On Wed, Nov 13, 2019 at 12:11 PM AKASHI Takahiro wrote: > > Hi Bhupesh, > > Do you have a corresponding patch for userspace tools, > including crash util and/or makedumpfile? > Otherwise, we can't verify that a generated core file is > correctly handled. Sure. I am still working on th

Re: WARN_ONCE does not warn once

2019-11-14 Thread Michal Suchánek
On Thu, Nov 14, 2019 at 05:46:55PM +0100, Michal Suchánek wrote: > Hello, > > on powernv with 5.3.8 kernel I get flood of messages on boot. > > The messages match WARN_ONCE(1, "opal: OPAL_CONSOLE_FLUSH missing.\n"); Asking around it was pointed out that WARN_ONCE warns up to as many times as you

Re: [PATCH v2 2/2] mm: remove "count" parameter from has_unmovable_pages()

2019-11-14 Thread Michal Hocko
On Thu 14-11-19 14:19:11, David Hildenbrand wrote: > Now that the memory isolate notifier is gone, the parameter is always 0. > Drop it and cleanup has_unmovable_pages(). > > Cc: Michal Hocko > Cc: Andrew Morton > Cc: Oscar Salvador > Cc: Anshuman Khandual > Cc: Qian Cai > Cc: Pingfan Liu >

Re: [PATCH v2 1/2] mm: remove the memory isolate notifier

2019-11-14 Thread Michal Hocko
On Thu 14-11-19 14:19:10, David Hildenbrand wrote: > Luckily, we have no users left, so we can get rid of it. Cleanup > set_migratetype_isolate() a little bit. > > Cc: Greg Kroah-Hartman > Cc: "Rafael J. Wysocki" > Cc: Andrew Morton > Cc: Pavel Tatashin > Cc: Michal Hocko > Cc: Dan Williams

Re: [PATCH v2 1/4] powerpc/kvm/book3s: Fixes possible 'use after release' of kvm

2019-11-14 Thread Leonardo Bras
On Tue, 2019-11-12 at 15:57 +1100, Michael Ellerman wrote: > Hi Leonardo, Hello Micheal, thanks for the feedback! > > Leonardo Bras writes: > > Fixes a possible 'use after free' of kvm variable in > > kvm_vm_ioctl_create_spapr_tce, where it does a mutex_unlock(&kvm- > > >lock) > > after a kvm_p

Re: [PATCH v2 1/1] powerpc/pseries/hotplug-memory.c: Change rc variable to bool

2019-11-14 Thread Leonardo Bras
On Thu, 2019-11-14 at 20:07 +1100, Michael Ellerman wrote: > On Fri, 2019-08-02 at 13:39:15 UTC, Leonardo Bras wrote: > > Changes the return variable to bool (as the return value) and > > avoids doing a ternary operation before returning. > > > > Signed-off-by: Leonardo Bras > > Series applied t

Re: [PATCH 2/2] powerpc/hw_breakpoints: Rewrite 8xx breakpoints to allow any address range size.

2019-11-14 Thread Christophe Leroy
Michael Ellerman a écrit : Christophe Leroy writes: Unlike standard powerpc, Powerpc 8xx doesn't have SPRN_DABR, but it has a breakpoint support based on a set of comparators which allow more flexibility. Commit 4ad8622dc548 ("powerpc/8xx: Implement hw_breakpoint") implemented breakpoints by

WARN_ONCE does not warn once

2019-11-14 Thread Michal Suchánek
Hello, on powernv with 5.3.8 kernel I get flood of messages on boot. The messages match WARN_ONCE(1, "opal: OPAL_CONSOLE_FLUSH missing.\n"); [ cut here ] opal: OPAL_CONSOLE_FLUSH missing. WARNING: CPU: 0 PID: 0 at ../arch/powerpc/platforms/powernv/opal.c:435 __opal_flush

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

2019-11-14 Thread Dan Williams
Some quick feedback on your intro concerns... On Thu, Nov 14, 2019 at 5:41 AM Frederic Barrat wrote: > > Hi Alastair, > > The patch is huge and could/should probably be split in smaller pieces Yeah, it's a must. Split the minimum viable infrastructure by topic and then follow on with per-feature

Re: [PATCH v4 32/47] serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe()

2019-11-14 Thread Timur Tabi
On Fri, Nov 8, 2019 at 7:03 AM Rasmus Villemoes wrote: > > - if (*iprop) > - qe_port->port.uartclk = *iprop; > + if (val) > + qe_port->port.uartclk = val; > else { > /* > * Older versions of U-Boot do not initialize t

Re: [PATCH] powerpc/powernv: Disable native PCIe port management

2019-11-14 Thread Bjorn Helgaas
On Fri, Nov 15, 2019 at 12:34:50AM +1100, Oliver O'Halloran wrote: > On Thu, Nov 14, 2019 at 1:31 AM Bjorn Helgaas wrote: > > > > This is fine, but it feels like sort of a blunt instrument. Is there > > any practical way to clear pci_host_bridge.native_pcie_hotplug (and > > native_aer if appropri

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

2019-11-14 Thread Frederic Barrat
Hi Alastair, The patch is huge and could/should probably be split in smaller pieces to ease the review. However, having sinned on that same topic in the past, I made a first pass anyway. I haven't covered everything but tried to focus on the general setup of the driver for now. Since the patch

Re: [PATCH] powerpc/powernv: Disable native PCIe port management

2019-11-14 Thread Oliver O'Halloran
On Thu, Nov 14, 2019 at 7:39 AM Tyrel Datwyler wrote: > > Nothing but pedantic spelling and grammar nits of the commit log follow. > > -Tyrel Thanks. My speeling is bad even on a good day and it was not a good day.

Re: [PATCH] powerpc/powernv: Disable native PCIe port management

2019-11-14 Thread Oliver O'Halloran
On Thu, Nov 14, 2019 at 1:31 AM Bjorn Helgaas wrote: > > This is fine, but it feels like sort of a blunt instrument. Is there > any practical way to clear pci_host_bridge.native_pcie_hotplug (and > native_aer if appropriate) for the PHBs in question? That would also > prevent pciehp from binding.

Re: [PATCH v15 3/9] namei: LOOKUP_NO_XDEV: block mountpoint crossing

2019-11-14 Thread Aleksa Sarai
On 2019-11-14, Al Viro wrote: > On Thu, Nov 14, 2019 at 03:49:45PM +1100, Aleksa Sarai wrote: > > On 2019-11-13, Al Viro wrote: > > > On Tue, Nov 05, 2019 at 08:05:47PM +1100, Aleksa Sarai wrote: > > > > > > > @@ -862,6 +870,8 @@ static int nd_jump_root(struct nameidata *nd) > > > > void nd_jum

[PATCH v2 2/2] mm: remove "count" parameter from has_unmovable_pages()

2019-11-14 Thread David Hildenbrand
Now that the memory isolate notifier is gone, the parameter is always 0. Drop it and cleanup has_unmovable_pages(). Cc: Michal Hocko Cc: Andrew Morton Cc: Oscar Salvador Cc: Anshuman Khandual Cc: Qian Cai Cc: Pingfan Liu Cc: Stephen Rothwell Cc: Dan Williams Cc: Pavel Tatashin Cc: Vlastim

[PATCH v2 1/2] mm: remove the memory isolate notifier

2019-11-14 Thread David Hildenbrand
Luckily, we have no users left, so we can get rid of it. Cleanup set_migratetype_isolate() a little bit. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Andrew Morton Cc: Pavel Tatashin Cc: Michal Hocko Cc: Dan Williams Cc: Oscar Salvador Cc: Qian Cai Cc: Anshuman Khandual Cc: Pingfan

[PATCH v2 0/2] mm: remove the memory isolate notifier

2019-11-14 Thread David Hildenbrand
This is the MM part of https://lkml.org/lkml/2019/10/31/487 "We can get rid of the memory isolate notifier by switching to balloon compaction in powerpc's CMM (Collaborative Memory Management). The memory isolate notifier was only necessary to allow to offline memory blocks that contain in

Re: [PATCH v1 01/12] powerpc/pseries: CMM: Implement release() function for sysfs device

2019-11-14 Thread David Hildenbrand
On 14.11.19 10:08, Michael Ellerman wrote: On Thu, 2019-10-31 at 14:29:22 UTC, David Hildenbrand wrote: When unloading the module, one gets [ 548.188594] [ cut here ] [ 548.188596] Device 'cmm0' does not have a release() function, it is brok= en and must be fixed. See D

[PATCH] random: Make RANDOM_TRUST_CPU depend on ARCH_RANDOM

2019-11-14 Thread richard . henderson
From: Richard Henderson Listing the set of host architectures does not scale. Depend instead on the existance of the architecture rng. Signed-off-by: Richard Henderson --- drivers/char/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/Kconfig b/driver

Re: [PATCH] sysfs: Fixes __BIN_ATTR_WO() macro

2019-11-14 Thread Greg Kroah-Hartman
On Thu, Nov 14, 2019 at 08:07:49PM +1100, Michael Ellerman wrote: > On Tue, 2019-10-01 at 23:37:18 UTC, Nayna Jain wrote: > > This patch fixes the size and write parameter for the macro > > __BIN_ATTR_WO(). > > > > Fixes: 7f905761e15a8 ("sysfs: add BIN_ATTR_WO() macro") > > Signed-off-by: Nayna Ja

Re: [PATCH] dma-mapping: treat dev->bus_dma_mask as a DMA limit

2019-11-14 Thread Nicolas Saenz Julienne
On Wed, 2019-11-13 at 20:34 +, Robin Murphy wrote: > On 13/11/2019 4:13 pm, Nicolas Saenz Julienne wrote: > > Using a mask to represent bus DMA constraints has a set of limitations. > > The biggest one being it can only hold a power of two (minus one). The > > DMA mapping code is already aware

Re: [PATCH] Fix wrong message when RFI Flush is disable

2019-11-14 Thread Michal Suchánek
On Thu, Nov 14, 2019 at 08:07:35PM +1100, Michael Ellerman wrote: > On Thu, 2019-05-02 at 21:09:07 UTC, Gustavo Walbon wrote: > > From: "Gustavo L. F. Walbon" > > > > The issue was showing "Mitigation" message via sysfs whatever the state of > > "RFI Flush", but it should show "Vulnerable" when i

Re: [PATCH 2/2] powerpc/hw_breakpoints: Rewrite 8xx breakpoints to allow any address range size.

2019-11-14 Thread Michael Ellerman
Christophe Leroy writes: > Unlike standard powerpc, Powerpc 8xx doesn't have SPRN_DABR, but > it has a breakpoint support based on a set of comparators which > allow more flexibility. > > Commit 4ad8622dc548 ("powerpc/8xx: Implement hw_breakpoint") > implemented breakpoints by emulating the DABR b

Re: [PATCH -next] powerpc/pseries: Drop pointless static qualifier in vpa_debugfs_init()

2019-11-14 Thread Michael Ellerman
On Mon, 2019-02-18 at 12:56:44 UTC, YueHaibing wrote: > There is no need to have the 'struct dentry *vpa_dir' variable static > since new value always be assigned before use it. > > Signed-off-by: YueHaibing Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/11dd34f3eae5a468013bb

Re: [PATCH v2 -next] powerpc/pseries: Fix platform_no_drv_owner.cocci warnings

2019-11-14 Thread Michael Ellerman
On Mon, 2019-02-18 at 13:39:50 UTC, YueHaibing wrote: > Remove .owner field if calls are used which set it automatically > Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci > > Signed-off-by: YueHaibing Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/42974f357db

Re: [PATCH] macintosh: ans-lcd: make anslcd_logo static and __initconst

2019-11-14 Thread Michael Ellerman
On Fri, 2018-11-02 at 21:17:06 UTC, Rasmus Villemoes wrote: > This variable has no reason to have external linkage, and since it is > only used in an __init function, it might as well be made __initconst > also. > > Signed-off-by: Rasmus Villemoes Applied to powerpc next, thanks. https://git.ke

Re: [PATCH -next] powerpc/64s: Fix debugfs_simple_attr.cocci warnings

2019-11-14 Thread Michael Ellerman
On Thu, 2018-11-29 at 13:35:18 UTC, YueHaibing wrote: > Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE > for debugfs files. > > Semantic patch information: > Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() > imposes some significant overhead as compared to > DEFINE_DEB

Re: [PATCH -next] powerpc/powernv/npu: Fix debugfs_simple_attr.cocci warnings

2019-11-14 Thread Michael Ellerman
On Tue, 2018-12-25 at 02:44:36 UTC, YueHaibing wrote: > Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE > for debugfs files. > > Semantic patch information: > Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() > imposes some significant overhead as compared to > DEFINE_DEB

Re: [PATCH v9 1/4] powerpc/powernv: Add OPAL API interface to access secure variable

2019-11-14 Thread Michael Ellerman
On Mon, 2019-11-11 at 03:10:33 UTC, Nayna Jain wrote: > The X.509 certificates trusted by the platform and required to secure boot > the OS kernel are wrapped in secure variables, which are controlled by > OPAL. > > This patch adds firmware/kernel interface to read and write OPAL secure > variable

Re: [PATCH v10a 1/9] powerpc: detect the secure boot mode of the system

2019-11-14 Thread Michael Ellerman
On Tue, 2019-11-05 at 23:00:22 UTC, Eric Richter wrote: > From: Nayna Jain > > This patch defines a function to detect the secure boot state of a > PowerNV system. > > The PPC_SECURE_BOOT config represents the base enablement of secure boot > for powerpc. > > Signed-off-by: Nayna Jain > Signed

Re: [PATCH v10a 3/9] powerpc: detect the trusted boot state of the system

2019-11-14 Thread Michael Ellerman
On Tue, 2019-11-05 at 23:02:07 UTC, Eric Richter wrote: > From: Nayna Jain > > While secure boot permits only properly verified signed kernels to be > booted, trusted boot calculates the file hash of the kernel image and > stores the measurement prior to boot, that can be subsequently compared >

Re: [PATCH v2 1/9] powerpc/pseries: Fix bad drc_index_start value parsing of drc-info entry

2019-11-14 Thread Michael Ellerman
On Mon, 2019-11-11 at 05:21:28 UTC, Tyrel Datwyler wrote: > The ibm,drc-info property is an array property that contains drc-info > entries such that each entry is made up of 2 string encoded elements > followed by 5 int encoded elements. The of_read_drc_info_cell() > helper contains comments that

Re: [PATCH] powerpc/64s: Always disable branch profiling for prom_init.o

2019-11-14 Thread Michael Ellerman
On Wed, 2019-11-06 at 05:11:29 UTC, Michael Ellerman wrote: > Otherwise the build fails because prom_init is calling symbols it's > not allowed to, eg: > > Error: External symbol 'ftrace_likely_update' referenced from prom_init.c > make[3]: *** [arch/powerpc/kernel/Makefile:197: > arch/powerp

Re: [PATCH v3] powerpc/fadump: when fadump is supported register the fadump sysfs files.

2019-11-14 Thread Michael Ellerman
On Thu, 2019-11-07 at 16:47:57 UTC, Michal Suchanek wrote: > Currently it is not possible to distinguish the case when fadump is > supported by firmware and disabled in kernel and completely unsupported > using the kernel sysfs interface. User can investigate the devicetree > but it is more reasona

Re: [PATCH] selftests/powerpc: Skip tm-signal-sigreturn-nt if TM not available

2019-11-14 Thread Michael Ellerman
On Mon, 2019-11-04 at 23:35:24 UTC, Michael Ellerman wrote: > On systems where TM (Transactional Memory) is disabled the > tm-signal-sigreturn-nt test causes a SIGILL: > > test: tm_signal_sigreturn_nt > tags: git_version:7c202575ef63 > !! child died by signal 4 > failure: tm_signal_sigretu

Re: [PATCH v5 1/6] powerpc: Allow flush_icache_range to work across ranges >4GB

2019-11-14 Thread Michael Ellerman
On Mon, 2019-11-04 at 02:32:53 UTC, "Alastair D'Silva" wrote: > From: Alastair D'Silva > > When calling flush_icache_range with a size >4GB, we were masking > off the upper 32 bits, so we would incorrectly flush a range smaller > than intended. > > This patch replaces the 32 bit shifts with 64 b

Re: [PATCH v1 01/12] powerpc/pseries: CMM: Implement release() function for sysfs device

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-31 at 14:29:22 UTC, David Hildenbrand wrote: > When unloading the module, one gets > [ 548.188594] [ cut here ] > [ 548.188596] Device 'cmm0' does not have a release() function, it is brok= > en and must be fixed. See Documentation/kobject.txt. > [ 548.188

Re: [PATCH 1/1] powerpc/crypto: Add cond_resched() in crc-vpmsum self-test

2019-11-14 Thread Michael Ellerman
On Sun, 2019-11-03 at 23:33:56 UTC, Chris Smart wrote: > The stress test for vpmsum implementations executes a long for loop in > the kernel. This blocks the scheduler, which prevents other tasks from > running, resulting in a warning. > > This fix adds a call to cond_reshed() at the end of each l

Re: [RFC PATCH v10 9/9] powerpc/ima: indicate kernel modules appended signatures are enforced

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-31 at 03:31:34 UTC, Mimi Zohar wrote: > The arch specific kernel module policy rule requires kernel modules to > be signed, either as an IMA signature, stored as an xattr, or as an > appended signature. As a result, kernel modules appended signatures > could be enforced without "si

Re: [PATCH] powerpc/xive: Prevent page fault issues in the machine crash handler

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-31 at 06:31:00 UTC, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= wrote: > When the machine crash handler is invoked, all interrupts are masked > but interrupts which have not been started yet do not have an ESB page > mapped in the Linux address space. This crashes the 'crash kexec' > sequ

Re: [PATCH v10 8/9] powerpc/ima: update ima arch policy to check for blacklist

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-31 at 03:31:33 UTC, Mimi Zohar wrote: > From: Nayna Jain > > This patch updates the arch-specific policies for PowerNV system to make > sure that the binary hash is not blacklisted. > > Signed-off-by: Nayna Jain > Cc: Jessica Yu > Signed-off-by: Mimi Zohar Applied to powerpc

Re: [PATCH v10 7/9] ima: check against blacklisted hashes for files with modsig

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-31 at 03:31:32 UTC, Mimi Zohar wrote: > From: Nayna Jain > > Asymmetric private keys are used to sign multiple files. The kernel > currently supports checking against blacklisted keys. However, if the > public key is blacklisted, any file signed by the blacklisted key will > aut

Re: [PATCH v10 6/9] certs: add wrapper function to check blacklisted binary hash

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-31 at 03:31:31 UTC, Mimi Zohar wrote: > From: Nayna Jain > > The -EKEYREJECTED error returned by existing is_hash_blacklisted() is > misleading when called for checking against blacklisted hash of a > binary. > > This patch adds a wrapper function is_binary_blacklisted() to retur

Re: [PATCH v10 5/9] ima: make process_buffer_measurement() generic

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-31 at 03:31:30 UTC, Mimi Zohar wrote: > From: Nayna Jain > > process_buffer_measurement() is limited to measuring the kexec boot > command line. This patch makes process_buffer_measurement() more > generic, allowing it to measure other types of buffer data (e.g. > blacklisted bina

Re: [PATCH v10 4/9] powerpc/ima: define trusted boot policy

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-31 at 03:31:29 UTC, Mimi Zohar wrote: > From: Nayna Jain > > This patch defines an arch-specific trusted boot only policy and a > combined secure and trusted boot policy. > > Signed-off-by: Nayna Jain > Signed-off-by: Mimi Zohar Applied to powerpc next, thanks. https://git.ke

Re: [PATCH v10 2/9] powerpc/ima: add support to initialize ima policy rules

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-31 at 03:31:27 UTC, Mimi Zohar wrote: > From: Nayna Jain > > PowerNV systems use a Linux-based bootloader, which rely on the IMA > subsystem to enforce different secure boot modes. Since the verification > policy may differ based on the secure boot mode of the system, the > polic

Re: [PATCH] L1TF support in PowerPC SYSFS.

2019-11-14 Thread Michael Ellerman
On Tue, 2019-10-29 at 19:07:59 UTC, asteinhau...@google.com wrote: > From: Anthony Steinhauser > > PowerPC CPUs are vulnerable to L1TF to the same extent as to Meltdown. > It is also mitigated by flushing the L1D on privilege transition. > Currently the SYSFS gives a false negative on L1TF on CPU

Re: [PATCH v1 1/3] mm/powerpc/book3s64/radix: Remove unused code.

2019-11-14 Thread Michael Ellerman
On Thu, 2019-10-24 at 07:57:59 UTC, "Aneesh Kumar K.V" wrote: > mm_tlb_flush_nested change was added in the mmu gather tlb flush to handle > the case of parallel pte invalidate happening with mmap_sem held in read > mode. This fix was done by commit: 02390f66bd23 ("powerpc/64s/radix: Fix > MADV_[FR

Re: [RESEND][PATCH] powerpc/pseries: Use correct event modifier in rtas_parse_epow_errlog()

2019-11-14 Thread Michael Ellerman
On Wed, 2019-10-23 at 13:48:38 UTC, YueHaibing wrote: > rtas_parse_epow_errlog() should pass 'modifier' to > handle_system_shutdown, because event modifier only use > bottom 4 bits. > > Reviewed-by: Tyrel Datwyler > Signed-off-by: YueHaibing Applied to powerpc next, thanks. https://git.kernel.

  1   2   >