mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
ARM and clkdev updates for 6.15-rc1
- Simplify ARM_MMU_KEEP usage - Add Rust support for ARM architecture version 7 - Align IPIs reported in /proc/interrupts - require linker to support KEEP within OVERLAY - add KEEP() for ARM vectors - add __printf() attribute for clkdev functions -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEuNNh8scc2k/wOAE+9OeQG+StrGQFAmfqn2AACgkQ9OeQG+St rGQ3RA//Vqi7xRiH6DUj7K1igG0aOeFgzGa8v1nnBfjMbij9w7hi7ufskH78bAoG e/KVK4ZafALbAsVme+mPMe8ABS0pvRiJL5A9EE3CNWF1i6a3udnEM9Mo8WmmYhux ZNaS5dKr3SP8vEZBZ5B9N4qRgJjgfkkuEoHj3TDtm1PMTGliHt6Qqe4Y/HJA0l+j Nsn946je8NAlUblPOyit4Q8n//7unbaO0bMWxFlptjBit5bWp7ttGwJpm3bHrepF qlM7pYaYFetQvmZuHS9ZYY6kuAI1XylqzdHoQxA53HfUnPCGaq0ncfqBMkTw/+ly 8K99djKSOW3wWjyPY42YMSyIN/y0EnzmTrTJjE5QEropjABFVQzLAYNOs+kqdIQM EjynSqFf2elwkt5hcjLDeZHof0n0IekPN11olAq+opP0sY4IawFgmQK8HZxkFz0d 6FA5+TB1Tl7wxjcrh0hjz9HYg4yj2pJSy4LPw+mEssTcbmFDN6vYDOeXA31yqe/n eeJ/qnbPHEgcAxEu4ZkyRjpZiHABpM4uAHsQu66OUiRVlc5dt5XhduIF8QXNZYu8 9s4NnNp5WVoqinWUz9Or/0puKlKOej48kNwyYMUcR0ZX4QxM5tqRL9Ih3N81/xgl Ia6JYWu085gm5aHThhqMR7/vD29iJW42/nTw8xYBrJWmgwaAFMk= =XL1+ -----END PGP SIGNATURE----- Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux Pull ARM and clkdev updates from Russell King: - Simplify ARM_MMU_KEEP usage - Add Rust support for ARM architecture version 7 - Align IPIs reported in /proc/interrupts - require linker to support KEEP within OVERLAY - add KEEP() for ARM vectors - add __printf() attribute for clkdev functions * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux: ARM: 9445/1: clkdev: Mark some functions with __printf() attribute ARM: 9444/1: add KEEP() keyword to ARM_VECTORS ARM: 9443/1: Require linker to support KEEP within OVERLAY for DCE ARM: 9442/1: smp: Fix IPI alignment in /proc/interrupts ARM: 9441/1: rust: Enable Rust support for ARMv7 ARM: 9439/1: arm32: simplify ARM_MMU_KEEP usage
This commit is contained in:
commit
e8b4712852
12 changed files with 62 additions and 14 deletions
|
|
@ -15,6 +15,7 @@ support corresponds to ``S`` values in the ``MAINTAINERS`` file.
|
|||
============= ================ ==============================================
|
||||
Architecture Level of support Constraints
|
||||
============= ================ ==============================================
|
||||
``arm`` Maintained ARMv7 Little Endian only.
|
||||
``arm64`` Maintained Little Endian only.
|
||||
``loongarch`` Maintained \-
|
||||
``riscv`` Maintained ``riscv64`` and LLVM/Clang only.
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ config ARM
|
|||
select HAVE_KERNEL_XZ
|
||||
select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M
|
||||
select HAVE_KRETPROBES if HAVE_KPROBES
|
||||
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if (LD_VERSION >= 23600 || LD_IS_LLD)
|
||||
select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if (LD_VERSION >= 23600 || LD_CAN_USE_KEEP_IN_OVERLAY)
|
||||
select HAVE_MOD_ARCH_SPECIFIC
|
||||
select HAVE_NMI
|
||||
select HAVE_OPTPROBES if !THUMB2_KERNEL
|
||||
|
|
@ -133,6 +133,7 @@ config ARM
|
|||
select MMU_GATHER_RCU_TABLE_FREE if SMP && ARM_LPAE
|
||||
select HAVE_REGS_AND_STACK_ACCESS_API
|
||||
select HAVE_RSEQ
|
||||
select HAVE_RUST if CPU_LITTLE_ENDIAN && CPU_32v7
|
||||
select HAVE_STACKPROTECTOR
|
||||
select HAVE_SYSCALL_TRACEPOINTS
|
||||
select HAVE_UID16
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ endif
|
|||
KBUILD_CPPFLAGS +=$(cpp-y)
|
||||
KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
|
||||
KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) -Wa,$(arch-y) $(tune-y) -include asm/unified.h -msoft-float
|
||||
KBUILD_RUSTFLAGS += --target=arm-unknown-linux-gnueabi
|
||||
|
||||
CHECKFLAGS += -D__arm__
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_MMU
|
||||
#define ARM_MMU_KEEP(x) x
|
||||
#define ARM_MMU_KEEP(x) KEEP(x)
|
||||
#define ARM_MMU_DISCARD(x)
|
||||
#else
|
||||
#define ARM_MMU_KEEP(x)
|
||||
|
|
@ -34,6 +34,12 @@
|
|||
#define NOCROSSREFS
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY
|
||||
#define OVERLAY_KEEP(x) KEEP(x)
|
||||
#else
|
||||
#define OVERLAY_KEEP(x) x
|
||||
#endif
|
||||
|
||||
/* Set start/end symbol names to the LMA for the section */
|
||||
#define ARM_LMA(sym, section) \
|
||||
sym##_start = LOADADDR(section); \
|
||||
|
|
@ -125,13 +131,13 @@
|
|||
__vectors_lma = .; \
|
||||
OVERLAY 0xffff0000 : NOCROSSREFS AT(__vectors_lma) { \
|
||||
.vectors { \
|
||||
*(.vectors) \
|
||||
OVERLAY_KEEP(*(.vectors)) \
|
||||
} \
|
||||
.vectors.bhb.loop8 { \
|
||||
*(.vectors.bhb.loop8) \
|
||||
OVERLAY_KEEP(*(.vectors.bhb.loop8)) \
|
||||
} \
|
||||
.vectors.bhb.bpiall { \
|
||||
*(.vectors.bhb.bpiall) \
|
||||
OVERLAY_KEEP(*(.vectors.bhb.bpiall)) \
|
||||
} \
|
||||
} \
|
||||
ARM_LMA(__vectors, .vectors); \
|
||||
|
|
|
|||
|
|
@ -551,7 +551,8 @@ void show_ipi_list(struct seq_file *p, int prec)
|
|||
if (!ipi_desc[i])
|
||||
continue;
|
||||
|
||||
seq_printf(p, "%*s%u: ", prec - 1, "IPI", i);
|
||||
seq_printf(p, "%*s%u:%s", prec - 1, "IPI", i,
|
||||
prec >= 4 ? " " : "");
|
||||
|
||||
for_each_online_cpu(cpu)
|
||||
seq_printf(p, "%10u ", irq_desc_kstat_cpu(ipi_desc[i], cpu));
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
|
||||
__start___ex_table = .;
|
||||
ARM_MMU_KEEP(KEEP(*(__ex_table)))
|
||||
ARM_MMU_KEEP(*(__ex_table))
|
||||
__stop___ex_table = .;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
|
||||
__start___ex_table = .;
|
||||
ARM_MMU_KEEP(KEEP(*(__ex_table)))
|
||||
ARM_MMU_KEEP(*(__ex_table))
|
||||
__stop___ex_table = .;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ struct clk_lookup_alloc {
|
|||
char con_id[MAX_CON_ID];
|
||||
};
|
||||
|
||||
static struct clk_lookup * __ref
|
||||
static __printf(3, 0) struct clk_lookup * __ref
|
||||
vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt,
|
||||
va_list ap)
|
||||
{
|
||||
|
|
@ -215,7 +215,7 @@ fail:
|
|||
return &cla->cl;
|
||||
}
|
||||
|
||||
static struct clk_lookup *
|
||||
static __printf(3, 0) struct clk_lookup *
|
||||
vclkdev_create(struct clk_hw *hw, const char *con_id, const char *dev_fmt,
|
||||
va_list ap)
|
||||
{
|
||||
|
|
@ -303,9 +303,8 @@ void clkdev_drop(struct clk_lookup *cl)
|
|||
}
|
||||
EXPORT_SYMBOL(clkdev_drop);
|
||||
|
||||
static struct clk_lookup *__clk_register_clkdev(struct clk_hw *hw,
|
||||
const char *con_id,
|
||||
const char *dev_id, ...)
|
||||
static __printf(3, 4) struct clk_lookup *
|
||||
__clk_register_clkdev(struct clk_hw *hw, const char *con_id, const char *dev_id, ...)
|
||||
{
|
||||
struct clk_lookup *cl;
|
||||
va_list ap;
|
||||
|
|
|
|||
|
|
@ -132,6 +132,11 @@ config CC_HAS_COUNTED_BY
|
|||
config CC_HAS_MULTIDIMENSIONAL_NONSTRING
|
||||
def_bool $(success,echo 'char tag[][4] __attribute__((__nonstring__)) = { };' | $(CC) $(CLANG_FLAGS) -x c - -c -o /dev/null -Werror)
|
||||
|
||||
config LD_CAN_USE_KEEP_IN_OVERLAY
|
||||
# ld.lld prior to 21.0.0 did not support KEEP within an overlay description
|
||||
# https://github.com/llvm/llvm-project/pull/130661
|
||||
def_bool LD_IS_BFD || LLD_VERSION >= 210000
|
||||
|
||||
config RUSTC_HAS_COERCE_POINTEE
|
||||
def_bool RUSTC_VERSION >= 108400
|
||||
|
||||
|
|
|
|||
|
|
@ -275,6 +275,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \
|
|||
# Derived from `scripts/Makefile.clang`.
|
||||
BINDGEN_TARGET_x86 := x86_64-linux-gnu
|
||||
BINDGEN_TARGET_arm64 := aarch64-linux-gnu
|
||||
BINDGEN_TARGET_arm := arm-linux-gnueabi
|
||||
BINDGEN_TARGET_loongarch := loongarch64-linux-gnusf
|
||||
BINDGEN_TARGET_um := $(BINDGEN_TARGET_$(SUBARCH))
|
||||
BINDGEN_TARGET := $(BINDGEN_TARGET_$(SRCARCH))
|
||||
|
|
@ -433,6 +434,13 @@ redirect-intrinsics = \
|
|||
__muloti4 __multi3 \
|
||||
__udivmodti4 __udivti3 __umodti3
|
||||
|
||||
ifdef CONFIG_ARM
|
||||
# Add eabi initrinsics for ARM 32-bit
|
||||
redirect-intrinsics += \
|
||||
__aeabi_fadd __aeabi_fmul __aeabi_fcmpeq __aeabi_fcmple __aeabi_fcmplt __aeabi_fcmpun \
|
||||
__aeabi_dadd __aeabi_dmul __aeabi_dcmple __aeabi_dcmplt __aeabi_dcmpun \
|
||||
__aeabi_uldivmod
|
||||
endif
|
||||
ifneq ($(or $(CONFIG_ARM64),$(and $(CONFIG_RISCV),$(CONFIG_64BIT))),)
|
||||
# These intrinsics are defined for ARM64 and RISCV64
|
||||
redirect-intrinsics += \
|
||||
|
|
|
|||
|
|
@ -73,5 +73,29 @@ define_panicking_intrinsics!("`u128` should not be used", {
|
|||
__umodti3,
|
||||
});
|
||||
|
||||
#[cfg(target_arch = "arm")]
|
||||
define_panicking_intrinsics!("`f32` should not be used", {
|
||||
__aeabi_fadd,
|
||||
__aeabi_fmul,
|
||||
__aeabi_fcmpeq,
|
||||
__aeabi_fcmple,
|
||||
__aeabi_fcmplt,
|
||||
__aeabi_fcmpun,
|
||||
});
|
||||
|
||||
#[cfg(target_arch = "arm")]
|
||||
define_panicking_intrinsics!("`f64` should not be used", {
|
||||
__aeabi_dadd,
|
||||
__aeabi_dmul,
|
||||
__aeabi_dcmple,
|
||||
__aeabi_dcmplt,
|
||||
__aeabi_dcmpun,
|
||||
});
|
||||
|
||||
#[cfg(target_arch = "arm")]
|
||||
define_panicking_intrinsics!("`u64` division/modulo should not be used", {
|
||||
__aeabi_uldivmod,
|
||||
});
|
||||
|
||||
// NOTE: if you are adding a new intrinsic here, you should also add it to
|
||||
// `redirect-intrinsics` in `rust/Makefile`.
|
||||
|
|
|
|||
|
|
@ -184,7 +184,9 @@ fn main() {
|
|||
let mut ts = TargetSpec::new();
|
||||
|
||||
// `llvm-target`s are taken from `scripts/Makefile.clang`.
|
||||
if cfg.has("ARM64") {
|
||||
if cfg.has("ARM") {
|
||||
panic!("arm uses the builtin rustc target");
|
||||
} else if cfg.has("ARM64") {
|
||||
panic!("arm64 uses the builtin rustc aarch64-unknown-none target");
|
||||
} else if cfg.has("RISCV") {
|
||||
if cfg.has("64BIT") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue