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

Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: 64-bit: Detect virtual memory size
MIPS: AR7: Fix USB slave mem range typo
MIPS: Alchemy: Fix dbdma ring destruction memory debugcheck.

+31 -4
+5 -2
arch/mips/alchemy/common/dbdma.c
··· 412 412 if (desc_base == 0) 413 413 return 0; 414 414 415 + ctp->cdb_membase = desc_base; 415 416 desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t)); 416 - } 417 + } else 418 + ctp->cdb_membase = desc_base; 419 + 417 420 dp = (au1x_ddma_desc_t *)desc_base; 418 421 419 422 /* Keep track of the base descriptor. */ ··· 834 831 835 832 au1xxx_dbdma_stop(chanid); 836 833 837 - kfree((void *)ctp->chan_desc_base); 834 + kfree((void *)ctp->cdb_membase); 838 835 839 836 stp->dev_flags &= ~DEV_FLAGS_INUSE; 840 837 dtp->dev_flags &= ~DEV_FLAGS_INUSE;
+1 -1
arch/mips/ar7/platform.c
··· 202 202 .name = "mem", 203 203 .flags = IORESOURCE_MEM, 204 204 .start = 0x03400000, 205 - .end = 0x034001fff, 205 + .end = 0x03401fff, 206 206 }, 207 207 }; 208 208
+7
arch/mips/include/asm/cpu-features.h
··· 191 191 # ifndef cpu_has_64bit_addresses 192 192 # define cpu_has_64bit_addresses 0 193 193 # endif 194 + # ifndef cpu_vmbits 195 + # define cpu_vmbits 31 196 + # endif 194 197 #endif 195 198 196 199 #ifdef CONFIG_64BIT ··· 211 208 # endif 212 209 # ifndef cpu_has_64bit_addresses 213 210 # define cpu_has_64bit_addresses 1 211 + # endif 212 + # ifndef cpu_vmbits 213 + # define cpu_vmbits cpu_data[0].vmbits 214 + # define __NEED_VMBITS_PROBE 214 215 # endif 215 216 #endif 216 217
+3
arch/mips/include/asm/cpu-info.h
··· 58 58 struct cache_desc tcache; /* Tertiary/split secondary cache */ 59 59 int srsets; /* Shadow register sets */ 60 60 int core; /* physical core number */ 61 + #ifdef CONFIG_64BIT 62 + int vmbits; /* Virtual memory size in bits */ 63 + #endif 61 64 #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) 62 65 /* 63 66 * In the MIPS MT "SMTC" model, each TC is considered
+1
arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h
··· 305 305 dbdev_tab_t *chan_dest; 306 306 au1x_dma_chan_t *chan_ptr; 307 307 au1x_ddma_desc_t *chan_desc_base; 308 + u32 cdb_membase; /* kmalloc base of above */ 308 309 au1x_ddma_desc_t *get_ptr, *put_ptr, *cur_ptr; 309 310 void *chan_callparam; 310 311 void (*chan_callback)(int, void *);
+3 -1
arch/mips/include/asm/pgtable-64.h
··· 110 110 #define VMALLOC_START MAP_BASE 111 111 #define VMALLOC_END \ 112 112 (VMALLOC_START + \ 113 - PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE - (1UL << 32)) 113 + min(PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE, \ 114 + (1UL << cpu_vmbits)) - (1UL << 32)) 115 + 114 116 #if defined(CONFIG_MODULES) && defined(KBUILD_64BIT_SYM32) && \ 115 117 VMALLOC_START != CKSSEG 116 118 /* Load modules into 32bit-compatible segment. */
+11
arch/mips/kernel/cpu-probe.c
··· 284 284 return ((cpu_get_fpu_id() & 0xff00) != FPIR_IMP_NONE); 285 285 } 286 286 287 + static inline void cpu_probe_vmbits(struct cpuinfo_mips *c) 288 + { 289 + #ifdef __NEED_VMBITS_PROBE 290 + write_c0_entryhi(0x3ffffffffffff000ULL); 291 + back_to_back_c0_hazard(); 292 + c->vmbits = fls64(read_c0_entryhi() & 0x3ffffffffffff000ULL); 293 + #endif 294 + } 295 + 287 296 #define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \ 288 297 | MIPS_CPU_COUNTER) 289 298 ··· 978 969 c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1; 979 970 else 980 971 c->srsets = 1; 972 + 973 + cpu_probe_vmbits(c); 981 974 } 982 975 983 976 __cpuinit void cpu_report(void)