The patch titled Generic ioremap_page_range: arm conversion has been removed from the -mm tree. Its filename is generic-ioremap_page_range-arm-conversion.patch This patch was dropped because it was nacked by the maintainer ------------------------------------------------------ Subject: Generic ioremap_page_range: arm conversion From: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx> Convert ARM to use generic ioremap_page_range() Signed-off-by: Haavard Skinnemoen <hskinnemoen@xxxxxxxxx> Cc: Russell King <rmk@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/arm/mm/ioremap.c | 95 ++-------------------------------------- 1 files changed, 5 insertions(+), 90 deletions(-) diff -puN arch/arm/mm/ioremap.c~generic-ioremap_page_range-arm-conversion arch/arm/mm/ioremap.c --- a/arch/arm/mm/ioremap.c~generic-ioremap_page_range-arm-conversion +++ a/arch/arm/mm/ioremap.c @@ -22,11 +22,11 @@ */ #include <linux/module.h> #include <linux/errno.h> +#include <linux/io.h> #include <linux/mm.h> #include <linux/vmalloc.h> #include <asm/cacheflush.h> -#include <asm/io.h> #include <asm/mmu_context.h> #include <asm/pgalloc.h> #include <asm/tlbflush.h> @@ -38,94 +38,6 @@ */ #define VM_ARM_SECTION_MAPPING 0x80000000 -static inline void -remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, - unsigned long phys_addr, pgprot_t pgprot) -{ - unsigned long end; - - address &= ~PMD_MASK; - end = address + size; - if (end > PMD_SIZE) - end = PMD_SIZE; - BUG_ON(address >= end); - do { - if (!pte_none(*pte)) - goto bad; - - set_pte(pte, pfn_pte(phys_addr >> PAGE_SHIFT, pgprot)); - address += PAGE_SIZE; - phys_addr += PAGE_SIZE; - pte++; - } while (address && (address < end)); - return; - - bad: - printk("remap_area_pte: page already exists\n"); - BUG(); -} - -static inline int -remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, - unsigned long phys_addr, unsigned long flags) -{ - unsigned long end; - pgprot_t pgprot; - - address &= ~PGDIR_MASK; - end = address + size; - - if (end > PGDIR_SIZE) - end = PGDIR_SIZE; - - phys_addr -= address; - BUG_ON(address >= end); - - pgprot = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | L_PTE_WRITE | flags); - do { - pte_t * pte = pte_alloc_kernel(pmd, address); - if (!pte) - return -ENOMEM; - remap_area_pte(pte, address, end - address, address + phys_addr, pgprot); - address = (address + PMD_SIZE) & PMD_MASK; - pmd++; - } while (address && (address < end)); - return 0; -} - -static int -remap_area_pages(unsigned long start, unsigned long pfn, - unsigned long size, unsigned long flags) -{ - unsigned long address = start; - unsigned long end = start + size; - unsigned long phys_addr = __pfn_to_phys(pfn); - int err = 0; - pgd_t * dir; - - phys_addr -= address; - dir = pgd_offset(&init_mm, address); - BUG_ON(address >= end); - do { - pmd_t *pmd = pmd_alloc(&init_mm, dir, address); - if (!pmd) { - err = -ENOMEM; - break; - } - if (remap_area_pmd(pmd, address, end - address, - phys_addr + address, flags)) { - err = -ENOMEM; - break; - } - - address = (address + PGDIR_SIZE) & PGDIR_MASK; - dir++; - } while (address && (address < end)); - - return err; -} - - void __check_kvm_seq(struct mm_struct *mm) { unsigned int seq; @@ -326,7 +238,10 @@ __ioremap_pfn(unsigned long pfn, unsigne err = remap_area_sections(addr, pfn, size, flags); } else #endif - err = remap_area_pages(addr, pfn, size, flags); + err = ioremap_page_range(addr, addr + size, pfn << PAGE_SHIFT, + __pgprot(L_PTE_PRESENT | L_PTE_YOUNG + | L_PTE_DIRTY | L_PTE_WRITE + | flags)); if (err) { vunmap((void *)addr); _ Patches currently in -mm which might be from hskinnemoen@xxxxxxxxx are avr32-arch.patch avr32-config_debug_bugverbose-and-config_frame_pointer.patch avr32-fix-invalid-constraints-for-stcond.patch avr32-add-support-for-irq-flags-state-tracing.patch avr32-turn-off-support-for-discontigmem-and-sparsemem.patch avr32-always-enable-config_embedded.patch avr32-export-the-find__bit-functions.patch avr32-add-defconfig-for-at32stk1002.patch avr32-use-autoconf-instead-of-marker.patch avr32-dont-assume-anything-about-max_nr_zones.patch avr32-add-i-o-port-access-primitives.patch avr32-use-linux-pfnh.patch avr32-kill-config_discontigmem-support-completely.patch avr32-fix-bug-in-__avr32_asr64.patch avr32-switch-to-generic-timekeeping-framework.patch generic-ioremap_page_range-implementation.patch generic-ioremap_page_range-flush_cache_vmap.patch generic-ioremap_page_range-alpha-conversion.patch generic-ioremap_page_range-arm-conversion.patch generic-ioremap_page_range-avr32-conversion.patch generic-ioremap_page_range-cris-conversion.patch generic-ioremap_page_range-i386-conversion.patch generic-ioremap_page_range-i386-conversion-fix.patch generic-ioremap_page_range-m32r-conversion.patch generic-ioremap_page_range-mips-conversion.patch generic-ioremap_page_range-parisc-conversion.patch generic-ioremap_page_range-s390-conversion.patch generic-ioremap_page_range-sh-conversion.patch generic-ioremap_page_range-sh64-conversion.patch generic-ioremap_page_range-x86_64-conversion.patch namespaces-add-nsproxy-avr32-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html