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

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

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

2020-04-15 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, > i

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

2020-04-15 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-15 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 a/arch/

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

2020-04-15 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 11/14] powerpc/vas: Do not use default credits for receive window

2020-04-15 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 --- arch/powerpc/platforms/powernv/vas

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

2020-04-15 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 a/arch/powerpc/platforms

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

2020-04-15 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 credi

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

2020-04-15 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 08/14] powerpc/vas: Update CSB and notify process for fault CRBs

2020-04-15 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 fa

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

2020-04-15 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 wi

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

2020-04-15 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(&pdev->dev, "error no valid uio-map configured\n"); + ret = -EINVAL; +

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

2020-04-15 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 04/14] powerpc/vas: Setup fault window per VAS instance

2020-04-15 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: Haren

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

2020-04-15 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 02/14] powerpc/vas: Define nx_fault_stamp in coprocessor_request_block

2020-04-15 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: Haren

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

2020-04-15 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 ch

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

2020-04-15 Thread Haren Myneni
On power9, Virtual Accelerator Switchboard (VAS) allows user space or kernel to communicate with Nest Accelerator (NX) directly using COPY/PASTE instructions. NX provides various functionalities such as compression, encryption and etc. But only compression (842 and GZIP formats) is supported in L

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

2020-04-15 Thread Christophe Leroy
Hi, Le 16/04/2020 à 00:06, Segher Boessenkool a écrit : Hi! 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 immediate index addressing, with the index set to 0. Ex: lwz reg1,

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

2020-04-15 Thread Wang Wenhu
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(&pdev->dev, "error no valid uio-map configured\n"); >> > + ret = -EINVAL; >> > + goto err_info_free_internel; >> > + } >>

[PATCH v2] KVM: Optimize kvm_arch_vcpu_ioctl_run function

2020-04-15 Thread Tianjia Zhang
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 function definition, removes the extra 'kvm_run' parameter,

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

2020-04-15 Thread Paul Mackerras
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 kvmppc_book3s_hv_page_fault() when running a guest on a POWER8 host. Because that case wasn't checked for, we could misinterpre

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

2020-04-15 Thread Florian Weimer
* 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 > mechanism with the same calling convention. The i386 mechanism has receive

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

2020-04-15 Thread Chris Packham
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 devicetree spec cache-line- > size > is only needed if it differs from the block size. > > Signed-off-by: Chris Packh

Re: [PATCH v2, 1/5] powerpc: 85xx: make FSL_85XX_CACHE_SRAM configurable

2020-04-15 Thread Wang Wenhu
From: Scott Wood >> +bool "32-bit kernel" > >Why make that user selectable ? > >Either a kernel is 64-bit or it is 32-bit. So having PPC64 user >selectable is all we need. > >And what is the link between this change and the description in the log ? > >> default y if !PPC64 >> selec

Re: CVE-2020-11669: Linux kernel 4.10 to 5.1: powerpc: guest can cause DoS on POWER9 KVM hosts

2020-04-15 Thread Paul Mackerras
On Wed, Apr 15, 2020 at 04:03:29PM +0200, Michal Suchánek wrote: > On Wed, Apr 15, 2020 at 10:52:53PM +1000, Andrew Donnellan wrote: > > The Linux kernel for powerpc from v4.10 to v5.1 has a bug where the > > Authority Mask Register (AMR), Authority Mask Override Register (AMOR) and > > User Author

[PATCH] KVM: PPC: Handle non-present PTEs in kvmppc_book3s_hv_page_fault()

2020-04-15 Thread David Gibson
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 kvmppc_book3s_hv_page_fault() when running a guest on a POWER8 host. Because that case wasn't checked for, we could misinterpre

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

2020-04-15 Thread Nicholas Piggin
Excerpts from Rich Felker's message of April 16, 2020 1:03 pm: > On Thu, Apr 16, 2020 at 12:53:31PM +1000, Nicholas Piggin wrote: >> > Not to mention the dcache line to access >> > __hwcap or whatever, and the icache lines to setup access TOC-relative >> > access to it. (Of course you could put a c

Re: [PATCH] papr/scm: Add bad memory ranges to nvdimm bad ranges

