diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-09-05 10:09:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-09-05 10:09:31 -0700 |
commit | 3dceb8a9a931675d5d19453306c6c76228f2b575 (patch) | |
tree | abed20e165752c140978c177b86216b317e30f28 /arch/openrisc/include | |
parent | 3f86ed6ec0b390c033eae7f9c487a3fea268e027 (diff) | |
parent | c289330331eb93bc6a3c68b9119ccd7d4285a4a2 (diff) |
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
Diffstat (limited to 'arch/openrisc/include')
-rw-r--r-- | arch/openrisc/include/asm/bug.h | 11 | ||||
-rw-r--r-- | arch/openrisc/include/asm/page.h | 11 | ||||
-rw-r--r-- | arch/openrisc/include/asm/processor.h | 1 |
3 files changed, 21 insertions, 2 deletions
diff --git a/arch/openrisc/include/asm/bug.h b/arch/openrisc/include/asm/bug.h new file mode 100644 index 000000000000..6d04776eaf10 --- /dev/null +++ b/arch/openrisc/include/asm/bug.h @@ -0,0 +1,11 @@ +/* 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 */ diff --git a/arch/openrisc/include/asm/page.h b/arch/openrisc/include/asm/page.h index 52b0d7e76446..44fc1fd56717 100644 --- a/arch/openrisc/include/asm/page.h +++ b/arch/openrisc/include/asm/page.h @@ -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)) diff --git a/arch/openrisc/include/asm/processor.h b/arch/openrisc/include/asm/processor.h index ed9efb430afa..3b736e74e6ed 100644 --- a/arch/openrisc/include/asm/processor.h +++ b/arch/openrisc/include/asm/processor.h @@ -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() |