xref: /linux/arch/microblaze/include/asm/current.h (revision ead5d1f4d877e92c051e1a1ade623d0d30e71619)
1*4726dd60SMichal Simek /* SPDX-License-Identifier: GPL-2.0 */
24115ac83SMichal Simek /*
323cfc369SMichal Simek  * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu>
423cfc369SMichal Simek  * Copyright (C) 2008-2009 PetaLogix
54115ac83SMichal Simek  * Copyright (C) 2006 Atmark Techno, Inc.
64115ac83SMichal Simek  */
74115ac83SMichal Simek 
84115ac83SMichal Simek #ifndef _ASM_MICROBLAZE_CURRENT_H
94115ac83SMichal Simek #define _ASM_MICROBLAZE_CURRENT_H
104115ac83SMichal Simek 
1123cfc369SMichal Simek /*
1223cfc369SMichal Simek  * Register used to hold the current task pointer while in the kernel.
1323cfc369SMichal Simek  * Any `call clobbered' register without a special meaning should be OK,
1423cfc369SMichal Simek  * but check asm/microblaze/kernel/entry.S to be sure.
1523cfc369SMichal Simek  */
1623cfc369SMichal Simek #define CURRENT_TASK	r31
174115ac83SMichal Simek # ifndef __ASSEMBLY__
184115ac83SMichal Simek /*
194115ac83SMichal Simek  * Dedicate r31 to keeping the current task pointer
204115ac83SMichal Simek  */
214115ac83SMichal Simek register struct task_struct *current asm("r31");
224115ac83SMichal Simek 
234115ac83SMichal Simek # define get_current()	current
244115ac83SMichal Simek # endif /* __ASSEMBLY__ */
254115ac83SMichal Simek 
264115ac83SMichal Simek #endif /* _ASM_MICROBLAZE_CURRENT_H */
27