2020-04-15 Thread Vaibhav Jain
Hi Santosh, Some review comments below. Santosh Sivaraj writes: > Subscribe to the MCE notification and add the physical address which > generated a memory error to nvdimm bad range. > > Signed-off-by: Santosh Sivaraj > --- > > This patch depends on "powerpc/mce: Add MCE notification chain" [1

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

2020-04-15 Thread Frank Rowand
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) changed: >>> >>>What|Removed

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

2020-04-15 Thread Rich Felker
On Thu, Apr 16, 2020 at 12:53:31PM +1000, Nicholas Piggin wrote: > > Not to mention the dcache line to access > > __hwcap or whatever, and the icache lines to setup access TOC-relative > > access to it. (Of course you could put a copy of its value in TLS at a > > fixed offset, which would somewhat

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

2020-04-15 Thread Nicholas Piggin
Excerpts from Rich Felker's message of April 16, 2020 12:35 pm: > On Thu, Apr 16, 2020 at 12:24:16PM +1000, Nicholas Piggin wrote: >> >> > Likewise, it's not useful to have different error return mechanisms >> >> > because the caller just has to branch to support both (or the >> >> > kernel-provide

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

2020-04-15 Thread Oliver O'Halloran
On Thu, Apr 16, 2020 at 12:34 PM Oliver O'Halloran wrote: > > On Thu, Apr 16, 2020 at 11:27 AM Alexey Kardashevskiy wrote: > > > > Anyone? Is it totally useless or wrong approach? Thanks, > > I wouldn't say it's either, but I still hate it. > > The 4GB mode being per-PHB makes it difficult to use

Re: [PATCH v2 4/4] mm/vmalloc: Hugepage vmalloc mappings

2020-04-15 Thread Nicholas Piggin
Excerpts from Will Deacon's message of April 15, 2020 8:47 pm: > Hi Nick, > > On Mon, Apr 13, 2020 at 10:53:03PM +1000, Nicholas Piggin wrote: >> For platforms that define HAVE_ARCH_HUGE_VMAP and support PMD vmap mappings, >> have vmalloc attempt to allocate PMD-sized pages first, before falling b

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

2020-04-15 Thread Rich Felker
On Thu, Apr 16, 2020 at 12:24:16PM +1000, Nicholas Piggin wrote: > >> > Likewise, it's not useful to have different error return mechanisms > >> > because the caller just has to branch to support both (or the > >> > kernel-provided stub just has to emulate one for it; that could work > >> > if you

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

2020-04-15 Thread Oliver O'Halloran
On Thu, Apr 16, 2020 at 11:27 AM Alexey Kardashevskiy wrote: > > Anyone? Is it totally useless or wrong approach? Thanks, I wouldn't say it's either, but I still hate it. The 4GB mode being per-PHB makes it difficult to use unless we force that mode on 100% of the time which I'd prefer not to do

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

2020-04-15 Thread Nicholas Piggin
Excerpts from Rich Felker's message of April 16, 2020 10:48 am: > On Thu, Apr 16, 2020 at 10:16:54AM +1000, 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 Lin

Re: [PATCH 01/34] docs: filesystems: fix references for doc files there

2020-04-15 Thread Joseph Qi
On 2020/4/15 22:32, Mauro Carvalho Chehab wrote: > Several files there were renamed to ReST. Fix the broken > references. > > Signed-off-by: Mauro Carvalho Chehab > --- > Documentation/ABI/stable/sysfs-devices-node | 2 +- > Documentation/ABI/testing/procfs-smaps_rollup

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

2020-04-15 Thread Alexey Kardashevskiy
Anyone? Is it totally useless or wrong approach? Thanks, On 08/04/2020 19:43, Alexey Kardashevskiy wrote: > > > On 23/03/2020 18:53, Alexey Kardashevskiy wrote: >> Here is an attempt to support bigger DMA space for devices >> supporting DMA masks less than 59 bits (GPUs come into mind >> first)

Re: [PATCH 1/5] powerpc: 85xx: make FSL_85XX_CACHE_SRAM configurable

2020-04-15 Thread kbuild test robot
Hi Wang, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on char-misc/char-misc-testing staging/staging-testing v5.7-rc1 next-20200415] [if your patch is applied to the wrong git tree, please drop us a note to help improve the

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

2020-04-15 Thread Rich Felker
On Thu, Apr 16, 2020 at 10:16:54AM +1000, 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

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

2020-04-15 Thread Nicholas Piggin
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 instruction. >> >> This requires two things to be defined: Firstly

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

2020-04-15 Thread Rich Felker
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 to > userspace that kernel supports scv, and a w

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

2020-04-15 Thread Segher Boessenkool
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 break it up somehow? > +#define __put_user_asm_goto(x, addr

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

2020-04-15 Thread Segher Boessenkool
Hi! 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 immediate index addressing, with the index > set to 0. Ex: > > lwz reg1, 0(reg2) This is called a "D-form" instruction, or

Powerpc Linux 'scv' system call ABI proposal take 2

2020-04-15 Thread Nicholas Piggin
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 to userspace that kernel supports scv, and a way to allocate and advertise support for individual scv vectors. Secondly,

Re: [PATCH v5 0/6] implement KASLR for powerpc/fsl_booke/64

2020-04-15 Thread Scott Wood
On Mon, 2020-03-30 at 10:20 +0800, Jason Yan wrote: > This is a try to implement KASLR for Freescale BookE64 which is based on > my earlier implementation for Freescale BookE32: > https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=131718&state=* > > The implementation for Freescale Bo

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

2020-04-15 Thread Scott Wood
On Wed, 2020-04-15 at 18:52 +0200, Christophe Leroy wrote: > > Le 15/04/2020 à 17:24, Wang Wenhu a écrit : > > + > > + if (uiomem >= &info->mem[MAX_UIO_MAPS]) { > > I'd prefer > if (uiomem - info->mem >= MAX_UIO_MAPS) { > > > + dev_warn(&pdev->dev, "more

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

2020-04-15 Thread Scott Wood
On Wed, 2020-04-15 at 08:24 -0700, Wang Wenhu wrote: > +static const struct of_device_id uio_mpc85xx_l2ctlr_of_match[] = { > + { .compatible = "uio,fsl,p2020-l2-cache-controller", }, > + { .compatible = "uio,fsl,p2010-l2-cache-controller", }, > + { .compatibl

Re: [PATCH v2,1/5] powerpc: 85xx: make FSL_85XX_CACHE_SRAM configurable

2020-04-15 Thread Scott Wood
On Wed, 2020-04-15 at 08:24 -0700, Wang Wenhu wrote: > Enable FSL_85XX_CACHE_SRAM selection. On e500 platforms, the cache > could be configured and used as a piece of SRAM which is hignly > friendly for some user level application performances. > > Cc: Greg Kroah-Hartman > Cc: Christophe Leroy >

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

2020-04-15 Thread Christophe Leroy
Le 15/04/2020 à 17:24, 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 C

Re: [PATCH v2,1/5] powerpc: 85xx: make FSL_85XX_CACHE_SRAM configurable

2020-04-15 Thread Christophe Leroy
Le 15/04/2020 à 17:24, Wang Wenhu a écrit : Enable FSL_85XX_CACHE_SRAM selection. On e500 platforms, the cache could be configured and used as a piece of SRAM which is hignly friendly for some user level application performances. It looks like following patches are fixing errors generated by

Re: [PATCH v2,1/5] powerpc: 85xx: make FSL_85XX_CACHE_SRAM configurable

2020-04-15 Thread Christophe Leroy
Le 15/04/2020 à 17:24, Wang Wenhu a écrit : Enable FSL_85XX_CACHE_SRAM selection. On e500 platforms, the cache could be configured and used as a piece of SRAM which is hignly friendly for some user level application performances. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood C

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

2020-04-15 Thread Christopher M Riedl
> On April 15, 2020 3:45 AM Christophe Leroy wrote: > > > Le 15/04/2020 à 07:11, Christopher M Riedl a écrit : > >> On March 24, 2020 11:25 AM Christophe Leroy > >> wrote: > >> > >> > >> Le 23/03/2020 à 05:52, Christopher M. Riedl a écrit : > >>> Currently, code patching a STRICT_KERNEL_RW

Re: [RFC PATCH] powerpc/lib: Fixing use a temporary mm for code patching

2020-04-15 Thread Christopher M Riedl
> On April 15, 2020 4:12 AM Christophe Leroy wrote: > > > Le 15/04/2020 à 07:16, Christopher M Riedl a écrit : > >> On March 26, 2020 9:42 AM Christophe Leroy wrote: > >> > >> > >> This patch fixes the RFC series identified below. > >> It fixes three points: > >> - Failure with CONFIG_PPC_K

Re: Linux-next POWER9 NULL pointer NIP since 1st Apr.

2020-04-15 Thread Qian Cai
> On Apr 10, 2020, at 3:20 PM, Qian Cai wrote: > > > >> On Apr 9, 2020, at 10:14 AM, Steven Rostedt wrote: >> >> On Thu, 9 Apr 2020 06:06:35 -0400 >> Qian Cai wrote: >> > I’ll go to bisect some more but it is going to take a while. > > $ git log --oneline 4c205c84e249..8e99c

Re: [PATCH] lib/mpi: Fix building for powerpc with clang

2020-04-15 Thread Herbert Xu
On Mon, Apr 13, 2020 at 12:50:42PM -0700, Nathan Chancellor wrote: > 0day reports over and over on an powerpc randconfig with clang: > > lib/mpi/generic_mpih-mul1.c:37:13: error: invalid use of a cast in a > inline asm context requiring an l-value: remove the cast or build with > -fheinous-gnu-ext

[PATCH v2, 4/5] powerpc: sysdev: fix compile error for fsl_85xx_l2ctlr

2020-04-15 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: error

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

2020-04-15 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: linuxppc-dev@lists.ozlab

[PATCH v2, 2/5] powerpc: sysdev: fix compile error for fsl_85xx_cache_sram

2020-04-15 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 ‘ioremap_

[PATCH v2,0/5] drivers: uio: new driver uio_fsl_85xx_cache_sram

2020-04-15 Thread Wang Wenhu
This series add a new uio driver for freescale 85xx platforms to access the Cache-Sram form user level. This is extremely helpful for the user-space applications that require high performance memory accesses. It fixes the compile errors and warning of the hardware level drivers and implements the

[PATCH v2,1/5] powerpc: 85xx: make FSL_85XX_CACHE_SRAM configurable

2020-04-15 Thread Wang Wenhu
Enable FSL_85XX_CACHE_SRAM selection. On e500 platforms, the cache could be configured and used as a piece of SRAM which is hignly friendly for some user level application performances. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlab

[PATCH v2, 3/5] powerpc: sysdev: fix compile warning for fsl_85xx_cache_sram

2020-04-15 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 cache-sram

[PATCH] powerpc/uaccess: Don't set KUAP by default on book3s/32

2020-04-15 Thread Christophe Leroy
On book3s/32, KUAP is an heavy process as it requires to determine which segments are impacted and unlock/lock each of them. And since the implementation of user_access_begin/end, it is even worth for the time being because unlike __get_user(), user_access_begin doesn't make difference between rea

[PATCH] powerpc/uaccess: Don't set KUEP by default on book3s/32

2020-04-15 Thread Christophe Leroy
On book3s/32, KUEP is an heavy process as it requires to set/unset the NX bit in each of the 12 user segments everytime the kernel is entered/exited from/to user space. Don't select KUEP by default on book3s/32. Signed-off-by: Christophe Leroy --- arch/powerpc/platforms/Kconfig.cputype | 2 +-

[PATCH 01/34] docs: filesystems: fix references for doc files there

2020-04-15 Thread Mauro Carvalho Chehab
Several files there were renamed to ReST. Fix the broken references. Signed-off-by: Mauro Carvalho Chehab --- Documentation/ABI/stable/sysfs-devices-node | 2 +- Documentation/ABI/testing/procfs-smaps_rollup | 2 +- Documentation/admin-guide/cpu-load.rst

[PATCH 29/34] docs: filesystems: convert spufs/spufs.txt to ReST

2020-04-15 Thread Mauro Carvalho Chehab
This file is at groff output format. Manually convert it to ReST format, trying to preserve a similar output after parsed. Signed-off-by: Mauro Carvalho Chehab --- Documentation/filesystems/spufs/index.rst | 1 + .../spufs/{spufs.txt => spufs.rst}| 59 +-- MAINTA

[PATCH 00/34] fs: convert remaining docs to ReST file format

2020-04-15 Thread Mauro Carvalho Chehab
This patch series convert the remaining files under Documentation/filesystems to the ReST file format. It is based on linux-next (next-20200414). PS.: I opted to add mainly ML from the output of get_maintainers.pl to the c/c list of patch 00/34, because otherwise the number of c/c would be too ma

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

2020-04-15 Thread Rob Herring
On Tue, Apr 14, 2020 at 9:56 PM Shengjiu Wang wrote: > > Hi Rob > > On Tue, Apr 14, 2020 at 11:49 PM Rob Herring wrote: > > > > On Wed, Apr 01, 2020 at 04:45:39PM +0800, Shengjiu Wang wrote: > > > EASRC (Enhanced Asynchronous Sample Rate Converter) is a new > > > IP module found on i.MX8MN. > > >

Re: [PATCH 5/5] drivers: uio: new driver for fsl_85xx_cache_sram>On Wed, Apr 15, 2020 at 05:33:46AM -0700, Wang Wenhu wrote:

2020-04-15 Thread Wang Wenhu
Hi, Greg k-h! Thank you for you fast reply. All the comments will be addressed with v2 soon. Detailed explanations are just below specific comment. >> A driver for freescale 85xx platforms to access the Cache-Sram form >> user level. This is extremely helpful for some user-space applications >> th

Re: CVE-2020-11669: Linux kernel 4.10 to 5.1: powerpc: guest can cause DoS on POWER9 KVM hosts

2020-04-15 Thread Michal Suchánek
On Wed, Apr 15, 2020 at 10:52:53PM +1000, Andrew Donnellan wrote: > The Linux kernel for powerpc from v4.10 to v5.1 has a bug where the > Authority Mask Register (AMR), Authority Mask Override Register (AMOR) and > User Authority Mask Override Register (UAMOR) are not correctly saved and > restored

[PATCH] i2c: powermac: Simplify reading the "reg" and "i2c-address" property

2020-04-15 Thread Aishwarya R
>> Use of_property_read_u32 to read the "reg" and "i2c-address" property >> instead of using of_get_property to check the return values. >> >> Signed-off-by: Aishwarya R > This is quite a fragile driver. Have you tested it on HW? This change is not tested with the Hardware. But of_property_read_

Re: [PATCH 4.19] powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle

2020-04-15 Thread Greg KH
On Wed, Apr 15, 2020 at 10:40:05PM +1000, Andrew Donnellan wrote: > From: Michael Ellerman > > commit 53a712bae5dd919521a58d7bad773b949358add0 upstream. > > In order to implement KUAP (Kernel Userspace Access Protection) on > Power9 we will be using the AMR, and therefore indirectly the > UAMOR/

CVE-2020-11669: Linux kernel 4.10 to 5.1: powerpc: guest can cause DoS on POWER9 KVM hosts

2020-04-15 Thread Andrew Donnellan
The Linux kernel for powerpc from v4.10 to v5.1 has a bug where the Authority Mask Register (AMR), Authority Mask Override Register (AMOR) and User Authority Mask Override Register (UAMOR) are not correctly saved and restored when the CPU is going into/coming out of idle state. On POWER9 CPUs,

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

2020-04-15 Thread Greg KH
On Wed, Apr 15, 2020 at 05:33:46AM -0700, Wang Wenhu wrote: > 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 L

[PATCH 4.19] powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle

2020-04-15 Thread Andrew Donnellan
From: Michael Ellerman commit 53a712bae5dd919521a58d7bad773b949358add0 upstream. In order to implement KUAP (Kernel Userspace Access Protection) on Power9 we will be using the AMR, and therefore indirectly the UAMOR/AMOR. So save/restore these regs in the idle code. Signed-off-by: Michael Elle

[PATCH 4.14] powerpc/powernv/idle: Restore AMR/UAMOR/AMOR after idle

2020-04-15 Thread Andrew Donnellan
From: Michael Ellerman commit 53a712bae5dd919521a58d7bad773b949358add0 upstream. In order to implement KUAP (Kernel Userspace Access Protection) on Power9 we will be using the AMR, and therefore indirectly the UAMOR/AMOR. So save/restore these regs in the idle code. Signed-off-by: Michael Elle

Applied "ASoC: fsl_micfil: Omit superfluous error message in fsl_micfil_probe()" to the asoc tree

2020-04-15 Thread Mark Brown
The patch ASoC: fsl_micfil: Omit superfluous error message in fsl_micfil_probe() has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the n

[PATCH 4/5] powerpc: sysdev: fix compile error for fsl_85xx_l2ctlr

2020-04-15 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: error

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

2020-04-15 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: linuxppc-dev@lists.ozlab

[PATCH 3/5] powerpc: sysdev: fix compile warning for fsl_85xx_cache_sram

2020-04-15 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 cache-sram

[PATCH 2/5] powerpc: sysdev: fix compile error for fsl_85xx_cache_sram

2020-04-15 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 ‘ioremap_

[PATCH 0/5] drivers: uio: new driver uio_fsl_85xx_cache_sram

2020-04-15 Thread Wang Wenhu
This series add a new uio driver for freescale 85xx platforms to access the Cache-Sram form user level. This is extremely helpful for the user-space applications that require high performance memory accesses. It fixes the compile errors and warning of the hardware level drivers and implements the

[PATCH 1/5] powerpc: 85xx: make FSL_85XX_CACHE_SRAM configurable

2020-04-15 Thread Wang Wenhu
Enable FSL_85XX_CACHE_SRAM selection. On e500 platforms, the cache could be configured and used as a piece of SRAM which is hignly friendly for some user level application performances. Cc: Greg Kroah-Hartman Cc: Christophe Leroy Cc: Scott Wood Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlab

[PATCH AUTOSEL 4.9 06/21] powerpc/maple: Fix declaration made after definition

2020-04-15 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit af6cf95c4d003fccd6c2ecc99a598fb854b537e7 ] When building ppc64 defconfig, Clang errors (trimmed for brevity): arch/powerpc/platforms/maple/setup.c:365:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] machine_d

[PATCH AUTOSEL 4.14 10/30] powerpc/maple: Fix declaration made after definition

2020-04-15 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit af6cf95c4d003fccd6c2ecc99a598fb854b537e7 ] When building ppc64 defconfig, Clang errors (trimmed for brevity): arch/powerpc/platforms/maple/setup.c:365:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] machine_d

[PATCH AUTOSEL 4.19 10/40] powerpc/maple: Fix declaration made after definition

2020-04-15 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit af6cf95c4d003fccd6c2ecc99a598fb854b537e7 ] When building ppc64 defconfig, Clang errors (trimmed for brevity): arch/powerpc/platforms/maple/setup.c:365:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] machine_d

