Re: mmu.c:undefined reference to `patch__hash_page_A0'

2021-04-17 Thread Randy Dunlap
HI-- I no longer see this build error. However: On 2/27/21 2:24 AM, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 3fb6d0e00efc958d01c2f109c8453033a2d96796 > commit: 259149cf7c3c6195e6199e045ca988c31d081cab powerpc/32s:

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Matthew Wilcox
On Sat, Apr 17, 2021 at 09:18:57PM +, David Laight wrote: > Ugly as well. Thank you for expressing your opinion. Again.

Re: [PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head

2021-04-17 Thread Matthew Wilcox
On Sat, Apr 17, 2021 at 09:13:45PM +, David Laight wrote: > > struct {/* page_pool used by netstack */ > > - /** > > -* @dma_addr: might require a 64-bit value on > > -* 32-bit architectures. > > -

Re: swiotlb cleanups v3

2021-04-17 Thread Tom Lendacky
On 4/17/21 11:39 AM, Tom Lendacky wrote: >> Hi Konrad, >> >> this series contains a bunch of swiotlb cleanups, mostly to reduce the >> amount of internals exposed to code outside of swiotlb.c, which should >> helper to prepare for supporting multiple different bounce buffer pools. > > Somewhere

RE: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread David Laight
From: Matthew Wilcox > Sent: 17 April 2021 03:45 > > Replacement patch to fix compiler warning. ... > static inline dma_addr_t page_pool_get_dma_addr(struct page *page) > { > - return page->dma_addr; > + dma_addr_t ret = page->dma_addr[0]; > + if (sizeof(dma_addr_t) >

RE: [PATCH 2/2] mm: Indicate pfmemalloc pages in compound_head

2021-04-17 Thread David Laight
From: Matthew Wilcox (Oracle) > Sent: 17 April 2021 00:07 > > The net page_pool wants to use a magic value to identify page pool pages. > The best place to put it is in the first word where it can be clearly a > non-pointer value. That means shifting dma_addr up to alias with ->index, > which

[V3 PATCH 16/16] crypto/nx: Add sysfs interface to export NX capabilities

2021-04-17 Thread Haren Myneni
Changes to export the following NXGZIP capabilities through sysfs: /sys/devices/vio/ibm,compression-v1/NxGzCaps: min_compress_len /*Recommended minimum compress length in bytes*/ min_decompress_len /*Recommended minimum decompress length in bytes*/ req_max_processed_len /* Maximum number of

[V3 PATCH 15/16] crypto/nx: Get NX capabilities for GZIP coprocessor type

2021-04-17 Thread Haren Myneni
phyp provides NX capabilities which gives recommended minimum compression / decompression length and maximum request buffer size in bytes. Changes to get NX overall capabilities which points to the specific features phyp supports. Then retrieve NXGZIP specific capabilities. Signed-off-by:

[V3 PATCH 14/16] crypto/nx: Register and unregister VAS interface

2021-04-17 Thread Haren Myneni
Changes to create /dev/crypto/nx-gzip interface with VAS register and to remove this interface with VAS unregister. Signed-off-by: Haren Myneni --- drivers/crypto/nx/Kconfig | 1 + drivers/crypto/nx/nx-common-pseries.c | 9 + 2 files changed, 10 insertions(+) diff --git

[V3 PATCH 13/16] crypto/nx: Rename nx-842-pseries file name to nx-common-pseries

2021-04-17 Thread Haren Myneni
Rename nx-842-pseries.c to nx-common-pseries.c to add code for new GZIP compression type. The actual functionality is not changed in this patch. Signed-off-by: Haren Myneni --- drivers/crypto/nx/Makefile | 2 +- drivers/crypto/nx/{nx-842-pseries.c =>

[V3 PATCH 12/16] powerpc/pseries/vas: sysfs interface to export capabilities

2021-04-17 Thread Haren Myneni
pHyp provides GZIP default and GZIP QoS capabilities which gives the total number of credits are available in LPAR. This patch creates sysfs entries and exports LPAR credits, the currently used and the available credits for each feature. /sys/kernel/vas/VasCaps/VDefGzip: (default GZIP

[V3 PATCH 11/16] powerpc/pseries/vas: Setup IRQ and fault handling

2021-04-17 Thread Haren Myneni
When NX sees a fault on the user space buffer, generates a fault interrupt and pHyp forwards that interrupt to OS. Then the kernel makes H_GET_NX_FAULT HCALL to retrieve the fault CRB information. This patch adds changes to setup IRQ per each window and handles fault by updating CSB.

[V3 PATCH 10/16] powerpc/pseries/vas: Integrate API with open/close windows

2021-04-17 Thread Haren Myneni
This patch adds VAS window allocatioa/close with the corresponding HCALLs. Also changes to integrate with the existing user space VAS API and provide register/unregister functions to NX pseries driver. The driver register function is used to create the user space interface (/dev/crypto/nx-gzip)

[V3 PATCH 09/16] powerpc/pseries/vas: Implement to get all capabilities

2021-04-17 Thread Haren Myneni
pHyp provides various VAS capabilities such as GZIP default and QoS capabilities which are used to determine total number of credits available in LPAR, maximum window credits, maximum LPAR credits, whether usermode copy/paste is supported, and etc. So first retrieve overall vas capabilities

[V3 PATCH 08/16] powerpc/pseries/VAS: Implement allocate/modify/deallocate HCALLS

2021-04-17 Thread Haren Myneni
This patch adds the following HCALLs which are used to allocate, modify and deallocate VAS windows. H_ALLOCATE_VAS_WINDOW: Allocate VAS window H_DEALLOCATE_VAS_WINDOW: Close VAS window H_MODIFY_VAS_WINDOW: Setup window before using Also adds phyp call (H_QUERY_VAS_CAPABILITIES) to get all VAS

[V3 PATCH 07/16] powerpc/vas: Define QoS credit flag to allocate window

2021-04-17 Thread Haren Myneni
pHyp introduces two different type of credits: Default and Quality of service (QoS). The total number of default credits available on each LPAR depends on CPU resources configured. But these credits can be shared or over-committed across LPARs in shared mode which can result in paste command

[V3 PATCH 06/16] powerpc/pseries/vas: Define VAS/NXGZIP HCALLs and structs

2021-04-17 Thread Haren Myneni
This patch adds HCALLs and other definitions. Also define structs that are used in VAS implementation on powerVM. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/hvcall.h| 7 ++ arch/powerpc/include/asm/vas.h | 28 arch/powerpc/platforms/pseries/vas.h | 96

[V3 PATCH 05/16] powerpc/vas: Define and use common vas_window struct

2021-04-17 Thread Haren Myneni

[V3 PATCH 03/16] powerpc/vas: Create take/drop task reference functions

2021-04-17 Thread Haren Myneni
Take task reference when each window opens and drops during close. This functionality is needed for powerNV and pseries. So this patch defines the existing code as functions in common book3s platform vas-api.c Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 20

[V3 PATCH 04/16] powerpc/vas: Move update_csb/dump_crb to common book3s platform

2021-04-17 Thread Haren Myneni
NX issues an interrupt when sees fault on user space buffer. The kernel processes the fault by updating CSB. This functionality is same for both powerNV and pseries. So this patch moves these functions to common vas-api.c and the actual functionality is not changed. Signed-off-by: Haren Myneni

[PATCH V3 02/16] powerpc/vas: Move VAS API to common book3s platform

2021-04-17 Thread Haren Myneni
Using the same /dev/crypto/nx-gzip interface for both powerNV and pseries. So this patch creates platforms/book3s/ and moves VAS API to that directory. The actual functionality is not changed. Common interface functions such as open, window open ioctl, mmap and close are moved to

[V3 PATCH 01/16] powerpc/powernv/vas: Rename register/unregister functions

2021-04-17 Thread Haren Myneni
powerNV and pseries drivers register / unregister to the corresponding VAS code separately. So rename powerNV VAS API register/unregister functions. Signed-off-by: Haren Myneni --- arch/powerpc/include/asm/vas.h | 6 +++--- arch/powerpc/platforms/powernv/vas-api.c | 10 +-

[V3 PATCH 00/16] Enable VAS and NX-GZIP support on powerVM

2021-04-17 Thread Haren Myneni
This patch series enables VAS / NX-GZIP on powerVM which allows the user space to do copy/paste with the same existing interface that is available on powerNV. VAS Enablement: - Get all VAS capabilities using H_QUERY_VAS_CAPABILITIES that are available in the hypervisor. These capabilities

Re: Bogus struct page layout on 32-bit

2021-04-17 Thread Grygorii Strashko
Hi Ilias, All, On 10/04/2021 11:52, Ilias Apalodimas wrote: +CC Grygorii for the cpsw part as Ivan's email is not valid anymore Thanks for catching this. Interesting indeed... On Sat, 10 Apr 2021 at 09:22, Jesper Dangaard Brouer wrote: On Sat, 10 Apr 2021 03:43:13 +0100 Matthew Wilcox

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Matthew Wilcox
On Sat, Apr 17, 2021 at 09:32:06PM +0300, Ilias Apalodimas wrote: > > +static inline void page_pool_set_dma_addr(struct page *page, dma_addr_t > > addr) > > +{ > > + page->dma_addr[0] = addr; > > + if (sizeof(dma_addr_t) > sizeof(unsigned long)) > > + page->dma_addr[1] = addr >> 16

PPC_FPU, ALTIVEC: enable_kernel_fp, put_vr, get_vr

2021-04-17 Thread Randy Dunlap
Hi, kernel test robot reports: >> drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of >> function 'enable_kernel_fp' [-Werror,-Wimplicit-function-declaration] enable_kernel_fp(); ^ when # CONFIG_PPC_FPU is not set CONFIG_ALTIVEC=y I see at least one

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Ilias Apalodimas
Hi Matthew, On Sat, Apr 17, 2021 at 03:45:22AM +0100, Matthew Wilcox wrote: > > Replacement patch to fix compiler warning. > > From: "Matthew Wilcox (Oracle)" > Date: Fri, 16 Apr 2021 16:34:55 -0400 > Subject: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems > To: bro...@redhat.com >

Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Arnd Bergmann
On Sat, Apr 17, 2021 at 3:58 PM Matthew Wilcox wrote: > I wouldn't like to make that assumption. I've come across IOMMUs (maybe > on parisc? powerpc?) that like to encode fun information in the top > few bits. So we could get it down to 52 bits, but I don't think we can > get all the way down

Re: swiotlb cleanups v3

2021-04-17 Thread Tom Lendacky
> Hi Konrad, > > this series contains a bunch of swiotlb cleanups, mostly to reduce the > amount of internals exposed to code outside of swiotlb.c, which should > helper to prepare for supporting multiple different bounce buffer pools. Somewhere between the 1st and 2nd patch, specifying a

Re: [PATCH v2] tools: do not include scripts/Kbuild.include

2021-04-17 Thread Masahiro Yamada
On Fri, Apr 16, 2021 at 10:01 PM Masahiro Yamada wrote: > > Since commit d9f4ff50d2aa ("kbuild: spilt cc-option and friends to > scripts/Makefile.compiler"), some kselftests fail to build. > > The tools/ directory opted out Kbuild, and went in a different > direction. They copy any kind of files

Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Matthew Wilcox
On Sat, Apr 17, 2021 at 12:31:37PM +0200, Arnd Bergmann wrote: > On Fri, Apr 16, 2021 at 5:27 PM Matthew Wilcox wrote: > > diff --git a/include/net/page_pool.h b/include/net/page_pool.h > > index b5b195305346..db7c7020746a 100644 > > --- a/include/net/page_pool.h > > +++ b/include/net/page_pool.h

Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode

2021-04-17 Thread Christophe Leroy
Le 16/04/2021 à 01:49, Alexei Starovoitov a écrit : On Thu, Apr 15, 2021 at 8:41 AM Quentin Monnet wrote: 2021-04-15 16:37 UTC+0200 ~ Daniel Borkmann On 4/15/21 11:32 AM, Jianlin Lv wrote: For debugging JITs, dumping the JITed image to kernel log is discouraged, "bpftool prog dump

RE: Bogus struct page layout on 32-bit

2021-04-17 Thread David Laight
From: Grygorii Strashko > Sent: 16 April 2021 10:27 ... > Sry, for delayed reply. > > The TI platforms am3/4/5 (cpsw) and Keystone 2 (netcp) can do only 32bit DMA > even in case of LPAE > (dma-ranges are used). > Originally, as I remember, CONFIG_ARCH_DMA_ADDR_T_64BIT has not been selected >

Re: [PATCH] powerpc/pseries/mce: Fix a typo in error type assignment

2021-04-17 Thread Michael Ellerman
Ganesh Goudar writes: > The error type is ICACHE and DCACHE, for case MCE_ERROR_TYPE_ICACHE. Do you mean "is ICACHE not DCACHE" ? cheers > Signed-off-by: Ganesh Goudar > --- > arch/powerpc/platforms/pseries/ras.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH] powerpc/pseries: Add shutdown() to vio_driver and vio_bus

2021-04-17 Thread Michael Ellerman
Tyrel Datwyler writes: > On 4/1/21 5:13 PM, Tyrel Datwyler wrote: >> Currently, neither the vio_bus or vio_driver structures provide support >> for a shutdown() routine. >> >> Add support for shutdown() by allowing drivers to provide a >> implementation via function pointer in their vio_driver

RE: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread David Laight
From: Matthew Wilcox > Sent: 16 April 2021 16:28 > > On Thu, Apr 15, 2021 at 08:08:32PM +0200, Jesper Dangaard Brouer wrote: > > See below patch. Where I swap32 the dma address to satisfy > > page->compound having bit zero cleared. (It is the simplest fix I could > > come up with). > > I think

Re: [PATCH 1/1] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Arnd Bergmann
On Fri, Apr 16, 2021 at 5:27 PM Matthew Wilcox wrote: > diff --git a/include/net/page_pool.h b/include/net/page_pool.h > index b5b195305346..db7c7020746a 100644 > --- a/include/net/page_pool.h > +++ b/include/net/page_pool.h > @@ -198,7 +198,17 @@ static inline void

[PATCH] perf vendor events: Initial json/events list for power10 platform

2021-04-17 Thread Kajol Jain
Patch adds initial json/events for POWER10. Signed-off-by: Kajol Jain --- .../perf/pmu-events/arch/powerpc/mapfile.csv | 1 + .../arch/powerpc/power10/cache.json | 47 +++ .../arch/powerpc/power10/floating_point.json | 7 + .../arch/powerpc/power10/frontend.json| 217

Re: [PATCH 1/2] mm: Fix struct page layout on 32-bit systems

2021-04-17 Thread Jesper Dangaard Brouer
On Sat, 17 Apr 2021 00:07:23 +0100 "Matthew Wilcox (Oracle)" wrote: > 32-bit architectures which expect 8-byte alignment for 8-byte integers > and need 64-bit DMA addresses (arc, arm, mips, ppc) had their struct > page inadvertently expanded in 2019. When the dma_addr_t was added, > it forced