From 0bb5e19d63cc1b09aed8aef3a20926ac435bb8e7 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 8 May 2007 00:30:57 -0700 Subject: [PATCH] Clean up mostly unused IOSPACE macros Most architectures defined three macros, MK_IOSPACE_PFN(), GET_IOSPACE() and GET_PFN() in pgtable.h. However, the only callers of any of these macros are in Sparc specific code, either in arch/sparc, arch/sparc64 or drivers/sbus. This patch removes the redundant macros from all architectures except sparc and sparc64. Signed-off-by: David Gibson Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-alpha/pgtable.h | 4 ---- include/asm-arm/pgtable-nommu.h | 4 ---- include/asm-arm/pgtable.h | 4 ---- include/asm-arm26/pgtable.h | 4 ---- include/asm-avr32/pgtable.h | 4 ---- include/asm-frv/pgtable.h | 4 ---- include/asm-h8300/pgtable.h | 4 ---- include/asm-i386/pgtable.h | 4 ---- include/asm-ia64/pgtable.h | 4 ---- include/asm-m32r/pgtable.h | 4 ---- include/asm-m68k/pgtable.h | 4 ---- include/asm-m68knommu/pgtable.h | 4 ---- include/asm-mips/pgtable.h | 4 ---- include/asm-parisc/pgtable.h | 4 ---- include/asm-ppc/pgtable.h | 4 ---- include/asm-sh/pgtable.h | 4 ---- include/asm-sh64/pgtable.h | 4 ---- include/asm-x86_64/pgtable.h | 4 ---- 18 files changed, 72 deletions(-) diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h index 49ac9bee7ced..616d20662ff3 100644 --- a/include/asm-alpha/pgtable.h +++ b/include/asm-alpha/pgtable.h @@ -345,10 +345,6 @@ extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset) #define io_remap_pfn_range(vma, start, pfn, size, prot) \ remap_pfn_range(vma, start, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - #define pte_ERROR(e) \ printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) #define pmd_ERROR(e) \ diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h index 7b1c9acdf79a..0c8be19fd66b 100644 --- a/include/asm-arm/pgtable-nommu.h +++ b/include/asm-arm/pgtable-nommu.h @@ -83,10 +83,6 @@ extern int is_in_rom(unsigned long); #define io_remap_page_range remap_page_range #define io_remap_pfn_range remap_pfn_range -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - /* * All 32bit addresses are effectively valid for vmalloc... diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 7b2bafce21a2..21dec9f258d8 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h @@ -395,10 +395,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; #define io_remap_pfn_range(vma,from,pfn,size,prot) \ remap_pfn_range(vma, from, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - #define pgtable_cache_init() do { } while (0) #endif /* !__ASSEMBLY__ */ diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h index 63a8881fae13..2b20e9f08857 100644 --- a/include/asm-arm26/pgtable.h +++ b/include/asm-arm26/pgtable.h @@ -297,10 +297,6 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) #define io_remap_pfn_range(vma,from,pfn,size,prot) \ remap_pfn_range(vma, from, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - #endif /* !__ASSEMBLY__ */ #endif /* _ASMARM_PGTABLE_H */ diff --git a/include/asm-avr32/pgtable.h b/include/asm-avr32/pgtable.h index 6b8ca9db2bd5..f6cc2b0f75c3 100644 --- a/include/asm-avr32/pgtable.h +++ b/include/asm-avr32/pgtable.h @@ -394,10 +394,6 @@ typedef pte_t *pte_addr_t; #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - /* No page table caches to initialize (?) */ #define pgtable_cache_init() do { } while(0) diff --git a/include/asm-frv/pgtable.h b/include/asm-frv/pgtable.h index 8a05aa168616..2687c7715120 100644 --- a/include/asm-frv/pgtable.h +++ b/include/asm-frv/pgtable.h @@ -509,10 +509,6 @@ static inline int pte_file(pte_t pte) #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR diff --git a/include/asm-h8300/pgtable.h b/include/asm-h8300/pgtable.h index ddd07f485dd8..a09230a08e02 100644 --- a/include/asm-h8300/pgtable.h +++ b/include/asm-h8300/pgtable.h @@ -55,10 +55,6 @@ extern int is_in_rom(unsigned long); #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - /* * All 32bit addresses are effectively valid for vmalloc... * Sort of meaningless for non-VM targets. diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 61fbf8578ff1..edce9d51a676 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h @@ -542,10 +542,6 @@ static inline void paravirt_pagetable_setup_done(pgd_t *base) #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - #include #endif /* _I386_PGTABLE_H */ diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index 553182747722..670b706411b8 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h @@ -485,10 +485,6 @@ extern void paging_init (void); #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - /* * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. diff --git a/include/asm-m32r/pgtable.h b/include/asm-m32r/pgtable.h index 1c15ba7ce319..8b2a2f17e695 100644 --- a/include/asm-m32r/pgtable.h +++ b/include/asm-m32r/pgtable.h @@ -381,10 +381,6 @@ static inline void pmd_set(pmd_t * pmdp, pte_t * ptep) #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY #define __HAVE_ARCH_PTEP_GET_AND_CLEAR diff --git a/include/asm-m68k/pgtable.h b/include/asm-m68k/pgtable.h index f3aa05377987..555b87a1f7e3 100644 --- a/include/asm-m68k/pgtable.h +++ b/include/asm-m68k/pgtable.h @@ -143,10 +143,6 @@ static inline void update_mmu_cache(struct vm_area_struct *vma, #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - /* MMU-specific headers */ #ifdef CONFIG_SUN3 diff --git a/include/asm-m68knommu/pgtable.h b/include/asm-m68knommu/pgtable.h index 549ad231efad..9dfbbc24aa71 100644 --- a/include/asm-m68knommu/pgtable.h +++ b/include/asm-m68knommu/pgtable.h @@ -59,10 +59,6 @@ extern int is_in_rom(unsigned long); #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - /* * All 32bit addresses are effectively valid for vmalloc... * Sort of meaningless for non-VM targets. diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 0d3295f57a95..27d77d981937 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h @@ -387,10 +387,6 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, remap_pfn_range(vma, vaddr, pfn, size, prot) #endif -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - #include /* diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index d7e1b10da5c6..beb2adb979d9 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h @@ -528,10 +528,6 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, #define pgprot_noncached(prot) __pgprot(pgprot_val(prot) | _PAGE_NO_CACHE) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - /* We provide our own get_unmapped_area to provide cache coherency */ #define HAVE_ARCH_UNMAPPED_AREA diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index b1fdbf40dba2..bed452d4a5f0 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h @@ -827,10 +827,6 @@ static inline int io_remap_pfn_range(struct vm_area_struct *vma, remap_pfn_range(vma, vaddr, pfn, size, prot) #endif -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - /* * No page table caches to initialise */ diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 184d7fcaaf10..5b523c7e7d99 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h @@ -568,10 +568,6 @@ typedef pte_t *pte_addr_t; #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - struct mm_struct; /* diff --git a/include/asm-sh64/pgtable.h b/include/asm-sh64/pgtable.h index 6b97c4cb1d64..b875482eb592 100644 --- a/include/asm-sh64/pgtable.h +++ b/include/asm-sh64/pgtable.h @@ -485,10 +485,6 @@ extern void update_mmu_cache(struct vm_area_struct * vma, #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - #endif /* !__ASSEMBLY__ */ /* diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 5f75ee5379a7..b21083891ce8 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h @@ -417,10 +417,6 @@ extern int kern_addr_valid(unsigned long addr); #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ remap_pfn_range(vma, vaddr, pfn, size, prot) -#define MK_IOSPACE_PFN(space, pfn) (pfn) -#define GET_IOSPACE(pfn) 0 -#define GET_PFN(pfn) (pfn) - #define HAVE_ARCH_UNMAPPED_AREA #define pgtable_cache_init() do { } while (0) -- 2.20.1