Skip to content

Commit c9f3343

Browse files
committed
Merge tag 'riscv-for-linus-6.11-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull more RISC-V updates from Palmer Dabbelt: - Support for NUMA (via SRAT and SLIT), console output (via SPCR), and cache info (via PPTT) on ACPI-based systems. - The trap entry/exit code no longer breaks the return address stack predictor on many systems, which results in an improvement to trap latency. - Support for HAVE_ARCH_STACKLEAK. - The sv39 linear map has been extended to support 128GiB mappings. - The frequency of the mtime CSR is now visible via hwprobe. * tag 'riscv-for-linus-6.11-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (21 commits) RISC-V: Provide the frequency of time CSR via hwprobe riscv: Extend sv39 linear mapping max size to 128G riscv: enable HAVE_ARCH_STACKLEAK riscv: signal: Remove unlikely() from WARN_ON() condition riscv: Improve exception and system call latency RISC-V: Select ACPI PPTT drivers riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT riscv: cacheinfo: remove the useless input parameter (node) of ci_leaf_init() RISC-V: ACPI: Enable SPCR table for console output on RISC-V riscv: boot: remove duplicated targets line trace: riscv: Remove deprecated kprobe on ftrace support riscv: cpufeature: Extract common elements from extension checking riscv: Introduce vendor variants of extension helpers riscv: Add vendor extensions to /proc/cpuinfo riscv: Extend cpufeature.c to detect vendor extensions RISC-V: run savedefconfig for defconfig RISC-V: hwprobe: sort EXT_KEY()s in hwprobe_isa_ext0() alphabetically ACPI: NUMA: replace pr_info with pr_debug in arch_acpi_numa_init ACPI: NUMA: change the ACPI_NUMA to a hidden option ACPI: NUMA: Add handler for SRAT RINTC affinity structure ...
2 parents c17f122 + 52420e4 commit c9f3343

File tree

43 files changed

+750
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+750
-245
lines changed

Documentation/arch/riscv/hwprobe.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,5 @@ The following keys are defined:
264264

265265
* :c:macro:`RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS`: An unsigned long which
266266
represent the highest userspace virtual address usable.
267+
268+
* :c:macro:`RISCV_HWPROBE_KEY_TIME_CSR_FREQ`: Frequency (in Hz) of `time CSR`.

Documentation/arch/riscv/vm-layout.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ RISC-V Linux Kernel SV39
4747
| Kernel-space virtual memory, shared between all processes:
4848
____________________________________________________________|___________________________________________________________
4949
| | | |
50-
ffffffc6fea00000 | -228 GB | ffffffc6feffffff | 6 MB | fixmap
51-
ffffffc6ff000000 | -228 GB | ffffffc6ffffffff | 16 MB | PCI io
52-
ffffffc700000000 | -228 GB | ffffffc7ffffffff | 4 GB | vmemmap
53-
ffffffc800000000 | -224 GB | ffffffd7ffffffff | 64 GB | vmalloc/ioremap space
54-
ffffffd800000000 | -160 GB | fffffff6ffffffff | 124 GB | direct mapping of all physical memory
50+
ffffffc4fea00000 | -236 GB | ffffffc4feffffff | 6 MB | fixmap
51+
ffffffc4ff000000 | -236 GB | ffffffc4ffffffff | 16 MB | PCI io
52+
ffffffc500000000 | -236 GB | ffffffc5ffffffff | 4 GB | vmemmap
53+
ffffffc600000000 | -232 GB | ffffffd5ffffffff | 64 GB | vmalloc/ioremap space
54+
ffffffd600000000 | -168 GB | fffffff5ffffffff | 128 GB | direct mapping of all physical memory
55+
| | | |
5556
fffffff700000000 | -36 GB | fffffffeffffffff | 32 GB | kasan
5657
__________________|____________|__________________|_________|____________________________________________________________
5758
|

arch/arm64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,6 @@ config HOTPLUG_CPU
14711471
config NUMA
14721472
bool "NUMA Memory Allocation and Scheduler Support"
14731473
select GENERIC_ARCH_NUMA
1474-
select ACPI_NUMA if ACPI
14751474
select OF_NUMA
14761475
select HAVE_SETUP_PER_CPU_AREA
14771476
select NEED_PER_CPU_EMBED_FIRST_CHUNK

arch/loongarch/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ config NR_CPUS
476476
config NUMA
477477
bool "NUMA Support"
478478
select SMP
479-
select ACPI_NUMA if ACPI
480479
help
481480
Say Y to compile the kernel with NUMA (Non-Uniform Memory Access)
482481
support. This option improves performance on systems with more

