mmzone.h 812 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_MACH_MMZONE_H
  3. #define _ASM_MACH_MMZONE_H
  4. #include <asm/sn/addrs.h>
  5. #include <asm/sn/arch.h>
  6. #include <asm/sn/hub.h>
  7. #define pa_to_nid(addr) NASID_TO_COMPACT_NODEID(NASID_GET(addr))
  8. #define LEVELS_PER_SLICE 128
  9. struct slice_data {
  10. unsigned long irq_enable_mask[2];
  11. int level_to_irq[LEVELS_PER_SLICE];
  12. };
  13. struct hub_data {
  14. kern_vars_t kern_vars;
  15. DECLARE_BITMAP(h_bigwin_used, HUB_NUM_BIG_WINDOW);
  16. cpumask_t h_cpus;
  17. unsigned long slice_map;
  18. unsigned long irq_alloc_mask[2];
  19. struct slice_data slice[2];
  20. };
  21. struct node_data {
  22. struct pglist_data pglist;
  23. struct hub_data hub;
  24. };
  25. extern struct node_data *__node_data[];
  26. #define NODE_DATA(n) (&__node_data[(n)]->pglist)
  27. #define hub_data(n) (&__node_data[(n)]->hub)
  28. #endif /* _ASM_MACH_MMZONE_H */