[PATCH v11 02/14] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block

2020-04-16 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:

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Christophe Leroy
Le 16/04/2020 à 07:22, Wang Wenhu a écrit : Yes, kzalloc() would clean the allocated areas and the init of remaining array elements are redundant. I will remove the block in v3. + dev_err(>dev, "error no valid uio-map configured\n"); + ret = -EINVAL; +

[PATCH v11 09/14] powerpc/vas: Return credits after handling fault

2020-04-16 Thread Haren Myneni
NX uses credit mechanism to control the number of requests issued on a specific window at any point of time. Only send windows and fault window are used credits. When the request is issued on a given window, a credit is taken. This credit will be returned after that request is processed. If

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Greg KH
On Wed, Apr 15, 2020 at 02:27:51PM -0500, Scott Wood wrote: > > > + dev_err(>dev, "error no valid uio-map configured\n"); > > > + ret = -EINVAL; > > > + goto err_info_free_internel; > > > + } > > > + > > > + info->version = "0.1.0"; > > > > Could you define some

[PATCH v11 03/14] powerpc/vas: Alloc and setup IRQ and trigger port address

2020-04-16 Thread Haren Myneni
Allocate a xive irq on each chip with a vas instance. The NX coprocessor raises a host CPU interrupt via vas if it encounters page fault on user space request buffer. Subsequent patches register the trigger port with the NX coprocessor, and create a vas fault handler for this interrupt mapping.

[PATCH v11 12/14] powerpc/vas: Display process stuck message

2020-04-16 Thread Haren Myneni
Process can not close send window until all requests are processed. Means wait until window state is not busy and send credits are returned. Display debug messages in case taking longer to close the window. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 30

[PATCH v11 01/14] powerpc/xive: Define xive_native_alloc_irq_on_chip()

2020-04-16 Thread Haren Myneni
This function allocates IRQ on a specific chip. VAS needs per chip IRQ allocation and will have IRQ handler per VAS instance. Signed-off-by: Haren Myneni Reviewed-by: Cédric Le Goater --- arch/powerpc/include/asm/xive.h | 9 - arch/powerpc/sysdev/xive/native.c | 6 +++--- 2 files

[PATCH v11 04/14] powerpc/vas: Setup fault window per VAS instance

2020-04-16 Thread Haren Myneni
Setup fault window for each VAS instance. When NX gets a fault on request buffer, pastes fault CRB in the corresponding fault FIFO and then raises an interrupt to the OS. The kernel handles this fault and process faults CRB from this FIFO. Signed-off-by: Sukadev Bhattiprolu Signed-off-by:

[PATCH v11 05/14] powerpc/vas: Register NX with fault window ID and IRQ port value

2020-04-16 Thread Haren Myneni
For each user space send window, register NX with fault window ID and port value so that NX paste CRBs in this fault FIFO when it sees fault on the request buffer. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 15

[PATCH v11 08/14] powerpc/vas: Update CSB and notify process for fault CRBs

2020-04-16 Thread Haren Myneni
Applications polls on CSB for the status update after requests are issued. NX process these requests and update the CSB with the status. If it encounters translation error, pastes CRB in fault FIFO and raises an interrupt. The kernel handles fault by reading CRB from fault FIFO and process the

[PATCH v11 07/14] powerpc/vas: Setup thread IRQ handler per VAS instance

2020-04-16 Thread Haren Myneni
When NX encounters translation error on CRB and any request buffer, raises an interrupt on the CPU to handle the fault. It can raise one interrupt for multiple faults. Expects OS to handle these faults and return credits for fault window after processing faults. Setup thread IRQ handler and IRQ

[PATCH v11 14/14] powerpc: Use mm_context vas_windows counter to issue CP_ABORT

2020-04-16 Thread Haren Myneni
set_thread_uses_vas() sets used_vas flag for a process that opened VAS window and issue CP_ABORT during context switch for only that process. In multi-thread application, windows can be shared. For example Thread A can open a window and Thread B can run COPY/PASTE instructions to send NX request

[PATCH v11 13/14] powerpc/vas: Free send window in VAS instance after credits returned

2020-04-16 Thread Haren Myneni
NX may be processing requests while trying to close window. Wait until all credits are returned and then free send window from VAS instance. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v11 06/14] powerpc/vas: Take reference to PID and mm for user space windows

2020-04-16 Thread Haren Myneni
When process opens a window, its pid and tgid will be saved in the vas_window struct. This window will be closed when the process exits. The kernel handles NX faults by updating CSB or send SEGV signal to pid of the process if the userspace csb addr is invalid. In multi-thread applications, a

[PATCH v11 11/14] powerpc/vas: Do not use default credits for receive window

2020-04-16 Thread Haren Myneni
System checkstops if RxFIFO overruns with more requests than the maximum possible number of CRBs allowed in FIFO at any time. So max credits value (rxattr.wcreds_max) is set and is passed to vas_rx_win_open() by the the driver. Signed-off-by: Haren Myneni ---

[PATCH v11 10/14] powerpc/vas: Print CRB and FIFO values