arch/riscv/Kconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ config 32BIT
1313
config RISCV
1414
def_bool y
1515
select ACPI_GENERIC_GSI if ACPI
16+
select ACPI_PPTT if ACPI
1617
select ACPI_REDUCED_HARDWARE_ONLY if ACPI
18+
select ACPI_SPCR_TABLE if ACPI
1719
select ARCH_DMA_DEFAULT_COHERENT
1820
select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
1921
select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM_VMEMMAP
@@ -123,6 +125,7 @@ config RISCV
123125
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
124126
select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
125127
select HAVE_ARCH_SECCOMP_FILTER
128+
select HAVE_ARCH_STACKLEAK
126129
select HAVE_ARCH_THREAD_STRUCT_WHITELIST
127130
select HAVE_ARCH_TRACEHOOK
128131
select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT && MMU
@@ -154,7 +157,6 @@ config RISCV
154157
select HAVE_KERNEL_UNCOMPRESSED if !XIP_KERNEL && !EFI_ZBOOT
155158
select HAVE_KERNEL_ZSTD if !XIP_KERNEL && !EFI_ZBOOT
156159
select HAVE_KPROBES if !XIP_KERNEL
157-
select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL
158160
select HAVE_KRETPROBES if !XIP_KERNEL
159161
# https://github.com/ClangBuiltLinux/linux/issues/1881
160162
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD
@@ -820,6 +822,8 @@ config RISCV_EFFICIENT_UNALIGNED_ACCESS
820822

821823
endchoice
822824

825+
source "arch/riscv/Kconfig.vendor"
826+
823827
endmenu # "Platform type"
824828

825829
menu "Kernel features"

arch/riscv/Kconfig.vendor

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
menu "Vendor extensions"
2+
3+
config RISCV_ISA_VENDOR_EXT
4+
bool
5+
6+
menu "Andes"
7+
config RISCV_ISA_VENDOR_EXT_ANDES
8+
bool "Andes vendor extension support"
9+
select RISCV_ISA_VENDOR_EXT
10+
default y
11+
help
12+
Say N here if you want to disable all Andes vendor extension
13+
support. This will cause any Andes vendor extensions that are
14+
requested by hardware probing to be ignored.
15+
16+
If you don't know what to do here, say Y.
17+
endmenu
18+
19+
endmenu

arch/riscv/boot/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ OBJCOPYFLAGS_Image :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
1818
OBJCOPYFLAGS_loader.bin :=-O binary
1919
OBJCOPYFLAGS_xipImage :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
2020

21-
targets := Image Image.* loader loader.o loader.lds loader.bin
2221
targets := Image Image.* loader loader.o loader.lds loader.bin xipImage
2322

2423
ifeq ($(CONFIG_XIP_KERNEL),y)