[PATCH AUTOSEL 5.4 32/84] powerpc/maple: Fix declaration made after definition

2020-04-15 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit af6cf95c4d003fccd6c2ecc99a598fb854b537e7 ] When building ppc64 defconfig, Clang errors (trimmed for brevity): arch/powerpc/platforms/maple/setup.c:365:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] machine_d

[PATCH AUTOSEL 5.4 31/84] powerpc/prom_init: Pass the "os-term" message to hypervisor

2020-04-15 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 74bb84e5117146fa73eb9d01305975c53022b3c3 ] The "os-term" RTAS calls has one argument with a message address of OS termination cause. rtas_os_term() already passes it but the recently added prom_init's version of that missed it; it also does not fill a

[PATCH AUTOSEL 5.4 21/84] KVM: PPC: Book3S HV: Fix H_CEDE return code for nested guests

2020-04-15 Thread Sasha Levin
From: Michael Roth [ Upstream commit 1f50cc1705350a4697923203fedd7d8fb1087fe2 ] The h_cede_tm kvm-unit-test currently fails when run inside an L1 guest via the guest/nested hypervisor. ./run-tests.sh -v ... TESTNAME=h_cede_tm TIMEOUT=90s ACCEL= ./powerpc/run powerpc/tm.elf -smp 2,threads

