Re: [PATCH v2] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add]
Hello, on current linux-next ARCH=riscv allmodconfig breaks with: CC arch/riscv/kernel/elf_kexec.o arch/riscv/kernel/elf_kexec.c:345:5: error: redefinition of ‘arch_kexec_apply_relocations_add’ 345 | int arch_kexec_apply_relocations_add(struct purgatory_info *pi, | ^~~~ In file included from arch/riscv/kernel/elf_kexec.c:16: include/linux/kexec.h:236:1: note: previous definition of ‘arch_kexec_apply_relocations_add’ with type ‘int(struct purgatory_info *, Elf64_Shdr *, const Elf64_Shdr *, const Elf64_Shdr *)’ {aka ‘int(struct purgatory_info *, struct elf64_shdr *, const struct elf64_shdr *, const struct elf64_shdr *)’} 236 | arch_kexec_apply_relocations_add(struct purgatory_info *pi, Elf_Shdr *section, | ^~~~ (I think) because there is a conflict between the two commits: 233c1e6c319c kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add] 838b3e28488f RISC-V: Load purgatory in kexec_file And so next is broken starting from 164a9037b1d33f28ba27671c16ec1c23d4a11acf which merges the riscv tree. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | https://www.pengutronix.de/ | signature.asc Description: PGP signature
Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.19-1 tag
The pull request you sent on Sat, 28 May 2022 22:50:19 +1000: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.19-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/6112bd00e84e5dbffebc3c1e908cbe914ca772ee Thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html
[GIT PULL] Please pull powerpc/linux.git powerpc-5.19-1 tag
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull powerpc updates for 5.19. There's a few changes to generic mm code and arm64 as part of the mmap conversion, they all have appropriate acks. There's one trivial conflict in arch/powerpc/Kconfig, the resolution is to take both sides. cheers Notable out of area changes: 2cb4de085f38 mm: Add len and flags parameters to arch_get_mmap_end() arch/arm64/include/asm/processor.h fs/hugetlbfs/inode.c include/linux/sched/mm.h mm/mmap.c include/linux/hugetlb.h # 4b439e25e29e mm, hugetlbfs: Allow an arch to always use generic versions of get_unmapped_area functions mm/util.c # 723820f3f77d mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT arch/Kconfig # aa06530a535f arch/Kconfig: Drop references to powerpc PAGE_SIZE symbols include/linux/of_irq.h# bb12dd42d20f powerpc/powermac: constify device_node in of_irq_parse_oldworld() The following changes since commit ce522ba9ef7e2d9fb22a39eb3371c0c64e2a433e: Linux 5.18-rc2 (Sun Apr 10 14:21:36 2022 -1000) are available in the git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/powerpc-5.19-1 for you to fetch changes up to dcf280e6f80be280ca7dd1b058f038654e4a18dd: powerpc/64: Include cache.h directly in paca.h (2022-05-27 22:20:09 +1000) - -- powerpc updates for 5.19 - Convert to the generic mmap support (ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT). - Add support for outline-only KASAN with 64-bit Radix MMU (P9 or later). - Increase SIGSTKSZ and MINSIGSTKSZ and add support for AT_MINSIGSTKSZ. - Enable the DAWR (Data Address Watchpoint) on POWER9 DD2.3 or later. - Drop support for system call instruction emulation. - Many other small features and fixes. Thanks to: Alexey Kardashevskiy, Alistair Popple, Andy Shevchenko, Bagas Sanjaya, Bjorn Helgaas, Bo Liu, Chen Huang, Christophe Leroy, Colin Ian King, Daniel Axtens, Dwaipayan Ray, Fabiano Rosas, Finn Thain, Frank Rowand, Fuqian Huang, Guilherme G. Piccoli, Hangyu Hua, Haowen Bai, Haren Myneni, Hari Bathini, He Ying, Jason Wang, Jiapeng Chong, Jing Yangyang, Joel Stanley, Julia Lawall, Kajol Jain, Kevin Hao, Krzysztof Kozlowski, Laurent Dufour, Lv Ruyi, Madhavan Srinivasan, Magali Lemes, Miaoqian Lin, Minghao Chi, Nathan Chancellor, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran, Oscar Salvador, Pali Rohár, Paul Mackerras, Peng Wu, Qing Wang, Randy Dunlap, Reza Arbab, Russell Currey, Sohaib Mohamed, Vaibhav Jain, Vasant Hegde, Wang Qing, Wang Wensheng, Xiang wangx, Xiaomeng Tong, Xu Wang, Yang Guang, Yang Li, Ye Bin, YueHaibing, Yu Kuai, Zheng Bin, Zou Wei, Zucheng Zheng. - -- Alexey Kardashevskiy (4): powerpc/boot: Stop using RELACOUNT KVM: PPC: Book3s: Retire H_PUT_TCE/etc real mode handlers KVM: PPC: Book3s: PR: Enable default TCE hypercalls KVM: PPC: Book3s: Remove real mode interrupt controller hcalls handlers Alistair Popple (1): selftests/powerpc: Add matrix multiply assist (MMA) test Andy Shevchenko (1): powerpc/83xx/mpc8349emitx: Get rid of of_node assignment Bagas Sanjaya (1): KVM: PPC: Book3S HV: remove extraneous asterisk from rm_host_ipi_action() comment Bjorn Helgaas (1): powerpc: Remove unused SLOW_DOWN_IO definition Bo Liu (1): KVM: PPC: Book3S HV: Use consistent type for return value of kvm_age_rmapp() Chen Huang (1): powerpc/rtas: Replaced simple_strtoull() with kstrtoull() Christophe Leroy (64): powerpc/book3e: Fix sparse report in mm/nohash/fsl_book3e.c mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT mm, hugetlbfs: Allow an arch to always use generic versions of get_unmapped_area functions mm: Add len and flags parameters to arch_get_mmap_end() powerpc/mm: Move vma_mmu_pagesize() powerpc/mm: Make slice specific to book3s/64 powerpc/mm: Remove CONFIG_PPC_MM_SLICES powerpc/mm: Use generic_get_unmapped_area() and call it from arch_get_unmapped_area() powerpc/mm: Use generic_hugetlb_get_unmapped_area() powerpc/mm: Move get_unmapped_area functions to slice.c powerpc/mm: Enable full randomisation of memory mappings powerpc/mm: Convert to default topdown mmap layout powerpc: Simplify and move arch_randomize_brk() powerpc: Reduce csum_add() complexity for PPC64 powerpc/64: Move pci_device_from_OF_node() out of asm/pci-bridge.h powerpc: Don't include asm/prom.h in asm/parport.h powerpc: Include asm/reg.h in asm/svm.h powerpc: Add missing declaration in asm/drmem.h powerpc: Remove asm/prom.h from all files that don't need it powerpc: Add missing headers powerpc: Use rol32() instead
[Bug 216041] Stack overflow at boot (do_IRQ: stack overflow: 1984) on a PowerMac G4 DP, KASAN debug build
https://bugzilla.kernel.org/show_bug.cgi?id=216041 Arnd Bergmann (a...@arndb.de) changed: What|Removed |Added CC||a...@arndb.de --- Comment #4 from Arnd Bergmann (a...@arndb.de) --- Setting it higher is probably a good idea, but there really isn't a safe limit with KASAN, at least if KASAN_STACK is active, running with KASAN always has a risk of running into stack overflow issues. One thing that sticks out is that there is an interrupt on the same stack as the task, in [eaa1c800] [c0009258] do_IRQ+0x20/0x34 [eaa1c820] [c00045b4] HardwareInterrupt_virt+0x108/0x10c [eaa1c920] [c0c59b2c] __schedule+0x3f0/0x9dc [eaa1c9b0] [c0c5a18c] schedule+0x74/0x13c It looks like on ppc32, as of 547db12fd8a0 ("powerpc/32: Use vmapped stacks for interrupts"), you have either VMAP_STACK (to detect stack overflows) or IRQ stacks (to make them less likely). I think you really want both instead, and allocate the IRQ stacks from vmalloc space as well. The ext4 read path is a bit wasteful with KASAN enabled, using 1776 bytes from ext4_lookup to ext4_read_bh, but not excessively so. -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 216041] Stack overflow at boot (do_IRQ: stack overflow: 1984) on a PowerMac G4 DP, KASAN debug build
https://bugzilla.kernel.org/show_bug.cgi?id=216041 Christophe Leroy (christophe.le...@csgroup.eu) changed: What|Removed |Added CC||christophe.le...@csgroup.eu --- Comment #3 from Christophe Leroy (christophe.le...@csgroup.eu) --- I can't see any issue, other than your CONFIG_THREAD_SHIFT is set to 13. It should be 14 by default, see https://elixir.bootlin.com/linux/v5.18/source/arch/powerpc/Kconfig#L769 Is there any reason why you set it to 13 ? -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
Re: [PATCH 1/2] powerpc/64s: Add CPU_FTRS_POWER9_DD2_2 to CPU_FTRS_ALWAYS mask
On Thu, 19 May 2022 22:22:04 +1000, Michael Ellerman wrote: > CPU_FTRS_POWER9_DD2_2 is missing from CPU_FTRS_ALWAYS. > > That doesn't cause any bug, because CPU_FTRS_POWER9_DD2_2 adds new bits > that don't appear in other values, so when anded with the other masks > the result is the same. > > But for consistency we should have all values in the CPU_FTRS_ALWAYS > mask, so that the logic is robust against the values being changed in > future. > > [...] Applied to powerpc/next. [1/2] powerpc/64s: Add CPU_FTRS_POWER9_DD2_2 to CPU_FTRS_ALWAYS mask https://git.kernel.org/powerpc/c/3e36960a27fec30f16bace1521dc852105522f5e [2/2] powerpc/64s: Add CPU_FTRS_POWER10 to ALWAYS mask https://git.kernel.org/powerpc/c/b4d9cc75721bdbceba0d71aa5accf6aa09ee26c1 cheers
Re: [PATCH] powerpc/64: Include cache.h directly in paca.h
On Fri, 27 May 2022 21:20:35 +1000, Michael Ellerman wrote: > paca.h uses cacheline_aligned without directly including cache.h, > where it's defined. > > For Book3S builds that's OK because paca.h includes lppaca.h, and it > does include cache.h. > > But Book3E builds have been getting cache.h indirectly via printk.h, > which is dicey, and in fact that include was recently removed, leading > to build errors such as: > > [...] Applied to powerpc/next. [1/1] powerpc/64: Include cache.h directly in paca.h https://git.kernel.org/powerpc/c/dcf280e6f80be280ca7dd1b058f038654e4a18dd cheers
Re: [PATCH] powerpc/xics: Include missing header
On Tue, 24 May 2022 07:35:10 +0200, Christophe Leroy wrote: > Include of_adresses.h to get of_iomap() prototype. > > Applied to powerpc/next. [1/1] powerpc/xics: Include missing header https://git.kernel.org/powerpc/c/14554d92c1c5a127dd0dab8fce8f08bf70d8b39b cheers
Re: [PATCH] powerpc/64s: Only set HAVE_ARCH_UNMAPPED_AREA when CONFIG_PPC_64S_HASH_MMU is set
On Tue, 24 May 2022 07:42:05 +0200, Christophe Leroy wrote: > When CONFIG_PPC_64S_HASH_MMU is not set, slice.c is not built and > arch_get_unmapped_area() and arch_get_unmapped_area_topdown() are > not provided because RADIX uses the generic ones. > > Therefore, neither set HAVE_ARCH_UNMAPPED_AREA nor > HAVE_ARCH_UNMAPPED_AREA_TOPDOWN. > > [...] Applied to powerpc/next. [1/1] powerpc/64s: Only set HAVE_ARCH_UNMAPPED_AREA when CONFIG_PPC_64S_HASH_MMU is set https://git.kernel.org/powerpc/c/c85ab4fe33065ca1fdcac26f0c00c837fe727ba7 cheers
Re: [PATCH -next, v2] powerpc: add support for syscall stack randomization
xiujianfeng writes: > friendly ping I will consider this for v5.20 once the merge window has closed (after v5.19-rc1 is release). cheers > 在 2022/5/16 15:32, Xiu Jianfeng 写道: >> Add support for adding a random offset to the stack while handling >> syscalls. This patch uses mftb() instead of get_random_int() for better >> performance. >> >> In order to avoid unconditional stack canaries on syscall entry (due to >> the use of alloca()), also disable stack protector to avoid triggering >> needless checks and slowing down the entry path. As there is no general >> way to control stack protector coverage with a function attribute, this >> must be disabled at the compilation unit level. >> >> Signed-off-by: Xiu Jianfeng >> >> --- >> Changes in v2: >>-move choose choose_random_kstack_offset() to the end of >> system_call_exception >>-allow full 6 (10) bits of entropy >>-disable stack-protector for interrupt.c >> --- >> arch/powerpc/Kconfig| 1 + >> arch/powerpc/kernel/Makefile| 7 +++ >> arch/powerpc/kernel/interrupt.c | 19 ++- >> 3 files changed, 26 insertions(+), 1 deletion(-) >> >> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig >> index 98309eeae09c..2f0019a0054e 100644 >> --- a/arch/powerpc/Kconfig >> +++ b/arch/powerpc/Kconfig >> @@ -192,6 +192,7 @@ config PPC >> select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14 >> select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14 >> select HAVE_ARCH_KFENCE if PPC_BOOK3S_32 || PPC_8xx || >> 40x >> +select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET >> select HAVE_ARCH_KGDB >> select HAVE_ARCH_MMAP_RND_BITS >> select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT >> diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile >> index 4ddd161aef32..5c5e85b8229b 100644 >> --- a/arch/powerpc/kernel/Makefile >> +++ b/arch/powerpc/kernel/Makefile >> @@ -40,6 +40,13 @@ CFLAGS_cputable.o += -DDISABLE_BRANCH_PROFILING >> CFLAGS_btext.o += -DDISABLE_BRANCH_PROFILING >> endif >> >> +#ifdef CONFIG_RANDOMIZE_KSTACK_OFFSET >> +# Remove stack protector to avoid triggering unneeded stack canary >> +# checks due to randomize_kstack_offset. >> +CFLAGS_REMOVE_interrupt.o = -fstack-protector -fstack-protector-strong >> +CFLAGS_interrupt.o += -fno-stack-protector >> +#endif >> + >> obj-y := cputable.o syscalls.o \ >> irq.o align.o signal_$(BITS).o pmc.o vdso.o \ >> process.o systbl.o idle.o \ >> diff --git a/arch/powerpc/kernel/interrupt.c >> b/arch/powerpc/kernel/interrupt.c >> index 784ea3289c84..d7cdcb6fc336 100644 >> --- a/arch/powerpc/kernel/interrupt.c >> +++ b/arch/powerpc/kernel/interrupt.c >> @@ -4,6 +4,7 @@ >> #include >> #include >> #include /* for show_regs */ >> +#include >> >> #include >> #include >> @@ -78,10 +79,12 @@ notrace long system_call_exception(long r3, long r4, >> long r5, >> long r6, long r7, long r8, >> unsigned long r0, struct pt_regs *regs) >> { >> +long ret; >> syscall_fn f; >> >> kuap_lock(); >> >> +add_random_kstack_offset(); >> regs->orig_gpr3 = r3; >> >> if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG)) >> @@ -229,7 +232,21 @@ notrace long system_call_exception(long r3, long r4, >> long r5, >> f = (void *)sys_call_table[r0]; >> } >> >> -return f(r3, r4, r5, r6, r7, r8); >> +ret = f(r3, r4, r5, r6, r7, r8); >> +/* >> + * Ultimately, this value will get limited by KSTACK_OFFSET_MAX(), >> + * so the maximum stack offset is 1k bytes(10 bits). >> + * >> + * The actual entropy will be further reduced by the compiler when >> + * applying stack alignment constraints: the powerpc architecture >> + * may have two kinds of stack alignment(16-bytes and 8-bytes). >> + * >> + * So the resulting 6 or 7 bits of entropy is seen in SP[9:4] or >> SP[9:3]. >> + * >> + */ >> +choose_random_kstack_offset(mftb()); >> + >> +return ret; >> } >> >> static notrace void booke_load_dbcr0(void)
Re: [PATCH] powerpc/64: Include cache.h directly in paca.h
Christophe Leroy writes: > Le 27/05/2022 à 13:20, Michael Ellerman a écrit : >> paca.h uses cacheline_aligned without directly including cache.h, >> where it's defined. >> >> For Book3S builds that's OK because paca.h includes lppaca.h, and it >> does include cache.h. >> >> But Book3E builds have been getting cache.h indirectly via printk.h, >> which is dicey, and in fact that include was recently removed, leading >> to build errors such as: >> >>ld: fs/isofs/dir.o:(.bss+0x0): multiple definition of >> `cacheline_aligned'; fs/isofs/namei.o:(.bss+0x0): first defined here >> >> So include cache.h directly to fix the build error. >> >> Fixes: 534aa1dc975a ("printk: stop including cache.h from printk.h") >> Signed-off-by: Michael Ellerman > > You've got other candidates for the fix: > > $ git grep -L linux/cache.h `git grep -l cacheline_aligned > arch/powerpc` > arch/powerpc/include/asm/hardirq.h > arch/powerpc/include/asm/iommu.h > arch/powerpc/include/asm/paca.h > arch/powerpc/include/asm/processor.h > arch/powerpc/kernel/prom_init.c > > Discussion at > https://lore.kernel.org/lkml/e3c8b2bf-b55d-4c2c-a1cf-d5e9941e2...@csgroup.eu/t/ Adding it to paca.h seems to also fix those build errors, so I'll leave it at that for now. Adding cache.h to those other headers should be fine, but I don't want to do it just before sending my pull request, because changing include order can easily cause bugs, and they're not always easy to find. cheers
[Bug 215389] pagealloc: memory corruption at building glibc-2.33 and running its' testsuite
https://bugzilla.kernel.org/show_bug.cgi?id=215389 --- Comment #27 from Erhard F. (erhar...@mailbox.org) --- I opened a new bug for the stack issue which contains a bit more data. Hopefully the output is of some help (see bug #216041). -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 216041] Stack overflow at boot (do_IRQ: stack overflow: 1984) on a PowerMac G4 DP, KASAN debug build
https://bugzilla.kernel.org/show_bug.cgi?id=216041 --- Comment #2 from Erhard F. (erhar...@mailbox.org) --- Created attachment 301067 --> https://bugzilla.kernel.org/attachment.cgi?id=301067&action=edit kernel .config (5.18.0, PowerMac G4 DP) -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 216041] Stack overflow at boot (do_IRQ: stack overflow: 1984) on a PowerMac G4 DP, KASAN debug build
https://bugzilla.kernel.org/show_bug.cgi?id=216041 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 301066 --> https://bugzilla.kernel.org/attachment.cgi?id=301066&action=edit dmesg (5.18.0, PowerMac G4 DP), case 2 -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 216041] New: Stack overflow at boot (do_IRQ: stack overflow: 1984) on a PowerMac G4 DP, KASAN debug build
https://bugzilla.kernel.org/show_bug.cgi?id=216041 Bug ID: 216041 Summary: Stack overflow at boot (do_IRQ: stack overflow: 1984) on a PowerMac G4 DP, KASAN debug build Product: Platform Specific/Hardware Version: 2.5 Kernel Version: 5.18.0 Hardware: PPC-32 OS: Linux Tree: Mainline Status: NEW Severity: normal Priority: P1 Component: PPC-32 Assignee: platform_ppc...@kernel-bugs.osdl.org Reporter: erhar...@mailbox.org Regression: No Created attachment 301065 --> https://bugzilla.kernel.org/attachment.cgi?id=301065&action=edit dmesg (5.18.0, PowerMac G4 DP), case 1 The attached v5.18 kernel .config triggers this stack overflow pretty easy on my G4 DP. It does not show up on every boot but very often. The overflow usually happens after the radeon drm gets loaded. Don't know whether it's the same issue as bug #207129 but here the KASAN + debug output looks more useful. [...] [drm] radeon: irq initialized. [drm] Loading R300 Microcode Loading firmware: radeon/R300_cp.bin do_IRQ: stack overflow: 1984 CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 5.18.0-gentoo-PMacG4 #1 Call Trace: Oops: Kernel stack overflow, sig: 11 [#1] BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=2 PowerMac Modules linked in: sr_mod cdrom radeon(+) ohci_pci(+) hwmon i2c_algo_bit drm_ttm_helper ttm drm_dp_helper snd_aoa_i2sbus snd_aoa_soundbus snd_pcm ehci_pci snd_timer ohci_hcd snd ssb ehci_hcd 8250_pci soundcore drm_kms_helper pcmcia 8250 pcmcia_core syscopyarea usbcore sysfillrect 8250_base sysimgblt serial_mctrl_gpio fb_sys_fops usb_common pkcs8_key_parser fuse drm drm_panel_orientation_quirks configfs CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 5.18.0-gentoo-PMacG4 #1 NIP: c02e5558 LR: c07eb3bc CTR: c07f46a8 REGS: e7fe9f50 TRAP: Not tainted (5.18.0-gentoo-PMacG4) MSR: 1032 CR: 44a14824 XER: 2000 GPR00: c07eb3bc eaa1c000 c26baea0 eaa1c0a0 0008 c07eb3bc eaa1c010 GPR08: eaa1c0a8 04f3f3f3 f1f1f1f1 c07f4c84 44a14824 0080f7e4 0005 0010 GPR16: 0025 eaa1c154 eaa1c158 c0dbad64 0020 fd543810 eaa1c0a0 eaa1c29e GPR24: c0dbad44 c0db8740 05ff fd543802 eaa1c150 c0c9a3c0 eaa1c0a0 c0c9a3c0 NIP [c02e5558] kasan_check_range+0xc/0x2b4 LR [c07eb3bc] format_decode+0x80/0x604 Call Trace: [eaa1c000] [c07eb3bc] format_decode+0x80/0x604 (unreliable) [eaa1c070] [c07f4dac] vsnprintf+0x128/0x938 [eaa1c110] [c07f5788] sprintf+0xa0/0xc0 [eaa1c180] [c0154c1c] __sprint_symbol.constprop.0+0x170/0x198 [eaa1c230] [c07ee71c] symbol_string+0xf8/0x260 [eaa1c430] [c07f46d0] pointer+0x15c/0x710 [eaa1c4b0] [c07f4fbc] vsnprintf+0x338/0x938 [eaa1c550] [c00e8fa0] vprintk_store+0x2a8/0x678 [eaa1c690] [c00e94e4] vprintk_emit+0x174/0x378 [eaa1c6d0] [c00ea008] _printk+0x9c/0xc0 [eaa1c750] [c000ca94] show_stack+0x21c/0x260 [eaa1c7a0] [c07d0bd4] dump_stack_lvl+0x60/0x90 [eaa1c7c0] [c0009234] __do_IRQ+0x170/0x174 [eaa1c800] [c0009258] do_IRQ+0x20/0x34 [eaa1c820] [c00045b4] HardwareInterrupt_virt+0x108/0x10c --- interrupt: 500 at finish_task_switch.isra.0+0x130/0x3a8 NIP: c00a3c9c LR: c00a3c88 CTR: c036560c REGS: eaa1c830 TRAP: 0500 Not tainted (5.18.0-gentoo-PMacG4) MSR: 0220b032 CR: 22882848 XER: 2000 GPR00: c00a3c88 eaa1c8e0 c26baea0 e6dcf2a0 c0c59b28 ea18df50 c002a268 c2fd1470 GPR08: 0003 0200b032 0001 22004868 0080f7e4 92e60efc c88833b4 GPR16: c88833c0 0003 25c84000 0006 e6dcf82c d82c68a0 GPR24: 25c84000 c2fd0bc0 c0c59b2c c114b2a0 e6dcf2a0 NIP [c00a3c9c] finish_task_switch.isra.0+0x130/0x3a8 LR [c00a3c88] finish_task_switch.isra.0+0x11c/0x3a8 --- interrupt: 500 [eaa1c920] [c0c59b2c] __schedule+0x3f0/0x9dc [eaa1c9b0] [c0c5a18c] schedule+0x74/0x13c [eaa1c9d0] [c0c5a2e4] io_schedule+0x54/0x8c [eaa1c9f0] [c0c5af0c] bit_wait_io+0x18/0x94 [eaa1ca10] [c0c5a8a0] __wait_on_bit+0x100/0x28c [eaa1ca60] [c0c5aaf4] out_of_line_wait_on_bit+0xc8/0xf0 [eaa1cae0] [c0494d38] ext4_read_bh+0x184/0x1a8 [eaa1cb10] [c0428bd4] __read_extent_tree_block+0x1a4/0x2d0 [eaa1cb50] [c042ade4] ext4_find_extent+0x270/0x5a4 [eaa1cbb0] [c04302b8] ext4_ext_map_blocks+0x11c/0x1d8c [eaa1cdd0] [c0452f14] ext4_map_blocks+0x3f0/0x950 [eaa1ce90] [c0454890] ext4_getblk+0x2e8/0x3cc [eaa1cf30] [c0454988] ext4_bread+0x14/0x110 [eaa1cf50] [c047d538] __ext4_read_dirblock+0x4c/0x52c [eaa1cf90] [c047da8c] dx_probe+0x74/0x95c [eaa1cff0] [c0480ed0] __ext4_find_entry+0x6c0/0x9b4 [eaa1d120] [c04812d4] ext4_lookup+0x110/0x3c0 [eaa1d1d0] [c0326524] __lookup_slow+0x10c/0x25c [eaa1d240] [c032d1f8] walk_component+0x220/0x30c [eaa1d2d0] [c032d6a0] link_path_walk.part.0.constprop.0+0x3bc/0x608 usb usb6: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.18 [eaa1d380] [c032e384] path_openat+0x1b4/0x1648 usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [eaa1d490] [c03310e8] do_file_open_root+0x
Re: [FSL P50x0] Keyboard and mouse don't work anymore after the devicetree updates for 5.19
On 28 May 2022 at 10:05 am, Christian Zigotzky wrote: On 27 May 2022 at 04:23 am, Rob Herring wrote: The issue is in drivers/usb/host/fsl-mph-dr-of.c which copies the resources to a child platform device. Can you try the following change: diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c index 44a7e58a26e3..47d9b7be60da 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c @@ -80,8 +80,6 @@ static struct platform_device *fsl_usb2_device_register( const char *name, int id) { struct platform_device *pdev; - const struct resource *res = ofdev->resource; - unsigned int num = ofdev->num_resources; int retval; pdev = platform_device_alloc(name, id); @@ -106,11 +104,7 @@ static struct platform_device *fsl_usb2_device_register( if (retval) goto error; - if (num) { - retval = platform_device_add_resources(pdev, res, num); - if (retval) - goto error; - } + pdev->dev.of_node = ofdev->dev.of_node; retval = platform_device_add(pdev); if (retval) Hi Rob, Thanks a lot for your patch! :-) First attempt with the latest git kernel: patching file a/drivers/usb/host/fsl-mph-dr-of.c Hunk #1 FAILED at 80. Hunk #2 FAILED at 106. 2 out of 2 hunks FAILED -- saving rejects to file a/drivers/usb/host/fsl-mph-dr-of.c.rej I created a new patch with your modifications. (see attachment) Unfortunately I can't test it. The git kernel doesn't compile currently. powerpc-linux-gnu-ld: net/rds/tcp_stats.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/wireless/wext-spy.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/wireless/wext-priv.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/bcast.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/bearer.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/core.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/link.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/discover.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/msg.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/name_distr.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/subscr.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/name_table.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/net.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/netlink.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/netlink_compat.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/node.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/eth_media.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/topsrv.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/group.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/trace.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/udp_media.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/sysctl.o:(.bss+0x40): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/crypto.o:(.bss+0x0): multiple definition of `cacheline_aligne
Re: [FSL P50x0] Keyboard and mouse don't work anymore after the devicetree updates for 5.19
Le 28/05/2022 à 10:05, Christian Zigotzky a écrit : > On 27 May 2022 at 04:23 am, Rob Herring wrote: >> The issue is in drivers/usb/host/fsl-mph-dr-of.c which copies the >> resources to a child platform device. Can you try the following >> change: >> >> diff --git a/drivers/usb/host/fsl-mph-dr-of.c >> b/drivers/usb/host/fsl-mph-dr-of.c >> index 44a7e58a26e3..47d9b7be60da 100644 >> --- a/drivers/usb/host/fsl-mph-dr-of.c >> +++ b/drivers/usb/host/fsl-mph-dr-of.c >> @@ -80,8 +80,6 @@ static struct platform_device >> *fsl_usb2_device_register( >> const char *name, int id) >> { >> struct platform_device *pdev; >> - const struct resource *res = ofdev->resource; >> - unsigned int num = ofdev->num_resources; >> int retval; >> >> pdev = platform_device_alloc(name, id); >> @@ -106,11 +104,7 @@ static struct platform_device >> *fsl_usb2_device_register( >> if (retval) >> goto error; >> >> - if (num) { >> - retval = platform_device_add_resources(pdev, res, num); >> - if (retval) >> - goto error; >> - } >> + pdev->dev.of_node = ofdev->dev.of_node; >> >> retval = platform_device_add(pdev); >> if (retval) > Hi Rob, > > Thanks a lot for your patch! :-) > > First attempt with the latest git kernel: > > patching file a/drivers/usb/host/fsl-mph-dr-of.c > Hunk #1 FAILED at 80. > Hunk #2 FAILED at 106. > 2 out of 2 hunks FAILED -- saving rejects to file > a/drivers/usb/host/fsl-mph-dr-of.c.rej > > I created a new patch with your modifications. (see attachment) > > Unfortunately I can't test it. The git kernel doesn't compile currently. > > powerpc-linux-gnu-ld: net/rds/tcp_stats.o:(.bss+0x0): multiple > definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first > defined here ... > make: *** [Makefile:1160: vmlinux] Error 1 > > @All > Could you please check the multiple definition of `cacheline_aligned'? > Fix at https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220527112035.2842155-1-...@ellerman.id.au/ Christophe
Re: [FSL P50x0] Keyboard and mouse don't work anymore after the devicetree updates for 5.19
On 27 May 2022 at 04:23 am, Rob Herring wrote: The issue is in drivers/usb/host/fsl-mph-dr-of.c which copies the resources to a child platform device. Can you try the following change: diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c index 44a7e58a26e3..47d9b7be60da 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c @@ -80,8 +80,6 @@ static struct platform_device *fsl_usb2_device_register( const char *name, int id) { struct platform_device *pdev; - const struct resource *res = ofdev->resource; - unsigned int num = ofdev->num_resources; int retval; pdev = platform_device_alloc(name, id); @@ -106,11 +104,7 @@ static struct platform_device *fsl_usb2_device_register( if (retval) goto error; - if (num) { - retval = platform_device_add_resources(pdev, res, num); - if (retval) - goto error; - } + pdev->dev.of_node = ofdev->dev.of_node; retval = platform_device_add(pdev); if (retval) Hi Rob, Thanks a lot for your patch! :-) First attempt with the latest git kernel: patching file a/drivers/usb/host/fsl-mph-dr-of.c Hunk #1 FAILED at 80. Hunk #2 FAILED at 106. 2 out of 2 hunks FAILED -- saving rejects to file a/drivers/usb/host/fsl-mph-dr-of.c.rej I created a new patch with your modifications. (see attachment) Unfortunately I can't test it. The git kernel doesn't compile currently. powerpc-linux-gnu-ld: net/rds/tcp_stats.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/wireless/wext-spy.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/wireless/wext-priv.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/bcast.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/bearer.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/core.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/link.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/discover.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/msg.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/name_distr.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/subscr.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/name_table.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/net.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/netlink.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/netlink_compat.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/node.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/eth_media.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/topsrv.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/group.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/trace.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/udp_media.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/sysctl.o:(.bss+0x40): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gnu-ld: net/tipc/crypto.o:(.bss+0x0): multiple definition of `cacheline_aligned'; init/version.o:(.bss+0x0): first defined here powerpc-linux-gn
Re: [PATCH v4,1/5] powerpc: sysdev: fix compile error for fsl_85xx_l2ctlr
Le 15/03/2022 à 13:45, Christophe Leroy a écrit : Le 24/04/2020 à 10:58, Wang Wenhu a écrit : Include "linux/of_address.h" to fix the compile error for mpc85xx_l2ctlr_of_probe() when compiling fsl_85xx_cache_sram.c. CC arch/powerpc/sysdev/fsl_85xx_l2ctlr.o arch/powerpc/sysdev/fsl_85xx_l2ctlr.c: In function ‘mpc85xx_l2ctlr_of_probe’: arch/powerpc/sysdev/fsl_85xx_l2ctlr.c:90:11: error: implicit declaration of function ‘of_iomap’; did you mean ‘pci_iomap’? [-Werror=implicit-function-declaration] l2ctlr = of_iomap(dev->dev.of_node, 0); ^~~~ pci_iomap arch/powerpc/sysdev/fsl_85xx_l2ctlr.c:90:9: error: assignment makes pointer from integer without a cast [-Werror=int-conversion] l2ctlr = of_iomap(dev->dev.of_node, 0); ^ cc1: all warnings being treated as errors scripts/Makefile.build:267: recipe for target 'arch/powerpc/sysdev/fsl_85xx_l2ctlr.o' failed make[2]: *** [arch/powerpc/sysdev/fsl_85xx_l2ctlr.o] Error 1 Cc: Greg Kroah-Hartman Cc: Arnd Bergmann Cc: Christophe Leroy Cc: Scott Wood Cc: Michael Ellerman Cc: Randy Dunlap Cc: linuxppc-dev@lists.ozlabs.org Fixes: 6db92cc9d07d ("powerpc/85xx: add cache-sram support") Reviewed-by: Christophe Leroy Signed-off-by: Wang Wenhu Is there still an interest for this series ? I see there is even a v5 at https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=172421&state=* allthough I can't find it in my emails. If so do you plan to send any update of it at some point ? Otherwise, as CONFIG_FSL_85XX_CACHE_SRAM is not user selectable and no driver selects it, I think time has come to remove it completely. CONFIG_FSL_85XX_CACHE_SRAM has now been removed. See https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=dc21ed2aef4150fc2fcf58227a4ff24502015c03