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

Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
"Two fixes for 6.1:

- fix stacktraces for tracepoint events in Thumb2 mode

- fix for noMMU ZERO_PAGE() implementation"

* tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
ARM: 9266/1: mm: fix no-MMU ZERO_PAGE() implementation
ARM: 9251/1: perf: Fix stacktraces for tracepoint events in THUMB2 kernels

+29 -14
+1 -1
arch/arm/include/asm/perf_event.h
··· 17 17 18 18 #define perf_arch_fetch_caller_regs(regs, __ip) { \ 19 19 (regs)->ARM_pc = (__ip); \ 20 - (regs)->ARM_fp = (unsigned long) __builtin_frame_address(0); \ 20 + frame_pointer((regs)) = (unsigned long) __builtin_frame_address(0); \ 21 21 (regs)->ARM_sp = current_stack_pointer; \ 22 22 (regs)->ARM_cpsr = SVC_MODE; \ 23 23 }
-6
arch/arm/include/asm/pgtable-nommu.h
··· 45 45 typedef pte_t *pte_addr_t; 46 46 47 47 /* 48 - * ZERO_PAGE is a global shared page that is always zero: used 49 - * for zero-mapped memory areas etc.. 50 - */ 51 - #define ZERO_PAGE(vaddr) (virt_to_page(0)) 52 - 53 - /* 54 48 * Mark the prot value as uncacheable and unbufferable. 55 49 */ 56 50 #define pgprot_noncached(prot) (prot)
+9 -7
arch/arm/include/asm/pgtable.h
··· 10 10 #include <linux/const.h> 11 11 #include <asm/proc-fns.h> 12 12 13 + #ifndef __ASSEMBLY__ 14 + /* 15 + * ZERO_PAGE is a global shared page that is always zero: used 16 + * for zero-mapped memory areas etc.. 17 + */ 18 + extern struct page *empty_zero_page; 19 + #define ZERO_PAGE(vaddr) (empty_zero_page) 20 + #endif 21 + 13 22 #ifndef CONFIG_MMU 14 23 15 24 #include <asm-generic/pgtable-nopud.h> ··· 148 139 */ 149 140 150 141 #ifndef __ASSEMBLY__ 151 - /* 152 - * ZERO_PAGE is a global shared page that is always zero: used 153 - * for zero-mapped memory areas etc.. 154 - */ 155 - extern struct page *empty_zero_page; 156 - #define ZERO_PAGE(vaddr) (empty_zero_page) 157 - 158 142 159 143 extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 160 144
+19
arch/arm/mm/nommu.c
··· 26 26 27 27 unsigned long vectors_base; 28 28 29 + /* 30 + * empty_zero_page is a special page that is used for 31 + * zero-initialized data and COW. 32 + */ 33 + struct page *empty_zero_page; 34 + EXPORT_SYMBOL(empty_zero_page); 35 + 29 36 #ifdef CONFIG_ARM_MPU 30 37 struct mpu_rgn_info mpu_rgn_info; 31 38 #endif ··· 155 148 */ 156 149 void __init paging_init(const struct machine_desc *mdesc) 157 150 { 151 + void *zero_page; 152 + 158 153 early_trap_init((void *)vectors_base); 159 154 mpu_setup(); 155 + 156 + /* allocate the zero page. */ 157 + zero_page = memblock_alloc(PAGE_SIZE, PAGE_SIZE); 158 + if (!zero_page) 159 + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", 160 + __func__, PAGE_SIZE, PAGE_SIZE); 161 + 160 162 bootmem_init(); 163 + 164 + empty_zero_page = virt_to_page(zero_page); 165 + flush_dcache_page(empty_zero_page); 161 166 } 162 167 163 168 /*