mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'riscv-for-linus-5.17-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V updates from Palmer Dabbelt: - Support for the DA9063 as used on the HiFive Unmatched. - Support for relative extables, which puts us in line with other architectures and save some space in vmlinux. - A handful of kexec fixes/improvements, including the ability to run crash kernels from PCI-addressable memory on the HiFive Unmatched. - Support for the SBI SRST extension, which allows systems that do not have an explicit driver in Linux to reboot. - A handful of fixes and cleanups, including to the defconfigs and device trees. * tag 'riscv-for-linus-5.17-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (52 commits) RISC-V: Use SBI SRST extension when available riscv: mm: fix wrong phys_ram_base value for RV64 RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n riscv: head: remove useless __PAGE_ALIGNED_BSS and .balign riscv: errata: alternative: mark vendor_patch_func __initdata riscv: head: make secondary_start_common() static riscv: remove cpu_stop() riscv: try to allocate crashkern region from 32bit addressible memory riscv: use hart id instead of cpu id on machine_kexec riscv: Don't use va_pa_offset on kdump riscv: dts: sifive: fu540-c000: Fix PLIC node riscv: dts: sifive: fu540-c000: Drop bogus soc node compatible values riscv: dts: sifive: Group tuples in register properties riscv: dts: sifive: Group tuples in interrupt properties riscv: dts: microchip: mpfs: Group tuples in interrupt properties riscv: dts: microchip: mpfs: Fix clock controller node riscv: dts: microchip: mpfs: Fix reference clock node riscv: dts: microchip: mpfs: Fix PLIC node riscv: dts: microchip: mpfs: Drop empty chosen node riscv: dts: canaan: Group tuples in interrupt properties ...
This commit is contained in:
+3
-1
@@ -14,6 +14,7 @@ config RISCV
|
||||
def_bool y
|
||||
select ARCH_CLOCKSOURCE_INIT
|
||||
select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
|
||||
select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
|
||||
select ARCH_HAS_BINFMT_FLAT
|
||||
select ARCH_HAS_DEBUG_VM_PGTABLE
|
||||
select ARCH_HAS_DEBUG_VIRTUAL if MMU
|
||||
@@ -75,6 +76,7 @@ config RISCV
|
||||
select HAVE_ARCH_SECCOMP_FILTER
|
||||
select HAVE_ARCH_TRACEHOOK
|
||||
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT && MMU
|
||||
select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
|
||||
select HAVE_ARCH_THREAD_STRUCT_WHITELIST
|
||||
select HAVE_ARCH_VMAP_STACK if MMU && 64BIT
|
||||
select HAVE_ASM_MODVERSIONS
|
||||
@@ -279,7 +281,7 @@ choice
|
||||
depends on 32BIT
|
||||
bool "1GiB"
|
||||
config MAXPHYSMEM_2GB
|
||||
depends on 64BIT && CMODEL_MEDLOW
|
||||
depends on 64BIT
|
||||
bool "2GiB"
|
||||
config MAXPHYSMEM_128GB
|
||||
depends on 64BIT && CMODEL_MEDANY
|
||||
|
||||
@@ -103,8 +103,8 @@
|
||||
clint0: timer@2000000 {
|
||||
compatible = "canaan,k210-clint", "sifive,clint0";
|
||||
reg = <0x2000000 0xC000>;
|
||||
interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
|
||||
&cpu1_intc 3 &cpu1_intc 7>;
|
||||
interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>,
|
||||
<&cpu1_intc 3>, <&cpu1_intc 7>;
|
||||
};
|
||||
|
||||
plic0: interrupt-controller@c000000 {
|
||||
@@ -113,7 +113,7 @@
|
||||
compatible = "canaan,k210-plic", "sifive,plic-1.0.0";
|
||||
reg = <0xC000000 0x4000000>;
|
||||
interrupt-controller;
|
||||
interrupts-extended = <&cpu0_intc 11 &cpu1_intc 11>;
|
||||
interrupts-extended = <&cpu0_intc 11>, <&cpu1_intc 11>;
|
||||
riscv,ndev = <65>;
|
||||
};
|
||||
|
||||
@@ -130,10 +130,11 @@
|
||||
compatible = "canaan,k210-gpiohs", "sifive,gpio0";
|
||||
reg = <0x38001000 0x1000>;
|
||||
interrupt-controller;
|
||||
interrupts = <34 35 36 37 38 39 40 41
|
||||
42 43 44 45 46 47 48 49
|
||||
50 51 52 53 54 55 56 57
|
||||
58 59 60 61 62 63 64 65>;
|
||||
interrupts = <34>, <35>, <36>, <37>, <38>, <39>, <40>,
|
||||
<41>, <42>, <43>, <44>, <45>, <46>, <47>,
|
||||
<48>, <49>, <50>, <51>, <52>, <53>, <54>,
|
||||
<55>, <56>, <57>, <58>, <59>, <60>, <61>,
|
||||
<62>, <63>, <64>, <65>;
|
||||
gpio-controller;
|
||||
ngpios = <32>;
|
||||
};
|
||||
@@ -141,7 +142,7 @@
|
||||
dmac0: dma-controller@50000000 {
|
||||
compatible = "snps,axi-dma-1.01a";
|
||||
reg = <0x50000000 0x1000>;
|
||||
interrupts = <27 28 29 30 31 32>;
|
||||
interrupts = <27>, <28>, <29>, <30>, <31>, <32>;
|
||||
#dma-cells = <1>;
|
||||
clocks = <&sysclk K210_CLK_DMA>, <&sysclk K210_CLK_DMA>;
|
||||
clock-names = "core-clk", "cfgr-clk";
|
||||
@@ -316,7 +317,7 @@
|
||||
timer0: timer@502d0000 {
|
||||
compatible = "snps,dw-apb-timer";
|
||||
reg = <0x502D0000 0x100>;
|
||||
interrupts = <14 15>;
|
||||
interrupts = <14>, <15>;
|
||||
clocks = <&sysclk K210_CLK_TIMER0>,
|
||||
<&sysclk K210_CLK_APB0>;
|
||||
clock-names = "timer", "pclk";
|
||||
@@ -326,7 +327,7 @@
|
||||
timer1: timer@502e0000 {
|
||||
compatible = "snps,dw-apb-timer";
|
||||
reg = <0x502E0000 0x100>;
|
||||
interrupts = <16 17>;
|
||||
interrupts = <16>, <17>;
|
||||
clocks = <&sysclk K210_CLK_TIMER1>,
|
||||
<&sysclk K210_CLK_APB0>;
|
||||
clock-names = "timer", "pclk";
|
||||
@@ -336,7 +337,7 @@
|
||||
timer2: timer@502f0000 {
|
||||
compatible = "snps,dw-apb-timer";
|
||||
reg = <0x502F0000 0x100>;
|
||||
interrupts = <18 19>;
|
||||
interrupts = <18>, <19>;
|
||||
clocks = <&sysclk K210_CLK_TIMER2>,
|
||||
<&sysclk K210_CLK_APB0>;
|
||||
clock-names = "timer", "pclk";
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
spi-flash@0 {
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
spi-flash@0 {
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
spi-flash@0 {
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
spi-flash@0 {
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
&refclk {
|
||||
clock-frequency = <600000000>;
|
||||
};
|
||||
|
||||
&serial0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
model = "Microchip PolarFire SoC";
|
||||
compatible = "microchip,mpfs";
|
||||
|
||||
chosen {
|
||||
};
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
@@ -142,6 +139,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
refclk: msspllclk {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
};
|
||||
|
||||
soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
@@ -156,62 +158,48 @@
|
||||
cache-size = <2097152>;
|
||||
cache-unified;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <1 2 3>;
|
||||
interrupts = <1>, <2>, <3>;
|
||||
reg = <0x0 0x2010000 0x0 0x1000>;
|
||||
};
|
||||
|
||||
clint@2000000 {
|
||||
compatible = "sifive,fu540-c000-clint", "sifive,clint0";
|
||||
reg = <0x0 0x2000000 0x0 0xC000>;
|
||||
interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7
|
||||
&cpu1_intc 3 &cpu1_intc 7
|
||||
&cpu2_intc 3 &cpu2_intc 7
|
||||
&cpu3_intc 3 &cpu3_intc 7
|
||||
&cpu4_intc 3 &cpu4_intc 7>;
|
||||
interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>,
|
||||
<&cpu1_intc 3>, <&cpu1_intc 7>,
|
||||
<&cpu2_intc 3>, <&cpu2_intc 7>,
|
||||
<&cpu3_intc 3>, <&cpu3_intc 7>,
|
||||
<&cpu4_intc 3>, <&cpu4_intc 7>;
|
||||
};
|
||||
|
||||
plic: interrupt-controller@c000000 {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0";
|
||||
reg = <0x0 0xc000000 0x0 0x4000000>;
|
||||
riscv,ndev = <186>;
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
interrupts-extended = <&cpu0_intc 11
|
||||
&cpu1_intc 11 &cpu1_intc 9
|
||||
&cpu2_intc 11 &cpu2_intc 9
|
||||
&cpu3_intc 11 &cpu3_intc 9
|
||||
&cpu4_intc 11 &cpu4_intc 9>;
|
||||
interrupts-extended = <&cpu0_intc 11>,
|
||||
<&cpu1_intc 11>, <&cpu1_intc 9>,
|
||||
<&cpu2_intc 11>, <&cpu2_intc 9>,
|
||||
<&cpu3_intc 11>, <&cpu3_intc 9>,
|
||||
<&cpu4_intc 11>, <&cpu4_intc 9>;
|
||||
riscv,ndev = <186>;
|
||||
};
|
||||
|
||||
dma@3000000 {
|
||||
compatible = "sifive,fu540-c000-pdma";
|
||||
reg = <0x0 0x3000000 0x0 0x8000>;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <23 24 25 26 27 28 29 30>;
|
||||
interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>,
|
||||
<30>;
|
||||
#dma-cells = <1>;
|
||||
};
|
||||
|
||||
refclk: refclk {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <600000000>;
|
||||
clock-output-names = "msspllclk";
|
||||
};
|
||||
|
||||
clkcfg: clkcfg@20002000 {
|
||||
compatible = "microchip,mpfs-clkcfg";
|
||||
reg = <0x0 0x20002000 0x0 0x1000>;
|
||||
reg-names = "mss_sysreg";
|
||||
clocks = <&refclk>;
|
||||
#clock-cells = <1>;
|
||||
clock-output-names = "cpu", "axi", "ahb", "envm", /* 0-3 */
|
||||
"mac0", "mac1", "mmc", "timer", /* 4-7 */
|
||||
"mmuart0", "mmuart1", "mmuart2", "mmuart3", /* 8-11 */
|
||||
"mmuart4", "spi0", "spi1", "i2c0", /* 12-15 */
|
||||
"i2c1", "can0", "can1", "usb", /* 16-19 */
|
||||
"rsvd", "rtc", "qspi", "gpio0", /* 20-23 */
|
||||
"gpio1", "gpio2", "ddrc", "fic0", /* 24-27 */
|
||||
"fic1", "fic2", "fic3", "athena", "cfm"; /* 28-32 */
|
||||
};
|
||||
|
||||
serial0: serial@20000000 {
|
||||
@@ -267,7 +255,7 @@
|
||||
compatible = "microchip,mpfs-sd4hc", "cdns,sd4hc";
|
||||
reg = <0x0 0x20008000 0x0 0x1000>;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <88 89>;
|
||||
interrupts = <88>, <89>;
|
||||
clocks = <&clkcfg 6>;
|
||||
max-frequency = <200000000>;
|
||||
status = "disabled";
|
||||
@@ -277,7 +265,7 @@
|
||||
compatible = "cdns,macb";
|
||||
reg = <0x0 0x20110000 0x0 0x2000>;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <64 65 66 67>;
|
||||
interrupts = <64>, <65>, <66>, <67>;
|
||||
local-mac-address = [00 00 00 00 00 00];
|
||||
clocks = <&clkcfg 4>, <&clkcfg 2>;
|
||||
clock-names = "pclk", "hclk";
|
||||
@@ -290,7 +278,7 @@
|
||||
compatible = "cdns,macb";
|
||||
reg = <0x0 0x20112000 0x0 0x2000>;
|
||||
interrupt-parent = <&plic>;
|
||||
interrupts = <70 71 72 73>;
|
||||
interrupts = <70>, <71>, <72>, <73>;
|
||||
local-mac-address = [00 00 00 00 00 00];
|
||||
clocks = <&clkcfg 5>, <&clkcfg 2>;
|
||||
status = "disabled";
|
||||
|
||||
@@ -137,20 +137,21 @@
|
||||
soc {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <2>;
|
||||
compatible = "sifive,fu540-c000", "sifive,fu540", "simple-bus";
|
||||
compatible = "simple-bus";
|
||||
ranges;
|
||||
plic0: interrupt-controller@c000000 {
|
||||
#interrupt-cells = <1>;
|
||||
compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0";
|
||||
reg = <0x0 0xc000000 0x0 0x4000000>;
|
||||
riscv,ndev = <53>;
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-controller;
|
||||
interrupts-extended = <
|
||||
&cpu0_intc 0xffffffff
|
||||
&cpu1_intc 0xffffffff &cpu1_intc 9
|
||||
&cpu2_intc 0xffffffff &cpu2_intc 9
|
||||
&cpu3_intc 0xffffffff &cpu3_intc 9
|
||||
&cpu4_intc 0xffffffff &cpu4_intc 9>;
|
||||
interrupts-extended =
|
||||
<&cpu0_intc 0xffffffff>,
|
||||
<&cpu1_intc 0xffffffff>, <&cpu1_intc 9>,
|
||||
<&cpu2_intc 0xffffffff>, <&cpu2_intc 9>,
|
||||
<&cpu3_intc 0xffffffff>, <&cpu3_intc 9>,
|
||||
<&cpu4_intc 0xffffffff>, <&cpu4_intc 9>;
|
||||
riscv,ndev = <53>;
|
||||
};
|
||||
prci: clock-controller@10000000 {
|
||||
compatible = "sifive,fu540-c000-prci";
|
||||
@@ -170,7 +171,8 @@
|
||||
compatible = "sifive,fu540-c000-pdma";
|
||||
reg = <0x0 0x3000000 0x0 0x8000>;
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <23 24 25 26 27 28 29 30>;
|
||||
interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>,
|
||||
<30>;
|
||||
#dma-cells = <1>;
|
||||
};
|
||||
uart1: serial@10011000 {
|
||||
@@ -195,8 +197,8 @@
|
||||
};
|
||||
qspi0: spi@10040000 {
|
||||
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
|
||||
reg = <0x0 0x10040000 0x0 0x1000
|
||||
0x0 0x20000000 0x0 0x10000000>;
|
||||
reg = <0x0 0x10040000 0x0 0x1000>,
|
||||
<0x0 0x20000000 0x0 0x10000000>;
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <51>;
|
||||
clocks = <&prci PRCI_CLK_TLCLK>;
|
||||
@@ -206,8 +208,8 @@
|
||||
};
|
||||
qspi1: spi@10041000 {
|
||||
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
|
||||
reg = <0x0 0x10041000 0x0 0x1000
|
||||
0x0 0x30000000 0x0 0x10000000>;
|
||||
reg = <0x0 0x10041000 0x0 0x1000>,
|
||||
<0x0 0x30000000 0x0 0x10000000>;
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <52>;
|
||||
clocks = <&prci PRCI_CLK_TLCLK>;
|
||||
@@ -229,8 +231,8 @@
|
||||
compatible = "sifive,fu540-c000-gem";
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <53>;
|
||||
reg = <0x0 0x10090000 0x0 0x2000
|
||||
0x0 0x100a0000 0x0 0x1000>;
|
||||
reg = <0x0 0x10090000 0x0 0x2000>,
|
||||
<0x0 0x100a0000 0x0 0x1000>;
|
||||
local-mac-address = [00 00 00 00 00 00];
|
||||
clock-names = "pclk", "hclk";
|
||||
clocks = <&prci PRCI_CLK_GEMGXLPLL>,
|
||||
@@ -243,7 +245,7 @@
|
||||
compatible = "sifive,fu540-c000-pwm", "sifive,pwm0";
|
||||
reg = <0x0 0x10020000 0x0 0x1000>;
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <42 43 44 45>;
|
||||
interrupts = <42>, <43>, <44>, <45>;
|
||||
clocks = <&prci PRCI_CLK_TLCLK>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
@@ -252,7 +254,7 @@
|
||||
compatible = "sifive,fu540-c000-pwm", "sifive,pwm0";
|
||||
reg = <0x0 0x10021000 0x0 0x1000>;
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <46 47 48 49>;
|
||||
interrupts = <46>, <47>, <48>, <49>;
|
||||
clocks = <&prci PRCI_CLK_TLCLK>;
|
||||
#pwm-cells = <3>;
|
||||
status = "disabled";
|
||||
@@ -265,7 +267,7 @@
|
||||
cache-size = <2097152>;
|
||||
cache-unified;
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <1 2 3>;
|
||||
interrupts = <1>, <2>, <3>;
|
||||
reg = <0x0 0x2010000 0x0 0x1000>;
|
||||
};
|
||||
gpio: gpio@10060000 {
|
||||
|
||||
@@ -147,12 +147,12 @@
|
||||
reg = <0x0 0xc000000 0x0 0x4000000>;
|
||||
riscv,ndev = <69>;
|
||||
interrupt-controller;
|
||||
interrupts-extended = <
|
||||
&cpu0_intc 0xffffffff
|
||||
&cpu1_intc 0xffffffff &cpu1_intc 9
|
||||
&cpu2_intc 0xffffffff &cpu2_intc 9
|
||||
&cpu3_intc 0xffffffff &cpu3_intc 9
|
||||
&cpu4_intc 0xffffffff &cpu4_intc 9>;
|
||||
interrupts-extended =
|
||||
<&cpu0_intc 0xffffffff>,
|
||||
<&cpu1_intc 0xffffffff>, <&cpu1_intc 9>,
|
||||
<&cpu2_intc 0xffffffff>, <&cpu2_intc 9>,
|
||||
<&cpu3_intc 0xffffffff>, <&cpu3_intc 9>,
|
||||
<&cpu4_intc 0xffffffff>, <&cpu4_intc 9>;
|
||||
};
|
||||
prci: clock-controller@10000000 {
|
||||
compatible = "sifive,fu740-c000-prci";
|
||||
@@ -273,7 +273,7 @@
|
||||
cache-size = <2097152>;
|
||||
cache-unified;
|
||||
interrupt-parent = <&plic0>;
|
||||
interrupts = <19 21 22 20>;
|
||||
interrupts = <19>, <21>, <22>, <20>;
|
||||
reg = <0x0 0x2010000 0x0 0x1000>;
|
||||
};
|
||||
gpio: gpio@10060000 {
|
||||
|
||||
@@ -2,6 +2,7 @@ CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_CGROUPS=y
|
||||
@@ -13,10 +14,10 @@ CONFIG_USER_NS=y
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EXPERT=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
CONFIG_SOC_MICROCHIP_POLARFIRE=y
|
||||
CONFIG_SOC_SIFIVE=y
|
||||
CONFIG_SOC_VIRT=y
|
||||
CONFIG_SOC_MICROCHIP_POLARFIRE=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_VIRTUALIZATION=y
|
||||
@@ -70,14 +71,14 @@ CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_SIFIVE=y
|
||||
# CONFIG_PTP_1588_CLOCK is not set
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_SIFIVE=y
|
||||
# CONFIG_PTP_1588_CLOCK is not set
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_DRM=m
|
||||
CONFIG_DRM_RADEON=m
|
||||
CONFIG_DRM_NOUVEAU=m
|
||||
CONFIG_DRM_VIRTIO_GPU=m
|
||||
CONFIG_FB=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
@@ -88,10 +89,10 @@ CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_UAS=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_CADENCE=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SPI=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
@@ -142,5 +143,3 @@ CONFIG_RCU_EQS_DEBUG=y
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
CONFIG_MEMTEST=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
CONFIG_EFI=y
|
||||
|
||||
@@ -29,7 +29,6 @@ CONFIG_EMBEDDED=y
|
||||
CONFIG_SLOB=y
|
||||
# CONFIG_MMU is not set
|
||||
CONFIG_SOC_CANAAN=y
|
||||
CONFIG_SOC_CANAAN_K210_DTB_SOURCE="k210_generic"
|
||||
CONFIG_MAXPHYSMEM_2GB=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
@@ -75,7 +74,6 @@ CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_USER=y
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
# CONFIG_VHOST_MENU is not set
|
||||
# CONFIG_SURFACE_PLATFORMS is not set
|
||||
# CONFIG_FILE_LOCKING is not set
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_INOTIFY_USER is not set
|
||||
|
||||
@@ -21,7 +21,6 @@ CONFIG_EMBEDDED=y
|
||||
CONFIG_SLOB=y
|
||||
# CONFIG_MMU is not set
|
||||
CONFIG_SOC_CANAAN=y
|
||||
CONFIG_SOC_CANAAN_K210_DTB_SOURCE="k210_generic"
|
||||
CONFIG_MAXPHYSMEM_2GB=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
@@ -30,7 +29,6 @@ CONFIG_CMDLINE_FORCE=y
|
||||
# CONFIG_SECCOMP is not set
|
||||
# CONFIG_STACKPROTECTOR is not set
|
||||
# CONFIG_GCC_PLUGINS is not set
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
# CONFIG_MQ_IOSCHED_DEADLINE is not set
|
||||
# CONFIG_MQ_IOSCHED_KYBER is not set
|
||||
CONFIG_BINFMT_FLAT=y
|
||||
@@ -72,7 +70,6 @@ CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_USER=y
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
# CONFIG_VHOST_MENU is not set
|
||||
# CONFIG_SURFACE_PLATFORMS is not set
|
||||
CONFIG_EXT2_FS=y
|
||||
# CONFIG_FILE_LOCKING is not set
|
||||
# CONFIG_DNOTIFY is not set
|
||||
|
||||
@@ -32,7 +32,6 @@ CONFIG_SMP=y
|
||||
CONFIG_CMDLINE="root=/dev/vda rw earlycon=uart8250,mmio,0x10000000,115200n8 console=ttyS0"
|
||||
CONFIG_CMDLINE_FORCE=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_PARTITION_ADVANCED=y
|
||||
# CONFIG_MSDOS_PARTITION is not set
|
||||
# CONFIG_EFI_PARTITION is not set
|
||||
|
||||
@@ -2,6 +2,7 @@ CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_CGROUPS=y
|
||||
@@ -13,7 +14,7 @@ CONFIG_USER_NS=y
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_EXPERT=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
CONFIG_SOC_SIFIVE=y
|
||||
CONFIG_SOC_VIRT=y
|
||||
CONFIG_ARCH_RV32I=y
|
||||
@@ -69,10 +70,10 @@ CONFIG_HW_RANDOM_VIRTIO=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_SIFIVE=y
|
||||
# CONFIG_PTP_1588_CLOCK is not set
|
||||
CONFIG_POWER_RESET=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_RADEON=y
|
||||
CONFIG_DRM_VIRTIO_GPU=y
|
||||
CONFIG_FB=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
@@ -132,4 +133,3 @@ CONFIG_RCU_EQS_DEBUG=y
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_RUNTIME_TESTING_MENU is not set
|
||||
CONFIG_MEMTEST=y
|
||||
# CONFIG_SYSFS_SYSCALL is not set
|
||||
|
||||
@@ -22,7 +22,8 @@ static struct cpu_manufacturer_info_t {
|
||||
} cpu_mfr_info;
|
||||
|
||||
static void (*vendor_patch_func)(struct alt_entry *begin, struct alt_entry *end,
|
||||
unsigned long archid, unsigned long impid);
|
||||
unsigned long archid,
|
||||
unsigned long impid) __initdata;
|
||||
|
||||
static inline void __init riscv_fill_cpu_mfr_info(void)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
generic-y += early_ioremap.h
|
||||
generic-y += extable.h
|
||||
generic-y += flat.h
|
||||
generic-y += kvm_para.h
|
||||
generic-y += user.h
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __ASM_ASM_EXTABLE_H
|
||||
#define __ASM_ASM_EXTABLE_H
|
||||
|
||||
#define EX_TYPE_NONE 0
|
||||
#define EX_TYPE_FIXUP 1
|
||||
#define EX_TYPE_BPF 2
|
||||
#define EX_TYPE_UACCESS_ERR_ZERO 3
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
#define __ASM_EXTABLE_RAW(insn, fixup, type, data) \
|
||||
.pushsection __ex_table, "a"; \
|
||||
.balign 4; \
|
||||
.long ((insn) - .); \
|
||||
.long ((fixup) - .); \
|
||||
.short (type); \
|
||||
.short (data); \
|
||||
.popsection;
|
||||
|
||||
.macro _asm_extable, insn, fixup
|
||||
__ASM_EXTABLE_RAW(\insn, \fixup, EX_TYPE_FIXUP, 0)
|
||||
.endm
|
||||
|
||||
#else /* __ASSEMBLY__ */
|
||||
|
||||
#include <linux/bits.h>
|
||||
#include <linux/stringify.h>
|
||||
#include <asm/gpr-num.h>
|
||||
|
||||
#define __ASM_EXTABLE_RAW(insn, fixup, type, data) \
|
||||
".pushsection __ex_table, \"a\"\n" \
|
||||
".balign 4\n" \
|
||||
".long ((" insn ") - .)\n" \
|
||||
".long ((" fixup ") - .)\n" \
|
||||
".short (" type ")\n" \
|
||||
".short (" data ")\n" \
|
||||
".popsection\n"
|
||||
|
||||
#define _ASM_EXTABLE(insn, fixup) \
|
||||
__ASM_EXTABLE_RAW(#insn, #fixup, __stringify(EX_TYPE_FIXUP), "0")
|
||||
|
||||
#define EX_DATA_REG_ERR_SHIFT 0
|
||||
#define EX_DATA_REG_ERR GENMASK(4, 0)
|
||||
#define EX_DATA_REG_ZERO_SHIFT 5
|
||||
#define EX_DATA_REG_ZERO GENMASK(9, 5)
|
||||
|
||||
#define EX_DATA_REG(reg, gpr) \
|
||||
"((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
|
||||
|
||||
#define _ASM_EXTABLE_UACCESS_ERR_ZERO(insn, fixup, err, zero) \
|
||||
__DEFINE_ASM_GPR_NUMS \
|
||||
__ASM_EXTABLE_RAW(#insn, #fixup, \
|
||||
__stringify(EX_TYPE_UACCESS_ERR_ZERO), \
|
||||
"(" \
|
||||
EX_DATA_REG(ERR, err) " | " \
|
||||
EX_DATA_REG(ZERO, zero) \
|
||||
")")
|
||||
|
||||
#define _ASM_EXTABLE_UACCESS_ERR(insn, fixup, err) \
|
||||
_ASM_EXTABLE_UACCESS_ERR_ZERO(insn, fixup, err, zero)
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_ASM_EXTABLE_H */
|
||||
@@ -0,0 +1,48 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef _ASM_RISCV_EXTABLE_H
|
||||
#define _ASM_RISCV_EXTABLE_H
|
||||
|
||||
/*
|
||||
* The exception table consists of pairs of relative offsets: the first
|
||||
* is the relative offset to an instruction that is allowed to fault,
|
||||
* and the second is the relative offset at which the program should
|
||||
* continue. No registers are modified, so it is entirely up to the
|
||||
* continuation code to figure out what to do.
|
||||
*
|
||||
* All the routines below use bits of fixup code that are out of line
|
||||
* with the main instruction path. This means when everything is well,
|
||||
* we don't even have to jump over them. Further, they do not intrude
|
||||
* on our cache or tlb entries.
|
||||
*/
|
||||
|
||||
struct exception_table_entry {
|
||||
int insn, fixup;
|
||||
short type, data;
|
||||
};
|
||||
|
||||
#define ARCH_HAS_RELATIVE_EXTABLE
|
||||
|
||||
#define swap_ex_entry_fixup(a, b, tmp, delta) \
|
||||
do { \
|
||||
(a)->fixup = (b)->fixup + (delta); \
|
||||
(b)->fixup = (tmp).fixup - (delta); \
|
||||
(a)->type = (b)->type; \
|
||||
(b)->type = (tmp).type; \
|
||||
(a)->data = (b)->data; \
|
||||
(b)->data = (tmp).data; \
|
||||
} while (0)
|
||||
|
||||
bool fixup_exception(struct pt_regs *regs);
|
||||
|
||||
#if defined(CONFIG_BPF_JIT) && defined(CONFIG_ARCH_RV64I)
|
||||
bool ex_handler_bpf(const struct exception_table_entry *ex, struct pt_regs *regs);
|
||||
#else
|
||||
static inline bool
|
||||
ex_handler_bpf(const struct exception_table_entry *ex,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/errno.h>
|
||||
#include <asm/asm.h>
|
||||
#include <asm/asm-extable.h>
|
||||
|
||||
/* We don't even really need the extable code, but for now keep it simple */
|
||||
#ifndef CONFIG_MMU
|
||||
@@ -20,23 +21,14 @@
|
||||
|
||||
#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
|
||||
{ \
|
||||
uintptr_t tmp; \
|
||||
__enable_user_access(); \
|
||||
__asm__ __volatile__ ( \
|
||||
"1: " insn " \n" \
|
||||
"2: \n" \
|
||||
" .section .fixup,\"ax\" \n" \
|
||||
" .balign 4 \n" \
|
||||
"3: li %[r],%[e] \n" \
|
||||
" jump 2b,%[t] \n" \
|
||||
" .previous \n" \
|
||||
" .section __ex_table,\"a\" \n" \
|
||||
" .balign " RISCV_SZPTR " \n" \
|
||||
" " RISCV_PTR " 1b, 3b \n" \
|
||||
" .previous \n" \
|
||||
_ASM_EXTABLE_UACCESS_ERR(1b, 2b, %[r]) \
|
||||
: [r] "+r" (ret), [ov] "=&r" (oldval), \
|
||||
[u] "+m" (*uaddr), [t] "=&r" (tmp) \
|
||||
: [op] "Jr" (oparg), [e] "i" (-EFAULT) \
|
||||
[u] "+m" (*uaddr) \
|
||||
: [op] "Jr" (oparg) \
|
||||
: "memory"); \
|
||||
__disable_user_access(); \
|
||||
}
|
||||
@@ -98,18 +90,10 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
|
||||
"2: sc.w.aqrl %[t],%z[nv],%[u] \n"
|
||||
" bnez %[t],1b \n"
|
||||
"3: \n"
|
||||
" .section .fixup,\"ax\" \n"
|
||||
" .balign 4 \n"
|
||||
"4: li %[r],%[e] \n"
|
||||
" jump 3b,%[t] \n"
|
||||
" .previous \n"
|
||||
" .section __ex_table,\"a\" \n"
|
||||
" .balign " RISCV_SZPTR " \n"
|
||||
" " RISCV_PTR " 1b, 4b \n"
|
||||
" " RISCV_PTR " 2b, 4b \n"
|
||||
" .previous \n"
|
||||
_ASM_EXTABLE_UACCESS_ERR(1b, 3b, %[r]) \
|
||||
_ASM_EXTABLE_UACCESS_ERR(2b, 3b, %[r]) \
|
||||
: [r] "+r" (ret), [v] "=&r" (val), [u] "+m" (*uaddr), [t] "=&r" (tmp)
|
||||
: [ov] "Jr" (oldval), [nv] "Jr" (newval), [e] "i" (-EFAULT)
|
||||
: [ov] "Jr" (oldval), [nv] "Jr" (newval)
|
||||
: "memory");
|
||||
__disable_user_access();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user