[RFC PATCH 04/13] powerpc/vas: Setup fault window per VAS instance

2019-10-18 Thread Haren Myneni
Setup fault window for each VAS instance. When NX gets fault on request buffer, write fault CRBs in the corresponding fault FIFO and then sends an interrupt to the OS. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/Makefile | 2 +-

[RFC PATCH 03/13] powerpc/vas: Setup IRQ mapping and register port for each window

2019-10-18 Thread Haren Myneni
Read interrupt and port values from the device tree, setup IRQ mapping and register IRQ for each VAS instance. Set port value for each NX window. When NX sees a fault on CRB, kernel gets an interrupt and handles the fault. IRQ setup and fault handling is needed only for user space send windows.

[RFC PATCH 02/13] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block

2019-10-18 Thread Haren Myneni
Kernel sets fault address and status in CRB for NX page fault on user space address after processing page fault. User space gets the signal and handles the fault mentioned in CRB by bringing the page in to memory and send NX request again. Signed-off-by: Sukadev Bhattiprolu Signed-off-by:

[RFC PATCH 01/13] Revert "powerpc/powernv: remove the unused vas_win_paste_addr and vas_win_id functions"

2019-10-18 Thread Haren Myneni
This reverts commit 452d23c0f6bd97f2fd8a9691fee79b76040a0feb. User space send windows (NX GZIP compression) need vas_win_paste_addr() to mmap window paste address and vas_win_id() to get window ID when window address is given. vas_win_id() is introduced in original commit 61f3cca8cda97

[RFC PATCH 00/13] powerpc/vas: Page fault handling for user space NX requests

2019-10-18 Thread Haren Myneni
Applications can send compression / decompression requests to NX with COPY/PASTE instructions. When NX is processing these requests, can hit fault on the request buffer (not in memory). It issues an interrupt and pastes fault CRB in fault FIFO. Expects kernel to handle this fault and return

[PATCH AUTOSEL 4.14 04/56] powerpc/powernv: hold device_hotplug_lock when calling memtrace_offline_pages()

2019-10-18 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 5666848774ef43d3db5151ec518f1deb63515c20 ] Let's perform all checking + offlining + removing under device_hotplug_lock, so nobody can mess with these devices via sysfs concurrently. [da...@redhat.com: take device_hotplug_lock outside of loop] Link:

[PATCH AUTOSEL 4.19 005/100] powerpc/powernv: hold device_hotplug_lock when calling memtrace_offline_pages()

2019-10-18 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 5666848774ef43d3db5151ec518f1deb63515c20 ] Let's perform all checking + offlining + removing under device_hotplug_lock, so nobody can mess with these devices via sysfs concurrently. [da...@redhat.com: take device_hotplug_lock outside of loop] Link:

Re: [PATCH 0/7] towards QE support on ARM

2019-10-18 Thread Li Yang
On Fri, Oct 18, 2019 at 3:54 PM Rasmus Villemoes wrote: > > On 18/10/2019 22.16, Leo Li wrote: > > > >> > >> There have been several attempts in the past few years to allow building > >> the > >> QUICC engine drivers for platforms other than PPC. This is (the beginning > >> of) > >> yet another

Re: [PATCH v2 00/33] Kill pr_warning in the whole linux code

2019-10-18 Thread Joe Perches
(Adding Stephen Rothwell) On Fri, 2019-10-18 at 17:22 +0200, Christoph Hellwig wrote: > As I said before: please just send Linus a scripted conversion after > the next -rc1. There is no point in creating all this churn. I again ask for a scripted mechanism to be added to -next to allow these

Re: [PATCH v2 00/33] Kill pr_warning in the whole linux code

2019-10-18 Thread Christoph Hellwig
As I said before: please just send Linus a scripted conversion after the next -rc1. There is no point in creating all this churn.

Re: [PATCH v2 00/33] Kill pr_warning in the whole linux code

2019-10-18 Thread Petr Mladek
On Fri 2019-10-18 11:17:10, Kefeng Wang wrote: > There are pr_warning and pr_warng to show WARNING level message, > most of the code using pr_warn, number based on next-20191017, > > pr_warn: 5206 pr_warning: 546 (tools: 399, others: 147) > > Let's carry on with the work to standardize the

Re: [PATCH 0/7] towards QE support on ARM

2019-10-18 Thread Rasmus Villemoes
On 18/10/2019 22.16, Leo Li wrote: > >> >> There have been several attempts in the past few years to allow building the >> QUICC engine drivers for platforms other than PPC. This is (the beginning of) >> yet another attempt. I hope I can get someone to pick up these relatively >> trivial patches

RE: [PATCH 0/7] towards QE support on ARM

