summaryrefslogtreecommitdiff
path: root/arch/mips
AgeCommit message (Collapse)Author
18 hoursMerge branch 'master' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git # Conflicts: # Documentation/scheduler/index.rst # arch/arm64/configs/defconfig
19 hoursMerge branch 'for-next' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git # Conflicts: # mm/internal.h
19 hoursMerge branch 'main' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
19 hoursMerge branch 'fs-next' of linux-nextMark Brown
# Conflicts: # fs/coredump.c # fs/f2fs/f2fs.h # fs/fuse/dax.c # fs/xfs/libxfs/xfs_btree.c
19 hoursMerge branch 'mips-next' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git
19 hoursMerge branch 'kbuild-for-next' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git # Conflicts: # init/Kconfig # scripts/remove-stale-files
3 daysMerge tag 'v7.3-rc6' into kbuild-for-nextNathan Chancellor
To temporarily resolve the conflict between eb13a1ff271b ("random: vDSO: avoid call to memset() when zeroing reserved parameter") and f85147b291e3 ("kbuild: move the toolchain checks into scripts/Kconfig.toolchain") for -next. Linus will handle this during the merge window, as he prefers to handle these conflicts himself. Signed-off-by: Nathan Chancellor <nathan@kernel.org>
3 dayskbuild: Mark the gzip recipes as recursiveKees Cook
Since commit 48ebe1cbbeb51 ("kbuild: compress the kernel with pigz if available"), cmd_gzip runs pigz through scripts/jobserver-exec, which takes the job slots make has free. GNU Make passes the jobserver pipe only to recipes it treats as recursive, but leaves --jobserver-auth in MAKEFLAGS for all of them. The make 4.3 in CentOS Stream 9 also hides the pipe in sub-makes (a backport of the fix for GNU Make bug 58232), so jobserver-exec cannot open it, runs pigz on one thread, and prints: WARNING: Unable to reopen jobserver read-side pipe: FileNotFoundError(2, 'No such file or directory') Mark every recipe that can run cmd_gzip as recursive with "+", as commit ecab4115c44cc ("kbuild: mark `rustc` (and others) invocations as recursive") did for rustc. Besides the $(call if_changed,gzip) rules, this covers those that choose gzip through a variable: the built-in initramfs in usr/Makefile (which rcutorture's kvm.sh builds), the EFI zboot image, and the arm, csky, and mips compressed images. As with rustc, "make -n" now runs these recipes, including those that choose through a variable when they select another compressor. Also update the gzip entry in Documentation/kbuild/makefiles.rst, as suggested in review. Tested with GNU Make 4.3 plus CentOS Stream 9's make-4.3-cloexec.patch, GCC 16.2.0, and -j64, on ARCH=x86_64, arm64, and arm defconfig, and ARCH=x86_64 defconfig with a built-in initramfs: none of them prints the warning, and pigz gets the free job slots (-p 54, 64, and 50 for the kernel image). Without this change, the x86_64 builds print it for the kernel image and for the initramfs. Reported-by: Paul E. McKenney <paulmck@kernel.org> Closes: https://lore.kernel.org/all/0ddb5e5e-f801-444c-aa98-0cfe814a3026@paulmck-laptop/ Fixes: 48ebe1cbbeb51 ("kbuild: compress the kernel with pigz if available") Assisted-by: LLM Reviewed-by: Nicolas Schier <n.schier@fritz.com> Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Signed-off-by: Kees Cook <kees@kernel.org> Tested-by: Paul E. McKenney <paulmck@kernel.org> Link: https://patch.msgid.link/20261010081914.540611-1-kees@kernel.org Signed-off-by: Nathan Chancellor <nathan@kernel.org>
5 daysmm: userland pgtable freeing is RCU-safe now, remove leftover bitsLorenzo Stoakes (ARM)
Now every architecture has been converted to support CONFIG_MMU_GATHER_RCU_TABLE_FREE, this configuration option no longer makes any sense to keep around. Therefore remove it, and remove all the dead code that existed for !CONFIG_MMU_GATHER_RCU_TABLE_FREE architectures previously. Additionally, CONFIG_MMU_GATHER_TABLE_FREE is no longer necessary, as all architectures instead use CONFIG_HAVE_ARCH_TLB_REMOVE_TABLE when a custom __tlb_remove_table() is required, so remove this too. A number of architectures only enabled CONFIG_MMU_GATHER_RCU_TABLE_FREE if CONFIG_MMU was set, however the mmu_gather logic only actually does something meaningful if CONFIG_MMU is set (mmu_gather.c is only compiled in this case, for instance). As a result, there's no need to gate any of this logic on CONFIG_MMU explicitly. CONFIG_PT_RECLAIM however does have a strict dependency on CONFIG_MMU, so make this dependency explicit. Additionally, correct comments to remove references to non-RCU page table gathering and make it clear that this is not 'semi-RCU', nor has it been since commit 1fb3d8c20bfa ("mm/mmu_gather: replace IPI with synchronize_rcu() when batch allocation fails"). With this change in place the kernel policy is now that userspace page tables are freed after an RCU grace period, and thus it is now safe to unconditionally perform page table walks under RCU, safe in the knowledge that page tables will not be freed underneath the walker. This is all that is guaranteed, however, so naturally it is still incumbent upon page table walkers to ensure that the page table entries are as expected. Link: https://lore.kernel.org/20260925-rcu-pagetable-freeing-v5-11-31e91065fea4@kernel.org Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Reviewed-by: Lance Yang <lance.yang@linux.dev> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Cc: Zi Yan <ziy@nvidia.com> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Liam R. Howlett <liam@infradead.org> Cc: Nico Pache <nico.pache@linux.dev> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: Dev Jain <dev.jain@arm.com> Cc: Barry Song <baohua@kernel.org> Cc: Usama Arif <usama.arif@linux.dev> Cc: Guo Ren <guoren@kernel.org> Cc: Brian Cain <bcain@kernel.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Simon Schuster <schuster.simon@siemens-energy.com> Cc: Jonas Bonn <jonas@southpole.se> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Cc: Stafford Horne <shorne@gmail.com> Cc: Rich Felker <dalias@libc.org> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: Paul Walmsley <pjw@kernel.org> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexandre Ghiti <alex@ghiti.fr> Cc: Russell King <linux@armlinux.org.uk> Cc: Vineet Gupta <vgupta@kernel.org> Cc: Michal Simek <monstr@monstr.eu> Cc: Chris Zankel <chris@zankel.net> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Will Deacon <will@kernel.org> Cc: Aneesh Kumar K.V <aneesh.kumar@kernel.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: David S. Miller <davem@davemloft.net> Cc: Andreas Larsson <andreas@gaisler.com> Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Matt Turner <mattst88@gmail.com> Cc: Magnus Lindholm <linmag7@gmail.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: James Bottomley <james.bottomley@hansenpartnership.com> Cc: Helge Deller <deller@gmx.de> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Christophe Leroy <chleroy@kernel.org> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Richard Weinberger <richard@nod.at> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Thomas Gleixner <tglx@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Vlastimil Babka <vbabka@kernel.org> Cc: Mike Rapoport <rppt@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Peter Xu <peterx@redhat.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Shakeel Butt <shakeel.butt@linux.dev> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Hugh Dickins <hughd@google.com> Cc: Qi Zheng <qi.zheng@linux.dev>
7 daysmm: drop pxd_ERROR()Anshuman Khandual
There are no more users left for any pxd_ERROR() either in generic MM or in the platform MM. Hence all these platform macros along with their generic fallback could be dropped across the tree. Link: https://lore.kernel.org/20260831054331.625505-9-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # m68k Acked-by: David Hildenbrand (Arm) <david@kernel.org> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Cc: Helge Deller <deller@gmx.de> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: James Bottomley <james.bottomley@HansenPartnership.com> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Rich Felker <dalias@libc.org> Cc: Samuel Holland <samuel.holland@sifive.com> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
7 daysMerge branch 'vfs-7.4.netfs' into vfs.allChristian Brauner
Signed-off-by: Christian Brauner <brauner@kernel.org>
8 daysMerge branch 'vfs-7.4.close_range' into vfs.allChristian Brauner
Signed-off-by: Christian Brauner <brauner@kernel.org>
13 daysMIPS: octeon: Add detection of UBNT Edgeroute Lite devicesThomas Bogendoerfer
The U-Boot of Ubiquiti Edgerouter Lite don't provide a DT to the kernel. Use MIPS_MACHINE mechanism to provide one. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
13 daysMIPS: octeon: Use MIPS_MACHINE for boards without provided device treeThomas Bogendoerfer
There are older Octeon boards with ld U-Boots, which don't use and pass a device tree to the kernel. Use MIPS_MACHINE mechanism to get a device tree. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
13 daysMIPS: GT64120: Remove duplicate GT_PCI1M1LD_OFS and GT_PCI1M1HD_OFSAristo Chen
The GT_PCI1M1LD_OFS and GT_PCI1M1HD_OFS register offsets are defined twice in a row with identical values. Identical macro redefinitions are valid C, so the compiler never warned about it. Drop the second copy. No functional change. Signed-off-by: Aristo Chen <aristo.chen@canonical.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
13 daysllc: move the type 2 sockets out of treeJakub Kicinski
802.2 LLC is only used in tree by protocols which need the connectionless type 1 subset: STP, which carries the bridge's BPDUs, GARP, which sends its own UI PDUs, and SNAP. The llc2 module on top of the core - the type 2 connection state machine, the type 1 SAP state machine, the station component and the PF_LLC socket family - has no in-kernel users and nobody who can test it; what we get instead is a slow trickle of drive-by fixes. There was a recent patch from Ernestas Kulik indicating potential real life use, but it was new/experimental and that person is not responding to off-list pings. Let LLC2 follow AX.25, hamradio and AppleTalk out of the Linux tree. We will maintain the code at: github.com/linux-netdev/mod-orphan for anyone interested in playing with it. PF_LLC goes in full, both the class two SOCK_STREAM and the class one SOCK_DGRAM half, and so do /proc/net/llc/ and /proc/sys/net/llc/. Note that the kernel also stops answering XID and TEST commands, addressed to a SAP or to the station - those are type 1, but they lived in the module, and they got answered whether or not any socket was open. Nothing in tree asks for them; what the core keeps is SAP registration and the UI path the in-tree users need. Retain the uAPI for now, like we did for AppleTalk. Only the socket ABI half of it is vestigial: STP, GARP, the bridge and openvswitch use the SAP numbers it defines. Cleaning up what the core no longer needs follows in the next patch. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://patch.msgid.link/20260928190800.2521749-2-kuba@kernel.org Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-09-27Merge branch 'perf/core' into perf/merge, to assist CI testingIngo Molnar
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2026-09-26mips: dts: pic32: pic32mzda: Remove unused address-cells, size-cells propertyUdaya Kiran Challa
The #address-cells and #size-cells properties are not strictly needed since the child nodes don't have reg properties Suggested-by: Rob Herring <robh@kernel.org> Signed-off-by: Udaya Kiran Challa <challauday369@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: generic: Remove undefined image 'ramdisk'Jeff Johnson
As originally reported by Guenter Roeck [1] and subsequently confirmed by me [2], a MIPS allmodconfig build can fail with: Error: configuration 'pcb110' references undefined image 'ramdisk' in property 'ramdisk' make[3]: *** [../arch/mips/boot/Makefile:173: arch/mips/boot/vmlinux.gz.itb] Error 1 make[2]: *** [../arch/mips/Makefile:403: vmlinux.gz.itb] Error 2 Or with: Error: configuration 'pcb105' references undefined image 'ramdisk' in property 'ramdisk' make[3]: *** [../arch/mips/boot/Makefile:173: arch/mips/boot/vmlinux.gz.itb] Error 1 make[2]: *** [../arch/mips/Makefile:403: vmlinux.gz.itb] Error 2 Guenter's original report made the observation that this was triggered by an operating system update since he saw the same errors appear on previously working kernels after the update. I prompted an LLM with the information available and it provided the following additional information: This is not a kernel bug — it's a mkimage behavior change in u-boot-tools. Your system recently received an upgrade from u-boot-tools 2024.01 => 2025.10 (Ubuntu 24.04 noble-security), which included two upstream commits from June 2025: - tools: mkimage: validate image references in FIT configurations (commit 7a8b25a) - tools: mkimage: propagate error codes from fit_handle_file() (commit 21705d3) These commits made mkimage strictly validate that every image name referenced in a configurations node actually exists in the images section. Previously it silently ignored undefined references, now it errors out. The offending files in the kernel are arch/mips/generic/board-jaguar2.its.S and arch/mips/generic/board-serval.its.S — their configurations reference ramdisk = "ramdisk" but no ramdisk image node is ever defined anywhere in the FIT source. This was always technically wrong; the new u-boot-tools 2025.10 just enforces it. To fix the issue, remove the stale ramdisk references from both ITS files. Assisted-by: LLM Reported-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/all/f817c158-412b-4fd1-9941-9c2ff421b91a@roeck-us.net/ # [1] Reported-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Link: https://lore.kernel.org/all/7eca1c7f-52d5-43bc-afcb-1f6ac198e391@oss.qualcomm.com/ # [2] Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: dec: Reorder header inclusions in setup.cWangYuli
Make the order alphabetic of headers included in setup.c. Signed-off-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: Reword KBUILD_SYM32 documentation for clarityMaciej W. Rozycki
It is currently hard to figure out what the inline documentation for the KBUILD_SYM32 option means as it speaks in generic build/ELF format terms which can mean just about anything, while the whole point of the option is whether kernel symbols can or cannot fit in the 32-bit value range. Adjust the description accordingly and also quote the more correct 'n' rather than 'no' setting (even though all that matters is whether it's 'y' or not). Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: Eliminate redundant KBUILD_SYM32 checkWangYuli
Given that KBUILD_SYM32=y is a prerequisite for this statement to be executed, it's logically redundant to verify KBUILD_SYM32 is y again. Signed-off-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: decstation_64_defconfig: Compile the kernel with warnings as errorsWangYuli
All compilation issues with decstation_64_defconfig have been resolved, and it is safe to enable CONFIG_WERROR now. Signed-off-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: decstation_64_defconfig: Regenerate for 7.xWangYuli
Due to long-term changes in kernel build configurations, run 'make savedefconfig' to update the build configuration dependencies. This commit does not affect the actual .config file content, in preparation for future modifications to decstation_64_defconfig. Signed-off-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: dec: Add missing <linux/interrupt.h> inclusion to reset.hWangYuli
Pull the header directly that is required for `irqreturn_t' type. Fixes: 0eb77376912e ("MIPS: DEC: Fix prototypes for halt/reset handlers") Signed-off-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: Only check -msym32 when need-compilerWangYuli
During 'make modules_install', the need-compiler variable is null, so Makefile.compiler isn't included. This results in call cc-option-yn returning nothing and consequently an error is issued: *** CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32. Stop. and the invocation terminated for configurations that set the Kconfig option named. Previously commit a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression") addressed the same issue for GCC versions now supported for Linux compilation, but caused a build error with Clang because it doesn't support '-msym32'. Then commit 18ca63a2e23c ("MIPS: Probe toolchain support of -msym32") fixed the issue with Clang, but reintroduced the 'make modules_install' error listed above. Wrap the handling of the '-msym32' option then with ifdef need-compiler, fixing said error for 'make modules_install'. For more technical details on why need-compiler is null during 'make modules_install' and why no compiler invocation is actually needed at this point, please refer to commit 4fe4a6374c4d ("MIPS: Only fiddle with CHECKFLAGS if need-compiler") and commit 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed"). NB leading 8 spaces rather than tabs required due to `make' syntax. Link: https://lore.kernel.org/all/alpine.DEB.2.21.2502120612000.65342@angie.orcam.me.uk/ Link: https://lore.kernel.org/all/alpine.DEB.2.21.2307180025120.62448@angie.orcam.me.uk/ Fixes: a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression") Reported-by: Maciej W. Rozycki <macro@orcam.me.uk> Closes: https://lore.kernel.org/all/alpine.DEB.2.21.2501030535080.49841@angie.orcam.me.uk/ Co-developed-by: Chen Linxuan <chenlinxuan@uniontech.com> Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com> Signed-off-by: WangYuli <wangyuli@uniontech.com> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Reviewed-by: Chen Linxuan <me@black-desk.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: remove unused <asm/cmp.h> headerEthan Nelson-Moore
arch/mips/include/asm/cmp.h appears never to have been used by the kernel. CMP support was removed in commit 7fb6f7b0af67 ("MIPS: Remove deprecated CONFIG_MIPS_CMP"), but it was left behind. Remove it. Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: remove unused <asm/mips-boards/sead3-addr.h> headerEthan Nelson-Moore
The last use of arch/mips/include/asm/mips-boards/sead3-addr.h was removed in commit 64601cb1343f ("leds: Remove SEAD-3 driver") but it was left behind. Remove it. Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: remove unused <asm/amon.h> headerEthan Nelson-Moore
The last use of arch/mips/include/asm/amon.h was removed in commit 7fb6f7b0af67 ("MIPS: Remove deprecated CONFIG_MIPS_CMP"), but it was left behind. Remove it. Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: Octeon: offer the RedBoot parser when it is modularOrgad Shaneh
The bootbus flash driver lists "RedBoot" among the partition parsers to try under "#ifdef CONFIG_MTD_REDBOOT_PARTS", so building that parser as a module drops it from the list and the partitions on such a chip are never found. Use IS_ENABLED(), like the USB device-tree fixups in octeon-platform.c. Untested - I have no board with RedBoot partitions; the change is by inspection, in the same family as the two above. Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: Octeon: size the swiotlb for a modular OHCI platform driverOrgad Shaneh
plat_swiotlb_setup() raises the swiotlb to 64 MB on OCTEON II with memory above 4 GB, because that OHCI can only DMA to 32 bits. The test is "#ifdef CONFIG_USB_OHCI_HCD_PLATFORM", which is false when the driver is a module - the usual way to build it - so the bump is silently skipped. What is left depends on the rest of the function: with PCI enabled the "memory past the BAR1 hole" branch happens to ask for the same 64 MB, but with CONFIG_PCI off - which is normal on these SoCs when no PCI devices are wired - swiotlbsize stays at the PAGE_SIZE it was initialised to. A full- or low-speed device on an OCTEON II board with more than 4 GB of RAM then has no bounce buffer to speak of. Use IS_ENABLED() so a modular OHCI gets the same sizing as a built-in one. Seen on a CN6635 board with 8 GB of RAM and CONFIG_USB_OHCI_HCD_PLATFORM=m. Fixes: a8667d706dfa ("MIPS: OCTEON: dma-octeon: fix OHCI USB config check") Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: mm: do not write a huge TLB entry when the probe missesOrgad Shaneh
__update_tlb() probes for the 8K pair at the address it is given and, for a huge pmd, writes the huge entry with tlbwi at the probed index or with tlbwr when the probe misses. That works only if the caller passes the faulting address, so that the probe finds the 4K entry the refill handler loaded for the faulting page and the huge entry replaces it. update_mmu_cache_pmd() is not called that way. do_set_pmd() has always passed the huge-aligned address, and since commit ebcfc63d6bca ("mm: abstract THP allocation") the anonymous THP fault path does too (map_anon_folio_pmd()). The probe then misses the stale 4K entry, which sits at the faulting page somewhere else in the 2 MB range, tlbwr adds a huge entry next to it, and the TLB holds two entries matching the faulting address. Octeon raises "Machine Check exception - caused by multiple matching entries in the TLB" on the next refill of that page; a process on a CN63XX board died this way within a second of start, on the first anonymous THP of its bss. Skip the write when the probe misses. The refill and TLBL/TLBS handlers probe the faulting address themselves and rewrite the stale entry with the huge one (they also set the software young bit), so the entry is installed on the next access at the cost of one exception. Fixes: fd062c847a8c ("MIPS: TLB support for hugetlbfs.") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: mm: align hugetlb mappings in arch_get_unmapped_area()Orgad Shaneh
Since hugetlb mappings were made to go through the architecture's arch_get_unmapped_area{,_topdown}(), every architecture that implements those has to align hugetlb files itself. The generic implementation and loongarch do it with huge_page_mask_align(); MIPS was left out. A non-MAP_FIXED mmap() of a hugetlbfs file therefore returns an address that is only SHMLBA aligned, and the kernel then installs 2 MB PMDs for a VMA that starts in the middle of a PMD. The consequences on an Octeon (CN63XX) board running a process that links libhugetlbfs with HUGETLB_ELFMAP=R and HUGETLB_MORECORE=yes, all within a minute of start: the neighbouring 4 KB page table is clobbered, the TLB ends up with overlapping entries ("Caught Machine Check exception - caused by multiple matching entries in the TLB"), process exit trips BUG_ON(start & ~huge_page_mask(h)) in __unmap_hugepage_range(), and freed pages leak into unrelated kernel structures (oopses in the irq maple tree, in pte_offset_map, ...). Do what loongarch does in commit 3109d5ff484b ("LoongArch: Set hugetlb mmap base address aligned with pmd size"): when the file is a hugetlb file, use its page mask as the search alignment instead of the cache colour mask. Fixes: 7bd3f1e1a9ae ("mm: make hugetlb mappings go through mm_get_unmapped_area_vmflags") Cc: stable@vger.kernel.org # 6.13+ Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: OCTEON: require the Core-14449 workaround only on CN63XX pass 1Orgad Shaneh
prom_free_prom_memory() probes the hint field of a compiler-emitted PREF and panics when it is not 28, which is what -Wa,-mfix-cn63xxp1 (CONFIG_CAVIUM_CN63XXP1) rewrites every prefetch in the kernel to. The test is gated on OCTEON_IS_MODEL(OCTEON_CN6XXX), so it fires on every OCTEON II part, including the pass 2 chips that do not need the workaround: Kernel panic - not syncing: OCTEON II DCache prefetch workaround not in place (cfa00004). Please build kernel with proper options (CONFIG_CAVIUM_CN63XXP1). on a CN6335-AAP pass 2.2. Core-14449 is a CN63XX pass 1.x erratum, and the vendor's own runtime check says so: it errors out only for OCTEON_CN63XX_PASS1_X without the fix, and otherwise merely warns about lost performance when fixed code runs on a part that is not a CN63XX. Narrow the check to CN63XX pass 1.x to match. The alternative - enabling CONFIG_CAVIUM_CN63XXP1 to satisfy the check - is not free: the assembler flag rewrites every prefetch in the kernel (77 of them in this build) to pref 0x1c, which is worth avoiding on an in-order core whose receive path is dominated by memcpy. uasm_i_pref() keeps its OCTEON_CN6XXX condition: it only touches the handful of runtime-generated TLB handlers, where the cost does not matter. Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: OCTEON: program L2C_CTL, not L2C_CFG, on OCTEON IIOrgad Shaneh
cvmx_helper_initialize_packet_io_global() sets the L2 arbitration modes by rewriting L2C_CFG. That register (0x1180080000000) does not exist on OCTEON II; there the L2 controller is configured through L2C_CTL (0x1180080800000), whose corresponding fields are rsp_arb_mode and xmc_arb_mode. On a CN6335 the stray write hung the board hard when this function ran - no exception, no watchdog, just a dead console. Keep the L2C_CFG write for CN3XXX/CN5XXX and program L2C_CTL on CN6XXX with the values the vendor SDK uses there (rsp_arb_mode 1, xmc_arb_mode 0), which is the same trade the existing code makes for the older parts: keep IO blocks from being starved under high L2 load. Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: OCTEON: read the L2 crippled fuses from MIO_FUS_DAT3 on OCTEON IIOrgad Shaneh
prom_init() decides whether to lock lines into the L2 by reading L2D_FUS3, a CN3XXX/CN5XXX register. On OCTEON II the fuses that cripple the L2 are MIO_FUS_DAT3[l2c_crip] - which is what cvmx_l2c_get_num_assoc() already reads for those parts - so the test looks at an address that is not a register on the chip and gets a meaningless answer: it can skip L2 locking on a healthy cache, or lock into a reduced one. Pick the register by family in a small helper. Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: OCTEON: cvmx-l2c: add the CN66XX L2 geometryOrgad Shaneh
cvmx_l2c_get_set_bits() and cvmx_l2c_get_num_assoc() know the CN63XX as the only OCTEON II part, so on a CN6635 both fell through to their "Unsupported OCTEON Model" defaults: 2048 sets, and 8 ways which the CN3XXX/CN5XXX fuse path - a read of L2D_FUS3, which is not a register on OCTEON II - then shifted down to 2. The CN66XX L2 has the CN63XX geometry, 16 ways and 1024 sets, and reports its fused-off ways in MIO_FUS_DAT3[l2c_crip] like the rest of OCTEON II, so name it in those three branches. With this the board reports assoc 16, sets 1024, and cvmx_l2c_lock_line() computes the tag alias from the right associativity. The CN68XX and CN61XX are deliberately left alone: their L2 geometry differs from the CN63XX, and the CN68XX also uses bit <2> of MIO_FUS_DAT3[l2c_crip], which the decoding here does not handle. I have no such board to test on. Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: OCTEON: cvmx-l2c: use the OCTEON II register model on all CN6XXXOrgad Shaneh
The L2 helpers pick between the OCTEON II and the CN3XXX/CN5XXX register model with OCTEON_IS_MODEL(OCTEON_CN63XX), which matches the CN63XX only. Every other OCTEON II part - CN66XX, CN68XX, CN61XX - takes the CN3XXX/CN5XXX branch and touches registers that do not exist on it: L2C_DBG, L2C_LCKBASE, L2C_LCKOFF and L2C_SPAR4 instead of the LCKL2 cache operation, the L2C_WPAR_{PPX,IOBX} way-partitioning registers and L2C_TADX_TAG. On a CN6635 board cvmx_l2c_lock_line(), called from prom_init() under CONFIG_CAVIUM_OCTEON_LOCK_L2 to lock the TLB refill and exception vectors, therefore went through L2C_DBG/L2C_LCKBASE. Whatever those writes hit inside the L2 controller left it silently dropping stores to DRAM above 512 MB: a probe that wrote 0x20400000, 0x40000000, 0x80000000 and 0xe0000000 in prom_init read its values back before the lock block and the old contents right after it, on CCA 0, 2 and 3 alike, while writes below 256 MB and every u-boot "mw" stuck. Since the cvmx bootmem free list keeps its nodes inside the free blocks themselves, the kernel's first split above 0x20000000 was lost, the walk of the free list stopped there, and the board came up with 248 MB of its 8 GB. Match the whole CN6XXX family, which is what these register accesses are keyed to. The CN63XX keeps exactly the same path. The geometry helpers in this file need the same treatment but not the same condition; they are handled in the next patch. Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh <orgads@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: fix repeated words in commentsHemanth Selam
Drop words accidentally written twice, reported by checkpatch.pl as a possible repeated word. Only touches comments, no code changes. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: fix typos in commentsHemanth Selam
Fix typos in comments, reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes. Assisted-by: Cursor:claude-opus-5 Signed-off-by: Hemanth Selam <hemanth.selam@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26MIPS: Alchemy: clock: Make sure clk_init_data is fully initializedGeert Uytterhoeven
The clk_init_data structure contains several mutually-exclusive members for different methods to specify the possible parents of a clock, prompting drivers to initialize only the members they need. However, not initializing all members may cause subtle issues, which are only exposed when CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_NONE is enabled. Make sure all members are fully initialized, to avoid such bugs, and to prevent future breakage when converting drivers to a different method for specifying the parents. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Brian Masney <bmasney@redhat.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-26bpf, mips: Add JIT support for JMP32_JAJohan Almbladh
The JMP32_JA instruction from the eBPF v4 ISA was not implemented. This caused programs using the instruction to fall back to the interpreter. Implement the JMP32_JA instruction. Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260925231932.1063678-3-johan.almbladh@anyfinetworks.com
2026-09-26bpf, mips: Add JIT support for unconditional BSWAPJohan Almbladh
The unconditional BSWAP instruction from the eBPF v4 ISA was not implemented. This caused programs using the instruction to fall back to the interpreter. Implement the unconditional BSWAP instruction. Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260925231932.1063678-2-johan.almbladh@anyfinetworks.com
2026-09-26mips: rb532: use devm_platform_ioremap_resource in gpio probeRosen Penev
Replace the platform_get_resource()/devm_ioremap_resource() pair with the devm_platform_ioremap_resource() helper and drop the now-unused struct resource pointer and NULL check. Assisted-by: opencode:deepseek-v4-flash-free Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-09-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 7.3-rc4Alexei Starovoitov
Cross-merge BPF and other fixes after downstream PR. Conflicts: kernel/bpf/helpers.c tools/testing/selftests/bpf/prog_tests/cb_refs.c tools/testing/selftests/bpf/prog_tests/verifier.c Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-09-24Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpfLinus Torvalds
Pull bpf fixes from Alexei Starovoitov: - Fix bpf_skb_change_tail() to drop the checksum offload instead of rejecting the trim of CHECKSUM_PARTIAL skbs (Daniel Borkmann) - Add KF_PERFMON kfunc flag and require CAP_PERFMON for kfuncs that read arbitrary memory and for untrusted read-only memory reads (Daniel Borkmann) - Clear scalar delta on narrowing stack spill (Daniel Borkmann) - Set up the frame pointer for the exception callback in arm64 JIT, and zero-fill other CPUs when BPF_F_CPU update creates a per-cpu hash element (Donggeun Yoo) - Various fixes (Emil Tsalapatis): - Fix bounds check underflow for skb-backed dynptrs - Fix rx_queue_mapping context access code generation in bpf_sock - Reject packet pointer arguments to subprogs that may mutate the packet - Reject ALU instructions that see arena and non-arena operands on different code paths - Fix copied_seq double-counting on sockmap self-redirect (Geliang Tang) - Fix divide-by-zero in btf_struct_walk() on a flexible array of zero-sized elements, fix out-of-bounds read of rtt_min in sock_ops (Jiayuan Chen) - Fix bpf_sock_destroy() out-of-bounds read of sk_protocol on TIME_WAIT and request socks, and sleeping under RCU when destroying a listener with pending children (Jiayuan Chen) - Fix JEQ/JNE with immediate operand in MIPS32 JIT and missing zero extension of BSWAP 16/32 in MIPS64 JIT (Johan Almbladh) - Avoid soft lockup in htab lookup[_and_delete] batch operations on large maps (Jose Fernandez) - Various fixes (Kumar Kartikeya Dwivedi): - Verify global subprogs in each sleepability context they are called from - Make post-verification instruction rewrites killable - Preserve packet pointer displacement in regsafe() - Apply CO-RE relocations before subprogram validation, restrict CO-RE poisoning to relocatable instructions, and reject truncated ldimm64 CO-RE relocations in libbpf - Assign lock identity to callback map values - Compare stack frames in regs_exact() - Bound ownership depth through local kptrs and graph roots - Fix u32 overflow in map batch operations when the map size exceeds 4GB (Masoud Aghasi) - Fix UAF in bpf memalloc due to concurrent consumption of ttrace lists in alloc_bulk() (Pu Lehui) - Allow gotox as the terminal instruction of a program or a subprogram (Siddharth Chintamaneni) - Disallow bpf_skb_pull_data() for LWT_SEG6LOCAL, skip unsettled links in link iterator, and reject dev-bound-only programs on other devices (Weiming Shi) - Reject non-negative stack offsets in stack_slot_obj_get_spi() (Xu Yunxiang) - Check params size before reading reserved fields in bpf_crypto_ctx_create() (Yuqi Xu) - Reject max_entries > INT_MAX in sock_map_alloc() (Zhao Gongyi) - Use a 32-bit compare in xsk_map_gen_lookup() (Zhiling Zou) - Use kvfree() in xdp_test_run_teardown() (Zhixing Chen) * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: (58 commits) selftests/bpf: Test per-cpu initialization of a BPF_F_CPU created element bpf: Zero-fill other CPUs when BPF_F_CPU creates a per-cpu hash element bpf: Fix BSWAP 32 and 16 on MIPS64 bpf: Fix immediate JMP JEQ/JNE on MIPS32 bpf: Reject dev-bound-only programs on other devices bpf, sockmap: Reject max_entries > INT_MAX in sock_map_alloc selftests/bpf: Test for mixed arena/nonarena code paths bpf: Prevent variable arena/non-arena register contents selftests/bpf: Test rejection of pkt args to mutating subprogs bpf: Reject pkt arguments in mutating subprogs selftests/bpf: Add selftests for rx_queue_mapping context access bpf: Fix bpf_sock context code generation selftests/bpf: Test dynptr slices past end of skb bpf: Fix bounds check for skb-backed dynptrs selftests/bpf: Reject iterator destruction through fp+0 bpf: Reject non-negative offsets in stack_slot_obj_get_spi() bpf: Check params size before reading reserved fields selftests/bpf: Check local object ownership depth bpf: Bound ownership depth through local kptrs and graph roots selftests/bpf: Cover frame changes in bounded loops ...
2026-09-24bpf: Fix BSWAP 32 and 16 on MIPS64Johan Almbladh
The 16/32-bit byteswap implementations for MIPS64r1 and earlier do not have an explicit zero extension afterwards. The input is first sign-extended to 64 bits, and the byteswap sequence can then leave the result sign-extended depending on the value of the low bits. Add the missing zero-extension. Found with test_bpf on MIPS64r1 emulated by QEMU. Fixes: fbc802de6b10 ("mips, bpf: Add new eBPF JIT for 64-bit MIPS") Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260923105158.3514342-2-johan.almbladh@anyfinetworks.com
2026-09-24bpf: Fix immediate JMP JEQ/JNE on MIPS32Johan Almbladh
An addu instruction was emitted instead of addiu, causing the immediate value 1 to be interpreted as register $at. This made the comparison result invalid when the immediate operand was negative. Note that $at is mapped to BPF_REG_AX, which is used for constant blinding. Fix the instruction to use the immediate form. Found with test_bpf on MIPS32r1 emulated by QEMU. Fixes: eb63cfcd2ee8 ("mips, bpf: Add eBPF JIT for 32-bit MIPS") Signed-off-by: Johan Almbladh <johan.almbladh@anyfinetworks.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260923105158.3514342-1-johan.almbladh@anyfinetworks.com
2026-09-23Merge branch 'perf/urgent' into perf/core, to resolve conflictIngo Molnar
Conflicts: include/linux/perf_event.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
2026-09-22bpf, mips: Add support for BPF_MOVSX in the JITsNicholas Dudar
Both MIPS JITs ignore insn->off when lowering register MOV instructions, so BPF_MOVSX is emitted as an ordinary move. Since build_insn() accepts it, affected programs are silently miscompiled instead of falling back to the interpreter. Decode the MOVSX width from insn->off in the register-move helpers. On MIPS32, propagate the sign into the high word for ALU64 while preserving the existing ALU32 zero-extension handling. Use seb/seh on MIPS32 R2-or-newer CPUs and shift pairs otherwise. On MIPS64, seb/seh require a sign-extended 32-bit source. Normalizing an arbitrary BPF register first would cost another instruction, so retain the doubleword shift pairs. Signed-off-by: Nicholas Dudar <main.kalliope@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://patch.msgid.link/20260912041220.444715-3-main.kalliope@gmail.com