riscv: Add riscv-kernel patch

riscv-kernel[1] is to add support for multiple RISC-V SoCs on the basis of
OLK-6.6 and enrich the openEuler riscv ecosystem.

Currently, riscv-kernel has added support for sg2042[2] and th1520.
After applying this patch, we can build the same kernel to start openEuler
on qemu, sg2042, and th1520 platforms.

Build and boot testing passed on qemu, Milk-V Pioneer[3] and Lpi4a[4].

Link: https://gitee.com/openeuler/riscv-kernel/tree/OLK-6.6 [1]
Link: https://www.sophgo.com/product/introduce/sg2042.html [2]
Link: https://milkv.io/zh/pioneer [3]
Link: https://sipeed.com/licheepi4a [4]
Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
This commit is contained in:
Mingzheng Xing 2024-03-21 16:54:39 +08:00
parent f1ba01bb04
commit b04eeb3465
2 changed files with 30573 additions and 1 deletions

30446
0001-riscv-kernel.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -42,7 +42,7 @@ rm -f test_openEuler_sign.ko test_openEuler_sign.ko.sig
%global upstream_sublevel 0
%global devel_release 25
%global maintenance_release .0.0
%global pkg_release .28
%global pkg_release .29
%define with_debuginfo 1
# Do not recompute the build-id of vmlinux in find-debuginfo.sh
@ -105,6 +105,7 @@ Source9002: series.conf
Source9998: patches.tar.bz2
%endif
Patch0001: 0001-riscv-kernel.patch
Patch0002: 0002-cpupower-clang-compile-support.patch
Patch0003: 0003-x86_energy_perf_policy-clang-compile-support.patch
Patch0004: 0004-turbostat-clang-compile-support.patch
@ -338,6 +339,11 @@ Applypatches()
Applypatches series.conf %{_builddir}/kernel-%{version}/linux-%{KernelVer}
%endif
# riscv-kernel patch
%ifarch riscv64
%patch0001 -p1
%endif
%if "%toolchain" == "clang"
%patch0002 -p1
%patch0003 -p1
@ -1053,6 +1059,126 @@ fi
%endif
%changelog
* Sat May 11 2024 Mingzheng Xing <xingmingzheng@iscas.ac.cn> - 6.6.0-25.0.0.29
- Add riscv-kernel patch, which adds support for sg2042 and th1520 RISC-V SoCs.
- This patch only applies to the RISC-V architecture, the related commit list:
-
- th1520: riscv: config: Enable th1520 support
- riscv: thead: Use the wback_inv instead of wback_only
- riscv: errata: thead: use pa based instructions for CMO
- riscv: errata: thead: use riscv_nonstd_cache_ops for CMO
- Revert "riscv: errata: thead: use riscv_nonstd_cache_ops for CMO"
- Revert "riscv: errata: thead: use pa based instructions for CMO"
- riscv: mm: fix NOCACHE_THEAD does not set bit[61] correctly
- riscv: mm: update T-Head memory type definitions
- Revert "sg2042: riscv: changing T-Head PBMT attributes"
- riscv: remove compression for riscv Image
- th1520: cpufreq: correct typo in config name
- th1520: riscv: dts: thead: Add Milk-V Meles board
- th1520: cpufreq: light-mpw-cpufreq: fix -Wunused-variable in panic_cpufreq_notifier_call
- th1520: cpufreq: light-mpw-cpufreq: fix cpu_pll1 already disabled warning
- riscv: Add th1520-lichee-cluster-4a dts support (8G/16G)
- riscv: dts: th1520-beaglev-ahead: add alias for emmc & sd
- riscv: dts: th1520-lichee-pi-4a: add alias for emmc & sd
- riscv: dts: lpi4a 16g support
- th1520: perf vendor events riscv: add T-HEAD C9xx JSON file
- th1520: riscv: dts: thead: Add PMU event node
- riscv: pinctrl: th1520: fix build
- riscv: dts: th1520: lpi4a: add rpmsg node
- riscv: dts: th1520: add mbox client node
- riscv: rpmsg: mailbox-client: sync thead sdk 1.4.2
- riscv: panic: add thead sdk quirks
- riscv: dts: add watchdog node
- th1520: riscv: dts: Add th1520 reset device tree
- th1520: reset: Add th1520 reset driver support
- th1520: dt-bindings: reset: Document th1520 reset control
- riscv: light_wdt: update sdk 1.4.2
- th1520_light_event: update sdk 1.4.2
- th1520_aon: update sdk 1.4.2
- th1520: fix compile th1520-beaglev-ahead error
- th1520: add TH1520 cpu frequency driver
- th1520: riscv: errata: thead: use pa based instructions for CMO
- th1520: riscv: errata: thead: use riscv_nonstd_cache_ops for CMO
- riscv: dts: thead: Add TH1520 CPU reset node
- th1520: riscv: dts: thead: Enable Lichee Pi 4A USB
- th1520: riscv: dts: thead: Add Lichee Pi 4A IO expansions
- th1520: riscv: dts: thead: Add TH1520 USB nodes
- th1520: riscv: dts: thead: Add TH1520 I2C nodes
- th1520: usb: dwc3: add T-HEAD TH1520 usb driver
- th1520: dt-bindings: usb: Add T-HEAD TH1520 USB controller
- th1520: riscv: dts: thead: Add BeagleV Ahead SDIO0 pins
- th1520: riscv: dts: thead: Add Lichee Pi 4A SDIO0 pins
- th1520: riscv: dts: thead: Add TH1520 ethernet nodes
- th1520: net: stmmac: add glue layer for T-HEAD TH1520 SoC
- th1520: dt-bindings: net: add T-HEAD dwmac support
- th1520: dt-bindings: net: snps,dwmac: allow dwmac-3.70a to set pbl properties
- th1520: riscv: dts: thead: Enable Lichee Pi 4A PWM fan
- th1520: riscv: dts: thead: Add TH1520 PVT node
- th1520: riscv: dts: thead: Add TH1520 PWM node
- th1520: pwm: add T-HEAD PWM driver
- th1520: dt-bindings: pwm: Add T-HEAD PWM controller
- th1520: gpio: dwapb: Use generic request, free and set_config
- riscv: dts: thead: Enable LicheePi 4A eMMC and microSD
- riscv: dts: thead: Enable BeagleV Ahead eMMC and microSD
- riscv: dts: thead: Add TH1520 mmc controllers and sdhci clock
- riscv: defconfig: Enable mmc and dma drivers for T-Head TH1520
- mmc: sdhci-of-dwcmshc: Add support for T-Head TH1520
- mmc: sdhci: add __sdhci_execute_tuning() to header
- dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support
- th1520: riscv: dtb: thead: Add BeagleV Ahead LEDs
- th1520: riscv: dts: thead: Add TH1520 pinctrl settings for UART0
- th1520: riscv: dts: thead: Adjust TH1520 GPIO labels
- th1520: riscv: dts: thead: Add TH1520 GPIO ranges
- th1520: riscv: dts: thead: Add TH1520 pin control nodes
- th1520: pinctrl: Add driver for the T-Head TH1520 SoC
- th1520: dt-bindings: pinctrl: Add thead,th1520-pinctrl bindings
- th1520: dt-bindings: gpio: dwapb: allow gpio-ranges
- sg2042: riscv: config: Enable sg2042 support
- sg2042: riscv: changing T-Head PBMT attributes
- sg2042: kconfig: Enable DW_APB_TIMER_OF in ARCH_SOPHGO
- sg2042: pcie contronller msi-x whitelist add device_id
- sg2042: nvidia hda: force msi
- sg2042: radeon hack: force 64-bit msi to fit top intc
- sg2042: amdgpu: disable rebar
- sg2042: ttm: disallow cached mapping
- sg2042: mango pci hack: broadcast when no MSI source known
- sg2042: riscv: dts: separate sg2042 mtime and mtimecmp to fit aclint format
- sg2042: dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp regs
- sg2042: riscv: dts: modify the PCIe range
- sg2042: drivers: clk: turn off non-essential clocks by default
- sg2042: drivers: clk: Avoid the problem of serial port garbled characters
- sg2042: mm: Modify __find_max_addr for memory hole
- sg2042: riscv: dts: Add timer apb clock
- sg2042: riscv: dts: Remove cma node
- sg2042: riscv: dts: Add uart apb clock and remove sysdma clock
- sg2042: riscv: dts: Move memory node from dts to zsbl
- sg2042: riscv: dts: Reduce bootargs
- sg2042: riscv: dts: Configure external interrupt in m mode
- sg2042: rebase: v6.6-rc1: Fix some compile warnings
- sg2042: riscv: dts: Remove nvme paremeter in bootargs
- sg2042: riscv: dtsi: confirm correspondence between PMU events and IDs
- sg2042: driver: pcie: support msix for top intr
- sg2042: driver: mmc: add config for MMC_SDHCI_SOPHGO
- sg2042: riscv: Kconfig: Set vector as default no
- sg2042: driver: soc: Add sophgo sg2042 soc support
- sg2042: driver: net: Add sophgo sg2042 soc support
- sg2042: driver: mmc: Add sophgo sg2042 soc support
- sg2042: driver: pcie: Add sophgo sg2042 soc support
- sg2042: driver: reset: Add sophgo sg2042 soc support
- sg2042: driver: pinctrl: Add sophgo sg2042 soc support
- sg2042: driver: clk: Add sophgo sg2042 soc support
- sg2042: riscv: dts: Add sophgo sg2042 soc support
- sg2042: riscv: defconfig: enable SOPHGO SoC
- sg2042: riscv: dts: sophgo: add Milk-V Pioneer board device tree
- sg2042: riscv: dts: add initial Sophgo SG2042 SoC device tree
- sg2042: dt-bindings: interrupt-controller: Add Sophgo sg2042 CLINT mswi
- sg2042: dt-bindings: timer: Add Sophgo sg2042 CLINT timer
- sg2042: dt-bindings: interrupt-controller: Add Sophgo SG2042 PLIC
- sg2042: dt-bindings: riscv: Add T-HEAD C920 compatibles
- sg2042: dt-bindings: riscv: add sophgo sg2042 bindings
- sg2042: dt-bindings: vendor-prefixes: add milkv/sophgo
- sg2042: riscv: Add SOPHGO SOC family Kconfig support
* Thu May 09 2024 ZhangPeng <zhangpeng362@huawei.com> - 6.6.0-25.0.0.28
- !6930 fix general protection fault in update_cpumask
- cgroup/cpuset: fix general protection fault in update_cpumask