2019-10-18 Thread Leo Li
> -Original Message- > From: Rasmus Villemoes > Sent: Friday, October 18, 2019 7:52 AM > To: Qiang Zhao ; Leo Li ; Greg > Kroah-Hartman ; Jiri Slaby > ; Timur Tabi ; linuxppc- > d...@lists.ozlabs.org; linux-arm-ker...@lists.infradead.org; linux- > ker...@vger.kernel.org;

Re: [PATCH v4 3/3] powerpc/prom_init: Use -ffreestanding to avoid a reference to bcmp

2019-10-18 Thread Segher Boessenkool
On Fri, Oct 18, 2019 at 12:00:22PM -0700, Nathan Chancellor wrote: > Just as an FYI, there was some more discussion around the availablity > and use of bcmp in this LLVM bug which spawned > commit 5f074f3e192f ("lib/string.c: implement a basic bcmp"). > >

Re: [PATCH v4 3/3] powerpc/prom_init: Use -ffreestanding to avoid a reference to bcmp

2019-10-18 Thread Nathan Chancellor
On Mon, Oct 14, 2019 at 02:11:41PM -0500, Segher Boessenkool wrote: > On Mon, Oct 14, 2019 at 08:56:12AM -0700, Nick Desaulniers wrote: > > On Mon, Oct 14, 2019 at 2:35 AM Segher Boessenkool > > wrote: > > > > > > On Sun, Oct 13, 2019 at 07:51:01PM -0700, Nathan Chancellor wrote: > > > > r374662

Re: [PATCH 4/7] soc: fsl: qe: replace spin_event_timeout by readx_poll_timeout_atomic

2019-10-18 Thread Christoph Hellwig
On Fri, Oct 18, 2019 at 02:52:31PM +0200, Rasmus Villemoes wrote: > /* wait for the QE_CR_FLG to clear */ > - ret = spin_event_timeout((ioread32be(_immr->cp.cecr) & QE_CR_FLG) == > 0, > - 100, 0); > - /* On timeout (e.g. failure), the expression will be

Re: [PATCH -next 03/13] hwrng: exynos - use devm_platform_ioremap_resource() to simplify code

2019-10-18 Thread Łukasz Stelmach
It was <2019-10-16 śro 12:46>, when YueHaibing wrote: > Use devm_platform_ioremap_resource() to simplify the code a bit. > This is detected by coccinelle. > > Signed-off-by: YueHaibing > --- > drivers/char/hw_random/exynos-trng.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >

Re: [PATCH] powerpc/prom_init: Undo relocation before entering secure mode

2019-10-18 Thread Ram Pai
On Wed, Sep 11, 2019 at 01:34:33PM -0300, Thiago Jung Bauermann wrote: > The ultravisor will do an integrity check of the kernel image but we > relocated it so the check will fail. Restore the original image by > relocating it back to the kernel virtual base address. > > This works because during

[PATCH v2 4/4] powerpc/fadump: sysfs for fadump memory reservation

2019-10-18 Thread Sourabh Jain
Add a sys interface to allow querying the memory reserved by FADump for saving the crash dump. Also added Documentation/ABI for the new sysfs file. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump| 7 +++ Documentation/powerpc/firmware-assisted-dump.rst |

[PATCH v2 1/4] Documentation/ABI: add ABI documentation for /sys/kernel/fadump_*

2019-10-18 Thread Sourabh Jain
Add the missing ABI documentation for the already available FADump sysfs files. Signed-off-by: Sourabh Jain --- Documentation/ABI/testing/sysfs-kernel-fadump_enabled | 7 +++ Documentation/ABI/testing/sysfs-kernel-fadump_registered | 8

[PATCH v2 3/4] Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated

2019-10-18 Thread Sourabh Jain
The /sys/kernel/fadump_* sysfs files are replicated under /sys/kernel/fadump/ directory. But we need to keep the old sysfs files to maintain the backward compatibility. The sysfs files are scheduled to remove by 2021. Signed-off-by: Sourabh Jain --- .../sysfs-kernel-fadump_enabled

[PATCH v2 2/4] powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files

2019-10-18 Thread Sourabh Jain
As the number of FADump sysfs files increases it is hard to manage all of them inside /sys/kernel directory. It's better to have all the FADump related sysfs files in a dedicated directory /sys/kernel/fadump. But in order to maintain the backward compatibility the /sys/kernel/fadump_* sysfs files

[PATCH v2 0/4] reorganize and add FADump sysfs files

2019-10-18 Thread Sourabh Jain
Currently, FADump sysfs files are present inside /sys/kernel directory. But as the number of FADump sysfs file increases it is not a good idea to push all of them in /sys/kernel directory. It is better to have separate directory to keep all the FADump sysfs files. The patch series reorganizes the

Re: [PATCH 2/7] soc: fsl: qe: drop volatile qualifier of struct qe_ic::regs

2019-10-18 Thread Christophe Leroy
Le 18/10/2019 à 14:52, Rasmus Villemoes a écrit : The actual io accessors (e.g. in_be32) implicitly add a volatile qualifier to their address argument. Remove volatile from the struct definition and the qe_ic_(read/write) helpers, in preparation for switching from the ppc-specific io

Re: [PATCH 1/7] soc: fsl: qe: remove space-before-tab

2019-10-18 Thread Christophe Leroy
Le 18/10/2019 à 14:52, Rasmus Villemoes a écrit : Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 417df7e19281..6fcbfad408de 100644 ---

[PATCH 6/7] serial: ucc_uart.c: explicitly include asm/cpm.h

2019-10-18 Thread Rasmus Villemoes
This driver uses #defines from asm/cpm.h, so instead of relying on some other header pulling that in, do that explicitly. Signed-off-by: Rasmus Villemoes --- drivers/tty/serial/ucc_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/ucc_uart.c

[PATCH 4/7] soc: fsl: qe: replace spin_event_timeout by readx_poll_timeout_atomic

2019-10-18 Thread Rasmus Villemoes
In preparation for allowing QE to be built for architectures other than ppc, use the generic readx_poll_timeout_atomic() helper from iopoll.h rather than the ppc-only spin_event_timeout(). Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 13 +++-- 1 file changed, 7

[PATCH 3/7] soc: fsl: qe: avoid ppc-specific io accessors

2019-10-18 Thread Rasmus Villemoes
In preparation for allowing to build QE support for architectures other than PPC, replace the ppc-specific io accessors. Done via $ spatch --sp-file io.cocci --in-place drivers/soc/fsl/qe/ where io.cocci is @@ expression addr, val; @@ - out_be32(addr, val) + iowrite32be(val, addr) @@

[PATCH 0/7] towards QE support on ARM

2019-10-18 Thread Rasmus Villemoes
There have been several attempts in the past few years to allow building the QUICC engine drivers for platforms other than PPC. This is (the beginning of) yet another attempt. I hope I can get someone to pick up these relatively trivial patches (I _think_ they shouldn't change functionality at

[PATCH 2/7] soc: fsl: qe: drop volatile qualifier of struct qe_ic::regs

2019-10-18 Thread Rasmus Villemoes
The actual io accessors (e.g. in_be32) implicitly add a volatile qualifier to their address argument. Remove volatile from the struct definition and the qe_ic_(read/write) helpers, in preparation for switching from the ppc-specific io accessors to generic ones. Signed-off-by: Rasmus Villemoes

[PATCH 1/7] soc: fsl: qe: remove space-before-tab

2019-10-18 Thread Rasmus Villemoes
Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 417df7e19281..6fcbfad408de 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -378,8

Re: [PATCH v8 1/5] kasan: support backing vmalloc space with real shadow memory

2019-10-18 Thread Andrey Ryabinin
On 10/16/19 4:22 PM, Mark Rutland wrote: > Hi Andrey, > > On Wed, Oct 16, 2019 at 03:19:50PM +0300, Andrey Ryabinin wrote: >> On 10/14/19 4:57 PM, Daniel Axtens wrote: > + /* > + * Ensure poisoning is visible before the shadow is made visible > + * to other CPUs. > + */

