Re: [PATCH v2] powerpc: make ALTIVEC select PPC_FPU

2021-04-21 Thread Randy Dunlap
On 4/20/21 10:19 PM, Christophe Leroy wrote: > > > Le 21/04/2021 à 04:56, Randy Dunlap a écrit : >> On a kernel config with ALTIVEC=y and PPC_FPU not set/enabled, >> there are build errors: >> >> drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of >> function

[PATCH v3] powerpc: make ALTIVEC select PPC_FPU

2021-04-21 Thread Randy Dunlap
On a kernel config with ALTIVEC=y and PPC_FPU not set/enabled, there are build errors: drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of function 'enable_kernel_fp' [-Werror,-Wimplicit-function-declaration] enable_kernel_fp(); ../arch/powerpc/lib/sstep.c: In

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

2021-04-21 Thread John Fastabend
Christophe Leroy wrote: > > > Le 20/04/2021 à 05:28, Alexei Starovoitov a écrit : > > On Sat, Apr 17, 2021 at 1:16 AM Christophe Leroy > > wrote: > >> > >> > >> > >> Le 16/04/2021 à 01:49, Alexei Starovoitov a écrit : > >>> On Thu, Apr 15, 2021 at 8:41 AM Quentin Monnet > >>> wrote: > >

[powerpc:next-test 245/263] arch/powerpc/include/asm/mmu_context.h:287:19: error: redefinition of 'pte_to_hpte_pkey_bits'

