Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Replace use of phys_t with phys_addr_t.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+64 -64
+2 -2
arch/mips/alchemy/common/setup.c
··· 72 72 73 73 #if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_PCI) 74 74 /* This routine should be valid for all Au1x based boards */ 75 - phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) 75 + phys_addr_t __fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size) 76 76 { 77 77 unsigned long start = ALCHEMY_PCI_MEMWIN_START; 78 78 unsigned long end = ALCHEMY_PCI_MEMWIN_END; ··· 83 83 84 84 /* Check for PCI memory window */ 85 85 if (phys_addr >= start && (phys_addr + size - 1) <= end) 86 - return (phys_t)(AU1500_PCI_MEM_PHYS_ADDR + phys_addr); 86 + return (phys_addr_t)(AU1500_PCI_MEM_PHYS_ADDR + phys_addr); 87 87 88 88 /* default nop */ 89 89 return phys_addr;
+2 -2
arch/mips/cavium-octeon/dma-octeon.c
··· 262 262 void __init plat_swiotlb_setup(void) 263 263 { 264 264 int i; 265 - phys_t max_addr; 266 - phys_t addr_size; 265 + phys_addr_t max_addr; 266 + phys_addr_t addr_size; 267 267 size_t swiotlbsize; 268 268 unsigned long swiotlb_nslabs; 269 269
+4 -4
arch/mips/include/asm/bootinfo.h
··· 98 98 struct boot_mem_map { 99 99 int nr_map; 100 100 struct boot_mem_map_entry { 101 - phys_t addr; /* start of memory segment */ 102 - phys_t size; /* size of memory segment */ 101 + phys_addr_t addr; /* start of memory segment */ 102 + phys_addr_t size; /* size of memory segment */ 103 103 long type; /* type of memory segment */ 104 104 } map[BOOT_MEM_MAP_MAX]; 105 105 }; 106 106 107 107 extern struct boot_mem_map boot_mem_map; 108 108 109 - extern void add_memory_region(phys_t start, phys_t size, long type); 110 - extern void detect_memory_region(phys_t start, phys_t sz_min, phys_t sz_max); 109 + extern void add_memory_region(phys_addr_t start, phys_addr_t size, long type); 110 + extern void detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max); 111 111 112 112 extern void prom_init(void); 113 113 extern void prom_free_prom_memory(void);
+4 -4
arch/mips/include/asm/io.h
··· 167 167 */ 168 168 #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) 169 169 170 - extern void __iomem * __ioremap(phys_t offset, phys_t size, unsigned long flags); 170 + extern void __iomem * __ioremap(phys_addr_t offset, phys_addr_t size, unsigned long flags); 171 171 extern void __iounmap(const volatile void __iomem *addr); 172 172 173 173 #ifndef CONFIG_PCI ··· 175 175 static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) {} 176 176 #endif 177 177 178 - static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, 178 + static inline void __iomem * __ioremap_mode(phys_addr_t offset, unsigned long size, 179 179 unsigned long flags) 180 180 { 181 181 void __iomem *addr = plat_ioremap(offset, size, flags); ··· 183 183 if (addr) 184 184 return addr; 185 185 186 - #define __IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL)) 186 + #define __IS_LOW512(addr) (!((phys_addr_t)(addr) & (phys_addr_t) ~0x1fffffffULL)) 187 187 188 188 if (cpu_has_64bit_addresses) { 189 189 u64 base = UNCAC_BASE; ··· 197 197 return (void __iomem *) (unsigned long) (base + offset); 198 198 } else if (__builtin_constant_p(offset) && 199 199 __builtin_constant_p(size) && __builtin_constant_p(flags)) { 200 - phys_t phys_addr, last_addr; 200 + phys_addr_t phys_addr, last_addr; 201 201 202 202 phys_addr = fixup_bigphys_addr(offset, size); 203 203
+4 -4
arch/mips/include/asm/mach-au1x00/ioremap.h
··· 12 12 #include <linux/types.h> 13 13 14 14 #if defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_PCI) 15 - extern phys_t __fixup_bigphys_addr(phys_t, phys_t); 15 + extern phys_addr_t __fixup_bigphys_addr(phys_addr_t, phys_addr_t); 16 16 #else 17 - static inline phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) 17 + static inline phys_addr_t __fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size) 18 18 { 19 19 return phys_addr; 20 20 } ··· 23 23 /* 24 24 * Allow physical addresses to be fixed up to help 36-bit peripherals. 25 25 */ 26 - static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) 26 + static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size) 27 27 { 28 28 return __fixup_bigphys_addr(phys_addr, size); 29 29 } 30 30 31 - static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, 31 + static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size, 32 32 unsigned long flags) 33 33 { 34 34 return NULL;
+3 -3
arch/mips/include/asm/mach-bcm63xx/ioremap.h
··· 3 3 4 4 #include <bcm63xx_cpu.h> 5 5 6 - static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) 6 + static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size) 7 7 { 8 8 return phys_addr; 9 9 } 10 10 11 - static inline int is_bcm63xx_internal_registers(phys_t offset) 11 + static inline int is_bcm63xx_internal_registers(phys_addr_t offset) 12 12 { 13 13 switch (bcm63xx_get_cpu_id()) { 14 14 case BCM3368_CPU_ID: ··· 32 32 return 0; 33 33 } 34 34 35 - static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, 35 + static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size, 36 36 unsigned long flags) 37 37 { 38 38 if (is_bcm63xx_internal_registers(offset))
+2 -2
arch/mips/include/asm/mach-generic/ioremap.h
··· 15 15 * Allow physical addresses to be fixed up to help peripherals located 16 16 * outside the low 32-bit range -- generic pass-through version. 17 17 */ 18 - static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) 18 + static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size) 19 19 { 20 20 return phys_addr; 21 21 } 22 22 23 - static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, 23 + static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size, 24 24 unsigned long flags) 25 25 { 26 26 return NULL;
+2 -2
arch/mips/include/asm/mach-tx39xx/ioremap.h
··· 15 15 * Allow physical addresses to be fixed up to help peripherals located 16 16 * outside the low 32-bit range -- generic pass-through version. 17 17 */ 18 - static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) 18 + static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size) 19 19 { 20 20 return phys_addr; 21 21 } 22 22 23 - static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, 23 + static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size, 24 24 unsigned long flags) 25 25 { 26 26 #define TXX9_DIRECTMAP_BASE 0xff000000ul
+2 -2
arch/mips/include/asm/mach-tx49xx/ioremap.h
··· 15 15 * Allow physical addresses to be fixed up to help peripherals located 16 16 * outside the low 32-bit range -- generic pass-through version. 17 17 */ 18 - static inline phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) 18 + static inline phys_addr_t fixup_bigphys_addr(phys_addr_t phys_addr, phys_addr_t size) 19 19 { 20 20 return phys_addr; 21 21 } 22 22 23 - static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, 23 + static inline void __iomem *plat_ioremap(phys_addr_t offset, unsigned long size, 24 24 unsigned long flags) 25 25 { 26 26 #ifdef CONFIG_64BIT
+1 -1
arch/mips/include/asm/mips-cm.h
··· 30 30 * different way by defining a function with the same prototype except for the 31 31 * name mips_cm_phys_base (without underscores). 32 32 */ 33 - extern phys_t __mips_cm_phys_base(void); 33 + extern phys_addr_t __mips_cm_phys_base(void); 34 34 35 35 /** 36 36 * mips_cm_probe - probe for a Coherence Manager
+2 -2
arch/mips/include/asm/mips-cpc.h
··· 25 25 * memory mapped registers. This is platform dependant & must therefore be 26 26 * implemented per-platform. 27 27 */ 28 - extern phys_t mips_cpc_default_phys_base(void); 28 + extern phys_addr_t mips_cpc_default_phys_base(void); 29 29 30 30 /** 31 31 * mips_cpc_phys_base - retrieve the physical base address of the CPC ··· 35 35 * is present. It may be overriden by individual platforms which determine 36 36 * this address in a different way. 37 37 */ 38 - extern phys_t __weak mips_cpc_phys_base(void); 38 + extern phys_addr_t __weak mips_cpc_phys_base(void); 39 39 40 40 /** 41 41 * mips_cpc_probe - probe for a Cluster Power Controller
+1 -1
arch/mips/include/asm/pci.h
··· 84 84 const struct resource *rsrc, resource_size_t *start, 85 85 resource_size_t *end) 86 86 { 87 - phys_t size = resource_size(rsrc); 87 + phys_addr_t size = resource_size(rsrc); 88 88 89 89 *start = fixup_bigphys_addr(rsrc->start, size); 90 90 *end = rsrc->start + size;
+1 -1
arch/mips/include/asm/pgtable.h
··· 428 428 unsigned long size, 429 429 pgprot_t prot) 430 430 { 431 - phys_t phys_addr_high = fixup_bigphys_addr(pfn << PAGE_SHIFT, size); 431 + phys_addr_t phys_addr_high = fixup_bigphys_addr(pfn << PAGE_SHIFT, size); 432 432 return remap_pfn_range(vma, vaddr, phys_addr_high >> PAGE_SHIFT, size, prot); 433 433 } 434 434 #define io_remap_pfn_range io_remap_pfn_range
+3 -3
arch/mips/include/asm/types.h
··· 20 20 #ifndef __ASSEMBLY__ 21 21 22 22 /* 23 - * Don't use phys_t. You've been warned. 23 + * Don't use phys_addr_t. You've been warned. 24 24 */ 25 25 #ifdef CONFIG_PHYS_ADDR_T_64BIT 26 - typedef unsigned long long phys_t; 26 + typedef unsigned long long phys_addr_t; 27 27 #else 28 - typedef unsigned long phys_t; 28 + typedef unsigned long phys_addr_t; 29 29 #endif 30 30 31 31 #endif /* __ASSEMBLY__ */
+1 -1
arch/mips/jz4740/setup.c
··· 32 32 { 33 33 void __iomem *jz_emc_base; 34 34 u32 ctrl, bus, bank, rows, cols; 35 - phys_t size; 35 + phys_addr_t size; 36 36 37 37 jz_emc_base = ioremap(JZ4740_EMC_BASE_ADDR, 0x100); 38 38 ctrl = readl(jz_emc_base + JZ4740_EMC_SDRAM_CTRL);
+6 -6
arch/mips/kernel/mips-cm.c
··· 16 16 void __iomem *mips_cm_base; 17 17 void __iomem *mips_cm_l2sync_base; 18 18 19 - phys_t __mips_cm_phys_base(void) 19 + phys_addr_t __mips_cm_phys_base(void) 20 20 { 21 21 u32 config3 = read_c0_config3(); 22 22 u32 cmgcr; ··· 30 30 return (cmgcr & MIPS_CMGCRF_BASE) << (36 - 32); 31 31 } 32 32 33 - phys_t mips_cm_phys_base(void) 33 + phys_addr_t mips_cm_phys_base(void) 34 34 __attribute__((weak, alias("__mips_cm_phys_base"))); 35 35 36 - phys_t __mips_cm_l2sync_phys_base(void) 36 + phys_addr_t __mips_cm_l2sync_phys_base(void) 37 37 { 38 38 u32 base_reg; 39 39 ··· 49 49 return mips_cm_phys_base() + MIPS_CM_GCR_SIZE; 50 50 } 51 51 52 - phys_t mips_cm_l2sync_phys_base(void) 52 + phys_addr_t mips_cm_l2sync_phys_base(void) 53 53 __attribute__((weak, alias("__mips_cm_l2sync_phys_base"))); 54 54 55 55 static void mips_cm_probe_l2sync(void) 56 56 { 57 57 unsigned major_rev; 58 - phys_t addr; 58 + phys_addr_t addr; 59 59 60 60 /* L2-only sync was introduced with CM major revision 6 */ 61 61 major_rev = (read_gcr_rev() & CM_GCR_REV_MAJOR_MSK) >> ··· 78 78 79 79 int mips_cm_probe(void) 80 80 { 81 - phys_t addr; 81 + phys_addr_t addr; 82 82 u32 base_reg; 83 83 84 84 addr = mips_cm_phys_base();
+2 -2
arch/mips/kernel/mips-cpc.c
··· 21 21 22 22 static DEFINE_PER_CPU_ALIGNED(unsigned long, cpc_core_lock_flags); 23 23 24 - phys_t __weak mips_cpc_phys_base(void) 24 + phys_addr_t __weak mips_cpc_phys_base(void) 25 25 { 26 26 u32 cpc_base; 27 27 ··· 44 44 45 45 int mips_cpc_probe(void) 46 46 { 47 - phys_t addr; 47 + phys_addr_t addr; 48 48 unsigned cpu; 49 49 50 50 for_each_possible_cpu(cpu)
+5 -5
arch/mips/kernel/setup.c
··· 82 82 83 83 static void *detect_magic __initdata = detect_memory_region; 84 84 85 - void __init add_memory_region(phys_t start, phys_t size, long type) 85 + void __init add_memory_region(phys_addr_t start, phys_addr_t size, long type) 86 86 { 87 87 int x = boot_mem_map.nr_map; 88 88 int i; ··· 127 127 boot_mem_map.nr_map++; 128 128 } 129 129 130 - void __init detect_memory_region(phys_t start, phys_t sz_min, phys_t sz_max) 130 + void __init detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max) 131 131 { 132 132 void *dm = &detect_magic; 133 - phys_t size; 133 + phys_addr_t size; 134 134 135 135 for (size = sz_min; size < sz_max; size <<= 1) { 136 136 if (!memcmp(dm, dm + size, sizeof(detect_magic))) ··· 545 545 early_param("elfcorehdr", early_parse_elfcorehdr); 546 546 #endif 547 547 548 - static void __init arch_mem_addpart(phys_t mem, phys_t end, int type) 548 + static void __init arch_mem_addpart(phys_addr_t mem, phys_addr_t end, int type) 549 549 { 550 - phys_t size; 550 + phys_addr_t size; 551 551 int i; 552 552 553 553 size = end - mem;
+9 -9
arch/mips/mm/ioremap.c
··· 17 17 #include <asm/tlbflush.h> 18 18 19 19 static inline void remap_area_pte(pte_t * pte, unsigned long address, 20 - phys_t size, phys_t phys_addr, unsigned long flags) 20 + phys_addr_t size, phys_addr_t phys_addr, unsigned long flags) 21 21 { 22 - phys_t end; 22 + phys_addr_t end; 23 23 unsigned long pfn; 24 24 pgprot_t pgprot = __pgprot(_PAGE_GLOBAL | _PAGE_PRESENT | __READABLE 25 25 | __WRITEABLE | flags); ··· 43 43 } 44 44 45 45 static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, 46 - phys_t size, phys_t phys_addr, unsigned long flags) 46 + phys_addr_t size, phys_addr_t phys_addr, unsigned long flags) 47 47 { 48 - phys_t end; 48 + phys_addr_t end; 49 49 50 50 address &= ~PGDIR_MASK; 51 51 end = address + size; ··· 64 64 return 0; 65 65 } 66 66 67 - static int remap_area_pages(unsigned long address, phys_t phys_addr, 68 - phys_t size, unsigned long flags) 67 + static int remap_area_pages(unsigned long address, phys_addr_t phys_addr, 68 + phys_addr_t size, unsigned long flags) 69 69 { 70 70 int error; 71 71 pgd_t * dir; ··· 111 111 * caller shouldn't need to know that small detail. 112 112 */ 113 113 114 - #define IS_LOW512(addr) (!((phys_t)(addr) & (phys_t) ~0x1fffffffULL)) 114 + #define IS_LOW512(addr) (!((phys_addr_t)(addr) & (phys_addr_t) ~0x1fffffffULL)) 115 115 116 - void __iomem * __ioremap(phys_t phys_addr, phys_t size, unsigned long flags) 116 + void __iomem * __ioremap(phys_addr_t phys_addr, phys_addr_t size, unsigned long flags) 117 117 { 118 118 struct vm_struct * area; 119 119 unsigned long offset; 120 - phys_t last_addr; 120 + phys_addr_t last_addr; 121 121 void * addr; 122 122 123 123 phys_addr = fixup_bigphys_addr(phys_addr, size);
+1 -1
arch/mips/mti-malta/malta-init.c
··· 111 111 flush_icache_range((unsigned long)base, (unsigned long)base + 0x80); 112 112 } 113 113 114 - phys_t mips_cpc_default_phys_base(void) 114 + phys_addr_t mips_cpc_default_phys_base(void) 115 115 { 116 116 return CPC_BASE_ADDR; 117 117 }
+4 -4
arch/mips/rb532/prom.c
··· 122 122 void __init prom_init(void) 123 123 { 124 124 struct ddr_ram __iomem *ddr; 125 - phys_t memsize; 126 - phys_t ddrbase; 125 + phys_addr_t memsize; 126 + phys_addr_t ddrbase; 127 127 128 128 ddr = ioremap_nocache(ddr_reg[0].start, 129 129 ddr_reg[0].end - ddr_reg[0].start); ··· 133 133 return; 134 134 } 135 135 136 - ddrbase = (phys_t)&ddr->ddrbase; 137 - memsize = (phys_t)&ddr->ddrmask; 136 + ddrbase = (phys_addr_t)&ddr->ddrbase; 137 + memsize = (phys_addr_t)&ddr->ddrmask; 138 138 memsize = 0 - memsize; 139 139 140 140 prom_setup_cmdline();
+2 -2
arch/mips/sibyte/common/cfe.c
··· 49 49 #endif 50 50 51 51 #define SIBYTE_MAX_MEM_REGIONS 8 52 - phys_t board_mem_region_addrs[SIBYTE_MAX_MEM_REGIONS]; 53 - phys_t board_mem_region_sizes[SIBYTE_MAX_MEM_REGIONS]; 52 + phys_addr_t board_mem_region_addrs[SIBYTE_MAX_MEM_REGIONS]; 53 + phys_addr_t board_mem_region_sizes[SIBYTE_MAX_MEM_REGIONS]; 54 54 unsigned int board_mem_region_count; 55 55 56 56 int cfe_cons_handle;
+1 -1
arch/mips/sibyte/swarm/platform.c
··· 50 50 static int __init swarm_pata_init(void) 51 51 { 52 52 u8 __iomem *base; 53 - phys_t offset, size; 53 + phys_addr_t offset, size; 54 54 struct resource *r; 55 55 56 56 if (!SIBYTE_HAVE_IDE)