Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags   |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #ifndef _ASM_IA64_SECTIONS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #define _ASM_IA64_SECTIONS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * Copyright (C) 1998-2003 Hewlett-Packard Co
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  *	David Mosberger-Tang <davidm@hpl.hp.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/elf.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/uaccess.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <asm-generic/sections.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) extern char __phys_per_cpu_start[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #ifdef	CONFIG_SMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) extern char __cpu0_per_cpu[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) extern char __start___vtop_patchlist[], __end___vtop_patchlist[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) extern char __start___rse_patchlist[], __end___rse_patchlist[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) extern char __start___phys_stack_reg_patchlist[], __end___phys_stack_reg_patchlist[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) extern char __start_gate_section[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) extern char __start_gate_mckinley_e9_patchlist[], __end_gate_mckinley_e9_patchlist[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) extern char __start_gate_vtop_patchlist[], __end_gate_vtop_patchlist[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) extern char __start_gate_fsyscall_patchlist[], __end_gate_fsyscall_patchlist[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) extern char __start_gate_brl_fsys_bubble_down_patchlist[], __end_gate_brl_fsys_bubble_down_patchlist[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) extern char __start_unwind[], __end_unwind[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) extern char __start_ivt_text[], __end_ivt_text[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #define HAVE_DEREFERENCE_FUNCTION_DESCRIPTOR 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #undef dereference_function_descriptor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) static inline void *dereference_function_descriptor(void *ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 	struct fdesc *desc = ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 	void *p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	if (!get_kernel_nofault(p, (void *)&desc->ip))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 		ptr = p;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 	return ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #undef dereference_kernel_function_descriptor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) static inline void *dereference_kernel_function_descriptor(void *ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 	if (ptr < (void *)__start_opd || ptr >= (void *)__end_opd)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 		return ptr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	return dereference_function_descriptor(ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) #endif /* _ASM_IA64_SECTIONS_H */