2020-04-16 Thread Haren Myneni
Dump FIFO entries if could not find send window and print CRB for debugging. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Haren Myneni --- arch/powerpc/platforms/powernv/vas-fault.c | 41 ++ 1 file changed, 41 insertions(+) diff --git

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Greg KH
On Wed, Apr 15, 2020 at 02:26:55PM -0500, Scott Wood wrote: > Instead, have module parameters that take the sizes and alignments you'd like > to allocate and expose to userspace. Better still would be some sort of > dynamic allocation (e.g. open a fd, ioctl to set the requested size/alignment, >

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Rich Felker
On Thu, Apr 16, 2020 at 11:21:56AM -0400, Jeffrey Walton wrote: > On Wed, Apr 15, 2020 at 8:17 PM Nicholas Piggin wrote: > > > > Excerpts from Rich Felker's message of April 16, 2020 8:55 am: > > > On Thu, Apr 16, 2020 at 07:45:09AM +1000, Nicholas Piggin wrote: > > >> I would like to enable

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Rich Felker
On Thu, Apr 16, 2020 at 06:48:44AM +0200, Florian Weimer wrote: > * Rich Felker: > > > My preference would be that it work just like the i386 AT_SYSINFO > > where you just replace "int $128" with "call *%%gs:16" and the kernel > > provides a stub in the vdso that performs either scv or the old >

Re: [PATCH v4,4/4] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Christophe Leroy
Le 16/04/2020 à 17:35, Wang Wenhu a écrit : A driver for freescale 85xx platforms to access the Cache-Sram form user level. This is extremely helpful for some user-space applications that require high performance memory accesses. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Florian Weimer
* Rich Felker: > On Thu, Apr 16, 2020 at 06:42:32PM +0200, Florian Weimer wrote: >> * Rich Felker: >> >> > On Thu, Apr 16, 2020 at 06:48:44AM +0200, Florian Weimer wrote: >> >> * Rich Felker: >> >> >> >> > My preference would be that it work just like the i386 AT_SYSINFO >> >> > where you just

Re: [PATCH v4,3/4] powerpc: sysdev: fix compile warning for fsl_85xx_cache_sram

2020-04-16 Thread Christophe Leroy
Le 16/04/2020 à 17:35, Wang Wenhu a écrit : Function instantiate_cache_sram should not be linked into the init section for its caller mpc85xx_l2ctlr_of_probe is none-__init. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Adhemerval Zanella
On 16/04/2020 12:37, Rich Felker wrote: > On Thu, Apr 16, 2020 at 11:16:04AM -0300, Adhemerval Zanella wrote: >>> My preference would be that it work just like the i386 AT_SYSINFO >>> where you just replace "int $128" with "call *%%gs:16" and the kernel >>> provides a stub in the vdso that

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Rich Felker
On Thu, Apr 16, 2020 at 02:31:51PM -0400, Rich Felker wrote: > > While on musl: > > > > : > >0: 48 83 ec 08 sub$0x8,%rsp > >4: 48 63 ffmovslq %edi,%rdi > >7: 48 63 f6movslq %esi,%rsi > >a: b8

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Adhemerval Zanella
On 16/04/2020 15:31, Rich Felker wrote: > On Thu, Apr 16, 2020 at 03:18:42PM -0300, Adhemerval Zanella wrote: >> >> >> On 16/04/2020 14:59, Rich Felker wrote: >>> On Thu, Apr 16, 2020 at 02:50:18PM -0300, Adhemerval Zanella wrote: On 16/04/2020 12:37, Rich Felker wrote: > On

[PATCH v4,4/4] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Wang Wenhu
A driver for freescale 85xx platforms to access the Cache-Sram form user level. This is extremely helpful for some user-space applications that require high performance memory accesses. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood Cc: Michael Ellerman Cc:

Re: [PATCH v4,2/4] powerpc: sysdev: fix compile error for fsl_85xx_cache_sram

2020-04-16 Thread Christophe Leroy
Le 16/04/2020 à 17:35, Wang Wenhu a écrit : Include linux/io.h into fsl_85xx_cache_sram.c to fix the implicit-declaration compile error when building Cache-Sram. arch/powerpc/sysdev/fsl_85xx_cache_sram.c: In function ‘instantiate_cache_sram’: arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:26:

[PATCH] KVM: PPC: Book3S HV: read ibm,secure-memory nodes

2020-04-16 Thread Laurent Dufour
The newly introduced ibm,secure-memory nodes supersede the ibm,uv-firmware's property secure-memory-ranges. Firmware will no more expose the secure-memory-ranges property so first read the new one and if not found rollback to the older one. Signed-off-by: Laurent Dufour ---

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Rich Felker
On Thu, Apr 16, 2020 at 02:50:18PM -0300, Adhemerval Zanella wrote: > > > On 16/04/2020 12:37, Rich Felker wrote: > > On Thu, Apr 16, 2020 at 11:16:04AM -0300, Adhemerval Zanella wrote: > >>> My preference would be that it work just like the i386 AT_SYSINFO > >>> where you just replace "int

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Rich Felker
On Thu, Apr 16, 2020 at 03:18:42PM -0300, Adhemerval Zanella wrote: > > > On 16/04/2020 14:59, Rich Felker wrote: > > On Thu, Apr 16, 2020 at 02:50:18PM -0300, Adhemerval Zanella wrote: > >> > >> > >> On 16/04/2020 12:37, Rich Felker wrote: > >>> On Thu, Apr 16, 2020 at 11:16:04AM -0300,

