cpu-multi32.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * arch/arm/include/asm/cpu-multi32.h
  3. *
  4. * Copyright (C) 2000 Russell King
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <asm/page.h>
  11. struct mm_struct;
  12. /*
  13. * Don't change this structure - ASM code
  14. * relies on it.
  15. */
  16. extern struct processor {
  17. /* MISC
  18. * get data abort address/flags
  19. */
  20. void (*_data_abort)(unsigned long pc);
  21. /*
  22. * Retrieve prefetch fault address
  23. */
  24. unsigned long (*_prefetch_abort)(unsigned long lr);
  25. /*
  26. * Set up any processor specifics
  27. */
  28. void (*_proc_init)(void);
  29. /*
  30. * Disable any processor specifics
  31. */
  32. void (*_proc_fin)(void);
  33. /*
  34. * Special stuff for a reset
  35. */
  36. void (*reset)(unsigned long addr) __attribute__((noreturn));
  37. /*
  38. * Idle the processor
  39. */
  40. int (*_do_idle)(void);
  41. /*
  42. * Processor architecture specific
  43. */
  44. /*
  45. * clean a virtual address range from the
  46. * D-cache without flushing the cache.
  47. */
  48. void (*dcache_clean_area)(void *addr, int size);
  49. /*
  50. * Set the page table
  51. */
  52. void (*switch_mm)(unsigned long pgd_phys, struct mm_struct *mm);
  53. /*
  54. * Set a possibly extended PTE. Non-extended PTEs should
  55. * ignore 'ext'.
  56. */
  57. void (*set_pte_ext)(pte_t *ptep, pte_t pte, unsigned int ext);
  58. } processor;
  59. #define cpu_proc_init() processor._proc_init()
  60. #define cpu_proc_fin() processor._proc_fin()
  61. #define cpu_reset(addr) processor.reset(addr)
  62. #define cpu_do_idle() processor._do_idle()
  63. #define cpu_dcache_clean_area(addr,sz) processor.dcache_clean_area(addr,sz)
  64. #define cpu_set_pte_ext(ptep,pte,ext) processor.set_pte_ext(ptep,pte,ext)
  65. #define cpu_do_switch_mm(pgd,mm) processor.switch_mm(pgd,mm)