2021-04-21 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test head: f76c7820fc6ef641b75b5142aea72f1485c73bb1 commit: e4e8bc1df691ba5ba749d1e2b67acf9827e51a35 [245/263] powerpc/kvm: Fix PR KVM with KUAP/MEM_KEYS enabled config: powerpc64-randconfig-p001-20210421 (attached

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

2021-04-21 Thread Quentin Monnet
2021-04-21 15:10 UTC+0200 ~ Christophe Leroy > > > Le 20/04/2021 à 05:28, Alexei Starovoitov a écrit : >> On Sat, Apr 17, 2021 at 1:16 AM Christophe Leroy >> wrote: >>> >>> >>> >>> Le 16/04/2021 à 01:49, Alexei Starovoitov a écrit : On Thu, Apr 15, 2021 at 8:41 AM Quentin Monnet

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

2021-04-21 Thread Christophe Leroy
Le 20/04/2021 à 05:28, Alexei Starovoitov a écrit : On Sat, Apr 17, 2021 at 1:16 AM Christophe Leroy wrote: 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,

Re: powerpc{32,64} randconfigs

2021-04-21 Thread Christophe Leroy
Le 21/04/2021 à 01:31, Randy Dunlap a écrit : --- linux-next-20210420.orig/arch/powerpc/platforms/Kconfig.cputype +++ linux-next-20210420/arch/powerpc/platforms/Kconfig.cputype @@ -1,11 +1,12 @@ # SPDX-License-Identifier: GPL-2.0 config PPC32 bool - default y if !PPC64 +

Re: powerpc{32,64} randconfigs

2021-04-21 Thread Christophe Leroy
Le 21/04/2021 à 01:31, Randy Dunlap a écrit : --- linux-next-20210420.orig/arch/powerpc/kernel/vdso64/Makefile +++ linux-next-20210420/arch/powerpc/kernel/vdso64/Makefile @@ -30,7 +30,7 @@ ccflags-y := -shared -fno-common -fno-bu asflags-y := -D__VDSO64__ -s targets += vdso64.lds

Re: powerpc{32,64} randconfigs

2021-04-21 Thread Christophe Leroy
Hi Le 21/04/2021 à 01:31, Randy Dunlap a écrit : [time passes] OK, I have a patch that seems for work as far as setting PPC32=y or PPC64=y... but it has a problem during linking of vmlinux: crosstool/gcc-9.3.0-nolibc/powerpc-linux/bin/powerpc-linux-ld:./arch/powerpc/kernel/vmlinux.lds:6:

Re: [PATCH V2 net] ibmvnic: Continue with reset if set link down failed

2021-04-21 Thread Sukadev Bhattiprolu
Lijun Pan [l...@linux.vnet.ibm.com] wrote: > > > > On Apr 20, 2021, at 4:35 PM, Dany Madden wrote: > > > > When ibmvnic gets a FATAL error message from the vnicserver, it marks > > the Command Respond Queue (CRQ) inactive and resets the adapter. If this > > FATAL reset fails and a transmission

Re: powerpc{32,64} randconfigs

2021-04-21 Thread Randy Dunlap
On 4/20/21 11:37 PM, Christophe Leroy wrote: > > > Le 21/04/2021 à 01:31, Randy Dunlap a écrit : >> --- linux-next-20210420.orig/arch/powerpc/kernel/vdso64/Makefile >> +++ linux-next-20210420/arch/powerpc/kernel/vdso64/Makefile >> @@ -30,7 +30,7 @@ ccflags-y := -shared -fno-common -fno-bu >>  

Re: [PATCH v10 05/10] powerpc/bpf: Write protect JIT code

2021-04-21 Thread Michael Ellerman
Jordan Niethe writes: > On Wed, Mar 31, 2021 at 9:37 PM Michael Ellerman wrote: >> >> Jordan Niethe writes: >> >> > Once CONFIG_STRICT_MODULE_RWX is enabled there will be no need to >> > override bpf_jit_free() because it is now possible to set images >> > read-only. So use the default

Re: [PATCH V2 net] ibmvnic: Continue with reset if set link down failed

2021-04-21 Thread Rick Lindsley
On 4/20/21 2:42 PM, Lijun Pan wrote: This v2 does not adddress the concerns mentioned in v1. And I think it is better to exit with error from do_reset, and schedule a thorough do_hard_reset if the the adapter is already in unstable state. But the point is that the testing and analysis has

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

2021-04-21 Thread Christophe Leroy
Le 18/04/2021 à 19:15, Randy Dunlap a écrit : On 4/18/21 3:43 AM, Christophe Leroy wrote: Le 18/04/2021 à 02:02, Randy Dunlap a écrit : HI-- I no longer see this build error. Fixed by https://github.com/torvalds/linux/commit/acdad8fb4a1574323db88f98a38b630691574e16 However: On

Re: powerpc{32,64} randconfigs

2021-04-21 Thread Michael Ellerman
Randy Dunlap writes: > Hi, > > Is there a way to do this? > > $ make ARCH=powerpc randconfig # and force PPC32 Sort of: $ KCONFIG_ALLCONFIG=arch/powerpc/configs/book3s_32.config make randconfig But that also forces BOOK3S. > and separately > $ make ARCH=powerpc randconfig # and force PPC64

Re: [PATCH 2/2] powerpc: If kexec_build_elf_info() fails return immediately from elf64_load()

2021-04-21 Thread Michael Ellerman
Lakshmi Ramasubramanian writes: > Uninitialized local variable "elf_info" would be passed to > kexec_free_elf_info() if kexec_build_elf_info() returns an error > in elf64_load(). > > If kexec_build_elf_info() returns an error, return the error > immediately. > > Signed-off-by: Lakshmi

Re: [PATCH] soc: fsl: qe: remove unused function

2021-04-21 Thread Jiapeng Chong
On 2021/4/16 15:06, Christophe Leroy wrote: Le 16/04/2021 à 08:57, Daniel Axtens a écrit : Hi Jiapeng, Fix the following clang warning: You are not fixing a warning, you are removing a function in order to fix a warning ... drivers/soc/fsl/qe/qe_ic.c:234:29: warning: unused function

Re: [PATCH 1/2] powerpc/sstep: Add emulation support for ‘setb’ instruction

2021-04-21 Thread Michael Ellerman
"Naveen N. Rao" writes: > Daniel Axtens wrote: >> Sathvika Vasireddy writes: >> >>> This adds emulation support for the following instruction: >>>* Set Boolean (setb) >>> >>> Signed-off-by: Sathvika Vasireddy ... >> >> If you do end up respinning the patch, I think it would be good to

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

2021-04-21 Thread David Laight
From: Arnd Bergmann > Sent: 20 April 2021 22:20 > > On Tue, Apr 20, 2021 at 11:14 PM Vineet Gupta > wrote: > > On 4/20/21 12:07 AM, Arnd Bergmann wrote: > > > > > > > which means that half the 32-bit architectures do this. This may > > > cause more problems when arc and/or microblaze want to

Re: [PATCH] powerpc/64s: Add load address to plt branch targets before moved to linked location for non-relocatable kernels

2021-04-21 Thread Christophe Leroy
Le 21/04/2021 à 04:17, Jordan Niethe a écrit : Large branches will go through the plt which includes a stub that loads a target address from the .branch_lt section. On a relocatable kernel the targets in .branch_lt have relocations so they will be fixed up for where the kernel is running by

Re: [PATCH 1/2] powerpc: Free fdt on error in elf64_load()

2021-04-21 Thread Michael Ellerman
Lakshmi Ramasubramanian writes: > There are a few "goto out;" statements before the local variable "fdt" > is initialized through the call to of_kexec_alloc_and_setup_fdt() in > elf64_load(). This will result in an uninitialized "fdt" being passed > to kvfree() in this function if there is an

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

2021-04-21 Thread Arnd Bergmann
On Wed, Apr 21, 2021 at 10:43 AM David Laight wrote: > From: Arnd Bergmann Sent: 20 April 2021 22:20 > > On Tue, Apr 20, 2021 at 11:14 PM Vineet Gupta > > wrote: > > > On 4/20/21 12:07 AM, Arnd Bergmann wrote: > > > > > > > > > > which means that half the 32-bit architectures do this. This may

[PATCH 1/2] powerpc/fadump: Fix sparse warnings

2021-04-21 Thread Michael Ellerman
Sparse says: arch/powerpc/kernel/fadump.c:48:16: warning: symbol 'fadump_kobj' was not declared. Should it be static? arch/powerpc/kernel/fadump.c:55:27: warning: symbol 'crash_mrange_info' was not declared. Should it be static? arch/powerpc/kernel/fadump.c:61:27: warning: symbol

[PATCH 2/2] powerpc/powernv: Fix type of opal_mpipl_query_tag() addr argument

2021-04-21 Thread Michael Ellerman
opal_mpipl_query_tag() takes a pointer to a 64-bit value, which firmware writes a value to. As OPAL is traditionally big endian this value will be big endian. This can be confirmed by looking at the implementation in skiboot: static uint64_t opal_mpipl_query_tag(enum opal_mpipl_tags tag,

Re: [PATCH 1/3] powerpc/8xx: Enhance readability of trap types

2021-04-21 Thread Michael Ellerman
On Mon, 19 Apr 2021 15:48:09 + (UTC), Christophe Leroy wrote: > This patch makes use of trap types in head_8xx.S Applied to powerpc/next. [1/3] powerpc/8xx: Enhance readability of trap types https://git.kernel.org/powerpc/c/0f5eb28a6ce6ab0882010e6727bfd6e8cd569273 [2/3] powerpc/32s:

Re: [PATCH V2 0/5] powerpc/perf: Export processor pipeline stage cycles information

2021-04-21 Thread Michael Ellerman
On Mon, 22 Mar 2021 10:57:22 -0400, Athira Rajeev wrote: > Performance Monitoring Unit (PMU) registers in powerpc exports > number of cycles elapsed between different stages in the pipeline. > Example, sampling registers in ISA v3.1. > > This patchset implements kernel and perf tools support to

Re: [PATCH 1/3] powerpc/ebpf32: Fix comment on BPF_ALU{64} | BPF_LSH | BPF_K

2021-04-21 Thread Michael Ellerman
On Mon, 12 Apr 2021 11:44:16 + (UTC), Christophe Leroy wrote: > Replace <<== by <<= Applied to powerpc/next. [1/3] powerpc/ebpf32: Fix comment on BPF_ALU{64} | BPF_LSH | BPF_K https://git.kernel.org/powerpc/c/d228cc4969663623e6b5a749b02e4619352a0a8d [2/3] powerpc/ebpf32: Rework 64 bits

Re: [PATCH] powerpc/32: Use r2 in wrtspr() instead of r0

2021-04-21 Thread Michael Ellerman
On Fri, 22 Jan 2021 07:15:03 + (UTC), Christophe Leroy wrote: > wrtspr() is a function to write an arbitrary value in a special > register. It is used on 8xx to write to SPRN_NRI, SPRN_EID and > SPRN_EIE. Writing any value to one of those will play with MSR EE > and MSR RI regardless of that

Re: [PATCH] selftests: timens: Fix gettime_perf to work on powerpc

2021-04-21 Thread Michael Ellerman
On Wed, 31 Mar 2021 13:59:17 + (UTC), Christophe Leroy wrote: > On powerpc: > - VDSO library is named linux-vdso32.so.1 or linux-vdso64.so.1 > - clock_gettime is named __kernel_clock_gettime() > > Ensure gettime_perf tries these names before giving up. Applied to powerpc/next. [1/1]

Re: [PATCH v3 1/4] powerpc: Remove probe_user_read_inst()

2021-04-21 Thread Michael Ellerman
On Wed, 14 Apr 2021 13:08:40 + (UTC), Christophe Leroy wrote: > Its name comes from former probe_user_read() function. > That function is now called copy_from_user_nofault(). > > probe_user_read_inst() uses copy_from_user_nofault() to read only > a few bytes. It is suboptimal. > > It does

Re: [PATCH v2 1/2] powerpc/inst: ppc_inst_as_u64() becomes ppc_inst_as_ulong()

2021-04-21 Thread Michael Ellerman
On Tue, 20 Apr 2021 14:02:06 + (UTC), Christophe Leroy wrote: > In order to simplify use on PPC32, change ppc_inst_as_u64() > into ppc_inst_as_ulong() that returns the 32 bits instruction > on PPC32. > > Will be used when porting OPTPROBES to PPC32. Applied to powerpc/next. [1/2]

Re: [PATCH 0/2] pseries: UNISOLATE DRCs to signal device removal error

2021-04-21 Thread Michael Ellerman
On Fri, 16 Apr 2021 18:02:14 -0300, Daniel Henrique Barboza wrote: > At this moment, PAPR [1] does not have a way to report errors during a device > removal operation. This puts a strain in the hypervisor, which needs extra > mechanisms to try to fallback and recover from an error that might have

Re: [PATCH] powerpc/mce: save ignore_event flag unconditionally for UE

2021-04-21 Thread Michael Ellerman
On Wed, 7 Apr 2021 10:28:16 +0530, Ganesh Goudar wrote: > When we hit an UE while using machine check safe copy routines, > ignore_event flag is set and the event is ignored by mce handler, > And the flag is also saved for defered handling and printing of > mce event information, But as of now

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

2021-04-21 Thread Michael Ellerman
On Fri, 16 Apr 2021 18:27:50 +0530, Ganesh Goudar wrote: > The error type is ICACHE and DCACHE, for case MCE_ERROR_TYPE_ICACHE. Applied to powerpc/next. [1/1] powerpc/pseries/mce: Fix a typo in error type assignment https://git.kernel.org/powerpc/c/864ec4d40c83365b16483d88990e7e579537635c

Re: [PATCH] Documentation/powerpc: Add proper links for manual and tests

2021-04-21 Thread Michael Ellerman
On Sun, 18 Apr 2021 12:29:42 -0700, Haren Myneni wrote: > The links that are mentioned in this document are no longer > valid. So changed the proper links for NXGZIP user manual and > test cases. Applied to powerpc/next. [1/1] Documentation/powerpc: Add proper links for manual and tests

Re: [PATCH] powerpc/kvm: Fix PR KVM with KUAP/MEM_KEYS enabled

2021-04-21 Thread Michael Ellerman
On Mon, 19 Apr 2021 22:01:39 +1000, Michael Ellerman wrote: > The changes to add KUAP support with the hash MMU broke booting of KVM > PR guests. The symptom is no visible progress of the guest, or possibly > just "SLOF" being printed to the qemu console. > > Host code is still executing, but

Re: [PATCH 1/1] powerpc/pseries/iommu: Fix window size for direct mapping with pmem

2021-04-21 Thread Michael Ellerman
On Tue, 20 Apr 2021 01:54:04 -0300, Leonardo Bras wrote: > As of today, if the DDW is big enough to fit (1 << MAX_PHYSMEM_BITS) it's > possible to use direct DMA mapping even with pmem region. > > But, if that happens, the window size (len) is set to > (MAX_PHYSMEM_BITS - page_shift) instead of

Re: [PATCH 2/2] powerpc/perf: Add platform specific check_attr_config

2021-04-21 Thread Michael Ellerman
On Thu, 8 Apr 2021 13:15:04 +0530, Madhavan Srinivasan wrote: > Add platform specific attr.config value checks. Patch > includes checks for both power9 and power10. Applied to powerpc/next. [2/2] powerpc/perf: Add platform specific check_attr_config

Re: [PATCH] powerpc: Only define _TASK_CPU for 32-bit

2021-04-21 Thread Michael Ellerman
On Sun, 18 Apr 2021 23:16:41 +1000, Michael Ellerman wrote: > We have some interesting code in our Makefile to define _TASK_CPU, based > on awk'ing the value out of asm-offsets.h. It exists to circumvent some > circular header dependencies that prevent us from referring to > task_struct in the

Re: [PATCH] powerpc/pseries: Stop calling printk in rtas_stop_self()

2021-04-21 Thread Michael Ellerman
On Sun, 18 Apr 2021 23:54:13 +1000, Michael Ellerman wrote: > RCU complains about us calling printk() from an offline CPU: > > = > WARNING: suspicious RCU usage > 5.12.0-rc7-02874-g7cf90e481cb8 #1 Not tainted > - >

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

2021-04-21 Thread Michael Ellerman
On Thu, 1 Apr 2021 18:13:25 -0600, 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 struct and >

Re: [PATCH v1] KVM: PPC: Book3S HV P9: implement kvmppc_xive_pull_vcpu in C

2021-04-21 Thread Cédric Le Goater
On 4/13/21 3:38 PM, Nicholas Piggin wrote: > This is more symmetric with kvmppc_xive_push_vcpu, and has the advantage > that it runs with the MMU on. > > The extra test added to the asm will go away with a future change. > > Reviewed-by: Cédric Le Goater > Reviewed-by: Alexey Kardashevskiy >

Re: powerpc{32,64} randconfigs

2021-04-21 Thread Masahiro Yamada
On Wed, Apr 21, 2021 at 4:15 PM Michael Ellerman wrote: > > Randy Dunlap writes: > > Hi, > > > > Is there a way to do this? > > > > $ make ARCH=powerpc randconfig # and force PPC32 > > Sort of: > > $ KCONFIG_ALLCONFIG=arch/powerpc/configs/book3s_32.config make randconfig > > But that also forces

[PATCH v2] soc: fsl: qe: Remove unused function

2021-04-21 Thread Jiapeng Chong
The last callers of this function were removed by commit d7c2878cfcfa ("soc: fsl: qe: remove unused qe_ic_set_* functions"): https://github.com/torvalds/linux/commit/d7c2878cfcfa Fix the following clang warning: drivers/soc/fsl/qe/qe_ic.c:234:29: warning: unused function 'qe_ic_from_irq'

Re: [PATCH v11 6/6] powerpc: Book3S 64-bit outline-only KASAN support

2021-04-21 Thread Christophe Leroy
Le 19/03/2021 à 15:40, Daniel Axtens a écrit : diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c index aca354fb670b..63672aa656e8 100644 --- a/arch/powerpc/mm/ptdump/ptdump.c +++ b/arch/powerpc/mm/ptdump/ptdump.c @@ -20,6 +20,7 @@ #include #include

Re: [PATCH] powerpc/64s: Add load address to plt branch targets before moved to linked location for non-relocatable kernels

2021-04-21 Thread Christophe Leroy
Le 21/04/2021 à 04:17, Jordan Niethe a écrit : Large branches will go through the plt which includes a stub that loads a target address from the .branch_lt section. On a relocatable kernel the targets in .branch_lt have relocations so they will be fixed up for where the kernel is running by

Re: [PATCH 1/2] powerpc: Free fdt on error in elf64_load()

2021-04-21 Thread Lakshmi Ramasubramanian
On 4/20/21 10:35 PM, Santosh Sivaraj wrote: Hi Santosh, There are a few "goto out;" statements before the local variable "fdt" is initialized through the call to of_kexec_alloc_and_setup_fdt() in elf64_load(). This will result in an uninitialized "fdt" being passed to kvfree() in this

Re: [PATCH 1/2] powerpc: Free fdt on error in elf64_load()

2021-04-21 Thread Lakshmi Ramasubramanian
On 4/21/21 12:18 AM, Michael Ellerman wrote: Lakshmi Ramasubramanian writes: There are a few "goto out;" statements before the local variable "fdt" is initialized through the call to of_kexec_alloc_and_setup_fdt() in elf64_load(). This will result in an uninitialized "fdt" being passed to

Re: [PATCH 1/2] powerpc: Free fdt on error in elf64_load()

2021-04-21 Thread Santosh Sivaraj
Lakshmi Ramasubramanian writes: > On 4/20/21 10:35 PM, Santosh Sivaraj wrote: > Hi Santosh, > >> >>> There are a few "goto out;" statements before the local variable "fdt" >>> is initialized through the call to of_kexec_alloc_and_setup_fdt() in >>> elf64_load(). This will result in an

Re: [PATCH 1/1] of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses

2021-04-21 Thread Leonardo Bras
On Tue, 2021-04-20 at 17:34 -0500, Rob Herring wrote: > > [...] > > I think the point here is bus resources not getting the MEM_64 flag, > > but device resources getting it correctly. Is that supposed to happen? > > I experimented with this on Arm with qemu and it seems fine there too. > Looks

[PATCH v2 2/2] powerpc: If kexec_build_elf_info() fails return immediately from elf64_load()

2021-04-21 Thread Lakshmi Ramasubramanian
Uninitialized local variable "elf_info" would be passed to kexec_free_elf_info() if kexec_build_elf_info() returns an error in elf64_load(). If kexec_build_elf_info() returns an error, return the error immediately. Signed-off-by: Lakshmi Ramasubramanian Reported-by: Dan Carpenter Reviewed-by:

[PATCH v2 1/2] powerpc: Free fdt on error in elf64_load()

2021-04-21 Thread Lakshmi Ramasubramanian
There are a few "goto out;" statements before the local variable "fdt" is initialized through the call to of_kexec_alloc_and_setup_fdt() in elf64_load(). This will result in an uninitialized "fdt" being passed to kvfree() in this function if there is an error before the call to

[PATCH] powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add')

2021-04-21 Thread Christophe Leroy
AS arch/powerpc/platforms/52xx/lite5200_sleep.o arch/powerpc/platforms/52xx/lite5200_sleep.S: Assembler messages: arch/powerpc/platforms/52xx/lite5200_sleep.S:184: Warning: invalid register expression In the following code, 'addi' is wrong, has to be 'add' /* local udelay in sram

[PATCH] opal/fadump: fix fadump to work with a different endian capture kernel

2021-04-21 Thread Hari Bathini
Dump capture would fail if capture kernel is not of the endianess as the production kernel, because the in-memory data structure (struct opal_fadump_mem_struct) shared across production kernel and capture kernel assumes the same endianess for both the kernels, which doesn't have to be true always.

[PATCH] powerpc/64s: Fix mm_cpumask memory ordering comment

2021-04-21 Thread Nicholas Piggin
The memory ordering comment no longer applies, because mm_ctx_id is no longer used anywhere. At best always been difficult to follow. It's better to consider the load on which the slbmte depends on, which the MMU depends on before it can start loading TLBs, rather than a store which may or may

[PATCH v2] powerpc/kconfig: Restore alphabetic order of the selects under CONFIG_PPC

2021-04-21 Thread Christophe Leroy
Commit a7d2475af7ae ("powerpc: Sort the selects under CONFIG_PPC") sorted all selects under CONFIG_PPC. 4 years later, several items have been introduced at wrong place, a few other have been renamed without moving them to their correct place. Reorder them now. While we are at it, simplify the

Re: [PATCH] ASoC: fsl: imx-pcm-dma: Don't request dma channel in probe

2021-04-21 Thread Mark Brown
On Wed, Apr 21, 2021 at 07:43:18PM +0200, Lucas Stach wrote: > If your driver code drops the rpm refcount to 0 and starts the > autosuspend timer while a cyclic transfer is still in flight this is > clearly a bug. Autosuspend is not there to paper over driver bugs, but > to amortize cost of

[PATCH v5 8/9] mm/mremap: Allow arch runtime override

2021-04-21 Thread Aneesh Kumar K.V
Architectures like ppc64 support faster mremap only with radix translation. Hence allow a runtime check w.r.t support for fast mremap. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/tlb.h | 6 ++ mm/mremap.c| 15 ++- 2 files changed, 20

[PATCH v5 9/9] powerpc/mm: Enable move pmd/pud

2021-04-21 Thread Aneesh Kumar K.V
mremap HAVE_MOVE_PMD/PUD optimization time comparison for 1GB region: 1GB mremap - Source PTE-aligned, Destination PTE-aligned mremap time: 1127034ns 1GB mremap - Source PMD-aligned, Destination PMD-aligned mremap time: 508817ns 1GB mremap - Source PUD-aligned, Destination

[powerpc:merge] BUILD SUCCESS d20f726744a0312b4b6613333bda7da9bc52fb75

2021-04-21 Thread kernel test robot
allnoconfig x86_64 randconfig-a004-20210421 x86_64 randconfig-a002-20210421 x86_64 randconfig-a001-20210421 x86_64 randconfig-a005-20210421 x86_64 randconfig-a006-20210421 x86_64 randconfig-a003-20210421 i386

[powerpc:next] BUILD SUCCESS 39352430aaa05fbe4ba710231c70b334513078f2

2021-04-21 Thread kernel test robot
allyesconfig mips allmodconfig powerpc allyesconfig powerpc allnoconfig x86_64 randconfig-a004-20210421 x86_64 randconfig-a002-20210421 x86_64 randconfig-a001

[powerpc:next-test] BUILD REGRESSION f76c7820fc6ef641b75b5142aea72f1485c73bb1

2021-04-21 Thread kernel test robot
: gcc_recent_errors `-- powerpc64-randconfig-p001-20210421 |-- arch-powerpc-include-asm-book3s-hash-pkey.h:error:VM_PKEY_BIT0-undeclared-(first-use-in-this-function) |-- arch-powerpc-include-asm-book3s-hash-pkey.h:error:VM_PKEY_BIT1-undeclared-(first-use-in-this-function) |-- arch

Re: [PATCH] powerpc: Initialize local variable fdt to NULL in elf64_load()

2021-04-21 Thread Daniel Axtens
Daniel Axtens writes: > Hi Lakshmi, > >> On 4/15/21 12:14 PM, Lakshmi Ramasubramanian wrote: >> >> Sorry - missed copying device-tree and powerpc mailing lists. >> >>> There are a few "goto out;" statements before the local variable "fdt" >>> is initialized through the call to

Re: [PATCH V2 net] ibmvnic: Continue with reset if set link down failed

2021-04-21 Thread Lijun Pan
On Wed, Apr 21, 2021 at 2:25 AM Sukadev Bhattiprolu wrote: > > Lijun Pan [l...@linux.vnet.ibm.com] wrote: > > > > > > > On Apr 20, 2021, at 4:35 PM, Dany Madden wrote: > > > > > > When ibmvnic gets a FATAL error message from the vnicserver, it marks > > > the Command Respond Queue (CRQ) inactive

Re: [PATCH V2 net] ibmvnic: Continue with reset if set link down failed

2021-04-21 Thread Lijun Pan
On Wed, Apr 21, 2021 at 3:06 AM Rick Lindsley wrote: > > On 4/20/21 2:42 PM, Lijun Pan wrote: > > > > This v2 does not adddress the concerns mentioned in v1. > > And I think it is better to exit with error from do_reset, and schedule a > > thorough > > do_hard_reset if the the adapter is already

Re: [PATCH V2 net] ibmvnic: Continue with reset if set link down failed

2021-04-21 Thread Lijun Pan
On Tue, Apr 20, 2021 at 4:37 PM Dany Madden wrote: > > When ibmvnic gets a FATAL error message from the vnicserver, it marks > the Command Respond Queue (CRQ) inactive and resets the adapter. If this > FATAL reset fails and a transmission timeout reset follows, the CRQ is > still inactive,

[PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument

2021-04-21 Thread Aneesh Kumar K.V
No functional change in this patch Signed-off-by: Aneesh Kumar K.V --- .../include/asm/book3s/64/tlbflush-radix.h| 19 +++- arch/powerpc/include/asm/book3s/64/tlbflush.h | 23 --- arch/powerpc/mm/book3s64/radix_hugetlbpage.c | 4 +--

[PATCH v5 6/9] mm/mremap: Use range flush that does TLB and page walk cache flush

2021-04-21 Thread Aneesh Kumar K.V
Some architectures do have the concept of page walk cache which need to be flush when updating higher levels of page tables. A fast mremap that involves moving page table pages instead of copying pte entries should flush page walk cache since the old translation cache is no more valid. Add new

[PATCH v5 7/9] mm/mremap: Move TLB flush outside page table lock

2021-04-21 Thread Aneesh Kumar K.V
Move TLB flush outside page table lock so that kernel does less with page table lock held. Releasing the ptl with old TLB contents still valid will behave such that such access happened before the level3 or level2 entry update. Signed-off-by: Aneesh Kumar K.V --- mm/mremap.c | 8 1

[PATCH v5 1/9] selftest/mremap_test: Update the test to handle pagesize other than 4K

2021-04-21 Thread Aneesh Kumar K.V
Instead of hardcoding 4K page size fetch it using sysconf(). For the performance measurements test still assume 2M and 1G are hugepage sizes. Reviewed-by: Kalesh Singh Signed-off-by: Aneesh Kumar K.V --- tools/testing/selftests/vm/mremap_test.c | 113 --- 1 file changed, 61

[PATCH v5 0/9] Speedup mremap on ppc64

2021-04-21 Thread Aneesh Kumar K.V
Hi, This patchset enables MOVE_PMD/MOVE_PUD support on power. This requires the platform to support updating higher-level page tables without updating page table entries. This also needs to invalidate the Page Walk Cache on architecture supporting the same. Changes from v4: * Change function

[PATCH v5 4/9] powerpc/mm/book3s64: Fix possible build error

2021-04-21 Thread Aneesh Kumar K.V
Update _tlbiel_pid() such that we can avoid build errors like below when using this function in other places. arch/powerpc/mm/book3s64/radix_tlb.c: In function ‘__radix__flush_tlb_range_psize’: arch/powerpc/mm/book3s64/radix_tlb.c:114:2: warning: ‘asm’ operand 3 probably does not match

[PATCH v5 2/9] selftest/mremap_test: Avoid crash with static build

2021-04-21 Thread Aneesh Kumar K.V
With a large mmap map size, we can overlap with the text area and using MAP_FIXED results in unmapping that area. Switch to MAP_FIXED_NOREPLACE and handle the EEXIST error. Reviewed-by: Kalesh Singh Signed-off-by: Aneesh Kumar K.V --- tools/testing/selftests/vm/mremap_test.c | 5 +++-- 1 file

[PATCH v5 3/9] mm/mremap: Use pmd/pud_poplulate to update page table entries

2021-04-21 Thread Aneesh Kumar K.V
pmd/pud_populate is the right interface to be used to set the respective page table entries. Some architectures like ppc64 do assume that set_pmd/pud_at can only be used to set a hugepage PTE. Since we are not setting up a hugepage PTE here, use the pmd/pud_populate interface. Signed-off-by:

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

2021-04-21 Thread Randy Dunlap
/../../../lib/decompress_unlzma.c:107:18: note: expected 'char *' but argument is of type 'unsigned char *' 107 |char *buffer, long buffer_size) | ~~~~~~^~ and for CONFIG_KERNEL_LZO=y, this one warning: BOOTCC arch/powerpc/boot/decompress.o In file inclu