[PATCH v4, 3/4] powerpc: sysdev: fix compile warning for fsl_85xx_cache_sram

2020-04-16 Thread Wang Wenhu
Function instantiate_cache_sram should not be linked into the init section for its caller mpc85xx_l2ctlr_of_probe is none-__init. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Fixes: 6db92cc9d07d ("powerpc/85xx: add

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Adhemerval Zanella
On 16/04/2020 14:59, Rich Felker wrote: > On Thu, Apr 16, 2020 at 02:50:18PM -0300, Adhemerval Zanella wrote: >> >> >> On 16/04/2020 12:37, Rich Felker wrote: >>> On Thu, Apr 16, 2020 at 11:16:04AM -0300, Adhemerval Zanella wrote: > My preference would be that it work just like the i386

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Rich Felker
On Thu, Apr 16, 2020 at 11:16:04AM -0300, Adhemerval Zanella wrote: > > My preference would be that it work just like the i386 AT_SYSINFO > > where you just replace "int $128" with "call *%%gs:16" and the kernel > > provides a stub in the vdso that performs either scv or the old > > mechanism with

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Florian Weimer
* Rich Felker: > On Thu, Apr 16, 2020 at 06:48:44AM +0200, Florian Weimer wrote: >> * Rich Felker: >> >> > My preference would be that it work just like the i386 AT_SYSINFO >> > where you just replace "int $128" with "call *%%gs:16" and the kernel >> > provides a stub in the vdso that performs

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Rich Felker
On Thu, Apr 16, 2020 at 06:42:32PM +0200, Florian Weimer wrote: > * Rich Felker: > > > On Thu, Apr 16, 2020 at 06:48:44AM +0200, Florian Weimer wrote: > >> * Rich Felker: > >> > >> > My preference would be that it work just like the i386 AT_SYSINFO > >> > where you just replace "int $128" with

[PATCH v4, 1/4] powerpc: sysdev: fix compile error for fsl_85xx_l2ctlr

2020-04-16 Thread Wang Wenhu
Include "linux/of_address.h" to fix the compile error for mpc85xx_l2ctlr_of_probe() when compiling fsl_85xx_cache_sram.c. CC arch/powerpc/sysdev/fsl_85xx_l2ctlr.o arch/powerpc/sysdev/fsl_85xx_l2ctlr.c: In function ‘mpc85xx_l2ctlr_of_probe’: arch/powerpc/sysdev/fsl_85xx_l2ctlr.c:90:11:

Re: [PATCH v4,1/4] powerpc: sysdev: fix compile error for fsl_85xx_l2ctlr

2020-04-16 Thread Christophe Leroy
Le 16/04/2020 à 17:35, Wang Wenhu a écrit : Include "linux/of_address.h" to fix the compile error for mpc85xx_l2ctlr_of_probe() when compiling fsl_85xx_cache_sram.c. CC arch/powerpc/sysdev/fsl_85xx_l2ctlr.o arch/powerpc/sysdev/fsl_85xx_l2ctlr.c: In function ‘mpc85xx_l2ctlr_of_probe’:

Re: [PATCH v2] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

2020-04-16 Thread Segher Boessenkool
On Thu, Apr 16, 2020 at 02:41:56PM +0200, Christophe Leroy wrote: > Le 16/04/2020 à 00:37, Segher Boessenkool a écrit : > >>+ __put_user_nocheck_goto((__typeof__(*(ptr)))(x), (ptr), > >>sizeof(*(ptr)), label) > > > >This line gets too long, can you break it up somehow? > > This line has 86

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-16 Thread David Hildenbrand
> Not sure if I get the notifier idea clearly. If you mean > > 1) Add a common function to pick memory in unmovable zone; Not strictly required IMHO. But, minor detail. > 2) Let DLPAR, balloon register with notifier; Yeah, or virtio-mem, or any other technology that adds/removes memory

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Jeffrey Walton
On Wed, Apr 15, 2020 at 8:17 PM Nicholas Piggin wrote: > > Excerpts from Rich Felker's message of April 16, 2020 8:55 am: > > On Thu, Apr 16, 2020 at 07:45:09AM +1000, Nicholas Piggin wrote: > >> I would like to enable Linux support for the powerpc 'scv' instruction, > >> as a faster system call

[PATCH v9 5/7] ASoC: fsl_asrc: Move common definition to fsl_asrc_common

