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-only
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
^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) #include <linux/sched.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #include <linux/mm.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <linux/interrupt.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <linux/thread_info.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/kbuild.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/ptrace.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <asm/hardirq.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <asm/page.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) int main(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 	DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	DEFINE(THREAD_KSP, offsetof(struct thread_struct, ksp));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	DEFINE(THREAD_CALLEE_REG, offsetof(struct thread_struct, callee_reg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	DEFINE(THREAD_FAULT_ADDR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 	       offsetof(struct thread_struct, fault_address));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	DEFINE(THREAD_INFO_FLAGS, offsetof(struct thread_info, flags));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	DEFINE(THREAD_INFO_PREEMPT_COUNT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	       offsetof(struct thread_info, preempt_count));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 	DEFINE(TASK_ACT_MM, offsetof(struct task_struct, active_mm));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 	DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	DEFINE(TASK_PID, offsetof(struct task_struct, pid));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) 	DEFINE(TASK_COMM, offsetof(struct task_struct, comm));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 	DEFINE(MM_CTXT, offsetof(struct mm_struct, context));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 	DEFINE(MM_PGD, offsetof(struct mm_struct, pgd));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 	DEFINE(MM_CTXT_ASID, offsetof(mm_context_t, asid));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) 	BLANK();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 	DEFINE(PT_status32, offsetof(struct pt_regs, status32));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 	DEFINE(PT_event, offsetof(struct pt_regs, event));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 	DEFINE(PT_sp, offsetof(struct pt_regs, sp));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 	DEFINE(PT_r0, offsetof(struct pt_regs, r0));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 	DEFINE(PT_r1, offsetof(struct pt_regs, r1));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 	DEFINE(PT_r2, offsetof(struct pt_regs, r2));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 	DEFINE(PT_r3, offsetof(struct pt_regs, r3));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 	DEFINE(PT_r4, offsetof(struct pt_regs, r4));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 	DEFINE(PT_r5, offsetof(struct pt_regs, r5));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 	DEFINE(PT_r6, offsetof(struct pt_regs, r6));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 	DEFINE(PT_r7, offsetof(struct pt_regs, r7));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 	DEFINE(PT_r8, offsetof(struct pt_regs, r8));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 	DEFINE(PT_r10, offsetof(struct pt_regs, r10));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 	DEFINE(PT_r26, offsetof(struct pt_regs, r26));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 	DEFINE(PT_ret, offsetof(struct pt_regs, ret));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 	DEFINE(PT_blink, offsetof(struct pt_regs, blink));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) 	DEFINE(PT_lpe, offsetof(struct pt_regs, lp_end));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) 	DEFINE(PT_lpc, offsetof(struct pt_regs, lp_count));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) 	DEFINE(PT_user_r25, offsetof(struct pt_regs, user_r25));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) 	DEFINE(SZ_CALLEE_REGS, sizeof(struct callee_regs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) 	DEFINE(SZ_PT_REGS, sizeof(struct pt_regs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) #ifdef CONFIG_ISA_ARCV2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) 	OFFSET(PT_r12, pt_regs, r12);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) 	OFFSET(PT_r30, pt_regs, r30);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) #ifdef CONFIG_ARC_HAS_ACCL_REGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) 	OFFSET(PT_r58, pt_regs, r58);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) 	OFFSET(PT_r59, pt_regs, r59);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) #ifdef CONFIG_ARC_DSP_SAVE_RESTORE_REGS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) 	OFFSET(PT_DSP_CTRL, pt_regs, DSP_CTRL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) }