arch/riscv/configs/defconfig

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CONFIG_IKCONFIG=y
77
CONFIG_IKCONFIG_PROC=y
88
CONFIG_CGROUPS=y
99
CONFIG_MEMCG=y
10+
CONFIG_BLK_CGROUP=y
1011
CONFIG_CGROUP_SCHED=y
1112
CONFIG_CFS_BANDWIDTH=y
1213
CONFIG_RT_GROUP_SCHED=y
@@ -35,9 +36,6 @@ CONFIG_ARCH_THEAD=y
3536
CONFIG_ARCH_VIRT=y
3637
CONFIG_ARCH_CANAAN=y
3738
CONFIG_SMP=y
38-
CONFIG_HOTPLUG_CPU=y
39-
CONFIG_PM=y
40-
CONFIG_CPU_IDLE=y
4139
CONFIG_CPU_FREQ=y
4240
CONFIG_CPU_FREQ_STAT=y
4341
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
@@ -52,13 +50,11 @@ CONFIG_ACPI=y
5250
CONFIG_JUMP_LABEL=y
5351
CONFIG_MODULES=y
5452
CONFIG_MODULE_UNLOAD=y
55-
CONFIG_SPARSEMEM_MANUAL=y
5653
CONFIG_BLK_DEV_THROTTLING=y
54+
CONFIG_SPARSEMEM_MANUAL=y
5755
CONFIG_NET=y
5856
CONFIG_PACKET=y
59-
CONFIG_UNIX=y
6057
CONFIG_XFRM_USER=m
61-
CONFIG_INET=y
6258
CONFIG_IP_MULTICAST=y
6359
CONFIG_IP_ADVANCED_ROUTER=y
6460
CONFIG_IP_PNP=y
@@ -102,9 +98,9 @@ CONFIG_NET_SCHED=y
10298
CONFIG_NET_CLS_CGROUP=m
10399
CONFIG_NETLINK_DIAG=y
104100
CONFIG_CGROUP_NET_PRIO=y
101+
CONFIG_CAN=m
105102
CONFIG_NET_9P=y
106103
CONFIG_NET_9P_VIRTIO=y
107-
CONFIG_CAN=m
108104
CONFIG_PCI=y
109105
CONFIG_PCIEPORTBUS=y
110106
CONFIG_PCI_HOST_GENERIC=y
@@ -153,8 +149,8 @@ CONFIG_SERIAL_8250=y
153149
CONFIG_SERIAL_8250_CONSOLE=y
154150
CONFIG_SERIAL_8250_DW=y
155151
CONFIG_SERIAL_OF_PLATFORM=y
156-
CONFIG_SERIAL_SH_SCI=y
157152
CONFIG_SERIAL_EARLYCON_RISCV_SBI=y
153+
CONFIG_SERIAL_SH_SCI=y
158154
CONFIG_VIRTIO_CONSOLE=y
159155
CONFIG_HW_RANDOM=y
160156
CONFIG_HW_RANDOM_VIRTIO=y
@@ -179,7 +175,6 @@ CONFIG_DEVFREQ_THERMAL=y
179175
CONFIG_RZG2L_THERMAL=y
180176
CONFIG_WATCHDOG=y
181177
CONFIG_SUNXI_WATCHDOG=y
182-
CONFIG_RENESAS_RZG2LWDT=y
183178
CONFIG_MFD_AXP20X_I2C=y
184179
CONFIG_REGULATOR=y
185180
CONFIG_REGULATOR_FIXED_VOLTAGE=y
@@ -193,11 +188,9 @@ CONFIG_DRM_NOUVEAU=m
193188
CONFIG_DRM_SUN4I=m
194189
CONFIG_DRM_VIRTIO_GPU=m
195190
CONFIG_FB=y
196-
CONFIG_FRAMEBUFFER_CONSOLE=y
197191
CONFIG_SOUND=y
198192
CONFIG_SND=y
199193
CONFIG_SND_SOC=y
200-
CONFIG_SND_SOC_RZ=m
201194
CONFIG_SND_DESIGNWARE_I2S=m
202195
CONFIG_SND_SOC_STARFIVE=m
203196
CONFIG_SND_SOC_JH7110_PWMDAC=m
@@ -239,34 +232,31 @@ CONFIG_USB_CONFIGFS_F_FS=y
239232
CONFIG_MMC=y
240233
CONFIG_MMC_SDHCI=y
241234
CONFIG_MMC_SDHCI_PLTFM=y
242-
CONFIG_MMC_SDHCI_CADENCE=y
243235
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
236+
CONFIG_MMC_SDHCI_CADENCE=y
244237
CONFIG_MMC_SPI=y
238+
CONFIG_MMC_SDHI=y
245239
CONFIG_MMC_DW=y
246240
CONFIG_MMC_DW_STARFIVE=y
247-
CONFIG_MMC_SDHI=y
248241
CONFIG_MMC_SUNXI=y
249242
CONFIG_RTC_CLASS=y
250243
CONFIG_RTC_DRV_SUN6I=y
251244
CONFIG_DMADEVICES=y
252245
CONFIG_DMA_SUN6I=m
253246
CONFIG_DW_AXI_DMAC=y
254-
CONFIG_RZ_DMAC=y
255247
CONFIG_VIRTIO_PCI=y
256248
CONFIG_VIRTIO_BALLOON=y
257249
CONFIG_VIRTIO_INPUT=y
258250
CONFIG_VIRTIO_MMIO=y
259-
CONFIG_RENESAS_OSTM=y
260251
CONFIG_CLK_SOPHGO_CV1800=y
261252
CONFIG_SUN8I_DE2_CCU=m
253+
CONFIG_RENESAS_OSTM=y
262254
CONFIG_SUN50I_IOMMU=y
263255
CONFIG_RPMSG_CHAR=y
264256
CONFIG_RPMSG_CTRL=y
265257
CONFIG_RPMSG_VIRTIO=y
266-
CONFIG_ARCH_R9A07G043=y
258+
CONFIG_PM_DEVFREQ=y
267259
CONFIG_IIO=y
268-
CONFIG_RZG2L_ADC=m
269-
CONFIG_RESET_RZG2L_USBPHY_CTRL=y
270260
CONFIG_PHY_SUN4I_USB=m
271261
CONFIG_PHY_RCAR_GEN3_USB2=y
272262
CONFIG_PHY_STARFIVE_JH7110_DPHY_RX=m

arch/riscv/errata/andes/errata.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <asm/processor.h>
1818
#include <asm/sbi.h>
1919
#include <asm/vendorid_list.h>
20+
#include <asm/vendor_extensions.h>
2021

2122
#define ANDES_AX45MP_MARCHID 0x8000000000008a45UL
2223
#define ANDES_AX45MP_MIMPID 0x500UL
@@ -65,6 +66,8 @@ void __init_or_module andes_errata_patch_func(struct alt_entry *begin, struct al
6566
unsigned long archid, unsigned long impid,
6667
unsigned int stage)
6768
{
69+
BUILD_BUG_ON(ERRATA_ANDES_NUMBER >= RISCV_VENDOR_EXT_ALTERNATIVES_BASE);
70+
6871
if (stage == RISCV_ALTERNATIVES_BOOT)
6972
errata_probe_iocp(stage, archid, impid);
7073

arch/riscv/errata/sifive/errata.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <asm/alternative.h>
1313
#include <asm/vendorid_list.h>
1414
#include <asm/errata_list.h>
15+
#include <asm/vendor_extensions.h>
1516

1617
struct errata_info_t {
1718
char name[32];
@@ -96,6 +97,8 @@ void sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
9697
u32 cpu_apply_errata = 0;
9798
u32 tmp;
9899

100+
BUILD_BUG_ON(ERRATA_SIFIVE_NUMBER >= RISCV_VENDOR_EXT_ALTERNATIVES_BASE);
101+
99102
if (stage == RISCV_ALTERNATIVES_EARLY_BOOT)
100103
return;
101104

0 commit comments

Comments
 (0)