[PATCH v12 06/22] powerpc: mm: Add p?d_leaf() definitions

2019-10-18 Thread Steven Price
walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_leaf() functions/macros. For powerpc pmd_large() already exists and does what we

Re: [PATCH 0/4] crypto: nx - convert to skcipher API

2019-10-18 Thread Herbert Xu
On Sat, Oct 12, 2019 at 09:39:14PM -0700, Eric Biggers wrote: > This series converts the PowerPC Nest (NX) implementations of AES modes > from the deprecated "blkcipher" API to the "skcipher" API. This is > needed in order for the blkcipher API to be removed. > > This patchset is compile-tested

Re: [PATCH v3 06/15] powerpc/32: prepare for CONFIG_VMAP_STACK

2019-10-18 Thread Andrew Donnellan
On 18/10/19 5:46 pm, Christophe Leroy wrote: Le 17/10/2019 à 09:36, Andrew Donnellan a écrit : On 10/9/19 7:16 pm, Christophe Leroy wrote: +#if defined(CONFIG_VMAP_STACK) && CONFIG_THREAD_SHIFT < PAGE_SHIFT +#define THREAD_SHIFT    PAGE_SHIFT +#else   #define THREAD_SHIFT   

Re: [PATCH v3 06/15] powerpc/32: prepare for CONFIG_VMAP_STACK

2019-10-18 Thread Christophe Leroy
Le 17/10/2019 à 09:36, Andrew Donnellan a écrit : On 10/9/19 7:16 pm, Christophe Leroy wrote: +#if defined(CONFIG_VMAP_STACK) && CONFIG_THREAD_SHIFT < PAGE_SHIFT +#define THREAD_SHIFT    PAGE_SHIFT +#else   #define THREAD_SHIFT    CONFIG_THREAD_SHIFT +#endif   #define THREAD_SIZE