2020-04-16 Thread Shengjiu Wang
There is a new ASRC included in i.MX serial platform, there are some common definition can be shared with each other. So move the common definition to a separate header file. And add fsl_asrc_pair_priv and fsl_asrc_priv for the variable specific for the module, which can be used internally.

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-16 Thread David Hildenbrand
>> kexec_walk_memblock() has the option for "kbuf->top_down". Only >> kexec_walk_resources() seems to ignore it. > > Yeah, that top down searching is done in a found low mem area. Means > firstly search an available region bottom up, then put kernel top down > in that region. The reason is our

[PATCH v9 4/7] ASoC: fsl_asrc: Support new property fsl,asrc-format

2020-04-16 Thread Shengjiu Wang
In order to align with new ESARC, we add new property fsl,asrc-format. The fsl,asrc-format can replace the fsl,asrc-width, driver can accept format from devicetree, don't need to convert it to format through width. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen ---

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Adhemerval Zanella
On 15/04/2020 19:55, Rich Felker wrote: > On Thu, Apr 16, 2020 at 07:45:09AM +1000, Nicholas Piggin wrote: >> I would like to enable Linux support for the powerpc 'scv' instruction, >> as a faster system call instruction. >> >> This requires two things to be defined: Firstly a way to advertise

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Szabolcs Nagy
* Nicholas Piggin via Libc-alpha [2020-04-16 10:16:54 +1000]: > Well it would have to test HWCAP and patch in or branch to two > completely different sequences including register save/restores yes. > You could have the same asm and matching clobbers to put the sequence > inline and then you

Re: [EXTERNAL] [PATCH] target/ppc: Fix mtmsr(d) L=1 variant that loses interrupts

2020-04-16 Thread Alex Bennée
Cédric Le Goater writes: > On 4/14/20 1:11 PM, Nicholas Piggin wrote: >> If mtmsr L=1 sets MSR[EE] while there is a maskable exception pending, >> it does not cause an interrupt. This causes the test case to hang: >> >>

[PATCH v9 0/7] ASoC: Add new module driver for new ASRC

2020-04-16 Thread Shengjiu Wang
Add new module driver for new ASRC in i.MX8MN, several commits are added for new property fsl,asrc-format Shengjiu Wang (7): ASoC: fsl_asrc: rename asrc_priv to asrc ASoC: dt-bindings: fsl_asrc: Add new property fsl,asrc-format ASoC: fsl-asoc-card: Support new property fsl,asrc-format

Re: [PATCH v2] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

2020-04-16 Thread Christophe Leroy
Le 16/04/2020 à 00:37, Segher Boessenkool a écrit : Hi! On Wed, Apr 15, 2020 at 09:25:59AM +, Christophe Leroy wrote: +#define __put_user_goto(x, ptr, label) \ + __put_user_nocheck_goto((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)), label) This line gets too long, can you

[PATCH v4, 2/4] powerpc: sysdev: fix compile error for fsl_85xx_cache_sram

2020-04-16 Thread Wang Wenhu
Include linux/io.h into fsl_85xx_cache_sram.c to fix the implicit-declaration compile error when building Cache-Sram. arch/powerpc/sysdev/fsl_85xx_cache_sram.c: In function ‘instantiate_cache_sram’: arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:26: error: implicit declaration of function

[PATCH v9 2/7] ASoC: dt-bindings: fsl_asrc: Add new property fsl, asrc-format

2020-04-16 Thread Shengjiu Wang
In order to support new EASRC and simplify the code structure, We decide to share the common structure between them. This bring a problem that EASRC accept format directly from devicetree, but ASRC accept width from devicetree. In order to align with new ESARC, we add new property

[PATCH v2] powerpc/uaccess: Use flexible addressing with __put_user()/__get_user()

2020-04-16 Thread Christophe Leroy
At the time being, __put_user()/__get_user() and friends only use D-form addressing, with 0 offset. Ex: lwz reg1, 0(reg2) Give the compiler the opportunity to use other adressing modes whenever possible, to get more optimised code. Hereunder is a small exemple: struct test {

Re: [PATCH RESEND,v3,4/4] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Christophe Leroy
Le 16/04/2020 à 13:16, Wang Wenhu a écrit : A driver for freescale 85xx platforms to access the Cache-Sram form user level. This is extremely helpful for some user-space applications that require high performance memory accesses. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood

[PATCH v9 1/7] ASoC: fsl_asrc: rename asrc_priv to asrc

2020-04-16 Thread Shengjiu Wang
In order to move common structure to fsl_asrc_common.h we change the name of asrc_priv to asrc, the asrc_priv will be used by new struct fsl_asrc_priv. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen --- sound/soc/fsl/fsl_asrc.c | 298 +--

[PATCH v3] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

2020-04-16 Thread Christophe Leroy
unsafe_put_user() is designed to take benefit of 'asm goto'. Instead of using the standard __put_user() approach and branch based on the returned error, use 'asm goto' and make the exception code branch directly to the error label. There is no code anymore in the fixup section. This change

[PATCH v4,0/4] drivers: uio: new driver uio_fsl_85xx_cache_sram

2020-04-16 Thread Wang Wenhu
Changes since v1: * Addressed comments from Greg K-H * Moved kfree(info->name) into uio_info_free_internal() Changes since v2: * Drop the patch that modifies Kconfigs of arch/powerpc/platforms and modified the sequence of patches: 01:dropped, 02->03, 03->02, 04->01, 05->04 *

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-16 Thread David Hildenbrand
>>> Sounds doable to me, and not complicated. >>> images. It would apply to - arm64 and filter out all hotadded memory (IIRC, only boot memory can be used). >>> >>> Do you mean hot added memory after boot can't be recognized and added >>> into system RAM on arm64? >> >> See

Re: [PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-16 Thread Paolo Bonzini
On 16/04/20 07:10, Tianjia Zhang wrote: > In earlier versions of kvm, 'kvm_run' is an independent structure > and is not included in the vcpu structure. At present, 'kvm_run' > is already included in the vcpu structure, so the parameter > 'kvm_run' is redundant. > > This patch simplify the

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-16 Thread Baoquan He
On 04/16/20 at 04:09pm, David Hildenbrand wrote: > >>> Sounds doable to me, and not complicated. > >>> > images. It would apply to > > - arm64 and filter out all hotadded memory (IIRC, only boot memory can > be used). > >>> > >>> Do you mean hot added memory after boot can't

[PATCH v9 3/7] ASoC: fsl-asoc-card: Support new property fsl, asrc-format

2020-04-16 Thread Shengjiu Wang
In order to align with new ESARC, we add new property fsl,asrc-format. The fsl,asrc-format can replace the fsl,asrc-width, driver can accept format from devicetree, don't need to convert it to format through width. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen ---

[PATCH v9 7/7] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers

2020-04-16 Thread Shengjiu Wang
EASRC (Enhanced Asynchronous Sample Rate Converter) is a new IP module found on i.MX8MN. It is different with old ASRC module. The primary features for the EASRC are as follows: - 4 Contexts - groups of channels with an independent time base - Fully independent and concurrent context control -

[PATCH v9 6/7] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-04-16 Thread Shengjiu Wang
EASRC (Enhanced Asynchronous Sample Rate Converter) is a new IP module found on i.MX8MN. Signed-off-by: Shengjiu Wang Reviewed-by: Rob Herring --- .../devicetree/bindings/sound/fsl,easrc.yaml | 101 ++ 1 file changed, 101 insertions(+) create mode 100644

Re: [PATCH 1/3] kexec: Prevent removal of memory in use by a loaded kexec image

2020-04-16 Thread Baoquan He
On 04/16/20 at 03:31pm, David Hildenbrand wrote: > > Not sure if I get the notifier idea clearly. If you mean > > > > 1) Add a common function to pick memory in unmovable zone; > > Not strictly required IMHO. But, minor detail. > > > 2) Let DLPAR, balloon register with notifier; > > Yeah, or

Re:Re: [PATCH RESEND,v3,4/4] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread 王文虎
Hi, Christophe, dev_kzalloc really looks better. I will update the patch with the comments addressed. Thanks, Wenhu From: Christophe Leroy Date: 2020-04-16 19:49:01 To:Wang Wenhu ,gre...@linuxfoundation.org, linux-ker...@vger.kernel.org,o...@buserror.net,linuxppc-dev@lists.ozlabs.org cc:

Re: [PATCH v4,4/4] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Scott Wood
On Thu, 2020-04-16 at 08:35 -0700, Wang Wenhu wrote: > +#define UIO_INFO_VER "devicetree,pseudo" What does this mean? Changing a number into a non-obvious string (Why "pseudo"? Why does the UIO user care that the config came from the device tree?) just to avoid setting off Greg's version number

Re: [PATCH] PCI/DPC: Allow Non-ACPI Native ports to use DPC

2020-04-16 Thread Kuppuswamy, Sathyanarayanan
Hi, On 4/16/20 12:59 PM, Jon Derrick wrote: Some platforms have a mix of ports whose capabilities can be negotiated by _OSC, and some ports which are not described by ACPI and instead managed by Native drivers. The existing Firmware-First HEST model can incorrectly tag these Native, Non-ACPI

Re: POWER9 crash due to STRICT_KERNEL_RWX (WAS: Re: Linux-next POWER9 NULL pointer NIP...)

