Re: [RFC PATCH 6/6] powerpc/microwatt: Stop building the hash MMU code

2021-08-29 Thread Michael Ellerman
Christophe Leroy  writes:
> Le 27/08/2021 à 18:34, Nicholas Piggin a écrit :
>> Microwatt is radix-only, so stop selecting the hash MMU code.
>> 
>> This saves 20kB compressed dtbImage and 56kB vmlinux size.
>> 
>> Signed-off-by: Nicholas Piggin 
>> ---
>>   arch/powerpc/configs/microwatt_defconfig | 1 -
>>   arch/powerpc/platforms/Kconfig.cputype   | 1 +
>>   arch/powerpc/platforms/microwatt/Kconfig | 1 -
>>   3 files changed, 1 insertion(+), 2 deletions(-)
>> 
>> diff --git a/arch/powerpc/configs/microwatt_defconfig 
>> b/arch/powerpc/configs/microwatt_defconfig
>> index bf5f2e5905eb..6fbad42f9e3d 100644
>> --- a/arch/powerpc/configs/microwatt_defconfig
>> +++ b/arch/powerpc/configs/microwatt_defconfig
>> @@ -26,7 +26,6 @@ CONFIG_PPC_MICROWATT=y
>>   # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
>>   CONFIG_CPU_FREQ=y
>>   CONFIG_HZ_100=y
>> -# CONFIG_PPC_MEM_KEYS is not set
>>   # CONFIG_SECCOMP is not set
>>   # CONFIG_MQ_IOSCHED_KYBER is not set
>>   # CONFIG_COREDUMP is not set
>> diff --git a/arch/powerpc/platforms/Kconfig.cputype 
>> b/arch/powerpc/platforms/Kconfig.cputype
>> index 9b90fc501ed4..b9acd6c68c81 100644
>> --- a/arch/powerpc/platforms/Kconfig.cputype
>> +++ b/arch/powerpc/platforms/Kconfig.cputype
>> @@ -371,6 +371,7 @@ config SPE
>>   config PPC_64S_HASH_MMU
>>  bool "Hash MMU Support"
>>  depends on PPC_BOOK3S_64
>> +depends on !PPC_MICROWATT
>
> Do we really want to start nit picking which platforms can select such or 
> such option ?
> Isn't it enough to get it off through the defconfig ?
>
> Is PPC_MICROWATT mutually exclusive with other book3s64 configs ? Don't we 
> build multiplatform kernels ?

Yeah that belongs in the microwatt defconfig, not as a forced exclusion
in Kconfig.

cheers


Re: [PATCH v4 4/4] powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP

