162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (C) 2008-2009 Michal Simek <monstr@monstr.eu> 462306a36Sopenharmony_ci * Copyright (C) 2008-2009 PetaLogix 562306a36Sopenharmony_ci * Copyright (C) 2006 Atmark Techno, Inc. 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef _ASM_MICROBLAZE_CURRENT_H 962306a36Sopenharmony_ci#define _ASM_MICROBLAZE_CURRENT_H 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/* 1262306a36Sopenharmony_ci * Register used to hold the current task pointer while in the kernel. 1362306a36Sopenharmony_ci * Any `call clobbered' register without a special meaning should be OK, 1462306a36Sopenharmony_ci * but check asm/microblaze/kernel/entry.S to be sure. 1562306a36Sopenharmony_ci */ 1662306a36Sopenharmony_ci#define CURRENT_TASK r31 1762306a36Sopenharmony_ci# ifndef __ASSEMBLY__ 1862306a36Sopenharmony_ci/* 1962306a36Sopenharmony_ci * Dedicate r31 to keeping the current task pointer 2062306a36Sopenharmony_ci */ 2162306a36Sopenharmony_ciregister struct task_struct *current asm("r31"); 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci# define get_current() current 2462306a36Sopenharmony_ci# endif /* __ASSEMBLY__ */ 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci#endif /* _ASM_MICROBLAZE_CURRENT_H */ 27