forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 6
feat: add TH1520 support for 6.18 #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The th1520 support xtheadvector [1] so it can be included in the devicetree. Also include vlenb for the cpu. And set vlenb=16 [2]. This can be tested by passing the "mitigations=off" kernel parameter. Link: https://lore.kernel.org/linux-riscv/20241113-xtheadvector-v11-4-236c22791ef9@rivosinc.com/ [1] Link: https://lore.kernel.org/linux-riscv/aCO44SAoS2kIP61r@ghost/ [2] Signed-off-by: Han Gao <rabenda.cn@gmail.com> Reviewed-by: Drew Fustini <fustini@kernel.org> Link: https://lore.kernel.org/r/1ff3fb07b24fb375fcf9d3067aa50583f47c35fe.1758228055.git.rabenda.cn@gmail.com Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Existing rv64 hardware conforms to the rva20 profile. Ziccrse is an additional extension required by the rva20 profile, so th1520 has this extension. Signed-off-by: Han Gao <rabenda.cn@gmail.com> Reviewed-by: Drew Fustini <fustini@kernel.org> Link: https://lore.kernel.org/r/71ac2ff73a63bd8674c4bc91fd287390d5339609.1758228055.git.rabenda.cn@gmail.com Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
th1520 support Zfh ISA extension. It supports the same RISC-V extensions as SG2042. commit cb074be ("riscv: dts: sophgo: add zfh for sg2042") Signed-off-by: Han Gao <rabenda.cn@gmail.com> Reviewed-by: Drew Fustini <fustini@kernel.org> Link: https://lore.kernel.org/r/38abc793c2fcb9dd26c89bab10dd4450d91ced4c.1758228055.git.rabenda.cn@gmail.com Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
…s clock Add binding ID for C910 bus clock, which takes CLK_C910 as parent and is essential for C910 cluster's operation. Signed-off-by: Yao Zi <ziyao@disroot.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20251120131416.26236-2-ziyao@disroot.org Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
…lity All PLLs found on TH1520 SoC take 21250ns at maximum to lock, and their lock status is indicated by register PLL_STS (offset 0x80 inside AP clock controller). We should poll the register to ensure the PLL actually locks after enabling it. Furthermore, a 30us delay is added after enabling the PLL, after which the PLL could be considered stable as stated by vendor clock code. Fixes: 56a48c1 ("clk: thead: add support for enabling/disabling PLLs") Signed-off-by: Yao Zi <ziyao@disroot.org> Link: https://lore.kernel.org/r/20251120131416.26236-3-ziyao@disroot.org Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
This divider takes c910_clk as parent and is essential for the C910 cluster to operate, thus is marked as CLK_IS_CRITICAL. Signed-off-by: Yao Zi <ziyao@disroot.org> Link: https://lore.kernel.org/r/20251120131416.26236-4-ziyao@disroot.org Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
TH1520 ships several PLLs that could operate in either integer or fractional mode. However, the TRM only lists a few configuration whose stability is considered guaranteed. Add a table-lookup rate determination logic to support PLL rate setting, and fill up frequency-configuration tables for AP-subsystem PLLs. Signed-off-by: Yao Zi <ziyao@disroot.org> Link: https://lore.kernel.org/r/20251120131416.26236-5-ziyao@disroot.org Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
…h flags The new macro, TH_CCU_MUX_FLAGS, extends TH_CCU_MUX macro by adding two parameters to specify clock flags and multiplexer flags. Signed-off-by: Yao Zi <ziyao@disroot.org> Link: https://lore.kernel.org/r/20251120131416.26236-6-ziyao@disroot.org Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
On TH1520 SoC, c910_clk feeds the CPU cluster. It could be glitchlessly reparented to one of the two PLLs: either to cpu_pll0 indirectly through c910_i0_clk, or to cpu_pll1 directly. To achieve glitchless rate change, customized clock operations are implemented for c910_clk: on rate change, the PLL not currently in use is configured to the requested rate first, then c910_clk reparents to it. Additionally, c910_bus_clk, which in turn takes c910_clk as parent, has a frequency limit of 750MHz. A clock notifier is registered on c910_clk to adjust c910_bus_clk on c910_clk rate change. Signed-off-by: Yao Zi <ziyao@disroot.org> Link: https://lore.kernel.org/r/20251120131416.26236-7-ziyao@disroot.org Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Add operating point table for CPU cores, and wire up clocks for CPU nodes. This patch isn't intended for upstreaming but only for testing purpose, since the PMIC driver for scaling CPU voltage isn't ready yet. Only operating points whose voltage is satisified by Lichee Module 4A's PMIC default, i.e. <= 1.5GHz, are enabled. Signed-off-by: Yao Zi <ziyao@disroot.org> Link: https://lore.kernel.org/r/20251120131416.26236-8-ziyao@disroot.org Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
VeriSilicon is a Silicon IP vendor, which is the current owner of Vivante series video-related IPs and Hantro series video codec IPs. Add a vendor prefix for this company. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20251124105226.2860845-2-uwu@icenowy.me Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Verisilicon has a series of display controllers prefixed with DC and with self-identification facility like their GC series GPUs. Add a device tree binding for it. Depends on the specific DC model, it can have either one or two display outputs, and each display output could be set to DPI signal or "DP" signal (which seems to be some plain parallel bus to HDMI controllers). Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Link: https://lore.kernel.org/r/20251124105226.2860845-3-uwu@icenowy.me Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
…rollers This is a from-scratch driver targeting Verisilicon DC-series display controllers, which feature self-identification functionality like their GC-series GPUs. Only DC8200 is being supported now, and only the main framebuffer is set up (as the DRM primary plane). Support for more DC models and more features is my further targets. As the display controller is delivered to SoC vendors as a whole part, this driver does not use component framework and extra bridges inside a SoC is expected to be implemented as dedicated bridges (this driver properly supports bridge chaining). Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Link: https://lore.kernel.org/r/20251124105226.2860845-4-uwu@icenowy.me Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
…ntroller T-Head TH1520 SoC contains a Synopsys DesignWare HDMI controller paired with DesignWare HDMI PHY, with an extra clock gate for HDMI pixel clock and two reset controls. Add a device tree binding to it. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20251124105226.2860845-5-uwu@icenowy.me Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
T-Head TH1520 SoC contains a Synopsys DesignWare HDMI controller (paired with DesignWare HDMI TX PHY Gen2) that takes the "DP" output from the display controller. Add a driver for this controller utilizing the common DesignWare HDMI code in the kernel. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Link: https://lore.kernel.org/r/20251124105226.2860845-6-uwu@icenowy.me Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
T-Head TH1520 SoC contains a Verisilicon DC8200 display controller (called DPU in manual) and a Synopsys DesignWare HDMI TX controller. Add device tree nodes to them. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Link: https://lore.kernel.org/r/20251124105226.2860845-7-uwu@icenowy.me Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Lichee Pi 4A board features a HDMI Type-A connector connected to the HDMI TX controller of TH1520 SoC. Add a device tree node describing the connector, connect it to the HDMI controller, and enable everything on this display pipeline. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Link: https://lore.kernel.org/r/20251124105226.2860845-8-uwu@icenowy.me Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
… driver As I am the author of this rewritten driver, it makes sense for me to be the maintainer. Confirm this in MAINTAINERS file. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Link: https://lore.kernel.org/r/20251124105226.2860845-9-uwu@icenowy.me Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Map all mail addresses Icenowy Zheng had used to the personal mailbox prefixed "uwu". All these mailboxes, except the one of Sipeed (which was only used during a summer vacation internship), can accept mails now. Signed-off-by: Icenowy Zheng <uwu@icenowy.me> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn> Link: https://lore.kernel.org/r/20251124105226.2860845-10-uwu@icenowy.me Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
T-HEAD TH1520 platform's USB has a wrapper module around the DesignWare USB3 DRD controller. Add binding information doc for it. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Link: https://lore.kernel.org/r/20230927164222.3505-2-jszhang@kernel.org Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Adds TH1520 Glue layer to support USB controller on T-HEAD TH1520 SoC. There is a DesignWare USB3 DRD core in TH1520 SoCs, the dwc3 core is the child of this USB wrapper module device. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Link: https://lore.kernel.org/r/20230927164222.3505-3-jszhang@kernel.org [ Han Gao: fix build in 6.18 ] Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
T-HEAD SoCs such as the TH1520 contain a PWM controller used to control the LCD backlight, fan and so on. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231005130519.3864-2-jszhang@kernel.org Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
T-HEAD SoCs such as the TH1520 contain a PWM controller used to control the LCD backlight, fan and so on. Add driver for it. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Tested-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com> Link: https://lore.kernel.org/r/20231005130519.3864-3-jszhang@kernel.org [ Han Gao: fix build in 6.18 ] Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
From: revyos@e40c817 Signed-off-by: Xiangyi Zeng <xiangyi.zeng@linux.alibaba.com> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
From: revyos@01a5108 Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
From: revyos@882a91b Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> [ Han Gao: use clk pwm ] Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Signed-off-by: Jisheng Zhang <jszhang@kernel.org> [esmil: add fan pinctrl] Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
From: revyos@2bd7874 Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
From: revyos@ef4ac92 Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
From: revyos@b41720b Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
From: revyos@9f2a969 Signed-off-by: Jisheng Zhang <jszhang@kernel.org> [esmil: fix gpio references] Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> [ Han Gao: remove audio_i2c ] Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
From: revyos@fe55f7b HACK patch for compatibility with thead-u-boot and vendor opensbi Signed-off-by: Han Gao <rabenda.cn@gmail.com> [Icenowy: preserve the original compatible to allow Linux to match] Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
From: revyos@1e57185 HACK patch for compatibility with thead-u-boot and vendor opensbi Signed-off-by: Han Gao <rabenda.cn@gmail.com> [Icenowy: remove the interrupt-controller property] Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
603e3ba to
e0e2cd2
Compare
AirFortressIlikara
pushed a commit
that referenced
this pull request
Nov 26, 2025
Use BPF_TRAMP_F_INDIRECT flag to detect struct ops and emit proper prologue and epilogue for this case. With this patch, all of the struct_ops related testcases (except struct_ops_multi_pages) passed on LoongArch. The testcase struct_ops_multi_pages failed is because the actual image_pages_cnt is 40 which is bigger than MAX_TRAMP_IMAGE_PAGES. Before: $ sudo ./test_progs -t struct_ops -d struct_ops_multi_pages ... WATCHDOG: test case struct_ops_module/struct_ops_load executes for 10 seconds... After: $ sudo ./test_progs -t struct_ops -d struct_ops_multi_pages ... #15 bad_struct_ops:OK ... torvalds#399 struct_ops_autocreate:OK ... torvalds#400 struct_ops_kptr_return:OK ... torvalds#401 struct_ops_maybe_null:OK ... torvalds#402 struct_ops_module:OK ... torvalds#404 struct_ops_no_cfi:OK ... torvalds#405 struct_ops_private_stack:SKIP ... torvalds#406 struct_ops_refcounted:OK Summary: 8/25 PASSED, 3 SKIPPED, 0 FAILED Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
MingcongBai
pushed a commit
that referenced
this pull request
Nov 26, 2025
The namespaces can access the controller's admin request_queue, and stale references on the namespaces may exist after tearing down the controller. Ensure the admin request_queue is active by moving the controller's 'put' to after all controller references have been released to ensure no one is can access the request_queue. This fixes a reported use-after-free bug: BUG: KASAN: slab-use-after-free in blk_queue_enter+0x41c/0x4a0 Read of size 8 at addr ffff88c0a53819f8 by task nvme/3287 CPU: 67 UID: 0 PID: 3287 Comm: nvme Tainted: G E 6.13.2-ga1582f1a031e #15 Tainted: [E]=UNSIGNED_MODULE Hardware name: Jabil /EGS 2S MB1, BIOS 1.00 06/18/2025 Call Trace: <TASK> dump_stack_lvl+0x4f/0x60 print_report+0xc4/0x620 ? _raw_spin_lock_irqsave+0x70/0xb0 ? _raw_read_unlock_irqrestore+0x30/0x30 ? blk_queue_enter+0x41c/0x4a0 kasan_report+0xab/0xe0 ? blk_queue_enter+0x41c/0x4a0 blk_queue_enter+0x41c/0x4a0 ? __irq_work_queue_local+0x75/0x1d0 ? blk_queue_start_drain+0x70/0x70 ? irq_work_queue+0x18/0x20 ? vprintk_emit.part.0+0x1cc/0x350 ? wake_up_klogd_work_func+0x60/0x60 blk_mq_alloc_request+0x2b7/0x6b0 ? __blk_mq_alloc_requests+0x1060/0x1060 ? __switch_to+0x5b7/0x1060 nvme_submit_user_cmd+0xa9/0x330 nvme_user_cmd.isra.0+0x240/0x3f0 ? force_sigsegv+0xe0/0xe0 ? nvme_user_cmd64+0x400/0x400 ? vfs_fileattr_set+0x9b0/0x9b0 ? cgroup_update_frozen_flag+0x24/0x1c0 ? cgroup_leave_frozen+0x204/0x330 ? nvme_ioctl+0x7c/0x2c0 blkdev_ioctl+0x1a8/0x4d0 ? blkdev_common_ioctl+0x1930/0x1930 ? fdget+0x54/0x380 __x64_sys_ioctl+0x129/0x190 do_syscall_64+0x5b/0x160 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7f765f703b0b Code: ff ff ff 85 c0 79 9b 49 c7 c4 ff ff ff ff 5b 5d 4c 89 e0 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d dd 52 0f 00 f7 d8 64 89 01 48 RSP: 002b:00007ffe2cefe808 EFLAGS: 00000202 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffe2cefe860 RCX: 00007f765f703b0b RDX: 00007ffe2cefe860 RSI: 00000000c0484e41 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000 R10: 00007f765f611d50 R11: 0000000000000202 R12: 0000000000000003 R13: 00000000c0484e41 R14: 0000000000000001 R15: 00007ffe2cefea60 </TASK> Reported-by: Casey Chen <cachen@purestorage.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
|
Picked to |
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 26, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 97588d21a38c430e497c4fce8e89243c8a65a12b).
7 tasks
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 26, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 97588d21a38c430e497c4fce8e89243c8a65a12b).
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 26, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - Drop broken KVM AVEC patch and unneeded AVEC IRQ redirect patch. - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 415ba9a351fe9e2fe2f8a522331e7b997b998d2c).
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 26, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - Drop broken KVM AVEC patch and unneeded AVEC IRQ redirect patch. - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 415ba9a351fe9e2fe2f8a522331e7b997b998d2c).
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 26, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - Drop broken KVM AVEC patch and unneeded AVEC IRQ redirect patch. - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 1db9d99ccffa495041850bd1a8d8a3c2fa82a23c).
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 26, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - Drop broken KVM AVEC patch and unneeded AVEC IRQ redirect patch. - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 1db9d99ccffa495041850bd1a8d8a3c2fa82a23c).
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 26, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - Drop broken KVM AVEC patch and unneeded AVEC IRQ redirect patch. - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - (riscv64) Enable TH1520 options. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 1db9d99ccffa495041850bd1a8d8a3c2fa82a23c).
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 26, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - Drop broken KVM AVEC patch and unneeded AVEC IRQ redirect patch. - (amd64) Enable DEBUG_INFO_BTF. - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - (riscv64) Enable TH1520 options. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 1db9d99ccffa495041850bd1a8d8a3c2fa82a23c).
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 26, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - Drop broken KVM AVEC patch and unneeded AVEC IRQ redirect patch. - (amd64) Enable DEBUG_INFO_BTF. - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - (riscv64) Enable TH1520 options. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 1db9d99ccffa495041850bd1a8d8a3c2fa82a23c).
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 27, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - Drop broken KVM AVEC patch and unneeded AVEC IRQ redirect patch. - Fix stmmac-phytium again against latest STMMAC changes in net-next. - (amd64) Enable DEBUG_INFO_BTF. - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - (riscv64) Enable TH1520 options. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 1db9d99ccffa495041850bd1a8d8a3c2fa82a23c).
MingcongBai
added a commit
to AOSC-Dev/aosc-os-abbs
that referenced
this pull request
Nov 28, 2025
- Refresh YT6801 patches (suspend/resume v5, YT6801 v3). - Add patches for pre-upstream TH1520 support (AOSC-Tracking/linux#15). - Drop broken KVM AVEC patch and unneeded AVEC IRQ redirect patch. - Fix stmmac-phytium again against latest STMMAC changes in net-next. - (amd64) Enable DEBUG_INFO_BTF. - (loongarch64) Enable ZBOOT, disable broken PATA_LEGACY. - (riscv64) Enable TH1520 options. - Refresh all configurations. - Track patches at AOSC-Tracking/linux @ aosc/v6.18-rc7 (HEAD: 1db9d99ccffa495041850bd1a8d8a3c2fa82a23c).
AirFortressIlikara
pushed a commit
that referenced
this pull request
Nov 29, 2025
Use BPF_TRAMP_F_INDIRECT flag to detect struct ops and emit proper prologue and epilogue for this case. With this patch, all of the struct_ops related testcases (except struct_ops_multi_pages) passed on LoongArch. The testcase struct_ops_multi_pages failed is because the actual image_pages_cnt is 40 which is bigger than MAX_TRAMP_IMAGE_PAGES. Before: $ sudo ./test_progs -t struct_ops -d struct_ops_multi_pages ... WATCHDOG: test case struct_ops_module/struct_ops_load executes for 10 seconds... After: $ sudo ./test_progs -t struct_ops -d struct_ops_multi_pages ... #15 bad_struct_ops:OK ... torvalds#399 struct_ops_autocreate:OK ... torvalds#400 struct_ops_kptr_return:OK ... torvalds#401 struct_ops_maybe_null:OK ... torvalds#402 struct_ops_module:OK ... torvalds#404 struct_ops_no_cfi:OK ... torvalds#405 struct_ops_private_stack:SKIP ... torvalds#406 struct_ops_refcounted:OK Summary: 8/25 PASSED, 3 SKIPPED, 0 FAILED Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
AirFortressIlikara
pushed a commit
that referenced
this pull request
Nov 29, 2025
Use BPF_TRAMP_F_INDIRECT flag to detect struct ops and emit proper prologue and epilogue for this case. With this patch, all of the struct_ops related testcases (except struct_ops_multi_pages) passed on LoongArch. The testcase struct_ops_multi_pages failed is because the actual image_pages_cnt is 40 which is bigger than MAX_TRAMP_IMAGE_PAGES. Before: $ sudo ./test_progs -t struct_ops -d struct_ops_multi_pages ... WATCHDOG: test case struct_ops_module/struct_ops_load executes for 10 seconds... After: $ sudo ./test_progs -t struct_ops -d struct_ops_multi_pages ... #15 bad_struct_ops:OK ... torvalds#399 struct_ops_autocreate:OK ... torvalds#400 struct_ops_kptr_return:OK ... torvalds#401 struct_ops_maybe_null:OK ... torvalds#402 struct_ops_module:OK ... torvalds#404 struct_ops_no_cfi:OK ... torvalds#405 struct_ops_private_stack:SKIP ... torvalds#406 struct_ops_refcounted:OK Summary: 8/25 PASSED, 3 SKIPPED, 0 FAILED Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
AirFortressIlikara
pushed a commit
that referenced
this pull request
Nov 30, 2025
[ Upstream commit 48918ca ] The test starts a workload and then opens events. If the events fail to open, for example because of perf_event_paranoid, the gopipe of the workload is leaked and the file descriptor leak check fails when the test exits. To avoid this cancel the workload when opening the events fails. Before: ``` $ perf test -vv 7 7: PERF_RECORD_* events & perf_sample fields: --- start --- test child forked, pid 1189568 Using CPUID GenuineIntel-6-B7-1 ------------------------------------------------------------ perf_event_attr: type 0 (PERF_TYPE_HARDWARE) config 0xa00000000 (cpu_atom/PERF_COUNT_HW_CPU_CYCLES/) disabled 1 ------------------------------------------------------------ sys_perf_event_open: pid 0 cpu -1 group_fd -1 flags 0x8 sys_perf_event_open failed, error -13 ------------------------------------------------------------ perf_event_attr: type 0 (PERF_TYPE_HARDWARE) config 0xa00000000 (cpu_atom/PERF_COUNT_HW_CPU_CYCLES/) disabled 1 exclude_kernel 1 ------------------------------------------------------------ sys_perf_event_open: pid 0 cpu -1 group_fd -1 flags 0x8 = 3 ------------------------------------------------------------ perf_event_attr: type 0 (PERF_TYPE_HARDWARE) config 0x400000000 (cpu_core/PERF_COUNT_HW_CPU_CYCLES/) disabled 1 ------------------------------------------------------------ sys_perf_event_open: pid 0 cpu -1 group_fd -1 flags 0x8 sys_perf_event_open failed, error -13 ------------------------------------------------------------ perf_event_attr: type 0 (PERF_TYPE_HARDWARE) config 0x400000000 (cpu_core/PERF_COUNT_HW_CPU_CYCLES/) disabled 1 exclude_kernel 1 ------------------------------------------------------------ sys_perf_event_open: pid 0 cpu -1 group_fd -1 flags 0x8 = 3 Attempt to add: software/cpu-clock/ ..after resolving event: software/config=0/ cpu-clock -> software/cpu-clock/ ------------------------------------------------------------ perf_event_attr: type 1 (PERF_TYPE_SOFTWARE) size 136 config 0x9 (PERF_COUNT_SW_DUMMY) sample_type IP|TID|TIME|CPU read_format ID|LOST disabled 1 inherit 1 mmap 1 comm 1 enable_on_exec 1 task 1 sample_id_all 1 mmap2 1 comm_exec 1 ksymbol 1 bpf_event 1 { wakeup_events, wakeup_watermark } 1 ------------------------------------------------------------ sys_perf_event_open: pid 1189569 cpu 0 group_fd -1 flags 0x8 sys_perf_event_open failed, error -13 perf_evlist__open: Permission denied ---- end(-2) ---- Leak of file descriptor 6 that opened: 'pipe:[14200347]' ---- unexpected signal (6) ---- iFailed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon Failed to read build ID for //anon #0 0x565358f6666e in child_test_sig_handler builtin-test.c:311 #1 0x7f29ce849df0 in __restore_rt libc_sigaction.c:0 #2 0x7f29ce89e95c in __pthread_kill_implementation pthread_kill.c:44 #3 0x7f29ce849cc2 in raise raise.c:27 #4 0x7f29ce8324ac in abort abort.c:81 #5 0x565358f662d4 in check_leaks builtin-test.c:226 #6 0x565358f6682e in run_test_child builtin-test.c:344 #7 0x565358ef7121 in start_command run-command.c:128 #8 0x565358f67273 in start_test builtin-test.c:545 #9 0x565358f6771d in __cmd_test builtin-test.c:647 #10 0x565358f682bd in cmd_test builtin-test.c:849 #11 0x565358ee5ded in run_builtin perf.c:349 #12 0x565358ee6085 in handle_internal_command perf.c:401 #13 0x565358ee61de in run_argv perf.c:448 #14 0x565358ee6527 in main perf.c:555 #15 0x7f29ce833ca8 in __libc_start_call_main libc_start_call_main.h:74 #16 0x7f29ce833d65 in __libc_start_main@@GLIBC_2.34 libc-start.c:128 torvalds#17 0x565358e391c1 in _start perf[851c1] 7: PERF_RECORD_* events & perf_sample fields : FAILED! ``` After: ``` $ perf test 7 7: PERF_RECORD_* events & perf_sample fields : Skip (permissions) ``` Fixes: 16d00fe ("perf tests: Move test__PERF_RECORD into separate object") Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.ibm.com> Cc: Chun-Tse Shao <ctshao@google.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
AirFortressIlikara
pushed a commit
that referenced
this pull request
Nov 30, 2025
commit 1d3ad18 upstream. syzbot reported a BUG_ON in ext4_es_cache_extent() when opening a verity file on a corrupted ext4 filesystem mounted without a journal. The issue is that the filesystem has an inode with both the INLINE_DATA and EXTENTS flags set: EXT4-fs error (device loop0): ext4_cache_extents:545: inode #15: comm syz.0.17: corrupted extent tree: lblk 0 < prev 66 Investigation revealed that the inode has both flags set: DEBUG: inode 15 - flag=1, i_inline_off=164, has_inline=1, extents_flag=1 This is an invalid combination since an inode should have either: - INLINE_DATA: data stored directly in the inode - EXTENTS: data stored in extent-mapped blocks Having both flags causes ext4_has_inline_data() to return true, skipping extent tree validation in __ext4_iget(). The unvalidated out-of-order extents then trigger a BUG_ON in ext4_es_cache_extent() due to integer underflow when calculating hole sizes. Fix this by detecting this invalid flag combination early in ext4_iget() and rejecting the corrupted inode. Cc: stable@kernel.org Reported-and-tested-by: syzbot+038b7bf43423e132b308@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=038b7bf43423e132b308 Suggested-by: Zhang Yi <yi.zhang@huawei.com> Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Message-ID: <20250930112810.315095-1-kartikey406@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
AirFortressIlikara
pushed a commit
that referenced
this pull request
Nov 30, 2025
Use BPF_TRAMP_F_INDIRECT flag to detect struct ops and emit proper prologue and epilogue for this case. With this patch, all of the struct_ops related testcases (except struct_ops_multi_pages) passed on LoongArch. The testcase struct_ops_multi_pages failed is because the actual image_pages_cnt is 40 which is bigger than MAX_TRAMP_IMAGE_PAGES. Before: $ sudo ./test_progs -t struct_ops -d struct_ops_multi_pages ... WATCHDOG: test case struct_ops_module/struct_ops_load executes for 10 seconds... After: $ sudo ./test_progs -t struct_ops -d struct_ops_multi_pages ... #15 bad_struct_ops:OK ... torvalds#399 struct_ops_autocreate:OK ... torvalds#400 struct_ops_kptr_return:OK ... torvalds#401 struct_ops_maybe_null:OK ... torvalds#402 struct_ops_module:OK ... torvalds#404 struct_ops_no_cfi:OK ... torvalds#405 struct_ops_private_stack:SKIP ... torvalds#406 struct_ops_refcounted:OK Summary: 8/25 PASSED, 3 SKIPPED, 0 FAILED Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.