current.h 714 B

1234567891011121314151617181920212223242526
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2008-2009 Michal Simek <[email protected]>
  4. * Copyright (C) 2008-2009 PetaLogix
  5. * Copyright (C) 2006 Atmark Techno, Inc.
  6. */
  7. #ifndef _ASM_MICROBLAZE_CURRENT_H
  8. #define _ASM_MICROBLAZE_CURRENT_H
  9. /*
  10. * Register used to hold the current task pointer while in the kernel.
  11. * Any `call clobbered' register without a special meaning should be OK,
  12. * but check asm/microblaze/kernel/entry.S to be sure.
  13. */
  14. #define CURRENT_TASK r31
  15. # ifndef __ASSEMBLY__
  16. /*
  17. * Dedicate r31 to keeping the current task pointer
  18. */
  19. register struct task_struct *current asm("r31");
  20. # define get_current() current
  21. # endif /* __ASSEMBLY__ */
  22. #endif /* _ASM_MICROBLAZE_CURRENT_H */