aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/iommu.h2
-rw-r--r--include/asm-sparc64/pbm.h8
-rw-r--r--include/asm-sparc64/pgalloc.h9
-rw-r--r--include/asm-sparc64/spitfire.h3
4 files changed, 12 insertions, 10 deletions
diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h
index 5fd16e42a045..0de7a3da79cd 100644
--- a/include/asm-sparc64/iommu.h
+++ b/include/asm-sparc64/iommu.h
@@ -16,4 +16,6 @@
16#define IOPTE_CACHE 0x0000000000000010UL /* Cached (in UPA E-cache) */ 16#define IOPTE_CACHE 0x0000000000000010UL /* Cached (in UPA E-cache) */
17#define IOPTE_WRITE 0x0000000000000002UL /* Writeable */ 17#define IOPTE_WRITE 0x0000000000000002UL /* Writeable */
18 18
19#define IOMMU_NUM_CTXS 4096
20
19#endif /* !(_SPARC_IOMMU_H) */ 21#endif /* !(_SPARC_IOMMU_H) */
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h
index 92999631c819..4c15610a2bac 100644
--- a/include/asm-sparc64/pbm.h
+++ b/include/asm-sparc64/pbm.h
@@ -15,6 +15,7 @@
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/oplib.h> 17#include <asm/oplib.h>
18#include <asm/iommu.h>
18 19
19/* The abstraction used here is that there are PCI controllers, 20/* The abstraction used here is that there are PCI controllers,
20 * each with one (Sabre) or two (PSYCHO/SCHIZO) PCI bus modules 21 * each with one (Sabre) or two (PSYCHO/SCHIZO) PCI bus modules
@@ -40,9 +41,6 @@ struct pci_iommu {
40 */ 41 */
41 spinlock_t lock; 42 spinlock_t lock;
42 43
43 /* Context allocator. */
44 unsigned int iommu_cur_ctx;
45
46 /* IOMMU page table, a linear array of ioptes. */ 44 /* IOMMU page table, a linear array of ioptes. */
47 iopte_t *page_table; /* The page table itself. */ 45 iopte_t *page_table; /* The page table itself. */
48 int page_table_sz_bits; /* log2 of ow many pages does it map? */ 46 int page_table_sz_bits; /* log2 of ow many pages does it map? */
@@ -87,6 +85,10 @@ struct pci_iommu {
87 u16 flush; 85 u16 flush;
88 } alloc_info[PBM_NCLUSTERS]; 86 } alloc_info[PBM_NCLUSTERS];
89 87
88 /* CTX allocation. */
89 unsigned long ctx_lowest_free;
90 unsigned long ctx_bitmap[IOMMU_NUM_CTXS / (sizeof(unsigned long) * 8)];
91
90 /* Here a PCI controller driver describes the areas of 92 /* Here a PCI controller driver describes the areas of
91 * PCI memory space where DMA to/from physical memory 93 * PCI memory space where DMA to/from physical memory
92 * are addressed. Drivers interrogate the PCI layer 94 * are addressed. Drivers interrogate the PCI layer
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h
index 2c28e1f605b7..b9b1914aae63 100644
--- a/include/asm-sparc64/pgalloc.h
+++ b/include/asm-sparc64/pgalloc.h
@@ -122,17 +122,12 @@ static __inline__ void free_pmd_slow(pmd_t *pmd)
122#define pmd_populate(MM,PMD,PTE_PAGE) \ 122#define pmd_populate(MM,PMD,PTE_PAGE) \
123 pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE)) 123 pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE))
124 124
125extern pte_t *__pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address); 125extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address);
126
127static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
128{
129 return __pte_alloc_one_kernel(mm, address);
130}
131 126
132static inline struct page * 127static inline struct page *
133pte_alloc_one(struct mm_struct *mm, unsigned long addr) 128pte_alloc_one(struct mm_struct *mm, unsigned long addr)
134{ 129{
135 pte_t *pte = __pte_alloc_one_kernel(mm, addr); 130 pte_t *pte = pte_alloc_one_kernel(mm, addr);
136 131
137 if (pte) 132 if (pte)
138 return virt_to_page(pte); 133 return virt_to_page(pte);
diff --git a/include/asm-sparc64/spitfire.h b/include/asm-sparc64/spitfire.h
index ad78ce64d69e..9d7613eea812 100644
--- a/include/asm-sparc64/spitfire.h
+++ b/include/asm-sparc64/spitfire.h
@@ -48,6 +48,9 @@ enum ultra_tlb_layout {
48 48
49extern enum ultra_tlb_layout tlb_type; 49extern enum ultra_tlb_layout tlb_type;
50 50
51extern int cheetah_pcache_forced_on;
52extern void cheetah_enable_pcache(void);
53
51#define sparc64_highest_locked_tlbent() \ 54#define sparc64_highest_locked_tlbent() \
52 (tlb_type == spitfire ? \ 55 (tlb_type == spitfire ? \
53 SPITFIRE_HIGHEST_LOCKED_TLBENT : \ 56 SPITFIRE_HIGHEST_LOCKED_TLBENT : \