Commit 3dceb8a9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 3f86ed6e c2893303
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ASM_OPENRISC_BUG_H
#define __ASM_OPENRISC_BUG_H

#include <asm-generic/bug.h>

struct pt_regs;

void __noreturn die(const char *str, struct pt_regs *regs, long err);

#endif /* __ASM_OPENRISC_BUG_H */
+9 −2
Original line number Diff line number Diff line
@@ -72,8 +72,15 @@ typedef struct page *pgtable_t;
#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET))
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)

#define virt_to_pfn(kaddr)      (__pa(kaddr) >> PAGE_SHIFT)
#define pfn_to_virt(pfn)        __va((pfn) << PAGE_SHIFT)
static inline unsigned long virt_to_pfn(const void *kaddr)
{
	return __pa(kaddr) >> PAGE_SHIFT;
}

static inline void * pfn_to_virt(unsigned long pfn)
{
	return (void *)((unsigned long)__va(pfn) << PAGE_SHIFT);
}

#define virt_to_page(addr) \
	(mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ struct thread_struct {

void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp);
unsigned long __get_wchan(struct task_struct *p);
void show_registers(struct pt_regs *regs);

#define cpu_relax()     barrier()

+2 −2
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
 */

#define __KERNEL_SYSCALLS__
#include <linux/cpu.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/sched/debug.h>
@@ -38,6 +39,7 @@
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/spr_defs.h>
#include <asm/switch_to.h>

#include <linux/smp.h>

@@ -119,8 +121,6 @@ void flush_thread(void)

void show_regs(struct pt_regs *regs)
{
	extern void show_registers(struct pt_regs *regs);

	show_regs_print_info(KERN_DEFAULT);
	/* __PHX__ cleanup this mess */
	show_registers(regs);
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,10 @@
#include <asm/thread_info.h>
#include <asm/page.h>

asmlinkage long do_syscall_trace_enter(struct pt_regs *regs);

asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);

/*
 * Copy the thread state to a regset that can be interpreted by userspace.
 *
Loading