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

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull MIPS fixes from Ralf Baechle:

- Three highmem fixes:
+ Fixed mapping initialization
+ Adjust the pkmap location
+ Ensure we use at most one page for PTEs

- Fix makefile dependencies for .its targets to depend on vmlinux

- Fix reversed condition in BNEZC and JIALC software branch emulation

- Only flush initialized flush_insn_slot to avoid NULL pointer
dereference

- perf: Remove incorrect odd/even counter handling for I6400

- ftrace: Fix init functions tracing

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: .its targets depend on vmlinux
MIPS: Fix bnezc/jialc return address calculation
MIPS: kprobes: flush_insn_slot should flush only if probe initialised
MIPS: ftrace: fix init functions tracing
MIPS: mm: adjust PKMAP location
MIPS: highmem: ensure that we don't use more than one page for PTEs
MIPS: mm: fixed mappings: correct initialisation
MIPS: perf: Remove incorrect odd/even counter handling for I6400

+34 -31
+5 -5
arch/mips/boot/Makefile
··· 128 128 -DADDR_BITS=$(ADDR_BITS) \ 129 129 -DADDR_CELLS=$(itb_addr_cells) 130 130 131 - $(obj)/vmlinux.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S FORCE 131 + $(obj)/vmlinux.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX) FORCE 132 132 $(call if_changed_dep,cpp_its_S,none,vmlinux.bin) 133 133 134 - $(obj)/vmlinux.gz.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S FORCE 134 + $(obj)/vmlinux.gz.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX) FORCE 135 135 $(call if_changed_dep,cpp_its_S,gzip,vmlinux.bin.gz) 136 136 137 - $(obj)/vmlinux.bz2.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S FORCE 137 + $(obj)/vmlinux.bz2.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX) FORCE 138 138 $(call if_changed_dep,cpp_its_S,bzip2,vmlinux.bin.bz2) 139 139 140 - $(obj)/vmlinux.lzma.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S FORCE 140 + $(obj)/vmlinux.lzma.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX) FORCE 141 141 $(call if_changed_dep,cpp_its_S,lzma,vmlinux.bin.lzma) 142 142 143 - $(obj)/vmlinux.lzo.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S FORCE 143 + $(obj)/vmlinux.lzo.its: $(srctree)/arch/mips/$(PLATFORM)/vmlinux.its.S $(VMLINUX) FORCE 144 144 $(call if_changed_dep,cpp_its_S,lzo,vmlinux.bin.lzo) 145 145 146 146 quiet_cmd_itb-image = ITB $@
+5
arch/mips/include/asm/highmem.h
··· 35 35 * easily, subsequent pte tables have to be allocated in one physical 36 36 * chunk of RAM. 37 37 */ 38 + #ifdef CONFIG_PHYS_ADDR_T_64BIT 39 + #define LAST_PKMAP 512 40 + #else 38 41 #define LAST_PKMAP 1024 42 + #endif 43 + 39 44 #define LAST_PKMAP_MASK (LAST_PKMAP-1) 40 45 #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) 41 46 #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
+2 -1
arch/mips/include/asm/kprobes.h
··· 43 43 44 44 #define flush_insn_slot(p) \ 45 45 do { \ 46 - flush_icache_range((unsigned long)p->addr, \ 46 + if (p->addr) \ 47 + flush_icache_range((unsigned long)p->addr, \ 47 48 (unsigned long)p->addr + \ 48 49 (MAX_INSN_SIZE * sizeof(kprobe_opcode_t))); \ 49 50 } while (0)
+6 -1
arch/mips/include/asm/pgtable-32.h
··· 19 19 #define __ARCH_USE_5LEVEL_HACK 20 20 #include <asm-generic/pgtable-nopmd.h> 21 21 22 + #ifdef CONFIG_HIGHMEM 23 + #include <asm/highmem.h> 24 + #endif 25 + 22 26 extern int temp_tlb_entry; 23 27 24 28 /* ··· 66 62 67 63 #define VMALLOC_START MAP_BASE 68 64 69 - #define PKMAP_BASE (0xfe000000UL) 65 + #define PKMAP_END ((FIXADDR_START) & ~((LAST_PKMAP << PAGE_SHIFT)-1)) 66 + #define PKMAP_BASE (PKMAP_END - PAGE_SIZE * LAST_PKMAP) 70 67 71 68 #ifdef CONFIG_HIGHMEM 72 69 # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE)
+3 -1
arch/mips/kernel/branch.c
··· 804 804 break; 805 805 } 806 806 /* Compact branch: BNEZC || JIALC */ 807 - if (insn.i_format.rs) 807 + if (!insn.i_format.rs) { 808 + /* JIALC: set $31/ra */ 808 809 regs->regs[31] = epc + 4; 810 + } 809 811 regs->cp0_epc += 8; 810 812 break; 811 813 #endif
+5 -19
arch/mips/kernel/ftrace.c
··· 38 38 39 39 #endif 40 40 41 - /* 42 - * Check if the address is in kernel space 43 - * 44 - * Clone core_kernel_text() from kernel/extable.c, but doesn't call 45 - * init_kernel_text() for Ftrace doesn't trace functions in init sections. 46 - */ 47 - static inline int in_kernel_space(unsigned long ip) 48 - { 49 - if (ip >= (unsigned long)_stext && 50 - ip <= (unsigned long)_etext) 51 - return 1; 52 - return 0; 53 - } 54 - 55 41 #ifdef CONFIG_DYNAMIC_FTRACE 56 42 57 43 #define JAL 0x0c000000 /* jump & link: ip --> ra, jump to target */ ··· 184 198 * If ip is in kernel space, no long call, otherwise, long call is 185 199 * needed. 186 200 */ 187 - new = in_kernel_space(ip) ? INSN_NOP : INSN_B_1F; 201 + new = core_kernel_text(ip) ? INSN_NOP : INSN_B_1F; 188 202 #ifdef CONFIG_64BIT 189 203 return ftrace_modify_code(ip, new); 190 204 #else ··· 204 218 unsigned int new; 205 219 unsigned long ip = rec->ip; 206 220 207 - new = in_kernel_space(ip) ? insn_jal_ftrace_caller : insn_la_mcount[0]; 221 + new = core_kernel_text(ip) ? insn_jal_ftrace_caller : insn_la_mcount[0]; 208 222 209 223 #ifdef CONFIG_64BIT 210 224 return ftrace_modify_code(ip, new); 211 225 #else 212 - return ftrace_modify_code_2r(ip, new, in_kernel_space(ip) ? 226 + return ftrace_modify_code_2r(ip, new, core_kernel_text(ip) ? 213 227 INSN_NOP : insn_la_mcount[1]); 214 228 #endif 215 229 } ··· 275 289 * instruction "lui v1, hi_16bit_of_mcount"(offset is 24), but for 276 290 * kernel, move after the instruction "move ra, at"(offset is 16) 277 291 */ 278 - ip = self_ra - (in_kernel_space(self_ra) ? 16 : 24); 292 + ip = self_ra - (core_kernel_text(self_ra) ? 16 : 24); 279 293 280 294 /* 281 295 * search the text until finding the non-store instruction or "s{d,w} ··· 380 394 * entries configured through the tracing/set_graph_function interface. 381 395 */ 382 396 383 - insns = in_kernel_space(self_ra) ? 2 : MCOUNT_OFFSET_INSNS + 1; 397 + insns = core_kernel_text(self_ra) ? 2 : MCOUNT_OFFSET_INSNS + 1; 384 398 trace.func = self_ra - (MCOUNT_INSN_SIZE * insns); 385 399 386 400 /* Only trace if the calling function expects to */
+5 -1
arch/mips/kernel/perf_event_mipsxx.c
··· 1597 1597 break; 1598 1598 case CPU_P5600: 1599 1599 case CPU_P6600: 1600 - case CPU_I6400: 1601 1600 /* 8-bit event numbers */ 1602 1601 raw_id = config & 0x1ff; 1603 1602 base_id = raw_id & 0xff; ··· 1608 1609 #ifdef CONFIG_MIPS_MT_SMP 1609 1610 raw_event.range = P; 1610 1611 #endif 1612 + break; 1613 + case CPU_I6400: 1614 + /* 8-bit event numbers */ 1615 + base_id = config & 0xff; 1616 + raw_event.cntr_mask = CNTR_EVEN | CNTR_ODD; 1611 1617 break; 1612 1618 case CPU_1004K: 1613 1619 if (IS_BOTH_COUNTERS_1004K_EVENT(base_id))
+3 -3
arch/mips/mm/pgtable-32.c
··· 51 51 /* 52 52 * Fixed mappings: 53 53 */ 54 - vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK; 55 - fixrange_init(vaddr, vaddr + FIXADDR_SIZE, pgd_base); 54 + vaddr = __fix_to_virt(__end_of_fixed_addresses - 1); 55 + fixrange_init(vaddr & PMD_MASK, vaddr + FIXADDR_SIZE, pgd_base); 56 56 57 57 #ifdef CONFIG_HIGHMEM 58 58 /* 59 59 * Permanent kmaps: 60 60 */ 61 61 vaddr = PKMAP_BASE; 62 - fixrange_init(vaddr, vaddr + PAGE_SIZE*LAST_PKMAP, pgd_base); 62 + fixrange_init(vaddr & PMD_MASK, vaddr + PAGE_SIZE*LAST_PKMAP, pgd_base); 63 63 64 64 pgd = swapper_pg_dir + __pgd_offset(vaddr); 65 65 pud = pud_offset(pgd, vaddr);