processor.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * include/asm-alpha/processor.h
  4. *
  5. * Copyright (C) 1994 Linus Torvalds
  6. */
  7. #ifndef __ASM_ALPHA_PROCESSOR_H
  8. #define __ASM_ALPHA_PROCESSOR_H
  9. /*
  10. * We have a 42-bit user address space: 4TB user VM...
  11. */
  12. #define TASK_SIZE (0x40000000000UL)
  13. #define STACK_TOP (0x00120000000UL)
  14. #define STACK_TOP_MAX 0x00120000000UL
  15. /* This decides where the kernel will search for a free chunk of vm
  16. * space during mmap's.
  17. */
  18. #define TASK_UNMAPPED_BASE (TASK_SIZE / 2)
  19. /* This is dead. Everything has been moved to thread_info. */
  20. struct thread_struct { };
  21. #define INIT_THREAD { }
  22. /* Do necessary setup to start up a newly executed thread. */
  23. struct pt_regs;
  24. extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
  25. /* Free all resources held by a thread. */
  26. struct task_struct;
  27. unsigned long __get_wchan(struct task_struct *p);
  28. #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
  29. #define KSTK_ESP(tsk) \
  30. ((tsk) == current ? rdusp() : task_thread_info(tsk)->pcb.usp)
  31. #define cpu_relax() barrier()
  32. #define ARCH_HAS_PREFETCH
  33. #define ARCH_HAS_PREFETCHW
  34. extern inline void prefetch(const void *ptr)
  35. {
  36. __builtin_prefetch(ptr, 0, 3);
  37. }
  38. extern inline void prefetchw(const void *ptr)
  39. {
  40. __builtin_prefetch(ptr, 1, 3);
  41. }
  42. #endif /* __ASM_ALPHA_PROCESSOR_H */