Commit 1e7eceaf authored by Paul Mackerras's avatar Paul Mackerras Committed by Paul Mackerras

PPC32: use page_to_pfn instead of page - mem_map in a couple of places

parent 0d2fe17d
......@@ -295,7 +295,7 @@ extern inline void * phys_to_virt(unsigned long address)
/*
* Change "struct page" to physical address.
*/
#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
#define page_to_bus(page) (page_to_phys(page) + PCI_DRAM_OFFSET)
#endif /* __KERNEL__ */
......
......@@ -26,7 +26,7 @@ extern void pgd_free(pgd_t *pgd);
#define pmd_populate_kernel(mm, pmd, pte) \
(pmd_val(*(pmd)) = __pa(pte))
#define pmd_populate(mm, pmd, pte) \
(pmd_val(*(pmd)) = ((pte) - mem_map) << PAGE_SHIFT)
(pmd_val(*(pmd)) = (page_to_pfn(pte) << PAGE_SHIFT))
extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
extern struct page *pte_alloc_one(struct mm_struct *mm, unsigned long addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment