pda.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.
  7. */
  8. #ifndef _ASM_IA64_SN_PDA_H
  9. #define _ASM_IA64_SN_PDA_H
  10. #include <linux/cache.h>
  11. #include <asm/percpu.h>
  12. /*
  13. * CPU-specific data structure.
  14. *
  15. * One of these structures is allocated for each cpu of a NUMA system.
  16. *
  17. * This structure provides a convenient way of keeping together
  18. * all SN per-cpu data structures.
  19. */
  20. typedef struct pda_s {
  21. /*
  22. * Support for SN LEDs
  23. */
  24. volatile short *led_address;
  25. u8 led_state;
  26. u8 hb_state; /* supports blinking heartbeat leds */
  27. unsigned int hb_count;
  28. unsigned int idle_flag;
  29. volatile unsigned long *bedrock_rev_id;
  30. volatile unsigned long *pio_write_status_addr;
  31. unsigned long pio_write_status_val;
  32. volatile unsigned long *pio_shub_war_cam_addr;
  33. unsigned long sn_in_service_ivecs[4];
  34. int sn_lb_int_war_ticks;
  35. int sn_last_irq;
  36. int sn_first_irq;
  37. } pda_t;
  38. #define CACHE_ALIGN(x) (((x) + SMP_CACHE_BYTES-1) & ~(SMP_CACHE_BYTES-1))
  39. /*
  40. * PDA
  41. * Per-cpu private data area for each cpu. The PDA is located immediately after
  42. * the IA64 cpu_data area. A full page is allocated for the cp_data area for each
  43. * cpu but only a small amout of the page is actually used. We put the SNIA PDA
  44. * in the same page as the cpu_data area. Note that there is a check in the setup
  45. * code to verify that we don't overflow the page.
  46. *
  47. * Seems like we should should cache-line align the pda so that any changes in the
  48. * size of the cpu_data area don't change cache layout. Should we align to 32, 64, 128
  49. * or 512 boundary. Each has merits. For now, pick 128 but should be revisited later.
  50. */
  51. DECLARE_PER_CPU(struct pda_s, pda_percpu);
  52. #define pda (&__ia64_per_cpu_var(pda_percpu))
  53. #define pdacpu(cpu) (&per_cpu(pda_percpu, cpu))
  54. #endif /* _ASM_IA64_SN_PDA_H */