forked from Minki/linux
RISC-V Fixes for 6.1-rc5
* A fix to add the missing PWM LEDs into the SiFive HiFive Unleashed device tree. * A fix to fully clear a task's registers on creation, as they end up in userspace and thus leak kernel memory. * A pair of VDSO-related build fixes that manifest on recent LLVM-based toolchains. * A fix to our early init to ensure the DT is adequately processed before reserved memory nodes are processed. -----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEEKzw3R0RoQ7JKlDp6LhMZ81+7GIkFAmNuex4THHBhbG1lckBk YWJiZWx0LmNvbQAKCRAuExnzX7sYiUm5D/94ElBfEEH1Si2qwzfk5Vwxap0Jsjwj BA7GHito1P22P4yHlvXnMyPvjnl3f0/Cc7Q6O5+J8HvnR9FWeu97s84oBJU/Thkt D9pd68nknY/HPZ1P5eb4gzBUwo2D6WWn4ISk2uoa8XAJ9EKfhylnYbn32rzyRerj p8HFT1lP71mryLCr0FsxEOdqtBl7+41/Htd/jxEA+lwJtHJ3F3Yk+TnaeCzebGjT kg5vwTzNwgkl7o4rlLsBv3d/Oz8kvLZh7V9qsZ9Ta//ZNpCGw0PMOwzxCKSYS6C0 ZK342BRThsqxAjc2y1QtKOzFBPzEECzbgSSixFiEVXY4qpDY4ZlojXEOxRLevMjl KpLJL4e3wXpfyknZXLeIPIh0tFzHnuWrgliBVwa5CO4hYXhxWRY+qzh6LTqypx/W ewvuQ1auxmFFB6U6RHEXWuUv5mtzymXVT8lcHltpGcpGvxcbvnSw9SYtXTM6Sz5d DzEtEpgCZTx9MEp981FJ+uMYs4mGtURRDqqKZzeLOiBmXe8r7wfqnTIyosW1/f8V aXYJB90yMX5QvVJPKJHocphaKbNl75ywF8z0JSdnilO8CKJMJ6elJ9KleiJGJGFc zFWyFVPt18Eg+w+r4vMGmH2tz+hlaaZ+sOOGFExeM7KRU18WhP4MMVLgJiaLtoul UUX63X1wx7S2JA== =EHH7 -----END PGP SIGNATURE----- Merge tag 'riscv-for-linus-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix to add the missing PWM LEDs into the SiFive HiFive Unleashed device tree. - A fix to fully clear a task's registers on creation, as they end up in userspace and thus leak kernel memory. - A pair of VDSO-related build fixes that manifest on recent LLVM-based toolchains. - A fix to our early init to ensure the DT is adequately processed before reserved memory nodes are processed. * tag 'riscv-for-linus-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: vdso: Do not add missing symbols to version section in linker script riscv: fix reserved memory setup riscv: vdso: fix build with llvm riscv: process: fix kernel info leakage riscv: dts: sifive unleashed: Add PWM controlled LEDs
This commit is contained in:
commit
991f173cd2
@ -3,6 +3,8 @@
|
||||
|
||||
#include "fu540-c000.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
|
||||
/* Clock frequency (in Hz) of the PCB crystal for rtcclk */
|
||||
#define RTCCLK_FREQ 1000000
|
||||
@ -42,6 +44,42 @@
|
||||
compatible = "gpio-restart";
|
||||
gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led-controller {
|
||||
compatible = "pwm-leds";
|
||||
|
||||
led-d1 {
|
||||
pwms = <&pwm0 0 7812500 PWM_POLARITY_INVERTED>;
|
||||
active-low;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
max-brightness = <255>;
|
||||
label = "d1";
|
||||
};
|
||||
|
||||
led-d2 {
|
||||
pwms = <&pwm0 1 7812500 PWM_POLARITY_INVERTED>;
|
||||
active-low;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
max-brightness = <255>;
|
||||
label = "d2";
|
||||
};
|
||||
|
||||
led-d3 {
|
||||
pwms = <&pwm0 2 7812500 PWM_POLARITY_INVERTED>;
|
||||
active-low;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
max-brightness = <255>;
|
||||
label = "d3";
|
||||
};
|
||||
|
||||
led-d4 {
|
||||
pwms = <&pwm0 3 7812500 PWM_POLARITY_INVERTED>;
|
||||
active-low;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
max-brightness = <255>;
|
||||
label = "d4";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
|
@ -164,6 +164,8 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
|
||||
unsigned long tls = args->tls;
|
||||
struct pt_regs *childregs = task_pt_regs(p);
|
||||
|
||||
memset(&p->thread.s, 0, sizeof(p->thread.s));
|
||||
|
||||
/* p->thread holds context to be restored by __switch_to() */
|
||||
if (unlikely(args->fn)) {
|
||||
/* Kernel thread */
|
||||
|
@ -283,6 +283,7 @@ void __init setup_arch(char **cmdline_p)
|
||||
else
|
||||
pr_err("No DTB found in kernel mappings\n");
|
||||
#endif
|
||||
early_init_fdt_scan_reserved_mem();
|
||||
misc_mem_init();
|
||||
|
||||
init_resources();
|
||||
|
@ -28,9 +28,12 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
|
||||
|
||||
obj-y += vdso.o
|
||||
CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
|
||||
ifneq ($(filter vgettimeofday, $(vdso-syms)),)
|
||||
CPPFLAGS_vdso.lds += -DHAS_VGETTIMEOFDAY
|
||||
endif
|
||||
|
||||
# Disable -pg to prevent insert call site
|
||||
CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os
|
||||
CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE)
|
||||
|
||||
# Disable profiling and instrumentation for VDSO code
|
||||
GCOV_PROFILE := n
|
||||
|
@ -68,9 +68,11 @@ VERSION
|
||||
LINUX_4.15 {
|
||||
global:
|
||||
__vdso_rt_sigreturn;
|
||||
#ifdef HAS_VGETTIMEOFDAY
|
||||
__vdso_gettimeofday;
|
||||
__vdso_clock_gettime;
|
||||
__vdso_clock_getres;
|
||||
#endif
|
||||
__vdso_getcpu;
|
||||
__vdso_flush_icache;
|
||||
local: *;
|
||||
|
@ -262,7 +262,6 @@ static void __init setup_bootmem(void)
|
||||
memblock_reserve(dtb_early_pa, fdt_totalsize(dtb_early_va));
|
||||
}
|
||||
|
||||
early_init_fdt_scan_reserved_mem();
|
||||
dma_contiguous_reserve(dma32_phys_limit);
|
||||
if (IS_ENABLED(CONFIG_64BIT))
|
||||
hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT);
|
||||
|
Loading…
Reference in New Issue
Block a user