[PATCH AUTOSEL 5.5 046/106] powerpc/maple: Fix declaration made after definition

2020-04-15 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit af6cf95c4d003fccd6c2ecc99a598fb854b537e7 ] When building ppc64 defconfig, Clang errors (trimmed for brevity): arch/powerpc/platforms/maple/setup.c:365:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] machine_d

[PATCH AUTOSEL 5.5 045/106] powerpc/prom_init: Pass the "os-term" message to hypervisor

2020-04-15 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 74bb84e5117146fa73eb9d01305975c53022b3c3 ] The "os-term" RTAS calls has one argument with a message address of OS termination cause. rtas_os_term() already passes it but the recently added prom_init's version of that missed it; it also does not fill a

[PATCH AUTOSEL 5.5 031/106] KVM: PPC: Book3S HV: Fix H_CEDE return code for nested guests

2020-04-15 Thread Sasha Levin
From: Michael Roth [ Upstream commit 1f50cc1705350a4697923203fedd7d8fb1087fe2 ] The h_cede_tm kvm-unit-test currently fails when run inside an L1 guest via the guest/nested hypervisor. ./run-tests.sh -v ... TESTNAME=h_cede_tm TIMEOUT=90s ACCEL= ./powerpc/run powerpc/tm.elf -smp 2,threads

[PATCH AUTOSEL 5.6 053/129] powerpc/prom_init: Pass the "os-term" message to hypervisor

2020-04-15 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 74bb84e5117146fa73eb9d01305975c53022b3c3 ] The "os-term" RTAS calls has one argument with a message address of OS termination cause. rtas_os_term() already passes it but the recently added prom_init's version of that missed it; it also does not fill a

[PATCH AUTOSEL 5.6 054/129] powerpc/maple: Fix declaration made after definition

2020-04-15 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit af6cf95c4d003fccd6c2ecc99a598fb854b537e7 ] When building ppc64 defconfig, Clang errors (trimmed for brevity): arch/powerpc/platforms/maple/setup.c:365:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] machine_d

[PATCH AUTOSEL 5.6 039/129] KVM: PPC: Book3S HV: Fix H_CEDE return code for nested guests

2020-04-15 Thread Sasha Levin
From: Michael Roth [ Upstream commit 1f50cc1705350a4697923203fedd7d8fb1087fe2 ] The h_cede_tm kvm-unit-test currently fails when run inside an L1 guest via the guest/nested hypervisor. ./run-tests.sh -v ... TESTNAME=h_cede_tm TIMEOUT=90s ACCEL= ./powerpc/run powerpc/tm.elf -smp 2,threads