2021-08-29 Thread Nathan Chancellor
On Sun, Aug 29, 2021 at 09:11:47PM +0200, Christophe Leroy wrote:
> Hi Nathan,
> 
> Le 29/08/2021 à 20:55, Nathan Chancellor a écrit :
> > Hi Christophe,
> > 
> > On Thu, Jul 08, 2021 at 04:49:43PM +, Christophe Leroy wrote:
> > > This patch converts powerpc to the generic PTDUMP implementation.
> > > 
> > > Signed-off-by: Christophe Leroy 
> > 
> > This patch as commit e084728393a5 ("powerpc/ptdump: Convert powerpc to
> > GENERIC_PTDUMP") in powerpc/next causes a panic with Fedora's ppc64le
> > config [1] when booting up in QEMU with [2]:
> > 
> > [1.621864] BUG: Unable to handle kernel data access on read at 
> > 0xc0eeff7f
> > [1.623058] Faulting instruction address: 0xc045e5fc
> > [1.623832] Oops: Kernel access of bad area, sig: 11 [#1]
> > [1.624318] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV
> > [1.625015] Modules linked in:
> > [1.625463] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 
> > 5.14.0-rc7-next-20210827 #16
> > [1.626237] NIP:  c045e5fc LR: c045e580 CTR: 
> > c0518220
> > [1.626839] REGS: c752b820 TRAP: 0380   Not tainted  
> > (5.14.0-rc7-next-20210827)
> > [1.627528] MSR:  92009033   CR: 
> > 84002482  XER: 2000
> > [1.628449] CFAR: c0518300 IRQMASK: 0
> > [1.628449] GPR00: c045e580 c752bac0 c28a9300 
> > 
> > [1.628449] GPR04: c2008000  000a 
> > 0001
> > [1.628449] GPR08: c0eeff7f 0012  
> > 
> > [1.628449] GPR12:  c2b2 fffe 
> > c2971a70
> > [1.628449] GPR16: c2960040 c11a8f98 c752bbf0 
> > 
> > [1.628449] GPR20: c2008fff c0eeff7f c2971a68 
> > c00a0003ff00
> > [1.628449] GPR24: c2971a78 0002 0001 
> > c11a8f98
> > [1.628449] GPR28: c11a8f98 c28daef8 c2008000 
> > c2009000
> > [1.634090] NIP [c045e5fc] __walk_page_range+0x2bc/0xce0
> > [1.635117] LR [c045e580] __walk_page_range+0x240/0xce0
> > [1.635755] Call Trace:
> > [1.636018] [c752bac0] [c045e580] 
> > __walk_page_range+0x240/0xce0 (unreliable)
> > [1.636811] [c752bbd0] [c045f234] 
> > walk_page_range_novma+0x74/0xb0
> > [1.637459] [c752bc20] [c0518448] 
> > ptdump_walk_pgd+0x98/0x170
> > [1.638138] [c752bc70] [c00aa988] 
> > ptdump_check_wx+0x88/0xd0
> > [1.638738] [c752bd50] [c008d6d8] 
> > mark_rodata_ro+0x48/0x80
> > [1.639299] [c752bdb0] [c0012a34] kernel_init+0x74/0x1a0
> > [1.639842] [c752be10] [c000cfd4] 
> > ret_from_kernel_thread+0x5c/0x64
> > [1.640597] Instruction dump:
> > [1.641021] 38e7 39490010 7ce707b4 7fca5436 79081564 7d4a3838 
> > 7908f082 794a1f24
> > [1.641740] 78a8f00e 30e6 7ea85214 7ce73110 <7d48502a> 78f90fa4 
> > 2c2a 39290010
> > [1.642771] ---[ end trace 6cf72b085097ad52 ]---
> > [1.643220]
> > [2.644228] Kernel panic - not syncing: Attempted to kill init! 
> > exitcode=0x000b
> > [2.645523] ---[ end Kernel panic - not syncing: Attempted to kill init! 
> > exitcode=0x000b ]---
> > 
> > This is not compiler specific, I can reproduce it with GCC 11.2.0 and
> > binutils 2.37. If there is any additional information I can provide,
> > please let me know.
> 
> Can you provide a dissassembly of __walk_page_range() ? Or provide your 
> vmlinux binary.

Sure thing!

Disassembly of mm/pagewalk.o: 
https://gist.github.com/2cc2cadc598fe55b0f5cea0d75e89186

vmlinux binary (zstd compressed, 123MB): 
https://1drv.ms/u/s!AsQNYeB-IEbqjjai5EiHUBiPYzI3?e=kqUwpN

Cheers,
Nathan


Re: [PATCH v4 4/4] powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP

2021-08-29 Thread Christophe Leroy

Hi Nathan,

Le 29/08/2021 à 20:55, Nathan Chancellor a écrit :

Hi Christophe,

On Thu, Jul 08, 2021 at 04:49:43PM +, Christophe Leroy wrote:

This patch converts powerpc to the generic PTDUMP implementation.

Signed-off-by: Christophe Leroy 


This patch as commit e084728393a5 ("powerpc/ptdump: Convert powerpc to
GENERIC_PTDUMP") in powerpc/next causes a panic with Fedora's ppc64le
config [1] when booting up in QEMU with [2]:

[1.621864] BUG: Unable to handle kernel data access on read at 
0xc0eeff7f
[1.623058] Faulting instruction address: 0xc045e5fc
[1.623832] Oops: Kernel access of bad area, sig: 11 [#1]
[1.624318] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV
[1.625015] Modules linked in:
[1.625463] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 
5.14.0-rc7-next-20210827 #16
[1.626237] NIP:  c045e5fc LR: c045e580 CTR: c0518220
[1.626839] REGS: c752b820 TRAP: 0380   Not tainted  
(5.14.0-rc7-next-20210827)
[1.627528] MSR:  92009033   CR: 
84002482  XER: 2000
[1.628449] CFAR: c0518300 IRQMASK: 0
[1.628449] GPR00: c045e580 c752bac0 c28a9300 

[1.628449] GPR04: c2008000  000a 
0001
[1.628449] GPR08: c0eeff7f 0012  

[1.628449] GPR12:  c2b2 fffe 
c2971a70
[1.628449] GPR16: c2960040 c11a8f98 c752bbf0 

[1.628449] GPR20: c2008fff c0eeff7f c2971a68 
c00a0003ff00
[1.628449] GPR24: c2971a78 0002 0001 
c11a8f98
[1.628449] GPR28: c11a8f98 c28daef8 c2008000 
c2009000
[1.634090] NIP [c045e5fc] __walk_page_range+0x2bc/0xce0
[1.635117] LR [c045e580] __walk_page_range+0x240/0xce0
[1.635755] Call Trace:
[1.636018] [c752bac0] [c045e580] 
__walk_page_range+0x240/0xce0 (unreliable)
[1.636811] [c752bbd0] [c045f234] 
walk_page_range_novma+0x74/0xb0
[1.637459] [c752bc20] [c0518448] ptdump_walk_pgd+0x98/0x170
[1.638138] [c752bc70] [c00aa988] ptdump_check_wx+0x88/0xd0
[1.638738] [c752bd50] [c008d6d8] mark_rodata_ro+0x48/0x80
[1.639299] [c752bdb0] [c0012a34] kernel_init+0x74/0x1a0
[1.639842] [c752be10] [c000cfd4] 
ret_from_kernel_thread+0x5c/0x64
[1.640597] Instruction dump:
[1.641021] 38e7 39490010 7ce707b4 7fca5436 79081564 7d4a3838 7908f082 
794a1f24
[1.641740] 78a8f00e 30e6 7ea85214 7ce73110 <7d48502a> 78f90fa4 2c2a 
39290010
[1.642771] ---[ end trace 6cf72b085097ad52 ]---
[1.643220]
[2.644228] Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x000b
[2.645523] ---[ end Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x000b ]---

This is not compiler specific, I can reproduce it with GCC 11.2.0 and
binutils 2.37. If there is any additional information I can provide,
please let me know.


Can you provide a dissassembly of __walk_page_range() ? Or provide your vmlinux 
binary.

Thanks
Christophe




[1]: 
https://src.fedoraproject.org/rpms/kernel/raw/rawhide/f/kernel-ppc64le-fedora.config
[2]: https://github.com/ClangBuiltLinux/boot-utils

Cheers,
Nathan



Re: [PATCH v4 4/4] powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP

2021-08-29 Thread Nathan Chancellor
Hi Christophe,

On Thu, Jul 08, 2021 at 04:49:43PM +, Christophe Leroy wrote:
> This patch converts powerpc to the generic PTDUMP implementation.
> 
> Signed-off-by: Christophe Leroy 

This patch as commit e084728393a5 ("powerpc/ptdump: Convert powerpc to
GENERIC_PTDUMP") in powerpc/next causes a panic with Fedora's ppc64le
config [1] when booting up in QEMU with [2]:

[1.621864] BUG: Unable to handle kernel data access on read at 
0xc0eeff7f
[1.623058] Faulting instruction address: 0xc045e5fc
[1.623832] Oops: Kernel access of bad area, sig: 11 [#1]
[1.624318] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV
[1.625015] Modules linked in:
[1.625463] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 
5.14.0-rc7-next-20210827 #16
[1.626237] NIP:  c045e5fc LR: c045e580 CTR: c0518220
[1.626839] REGS: c752b820 TRAP: 0380   Not tainted  
(5.14.0-rc7-next-20210827)
[1.627528] MSR:  92009033   CR: 
84002482  XER: 2000
[1.628449] CFAR: c0518300 IRQMASK: 0
[1.628449] GPR00: c045e580 c752bac0 c28a9300 

[1.628449] GPR04: c2008000  000a 
0001
[1.628449] GPR08: c0eeff7f 0012  

[1.628449] GPR12:  c2b2 fffe 
c2971a70
[1.628449] GPR16: c2960040 c11a8f98 c752bbf0 

[1.628449] GPR20: c2008fff c0eeff7f c2971a68 
c00a0003ff00
[1.628449] GPR24: c2971a78 0002 0001 
c11a8f98
[1.628449] GPR28: c11a8f98 c28daef8 c2008000 
c2009000
[1.634090] NIP [c045e5fc] __walk_page_range+0x2bc/0xce0
[1.635117] LR [c045e580] __walk_page_range+0x240/0xce0
[1.635755] Call Trace:
[1.636018] [c752bac0] [c045e580] 
__walk_page_range+0x240/0xce0 (unreliable)
[1.636811] [c752bbd0] [c045f234] 
walk_page_range_novma+0x74/0xb0
[1.637459] [c752bc20] [c0518448] ptdump_walk_pgd+0x98/0x170
[1.638138] [c752bc70] [c00aa988] ptdump_check_wx+0x88/0xd0
[1.638738] [c752bd50] [c008d6d8] mark_rodata_ro+0x48/0x80
[1.639299] [c752bdb0] [c0012a34] kernel_init+0x74/0x1a0
[1.639842] [c752be10] [c000cfd4] 
ret_from_kernel_thread+0x5c/0x64
[1.640597] Instruction dump:
[1.641021] 38e7 39490010 7ce707b4 7fca5436 79081564 7d4a3838 7908f082 
794a1f24
[1.641740] 78a8f00e 30e6 7ea85214 7ce73110 <7d48502a> 78f90fa4 2c2a 
39290010
[1.642771] ---[ end trace 6cf72b085097ad52 ]---
[1.643220]
[2.644228] Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x000b
[2.645523] ---[ end Kernel panic - not syncing: Attempted to kill init! 
exitcode=0x000b ]---

This is not compiler specific, I can reproduce it with GCC 11.2.0 and
binutils 2.37. If there is any additional information I can provide,
please let me know.

[1]: 
https://src.fedoraproject.org/rpms/kernel/raw/rawhide/f/kernel-ppc64le-fedora.config
[2]: https://github.com/ClangBuiltLinux/boot-utils

Cheers,
Nathan


Re: [PATCH] net: spider_net: switch from 'pci_' to 'dma_' API

2021-08-29 Thread Michael Ellerman
Christophe Leroy  writes:
> Le 27/08/2021 à 21:56, Christophe JAILLET a écrit :
>> ---
>> It has *not* been compile tested because I don't have the needed
>> configuration or cross-compiler. However, the modification is completely
>> mechanical and done by coccinelle.
>
> All you need is at https://mirrors.edge.kernel.org/pub/tools/crosstool/

There's also some instructions here for using distro toolchains:

https://github.com/linuxppc/wiki/wiki/Building-powerpc-kernels

cheers


[powerpc:merge] BUILD SUCCESS a555f645f92c58683d0a8d3315352a8d0ce8f80e

2021-08-29 Thread kernel test robot
   randconfig-a011-20210825
i386 randconfig-a011-20210827
i386 randconfig-a016-20210827
i386 randconfig-a012-20210827
i386 randconfig-a014-20210827
i386 randconfig-a013-20210827
i386 randconfig-a015-20210827
i386 randconfig-a011-20210825
i386 randconfig-a016-20210825
i386 randconfig-a012-20210825
i386 randconfig-a014-20210825
i386 randconfig-a013-20210825
i386 randconfig-a015-20210825
arc  randconfig-r043-20210825
riscvrandconfig-r042-20210825
s390 randconfig-r044-20210825
arc  randconfig-r043-20210824
riscvnommu_k210_defconfig
riscvallyesconfig
riscvnommu_virt_defconfig
riscv allnoconfig
riscv   defconfig
riscv  rv32_defconfig
riscvallmodconfig
x86_64rhel-8.3-kselftests
um   x86_64_defconfig
um i386_defconfig
x86_64   allyesconfig
x86_64  defconfig
x86_64   rhel-8.3
x86_64  kexec

clang tested configs:
s390 randconfig-c005-20210825
i386 randconfig-c001-20210825
arm  randconfig-c002-20210825
riscvrandconfig-c006-20210825
powerpc  randconfig-c003-20210825
x86_64   randconfig-c007-20210825
mips randconfig-c004-20210825
i386 randconfig-c001-20210826
s390 randconfig-c005-20210826
arm  randconfig-c002-20210826
riscvrandconfig-c006-20210826
powerpc  randconfig-c003-20210826
x86_64   randconfig-c007-20210826
mips randconfig-c004-20210826
i386 randconfig-a006-20210825
i386 randconfig-a001-20210825
i386 randconfig-a002-20210825
i386 randconfig-a005-20210825
i386 randconfig-a004-20210825
i386 randconfig-a003-20210825
i386 randconfig-a001-20210829
i386 randconfig-a006-20210829
i386 randconfig-a005-20210829
i386 randconfig-a004-20210829
i386 randconfig-a003-20210829
x86_64   randconfig-a014-20210824
x86_64   randconfig-a015-20210824
x86_64   randconfig-a016-20210824
x86_64   randconfig-a013-20210824
x86_64   randconfig-a012-20210824
x86_64   randconfig-a011-20210824
x86_64   randconfig-a005-20210827
x86_64   randconfig-a001-20210827
x86_64   randconfig-a006-20210827
x86_64   randconfig-a003-20210827
x86_64   randconfig-a004-20210827
x86_64   randconfig-a002-20210827
i386 randconfig-a011-20210824
i386 randconfig-a016-20210824
i386 randconfig-a012-20210824
i386 randconfig-a014-20210824
i386 randconfig-a013-20210824
i386 randconfig-a015-20210824
hexagon  randconfig-r041-20210826
hexagon  randconfig-r045-20210826
riscvrandconfig-r042-20210826
s390 randconfig-r044-20210826
hexagon  randconfig-r041-20210824
hexagon  randconfig-r045-20210824
riscvrandconfig-r042-20210824
s390 randconfig-r044-20210824

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org


Re: [PATCH] net: spider_net: switch from 'pci_' to 'dma_' API

2021-08-29 Thread patchwork-bot+netdevbpf
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Fri, 27 Aug 2021 21:56:28 +0200 you wrote:
> In [1], Christoph Hellwig has proposed to remove the wrappers in
> include/linux/pci-dma-compat.h.
> 
> Some reasons why this API should be removed have been given by Julia
> Lawall in [2].
> 
> A coccinelle script has been used to perform the needed transformation
> Only relevant parts are given below.
> 
> [...]

Here is the summary with links:
  - net: spider_net: switch from 'pci_' to 'dma_' API
https://git.kernel.org/netdev/net-next/c/27d57f85102b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




Re: [PATCH] net: spider_net: switch from 'pci_' to 'dma_' API

2021-08-29 Thread Christophe Leroy




Le 27/08/2021 à 21:56, Christophe JAILLET a écrit :

---
It has *not* been compile tested because I don't have the needed
configuration or cross-compiler. However, the modification is completely
mechanical and done by coccinelle.


All you need is at https://mirrors.edge.kernel.org/pub/tools/crosstool/

Christophe