diff options
Diffstat (limited to 'include/asm-ppc')
-rw-r--r-- | include/asm-ppc/pgtable.h | 8 | ||||
-rw-r--r-- | include/asm-ppc/spinlock.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 51fa7c662917..b1fdbf40dba2 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h | |||
@@ -526,7 +526,7 @@ static inline int pgd_bad(pgd_t pgd) { return 0; } | |||
526 | static inline int pgd_present(pgd_t pgd) { return 1; } | 526 | static inline int pgd_present(pgd_t pgd) { return 1; } |
527 | #define pgd_clear(xp) do { } while (0) | 527 | #define pgd_clear(xp) do { } while (0) |
528 | 528 | ||
529 | #define pgd_page(pgd) \ | 529 | #define pgd_page_vaddr(pgd) \ |
530 | ((unsigned long) __va(pgd_val(pgd) & PAGE_MASK)) | 530 | ((unsigned long) __va(pgd_val(pgd) & PAGE_MASK)) |
531 | 531 | ||
532 | /* | 532 | /* |
@@ -720,12 +720,12 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | |||
720 | * of the pte page. -- paulus | 720 | * of the pte page. -- paulus |
721 | */ | 721 | */ |
722 | #ifndef CONFIG_BOOKE | 722 | #ifndef CONFIG_BOOKE |
723 | #define pmd_page_kernel(pmd) \ | 723 | #define pmd_page_vaddr(pmd) \ |
724 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) | 724 | ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK)) |
725 | #define pmd_page(pmd) \ | 725 | #define pmd_page(pmd) \ |
726 | (mem_map + (pmd_val(pmd) >> PAGE_SHIFT)) | 726 | (mem_map + (pmd_val(pmd) >> PAGE_SHIFT)) |
727 | #else | 727 | #else |
728 | #define pmd_page_kernel(pmd) \ | 728 | #define pmd_page_vaddr(pmd) \ |
729 | ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) | 729 | ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) |
730 | #define pmd_page(pmd) \ | 730 | #define pmd_page(pmd) \ |
731 | (mem_map + (__pa(pmd_val(pmd)) >> PAGE_SHIFT)) | 731 | (mem_map + (__pa(pmd_val(pmd)) >> PAGE_SHIFT)) |
@@ -748,7 +748,7 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address) | |||
748 | #define pte_index(address) \ | 748 | #define pte_index(address) \ |
749 | (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | 749 | (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
750 | #define pte_offset_kernel(dir, addr) \ | 750 | #define pte_offset_kernel(dir, addr) \ |
751 | ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(addr)) | 751 | ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(addr)) |
752 | #define pte_offset_map(dir, addr) \ | 752 | #define pte_offset_map(dir, addr) \ |
753 | ((pte_t *) kmap_atomic(pmd_page(*(dir)), KM_PTE0) + pte_index(addr)) | 753 | ((pte_t *) kmap_atomic(pmd_page(*(dir)), KM_PTE0) + pte_index(addr)) |
754 | #define pte_offset_map_nested(dir, addr) \ | 754 | #define pte_offset_map_nested(dir, addr) \ |
diff --git a/include/asm-ppc/spinlock.h b/include/asm-ppc/spinlock.h index 5c64b75f0295..fccaf5531e57 100644 --- a/include/asm-ppc/spinlock.h +++ b/include/asm-ppc/spinlock.h | |||
@@ -161,4 +161,8 @@ static __inline__ void __raw_write_unlock(raw_rwlock_t *rw) | |||
161 | rw->lock = 0; | 161 | rw->lock = 0; |
162 | } | 162 | } |
163 | 163 | ||
164 | #define _raw_spin_relax(lock) cpu_relax() | ||
165 | #define _raw_read_relax(lock) cpu_relax() | ||
166 | #define _raw_write_relax(lock) cpu_relax() | ||
167 | |||
164 | #endif /* __ASM_SPINLOCK_H */ | 168 | #endif /* __ASM_SPINLOCK_H */ |