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 'for-linus' of https://github.com/openrisc/linux

Pull OpenRISC updates from Stafford Horne:

- Fixes from me to cleanup all compiler warnings reported under
arch/openrisc

- One cleanup from Linus Walleij to convert pfn macros to static
inlines

* tag 'for-linus' of https://github.com/openrisc/linux:
openrisc: Remove kernel-doc marker from ioremap comment
openrisc: Remove unused tlb_init function
openriac: Remove unused nommu_dump_state function
openrisc: Include cpu.h and switch_to.h for prototypes
openrisc: Add prototype for die to bug.h
openrisc: Add prototype for show_registers to processor.h
openrisc: Declare do_signal function as static
openrisc: Add missing prototypes for assembly called fnctions
openrisc: Make pfn accessors statics inlines

+51 -93
+11
arch/openrisc/include/asm/bug.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + #ifndef __ASM_OPENRISC_BUG_H 3 + #define __ASM_OPENRISC_BUG_H 4 + 5 + #include <asm-generic/bug.h> 6 + 7 + struct pt_regs; 8 + 9 + void __noreturn die(const char *str, struct pt_regs *regs, long err); 10 + 11 + #endif /* __ASM_OPENRISC_BUG_H */
+9 -2
arch/openrisc/include/asm/page.h
··· 72 72 #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET)) 73 73 #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) 74 74 75 - #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) 76 - #define pfn_to_virt(pfn) __va((pfn) << PAGE_SHIFT) 75 + static inline unsigned long virt_to_pfn(const void *kaddr) 76 + { 77 + return __pa(kaddr) >> PAGE_SHIFT; 78 + } 79 + 80 + static inline void * pfn_to_virt(unsigned long pfn) 81 + { 82 + return (void *)((unsigned long)__va(pfn) << PAGE_SHIFT); 83 + } 77 84 78 85 #define virt_to_page(addr) \ 79 86 (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
+1
arch/openrisc/include/asm/processor.h
··· 73 73 74 74 void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp); 75 75 unsigned long __get_wchan(struct task_struct *p); 76 + void show_registers(struct pt_regs *regs); 76 77 77 78 #define cpu_relax() barrier() 78 79
+2 -2
arch/openrisc/kernel/process.c
··· 14 14 */ 15 15 16 16 #define __KERNEL_SYSCALLS__ 17 + #include <linux/cpu.h> 17 18 #include <linux/errno.h> 18 19 #include <linux/sched.h> 19 20 #include <linux/sched/debug.h> ··· 39 38 #include <asm/io.h> 40 39 #include <asm/processor.h> 41 40 #include <asm/spr_defs.h> 41 + #include <asm/switch_to.h> 42 42 43 43 #include <linux/smp.h> 44 44 ··· 121 119 122 120 void show_regs(struct pt_regs *regs) 123 121 { 124 - extern void show_registers(struct pt_regs *regs); 125 - 126 122 show_regs_print_info(KERN_DEFAULT); 127 123 /* __PHX__ cleanup this mess */ 128 124 show_registers(regs);
+4
arch/openrisc/kernel/ptrace.c
··· 27 27 #include <asm/thread_info.h> 28 28 #include <asm/page.h> 29 29 30 + asmlinkage long do_syscall_trace_enter(struct pt_regs *regs); 31 + 32 + asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); 33 + 30 34 /* 31 35 * Copy the thread state to a regset that can be interpreted by userspace. 32 36 *
+6 -1
arch/openrisc/kernel/signal.c
··· 34 34 unsigned char retcode[16]; /* trampoline code */ 35 35 }; 36 36 37 + asmlinkage long _sys_rt_sigreturn(struct pt_regs *regs); 38 + 39 + asmlinkage int do_work_pending(struct pt_regs *regs, unsigned int thread_flags, 40 + int syscall); 41 + 37 42 static int restore_sigcontext(struct pt_regs *regs, 38 43 struct sigcontext __user *sc) 39 44 { ··· 229 224 * mode below. 230 225 */ 231 226 232 - int do_signal(struct pt_regs *regs, int syscall) 227 + static int do_signal(struct pt_regs *regs, int syscall) 233 228 { 234 229 struct ksignal ksig; 235 230 unsigned long continue_addr = 0;
+2
arch/openrisc/kernel/smp.c
··· 23 23 #include <asm/cacheflush.h> 24 24 #include <asm/time.h> 25 25 26 + asmlinkage __init void secondary_start_kernel(void); 27 + 26 28 static void (*smp_cross_call)(const struct cpumask *, unsigned int); 27 29 28 30 unsigned long secondary_release = -1;
+2
arch/openrisc/kernel/time.c
··· 25 25 #include <asm/cpuinfo.h> 26 26 #include <asm/time.h> 27 27 28 + irqreturn_t __irq_entry timer_interrupt(struct pt_regs *regs); 29 + 28 30 /* Test the timer ticks to count, used in sync routine */ 29 31 inline void openrisc_timer_set(unsigned long count) 30 32 {
+10 -75
arch/openrisc/kernel/traps.c
··· 30 30 #include <linux/kallsyms.h> 31 31 #include <linux/uaccess.h> 32 32 33 + #include <asm/bug.h> 33 34 #include <asm/io.h> 35 + #include <asm/processor.h> 34 36 #include <asm/unwinder.h> 35 37 #include <asm/sections.h> 36 38 37 - static int kstack_depth_to_print = 0x180; 38 39 int lwa_flag; 39 40 static unsigned long __user *lwa_addr; 41 + 42 + asmlinkage void unhandled_exception(struct pt_regs *regs, int ea, int vector); 43 + asmlinkage void do_trap(struct pt_regs *regs, unsigned long address); 44 + asmlinkage void do_fpe_trap(struct pt_regs *regs, unsigned long address); 45 + asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long address); 46 + asmlinkage void do_bus_fault(struct pt_regs *regs, unsigned long address); 47 + asmlinkage void do_illegal_instruction(struct pt_regs *regs, 48 + unsigned long address); 40 49 41 50 static void print_trace(void *data, unsigned long addr, int reliable) 42 51 { ··· 148 139 149 140 print_data(regs->pc, word, i); 150 141 } 151 - } 152 - printk("\n"); 153 - } 154 - 155 - void nommu_dump_state(struct pt_regs *regs, 156 - unsigned long ea, unsigned long vector) 157 - { 158 - int i; 159 - unsigned long addr, stack = regs->sp; 160 - 161 - printk("\n\r[nommu_dump_state] :: ea %lx, vector %lx\n\r", ea, vector); 162 - 163 - printk("CPU #: %d\n" 164 - " PC: %08lx SR: %08lx SP: %08lx\n", 165 - 0, regs->pc, regs->sr, regs->sp); 166 - printk("GPR00: %08lx GPR01: %08lx GPR02: %08lx GPR03: %08lx\n", 167 - 0L, regs->gpr[1], regs->gpr[2], regs->gpr[3]); 168 - printk("GPR04: %08lx GPR05: %08lx GPR06: %08lx GPR07: %08lx\n", 169 - regs->gpr[4], regs->gpr[5], regs->gpr[6], regs->gpr[7]); 170 - printk("GPR08: %08lx GPR09: %08lx GPR10: %08lx GPR11: %08lx\n", 171 - regs->gpr[8], regs->gpr[9], regs->gpr[10], regs->gpr[11]); 172 - printk("GPR12: %08lx GPR13: %08lx GPR14: %08lx GPR15: %08lx\n", 173 - regs->gpr[12], regs->gpr[13], regs->gpr[14], regs->gpr[15]); 174 - printk("GPR16: %08lx GPR17: %08lx GPR18: %08lx GPR19: %08lx\n", 175 - regs->gpr[16], regs->gpr[17], regs->gpr[18], regs->gpr[19]); 176 - printk("GPR20: %08lx GPR21: %08lx GPR22: %08lx GPR23: %08lx\n", 177 - regs->gpr[20], regs->gpr[21], regs->gpr[22], regs->gpr[23]); 178 - printk("GPR24: %08lx GPR25: %08lx GPR26: %08lx GPR27: %08lx\n", 179 - regs->gpr[24], regs->gpr[25], regs->gpr[26], regs->gpr[27]); 180 - printk("GPR28: %08lx GPR29: %08lx GPR30: %08lx GPR31: %08lx\n", 181 - regs->gpr[28], regs->gpr[29], regs->gpr[30], regs->gpr[31]); 182 - printk(" RES: %08lx oGPR11: %08lx\n", 183 - regs->gpr[11], regs->orig_gpr11); 184 - 185 - printk("Process %s (pid: %d, stackpage=%08lx)\n", 186 - ((struct task_struct *)(__pa(current)))->comm, 187 - ((struct task_struct *)(__pa(current)))->pid, 188 - (unsigned long)current); 189 - 190 - printk("\nStack: "); 191 - printk("Stack dump [0x%08lx]:\n", (unsigned long)stack); 192 - for (i = 0; i < kstack_depth_to_print; i++) { 193 - if (((long)stack & (THREAD_SIZE - 1)) == 0) 194 - break; 195 - stack++; 196 - 197 - printk("%lx :: sp + %02d: 0x%08lx\n", stack, i * 4, 198 - *((unsigned long *)(__pa(stack)))); 199 - } 200 - printk("\n"); 201 - 202 - printk("Call Trace: "); 203 - i = 1; 204 - while (((long)stack & (THREAD_SIZE - 1)) != 0) { 205 - addr = *((unsigned long *)__pa(stack)); 206 - stack++; 207 - 208 - if (kernel_text_address(addr)) { 209 - if (i && ((i % 6) == 0)) 210 - printk("\n "); 211 - printk(" [<%08lx>]", addr); 212 - i++; 213 - } 214 - } 215 - printk("\n"); 216 - 217 - printk("\nCode: "); 218 - 219 - for (i = -24; i < 24; i++) { 220 - unsigned long word; 221 - 222 - word = ((unsigned long *)(__pa(regs->pc)))[i]; 223 - 224 - print_data(regs->pc, word, i); 225 142 } 226 143 printk("\n"); 227 144 }
+3 -1
arch/openrisc/mm/fault.c
··· 18 18 #include <linux/perf_event.h> 19 19 20 20 #include <linux/uaccess.h> 21 + #include <asm/bug.h> 21 22 #include <asm/mmu_context.h> 22 23 #include <asm/siginfo.h> 23 24 #include <asm/signal.h> ··· 31 30 */ 32 31 volatile pgd_t *current_pgd[NR_CPUS]; 33 32 34 - extern void __noreturn die(char *, struct pt_regs *, long); 33 + asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address, 34 + unsigned long vector, int write_acc); 35 35 36 36 /* 37 37 * This routine handles page faults. It determines the address,
-2
arch/openrisc/mm/init.c
··· 123 123 124 124 void __init paging_init(void) 125 125 { 126 - extern void tlb_init(void); 127 - 128 126 int i; 129 127 130 128 printk(KERN_INFO "Setting up paging and PTEs.\n");
+1 -1
arch/openrisc/mm/ioremap.c
··· 22 22 23 23 extern int mem_init_done; 24 24 25 - /** 25 + /* 26 26 * OK, this one's a bit tricky... ioremap can get called before memory is 27 27 * initialized (early serial console does this) and will want to alloc a page 28 28 * for its mapping. No userspace pages will ever get allocated before memory
-9
arch/openrisc/mm/tlb.c
··· 182 182 flush_tlb_mm(mm); 183 183 184 184 } 185 - 186 - /* called once during VM initialization, from init.c */ 187 - 188 - void __init tlb_init(void) 189 - { 190 - /* Do nothing... */ 191 - /* invalidate the entire TLB */ 192 - /* flush_tlb_all(); */ 193 - }