Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'riscv/for-v5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Paul Walmsley:
"One fix for PCIe users:

- Fix legacy PCI I/O port access emulation

One set of cleanups:

- Resolve most of the warnings generated by sparse across arch/riscv.
No functional changes

And one MAINTAINERS update:

- Update Palmer's E-mail address"

* tag 'riscv/for-v5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
MAINTAINERS: Change to my personal email address
RISC-V: Add PCIe I/O BAR memory mapping
riscv: for C functions called only from assembly, mark with __visible
riscv: fp: add missing __user pointer annotations
riscv: add missing header file includes
riscv: mark some code and data as file-static
riscv: init: merge split string literals in preprocessor directive
riscv: add prototypes for assembly language functions from head.S

+75 -18
+3 -3
MAINTAINERS
··· 13906 13906 13907 13907 RISC-V ARCHITECTURE 13908 13908 M: Paul Walmsley <paul.walmsley@sifive.com> 13909 - M: Palmer Dabbelt <palmer@sifive.com> 13909 + M: Palmer Dabbelt <palmer@dabbelt.com> 13910 13910 M: Albert Ou <aou@eecs.berkeley.edu> 13911 13911 L: linux-riscv@lists.infradead.org 13912 13912 T: git git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git ··· 14783 14783 F: drivers/media/mmc/siano/ 14784 14784 14785 14785 SIFIVE DRIVERS 14786 - M: Palmer Dabbelt <palmer@sifive.com> 14786 + M: Palmer Dabbelt <palmer@dabbelt.com> 14787 14787 M: Paul Walmsley <paul.walmsley@sifive.com> 14788 14788 L: linux-riscv@lists.infradead.org 14789 14789 T: git git://github.com/sifive/riscv-linux.git ··· 14793 14793 14794 14794 SIFIVE FU540 SYSTEM-ON-CHIP 14795 14795 M: Paul Walmsley <paul.walmsley@sifive.com> 14796 - M: Palmer Dabbelt <palmer@sifive.com> 14796 + M: Palmer Dabbelt <palmer@dabbelt.com> 14797 14797 L: linux-riscv@lists.infradead.org 14798 14798 T: git git://git.kernel.org/pub/scm/linux/kernel/git/pjw/sifive.git 14799 14799 S: Supported
+7
arch/riscv/include/asm/io.h
··· 13 13 14 14 #include <linux/types.h> 15 15 #include <asm/mmiowb.h> 16 + #include <asm/pgtable.h> 16 17 17 18 extern void __iomem *ioremap(phys_addr_t offset, unsigned long size); 18 19 ··· 161 160 #define readq(c) ({ u64 __v; __io_br(); __v = readq_cpu(c); __io_ar(__v); __v; }) 162 161 #define writeq(v,c) ({ __io_bw(); writeq_cpu((v),(c)); __io_aw(); }) 163 162 #endif 163 + 164 + /* 165 + * I/O port access constants. 166 + */ 167 + #define IO_SPACE_LIMIT (PCI_IO_SIZE - 1) 168 + #define PCI_IOBASE ((void __iomem *)PCI_IO_START) 164 169 165 170 /* 166 171 * Emulation routines for the port-mapped IO space used by some PCI drivers.
+3
arch/riscv/include/asm/irq.h
··· 7 7 #ifndef _ASM_RISCV_IRQ_H 8 8 #define _ASM_RISCV_IRQ_H 9 9 10 + #include <linux/interrupt.h> 11 + #include <linux/linkage.h> 12 + 10 13 #define NR_IRQS 0 11 14 12 15 void riscv_timer_interrupt(void);
+6 -1
arch/riscv/include/asm/pgtable.h
··· 7 7 #define _ASM_RISCV_PGTABLE_H 8 8 9 9 #include <linux/mmzone.h> 10 + #include <linux/sizes.h> 10 11 11 12 #include <asm/pgtable-bits.h> 12 13 ··· 87 86 #define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1) 88 87 #define VMALLOC_END (PAGE_OFFSET - 1) 89 88 #define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE) 89 + #define PCI_IO_SIZE SZ_16M 90 90 91 91 /* 92 92 * Roughly size the vmemmap space to be large enough to fit enough ··· 102 100 103 101 #define vmemmap ((struct page *)VMEMMAP_START) 104 102 105 - #define FIXADDR_TOP (VMEMMAP_START) 103 + #define PCI_IO_END VMEMMAP_START 104 + #define PCI_IO_START (PCI_IO_END - PCI_IO_SIZE) 105 + #define FIXADDR_TOP PCI_IO_START 106 + 106 107 #ifdef CONFIG_64BIT 107 108 #define FIXADDR_SIZE PMD_SIZE 108 109 #else
+1
arch/riscv/include/asm/switch_to.h
··· 6 6 #ifndef _ASM_RISCV_SWITCH_TO_H 7 7 #define _ASM_RISCV_SWITCH_TO_H 8 8 9 + #include <linux/sched/task_stack.h> 9 10 #include <asm/processor.h> 10 11 #include <asm/ptrace.h> 11 12 #include <asm/csr.h>
+1
arch/riscv/kernel/cpufeature.c
··· 10 10 #include <asm/processor.h> 11 11 #include <asm/hwcap.h> 12 12 #include <asm/smp.h> 13 + #include <asm/switch_to.h> 13 14 14 15 unsigned long elf_hwcap __read_mostly; 15 16 #ifdef CONFIG_FPU
+21
arch/riscv/kernel/head.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + /* 3 + * Copyright (C) 2019 SiFive, Inc. 4 + */ 5 + #ifndef __ASM_HEAD_H 6 + #define __ASM_HEAD_H 7 + 8 + #include <linux/linkage.h> 9 + #include <linux/init.h> 10 + 11 + extern atomic_t hart_lottery; 12 + 13 + asmlinkage void do_page_fault(struct pt_regs *regs); 14 + asmlinkage void __init setup_vm(uintptr_t dtb_pa); 15 + 16 + extern void *__cpu_up_stack_pointer[]; 17 + extern void *__cpu_up_task_pointer[]; 18 + 19 + void __init parse_dtb(void); 20 + 21 + #endif /* __ASM_HEAD_H */
+1 -1
arch/riscv/kernel/irq.c
··· 24 24 return 0; 25 25 } 26 26 27 - asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs) 27 + asmlinkage __visible void __irq_entry do_IRQ(struct pt_regs *regs) 28 28 { 29 29 struct pt_regs *old_regs = set_irq_regs(regs); 30 30
+1
arch/riscv/kernel/module-sections.c
··· 8 8 #include <linux/elf.h> 9 9 #include <linux/kernel.h> 10 10 #include <linux/module.h> 11 + #include <linux/moduleloader.h> 11 12 12 13 unsigned long module_emit_got_entry(struct module *mod, unsigned long val) 13 14 {
+2
arch/riscv/kernel/process.c
··· 7 7 * Copyright (C) 2017 SiFive 8 8 */ 9 9 10 + #include <linux/cpu.h> 10 11 #include <linux/kernel.h> 11 12 #include <linux/sched.h> 12 13 #include <linux/sched/task_stack.h> ··· 20 19 #include <asm/csr.h> 21 20 #include <asm/string.h> 22 21 #include <asm/switch_to.h> 22 + #include <asm/thread_info.h> 23 23 24 24 extern asmlinkage void ret_from_fork(void); 25 25 extern asmlinkage void ret_from_kernel_thread(void);
+2 -2
arch/riscv/kernel/ptrace.c
··· 148 148 * Allows PTRACE_SYSCALL to work. These are called from entry.S in 149 149 * {handle,ret_from}_syscall. 150 150 */ 151 - void do_syscall_trace_enter(struct pt_regs *regs) 151 + __visible void do_syscall_trace_enter(struct pt_regs *regs) 152 152 { 153 153 if (test_thread_flag(TIF_SYSCALL_TRACE)) 154 154 if (tracehook_report_syscall_entry(regs)) ··· 162 162 audit_syscall_entry(regs->a7, regs->a0, regs->a1, regs->a2, regs->a3); 163 163 } 164 164 165 - void do_syscall_trace_exit(struct pt_regs *regs) 165 + __visible void do_syscall_trace_exit(struct pt_regs *regs) 166 166 { 167 167 audit_syscall_exit(regs); 168 168
+1
arch/riscv/kernel/reset.c
··· 4 4 */ 5 5 6 6 #include <linux/reboot.h> 7 + #include <linux/pm.h> 7 8 #include <asm/sbi.h> 8 9 9 10 static void default_power_off(void)
+2
arch/riscv/kernel/setup.c
··· 24 24 #include <asm/tlbflush.h> 25 25 #include <asm/thread_info.h> 26 26 27 + #include "head.h" 28 + 27 29 #ifdef CONFIG_DUMMY_CONSOLE 28 30 struct screen_info screen_info = { 29 31 .orig_video_lines = 30,
+4 -4
arch/riscv/kernel/signal.c
··· 26 26 27 27 #ifdef CONFIG_FPU 28 28 static long restore_fp_state(struct pt_regs *regs, 29 - union __riscv_fp_state *sc_fpregs) 29 + union __riscv_fp_state __user *sc_fpregs) 30 30 { 31 31 long err; 32 32 struct __riscv_d_ext_state __user *state = &sc_fpregs->d; ··· 53 53 } 54 54 55 55 static long save_fp_state(struct pt_regs *regs, 56 - union __riscv_fp_state *sc_fpregs) 56 + union __riscv_fp_state __user *sc_fpregs) 57 57 { 58 58 long err; 59 59 struct __riscv_d_ext_state __user *state = &sc_fpregs->d; ··· 292 292 * notification of userspace execution resumption 293 293 * - triggered by the _TIF_WORK_MASK flags 294 294 */ 295 - asmlinkage void do_notify_resume(struct pt_regs *regs, 296 - unsigned long thread_info_flags) 295 + asmlinkage __visible void do_notify_resume(struct pt_regs *regs, 296 + unsigned long thread_info_flags) 297 297 { 298 298 /* Handle pending signal delivery */ 299 299 if (thread_info_flags & _TIF_SIGPENDING)
+2
arch/riscv/kernel/smp.c
··· 8 8 * Copyright (C) 2017 SiFive 9 9 */ 10 10 11 + #include <linux/cpu.h> 11 12 #include <linux/interrupt.h> 13 + #include <linux/profile.h> 12 14 #include <linux/smp.h> 13 15 #include <linux/sched.h> 14 16 #include <linux/seq_file.h>
+4 -1
arch/riscv/kernel/smpboot.c
··· 29 29 #include <asm/tlbflush.h> 30 30 #include <asm/sections.h> 31 31 #include <asm/sbi.h> 32 + #include <asm/smp.h> 33 + 34 + #include "head.h" 32 35 33 36 void *__cpu_up_stack_pointer[NR_CPUS]; 34 37 void *__cpu_up_task_pointer[NR_CPUS]; ··· 133 130 /* 134 131 * C entry point for a secondary processor. 135 132 */ 136 - asmlinkage void __init smp_callin(void) 133 + asmlinkage __visible void __init smp_callin(void) 137 134 { 138 135 struct mm_struct *mm = &init_mm; 139 136
+1
arch/riscv/kernel/syscall_table.c
··· 8 8 #include <linux/syscalls.h> 9 9 #include <asm-generic/syscalls.h> 10 10 #include <asm/vdso.h> 11 + #include <asm/syscall.h> 11 12 12 13 #undef __SYSCALL 13 14 #define __SYSCALL(nr, call) [nr] = (call),
+1
arch/riscv/kernel/time.c
··· 7 7 #include <linux/clocksource.h> 8 8 #include <linux/delay.h> 9 9 #include <asm/sbi.h> 10 + #include <asm/processor.h> 10 11 11 12 unsigned long riscv_timebase; 12 13 EXPORT_SYMBOL_GPL(riscv_timebase);
+3 -2
arch/riscv/kernel/traps.c
··· 3 3 * Copyright (C) 2012 Regents of the University of California 4 4 */ 5 5 6 + #include <linux/cpu.h> 6 7 #include <linux/kernel.h> 7 8 #include <linux/init.h> 8 9 #include <linux/sched.h> ··· 84 83 } 85 84 86 85 #define DO_ERROR_INFO(name, signo, code, str) \ 87 - asmlinkage void name(struct pt_regs *regs) \ 86 + asmlinkage __visible void name(struct pt_regs *regs) \ 88 87 { \ 89 88 do_trap_error(regs, signo, code, regs->sepc, "Oops - " str); \ 90 89 } ··· 121 120 return (((insn & __INSN_LENGTH_MASK) == __INSN_LENGTH_32) ? 4UL : 2UL); 122 121 } 123 122 124 - asmlinkage void do_trap_break(struct pt_regs *regs) 123 + asmlinkage __visible void do_trap_break(struct pt_regs *regs) 125 124 { 126 125 if (user_mode(regs)) 127 126 force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->sepc);
+2 -1
arch/riscv/kernel/vdso.c
··· 6 6 * Copyright (C) 2015 Regents of the University of California 7 7 */ 8 8 9 + #include <linux/elf.h> 9 10 #include <linux/mm.h> 10 11 #include <linux/slab.h> 11 12 #include <linux/binfmts.h> ··· 26 25 struct vdso_data data; 27 26 u8 page[PAGE_SIZE]; 28 27 } vdso_data_store __page_aligned_data; 29 - struct vdso_data *vdso_data = &vdso_data_store.data; 28 + static struct vdso_data *vdso_data = &vdso_data_store.data; 30 29 31 30 static int __init vdso_init(void) 32 31 {
+1
arch/riscv/mm/context.c
··· 7 7 #include <linux/mm.h> 8 8 #include <asm/tlbflush.h> 9 9 #include <asm/cacheflush.h> 10 + #include <asm/mmu_context.h> 10 11 11 12 /* 12 13 * When necessary, performs a deferred icache flush for the given MM context,
+2
arch/riscv/mm/fault.c
··· 18 18 #include <asm/ptrace.h> 19 19 #include <asm/tlbflush.h> 20 20 21 + #include "../kernel/head.h" 22 + 21 23 /* 22 24 * This routine handles page faults. It determines the address and the 23 25 * problem, and then passes it off to one of the appropriate routines.
+3 -2
arch/riscv/mm/init.c
··· 19 19 #include <asm/pgtable.h> 20 20 #include <asm/io.h> 21 21 22 + #include "../kernel/head.h" 23 + 22 24 unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)] 23 25 __page_aligned_bss; 24 26 EXPORT_SYMBOL(empty_zero_page); ··· 339 337 */ 340 338 341 339 #ifndef __riscv_cmodel_medany 342 - #error "setup_vm() is called from head.S before relocate so it should " 343 - "not use absolute addressing." 340 + #error "setup_vm() is called from head.S before relocate so it should not use absolute addressing." 344 341 #endif 345 342 346 343 asmlinkage void __init setup_vm(uintptr_t dtb_pa)
+1 -1
arch/riscv/mm/sifive_l2_cache.c
··· 142 142 return IRQ_HANDLED; 143 143 } 144 144 145 - int __init sifive_l2_init(void) 145 + static int __init sifive_l2_init(void) 146 146 { 147 147 struct device_node *np; 148 148 struct resource res;