Re: [PATCH 1/4] dma-mapping: move the remaining DMA API calls out of line

2020-04-15 Thread Alexey Kardashevskiy
On 15/04/2020 16:18, Christoph Hellwig wrote: > On Wed, Apr 15, 2020 at 12:26:04PM +1000, Alexey Kardashevskiy wrote: >> May be this is correct and allowed (no idea) but removing exported >> symbols at least deserves a mention in the commit log, does not it? >> >> The rest of the series is fine

Re: [PATCH] i2c: powermac: Simplify reading the "reg" and "i2c-address" property

2020-04-15 Thread Wolfram Sang
On Wed, Apr 08, 2020 at 03:33:53PM +0530, Aishwarya R wrote: > Use of_property_read_u32 to read the "reg" and "i2c-address" property > instead of using of_get_property to check the return values. > > Signed-off-by: Aishwarya R This is quite a fragile driver. Have you tested it on HW? signatur

Re: [PATCH v2 4/4] mm/vmalloc: Hugepage vmalloc mappings

2020-04-15 Thread Will Deacon
Hi Nick, On Mon, Apr 13, 2020 at 10:53:03PM +1000, Nicholas Piggin wrote: > For platforms that define HAVE_ARCH_HUGE_VMAP and support PMD vmap mappings, > have vmalloc attempt to allocate PMD-sized pages first, before falling back > to small pages. Allocations which use something other than PAGE_K

Re: [PATCH v2] Fix: buffer overflow during hvc_alloc().

2020-04-15 Thread Greg KH
On Tue, Apr 14, 2020 at 10:15:03PM +0300, and...@daynix.com wrote: > From: Andrew Melnychenko > > If there is a lot(more then 16) of virtio-console devices > or virtio_console module is reloaded > - buffers 'vtermnos' and 'cons_ops' are overflowed. > In older kernels it overruns spinlock which le

  1   2   >