2020-04-16 Thread Russell Currey
On Thu, 2020-04-16 at 22:40 -0400, Qian Cai wrote: > > On Apr 16, 2020, at 10:27 PM, Russell Currey > > wrote: > > > > Reverting the patch with the given config will have the same effect > > as > > STRICT_KERNEL_RWX=n. Not discounting that it could be a bug on the > > powerpc side (i.e.

Re: [PATCH V3 3/5] selftests/powerpc: Add NX-GZIP engine compress testcase

2020-04-16 Thread Michael Ellerman
Hi Raphael, Some comments below ... Raphael Moreira Zinsly writes: > Add a compression testcase for the powerpc NX-GZIP engine. > > Signed-off-by: Bulent Abali > Signed-off-by: Raphael Moreira Zinsly > --- > .../selftests/powerpc/nx-gzip/Makefile| 21 + >

Re: POWER9 crash due to STRICT_KERNEL_RWX (WAS: Re: Linux-next POWER9 NULL pointer NIP...)

2020-04-16 Thread Qian Cai
> On Apr 16, 2020, at 10:46 PM, Russell Currey wrote: > > On Thu, 2020-04-16 at 22:40 -0400, Qian Cai wrote: >>> On Apr 16, 2020, at 10:27 PM, Russell Currey >>> wrote: >>> >>> Reverting the patch with the given config will have the same effect >>> as >>> STRICT_KERNEL_RWX=n. Not

[PATCH] powerpc/pseries: Make vio and ibmebus initcalls pseries specific

2020-04-16 Thread Oliver O'Halloran
The vio and ibmebus buses are used for pseries specific paravirtualised devices and currently they're initialised by the generic initcall types. This is mostly fine, but it can result in some nuisance errors in dmesg when booting on PowerNV on some OSes, e.g. [2.984439] synth uevent:

Re: [PATCH V3 1/5] selftests/powerpc: Add header files for GZIP engine test

2020-04-16 Thread Michael Ellerman
Hi Raphael, Some comments below ... Raphael Moreira Zinsly writes: > Add files to access the powerpc NX-GZIP engine in user space. > > Signed-off-by: Bulent Abali > Signed-off-by: Raphael Moreira Zinsly > --- > .../selftests/powerpc/nx-gzip/inc/crb.h | 159 ++ >

Re: [PATCH kernel v2 0/7] powerpc/powenv/ioda: Allow huge DMA window at 4GB

2020-04-16 Thread Alexey Kardashevskiy
On 17/04/2020 11:26, Russell Currey wrote: > On Thu, 2020-04-16 at 12:53 +1000, Oliver O'Halloran wrote: >> On Thu, Apr 16, 2020 at 12:34 PM Oliver O'Halloran >> wrote: >>> On Thu, Apr 16, 2020 at 11:27 AM Alexey Kardashevskiy < >>> a...@ozlabs.ru> wrote: Anyone? Is it totally useless or

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Rich Felker
On Thu, Apr 16, 2020 at 06:02:35PM -0500, Segher Boessenkool wrote: > On Thu, Apr 16, 2020 at 08:12:19PM +0200, Florian Weimer wrote: > > > I think my choice would be just making the inline syscall be a single > > > call insn to an asm source file that out-of-lines the loading of TOC > > > pointer

Re: [RFC PATCH 2/3] powerpc/lib: Initialize a temporary mm for code patching

2020-04-16 Thread Michael Ellerman
Christophe Leroy writes: > Le 31/03/2020 à 05:19, Christopher M Riedl a écrit : >>> On March 24, 2020 11:10 AM Christophe Leroy wrote: >>> Le 23/03/2020 à 05:52, Christopher M. Riedl a écrit : When code patching a STRICT_KERNEL_RWX kernel the page containing the address to be patched

Re: [PATCH] target/ppc: Fix mtmsr(d) L=1 variant that loses interrupts

2020-04-16 Thread David Gibson
On Tue, Apr 14, 2020 at 09:11:31PM +1000, Nicholas Piggin wrote: 65;5803;1c> If mtmsr L=1 sets MSR[EE] while there is a maskable exception pending, > it does not cause an interrupt. This causes the test case to hang: > > https://lists.gnu.org/archive/html/qemu-ppc/2019-10/msg00826.html > > More

Re: POWER9 crash due to STRICT_KERNEL_RWX (WAS: Re: Linux-next POWER9 NULL pointer NIP...)

2020-04-16 Thread Russell Currey
On Thu, 2020-04-16 at 22:17 -0400, Steven Rostedt wrote: > On Thu, 16 Apr 2020 21:19:10 -0400 > Qian Cai wrote: > > > OK, reverted the commit, > > > > c55d7b5e6426 (“powerpc: Remove STRICT_KERNEL_RWX incompatibility > > with RELOCATABLE”) > > > > or set STRICT_KERNEL_RWX=n fixed the crash

POWER9 crash due to STRICT_KERNEL_RWX (WAS: Re: Linux-next POWER9 NULL pointer NIP...)

2020-04-16 Thread Qian Cai
OK, reverted the commit, c55d7b5e6426 (“powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE”) or set STRICT_KERNEL_RWX=n fixed the crash below and also mentioned in this thread, https://lore.kernel.org/lkml/15ac5b0e-a221-4b8c-9039-fa96b8ef7...@lca.pw/ [ 148.110969][T13115]

Re: [PATCH] powerpc/uaccess: Use flexible addressing with __put_user()/__get_user()

2020-04-16 Thread Segher Boessenkool
Hi! On Thu, Apr 16, 2020 at 07:50:00AM +0200, Christophe Leroy wrote: > Le 16/04/2020 à 00:06, Segher Boessenkool a écrit : > >On Wed, Apr 15, 2020 at 09:20:26AM +, Christophe Leroy wrote: > >>At the time being, __put_user()/__get_user() and friends only use > >>register indirect with

Re: POWER9 crash due to STRICT_KERNEL_RWX (WAS: Re: Linux-next POWER9 NULL pointer NIP...)

2020-04-16 Thread Steven Rostedt
On Thu, 16 Apr 2020 21:19:10 -0400 Qian Cai wrote: > OK, reverted the commit, > > c55d7b5e6426 (“powerpc: Remove STRICT_KERNEL_RWX incompatibility with > RELOCATABLE”) > > or set STRICT_KERNEL_RWX=n fixed the crash below and also mentioned in this > thread, This may be a symptom and not a

Re: [PATCH v4,4/4] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread 王文虎
>> On Thu, 2020-04-16 at 08:35 -0700, Wang Wenhu wrote: >> > +#define UIO_INFO_VER "devicetree,pseudo" >> >> What does this mean? Changing a number into a non-obvious string (Why >> "pseudo"? Why does the UIO user care that the config came from the device >> tree?) just to avoid setting

Re: POWER9 crash due to STRICT_KERNEL_RWX (WAS: Re: Linux-next POWER9 NULL pointer NIP...)

2020-04-16 Thread Qian Cai
> On Apr 16, 2020, at 10:27 PM, Russell Currey wrote: > > Reverting the patch with the given config will have the same effect as > STRICT_KERNEL_RWX=n. Not discounting that it could be a bug on the > powerpc side (i.e. relocatable kernels with strict RWX on haven't been > exhaustively tested

Re: [PATCH v5 3/9] powerpc/vas: Add VAS user space API

2020-04-16 Thread Michael Ellerman
Haren Myneni writes: > On power9, user space can send GZIP compression requests directly to NX > once kernel establishes NX channel / window with VAS. This patch provides > user space API which allows user space to establish channel using open > VAS_TX_WIN_OPEN ioctl, mmap and close operations.

Re: [PATCH] KVM: PPC: Book3S HV: Handle non-present PTEs in page fault functions

2020-04-16 Thread David Gibson
On Thu, Apr 16, 2020 at 10:07:49AM +0200, Cédric Le Goater wrote: > On 4/16/20 7:03 AM, Paul Mackerras wrote: > > Since cd758a9b57ee "KVM: PPC: Book3S HV: Use __gfn_to_pfn_memslot in HPT > > page fault handler", it's been possible in fairly rare circumstances to > > load a non-present PTE in

Re: [PATCH kernel v2 0/7] powerpc/powenv/ioda: Allow huge DMA window at 4GB

2020-04-16 Thread Russell Currey
On Thu, 2020-04-16 at 12:53 +1000, Oliver O'Halloran wrote: > On Thu, Apr 16, 2020 at 12:34 PM Oliver O'Halloran > wrote: > > On Thu, Apr 16, 2020 at 11:27 AM Alexey Kardashevskiy < > > a...@ozlabs.ru> wrote: > > > Anyone? Is it totally useless or wrong approach? Thanks, > > > > I wouldn't say

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Segher Boessenkool
On Thu, Apr 16, 2020 at 08:34:42PM -0400, Rich Felker wrote: > On Thu, Apr 16, 2020 at 06:02:35PM -0500, Segher Boessenkool wrote: > > On Thu, Apr 16, 2020 at 08:12:19PM +0200, Florian Weimer wrote: > > > > I think my choice would be just making the inline syscall be a single > > > > call insn to

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-16 Thread Jason Wang
On 2020/4/17 上午6:55, Michael S. Tsirkin wrote: On Wed, Apr 15, 2020 at 10:43:56AM +0800, Jason Wang wrote: We try to keep the defconfig untouched after decoupling CONFIG_VHOST out of CONFIG_VIRTUALIZATION in commit 20c384f1ea1a ("vhost: refine vhost and vringh kconfig") by enabling VHOST_MENU

Re: [PATCH v4,4/4] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Scott Wood
On Fri, 2020-04-17 at 10:31 +0800, 王文虎 wrote: > > > On Thu, 2020-04-16 at 08:35 -0700, Wang Wenhu wrote: > > > > +#define UIO_INFO_VER "devicetree,pseudo" > > > > > > What does this mean? Changing a number into a non-obvious string (Why > > > "pseudo"? Why does the UIO user care that the

Re: [PATCH 11/29] mm: only allow page table mappings for built-in zsmalloc

2020-04-16 Thread Minchan Kim
On Tue, Apr 14, 2020 at 03:13:30PM +0200, Christoph Hellwig wrote: > This allows to unexport map_vm_area and unmap_kernel_range, which are > rather deep internal and should not be available to modules, as they for > example allow fine grained control of mapping permissions, and also > allow

Re: [PATCH] PCI/DPC: Allow Non-ACPI Native ports to use DPC

2020-04-16 Thread Derrick, Jonathan
On Thu, 2020-04-16 at 13:32 -0700, Kuppuswamy, Sathyanarayanan wrote: > Hi, > > On 4/16/20 12:59 PM, Jon Derrick wrote: > > Some platforms have a mix of ports whose capabilities can be negotiated > > by _OSC, and some ports which are not described by ACPI and instead > > managed by Native

[PATCH] PCI/DPC: Allow Non-ACPI Native ports to use DPC

2020-04-16 Thread Jon Derrick
Some platforms have a mix of ports whose capabilities can be negotiated by _OSC, and some ports which are not described by ACPI and instead managed by Native drivers. The existing Firmware-First HEST model can incorrectly tag these Native, Non-ACPI ports as Firmware-First capable ports by

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Segher Boessenkool
On Thu, Apr 16, 2020 at 08:12:19PM +0200, Florian Weimer wrote: > > I think my choice would be just making the inline syscall be a single > > call insn to an asm source file that out-of-lines the loading of TOC > > pointer and call through it or branch based on hwcap so that it's not > > repeated

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Scott Wood
On Thu, 2020-04-16 at 08:30 +0200, Greg KH wrote: > On Wed, Apr 15, 2020 at 02:26:55PM -0500, Scott Wood wrote: > > Instead, have module parameters that take the sizes and alignments you'd > > like > > to allocate and expose to userspace. Better still would be some sort of > > dynamic allocation

Re: [PATCH v2,5/5] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Scott Wood
On Thu, 2020-04-16 at 08:30 +0200, Greg KH wrote: > On Wed, Apr 15, 2020 at 02:27:51PM -0500, Scott Wood wrote: > > > > + dev_err(>dev, "error no valid uio-map > > > > configured\n"); > > > > + ret = -EINVAL; > > > > + goto err_info_free_internel; > > > >

Re: [PATCH 10/28] mm: only allow page table mappings for built-in zsmalloc

2020-04-16 Thread Minchan Kim
Hi Christoph, Sorry for the late. On Sat, Apr 11, 2020 at 09:20:52AM +0200, Christoph Hellwig wrote: > Hi Minchan, > > On Fri, Apr 10, 2020 at 04:11:36PM -0700, Minchan Kim wrote: > > It doesn't mean we couldn't use zsmalloc as module any longer. It means > > we couldn't use zsmalloc as module

Re: [PATCH v2] powerpc/setup_64: Set cache-line-size based on cache-block-size

2020-04-16 Thread Chris Packham
On Thu, 2020-04-16 at 21:43 +1000, Michael Ellerman wrote: > Chris Packham writes: > > Hi All, > > > > On Wed, 2020-03-25 at 16:18 +1300, Chris Packham wrote: > > > If {i,d}-cache-block-size is set and {i,d}-cache-line-size is > > > not, > > > use > > > the block-size value for both. Per the

Re: [Bug 206203] kmemleak reports various leaks in drivers/of/unittest.c

2020-04-16 Thread Frank Rowand
On 4/15/20 10:27 PM, Frank Rowand wrote: > On 4/8/20 10:22 AM, Frank Rowand wrote: >> Hi Michael, >> >> On 4/7/20 10:13 PM, Michael Ellerman wrote: >>> bugzilla-dae...@bugzilla.kernel.org writes: https://bugzilla.kernel.org/show_bug.cgi?id=206203 Erhard F. (erhar...@mailbox.org)

[PATCH v3] powerpc/setup_64: Set cache-line-size based on cache-block-size

2020-04-16 Thread Chris Packham
If {i,d}-cache-block-size is set and {i,d}-cache-line-size is not, use the block-size value for both. Per the devicetree spec cache-line-size is only needed if it differs from the block size. Originally the code would fallback from block size to line size. An error message was printed if both

Re: [musl] Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-16 Thread Florian Weimer
* Nicholas Piggin via Libc-alpha: > We may or may not be getting a new ABI that will use instructions not > supported by old processors. > > https://sourceware.org/legacy-ml/binutils/2019-05/msg00331.html > > Current ABI continues to work of course and be the default for some > time, but

Re: [PATCH v4,4/4] drivers: uio: new driver for fsl_85xx_cache_sram

2020-04-16 Thread Rob Herring
On Thu, Apr 16, 2020 at 02:59:36PM -0500, Scott Wood wrote: > On Thu, 2020-04-16 at 08:35 -0700, Wang Wenhu wrote: > > +#define UIO_INFO_VER "devicetree,pseudo" > > What does this mean? Changing a number into a non-obvious string (Why > "pseudo"? Why does the UIO user care that the config

[PATCH] PCI: Use of_node_name_eq for node name comparisons

2020-04-16 Thread Rob Herring
Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Bjorn Helgaas Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-...@vger.kernel.org

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-16 Thread Michael S. Tsirkin
On Wed, Apr 15, 2020 at 10:43:56AM +0800, Jason Wang wrote: > We try to keep the defconfig untouched after decoupling CONFIG_VHOST > out of CONFIG_VIRTUALIZATION in commit 20c384f1ea1a > ("vhost: refine vhost and vringh kconfig") by enabling VHOST_MENU by > default. Then the defconfigs can keep

  1   2   >