ioremap.c (eadcbfa58ae8693f0d6a0f591d8f51d55cf068e1) | ioremap.c (6c690ee1039b251e583fc65b28da30e97d6a7385) |
---|---|
1/* 2 * Re-map IO memory to kernel address space so that we can access it. 3 * This is needed for high PCI addresses that aren't mapped in the 4 * 640k-1MB IO memory area on PC's 5 * 6 * (C) Copyright 1995 1996 Linus Torvalds 7 */ 8 --- 410 unchanged lines hidden (view full) --- 419 iounmap((void __iomem *)((unsigned long)addr & PAGE_MASK)); 420} 421 422static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] __page_aligned_bss; 423 424static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) 425{ 426 /* Don't assume we're using swapper_pg_dir at this point */ | 1/* 2 * Re-map IO memory to kernel address space so that we can access it. 3 * This is needed for high PCI addresses that aren't mapped in the 4 * 640k-1MB IO memory area on PC's 5 * 6 * (C) Copyright 1995 1996 Linus Torvalds 7 */ 8 --- 410 unchanged lines hidden (view full) --- 419 iounmap((void __iomem *)((unsigned long)addr & PAGE_MASK)); 420} 421 422static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] __page_aligned_bss; 423 424static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) 425{ 426 /* Don't assume we're using swapper_pg_dir at this point */ |
427 pgd_t *base = __va(read_cr3()); | 427 pgd_t *base = __va(read_cr3_pa()); |
428 pgd_t *pgd = &base[pgd_index(addr)]; 429 p4d_t *p4d = p4d_offset(pgd, addr); 430 pud_t *pud = pud_offset(p4d, addr); 431 pmd_t *pmd = pmd_offset(pud, addr); 432 433 return pmd; 434} 435 --- 67 unchanged lines hidden --- | 428 pgd_t *pgd = &base[pgd_index(addr)]; 429 p4d_t *p4d = p4d_offset(pgd, addr); 430 pud_t *pud = pud_offset(p4d, addr); 431 pmd_t *pmd = pmd_offset(pud, addr); 432 433 return pmd; 434} 435 --- 67 unchanged lines hidden --- |