init_64.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef _SPARC64_MM_INIT_H
  2. #define _SPARC64_MM_INIT_H
  3. /* Most of the symbols in this file are defined in init.c and
  4. * marked non-static so that assembler code can get at them.
  5. */
  6. #define MAX_PHYS_ADDRESS (1UL << 41UL)
  7. #define KPTE_BITMAP_CHUNK_SZ (256UL * 1024UL * 1024UL)
  8. #define KPTE_BITMAP_BYTES \
  9. ((MAX_PHYS_ADDRESS / KPTE_BITMAP_CHUNK_SZ) / 8)
  10. #define VALID_ADDR_BITMAP_CHUNK_SZ (4UL * 1024UL * 1024UL)
  11. #define VALID_ADDR_BITMAP_BYTES \
  12. ((MAX_PHYS_ADDRESS / VALID_ADDR_BITMAP_CHUNK_SZ) / 8)
  13. extern unsigned long kern_linear_pte_xor[2];
  14. extern unsigned long kpte_linear_bitmap[KPTE_BITMAP_BYTES / sizeof(unsigned long)];
  15. extern unsigned int sparc64_highest_unlocked_tlb_ent;
  16. extern unsigned long sparc64_kern_pri_context;
  17. extern unsigned long sparc64_kern_pri_nuc_bits;
  18. extern unsigned long sparc64_kern_sec_context;
  19. extern void mmu_info(struct seq_file *m);
  20. struct linux_prom_translation {
  21. unsigned long virt;
  22. unsigned long size;
  23. unsigned long data;
  24. };
  25. /* Exported for kernel TLB miss handling in ktlb.S */
  26. extern struct linux_prom_translation prom_trans[512];
  27. extern unsigned int prom_trans_ents;
  28. /* Exported for SMP bootup purposes. */
  29. extern unsigned long kern_locked_tte_data;
  30. extern void prom_world(int enter);
  31. extern void free_initmem(void);
  32. #ifdef CONFIG_SPARSEMEM_VMEMMAP
  33. #define VMEMMAP_CHUNK_SHIFT 22
  34. #define VMEMMAP_CHUNK (1UL << VMEMMAP_CHUNK_SHIFT)
  35. #define VMEMMAP_CHUNK_MASK ~(VMEMMAP_CHUNK - 1UL)
  36. #define VMEMMAP_ALIGN(x) (((x)+VMEMMAP_CHUNK-1UL)&VMEMMAP_CHUNK_MASK)
  37. #define VMEMMAP_SIZE ((((1UL << MAX_PHYSADDR_BITS) >> PAGE_SHIFT) * \
  38. sizeof(struct page)) >> VMEMMAP_CHUNK_SHIFT)
  39. extern unsigned long vmemmap_table[VMEMMAP_SIZE];
  40. #endif
  41. #endif /* _SPARC64_MM_INIT_H */