18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> 48c2ecf20Sopenharmony_ci * Copyright (C) 2008-2009 PetaLogix 58c2ecf20Sopenharmony_ci * Copyright (C) 2006 Atmark Techno, Inc. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef _ASM_MICROBLAZE_CURRENT_H 98c2ecf20Sopenharmony_ci#define _ASM_MICROBLAZE_CURRENT_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci/* 128c2ecf20Sopenharmony_ci * Register used to hold the current task pointer while in the kernel. 138c2ecf20Sopenharmony_ci * Any `call clobbered' register without a special meaning should be OK, 148c2ecf20Sopenharmony_ci * but check asm/microblaze/kernel/entry.S to be sure. 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ci#define CURRENT_TASK r31 178c2ecf20Sopenharmony_ci# ifndef __ASSEMBLY__ 188c2ecf20Sopenharmony_ci/* 198c2ecf20Sopenharmony_ci * Dedicate r31 to keeping the current task pointer 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_ciregister struct task_struct *current asm("r31"); 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci# define get_current() current 248c2ecf20Sopenharmony_ci# endif /* __ASSEMBLY__ */ 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#endif /* _ASM_MICROBLAZE_CURRENT_H */ 27