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 tag 'parisc-for-7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc fixes from Helge Deller:
"While testing Sasha Levin's 'kallsyms: embed source file:line info in
kernel stack traces' patch series, which increases the typical kernel
image size, I found some issues with the parisc initial kernel mapping
which may prevent the kernel to boot.

The three small patches here fix this"

* tag 'parisc-for-7.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Fix initial page table creation for boot
parisc: Check kernel mapping earlier at bootup
parisc: Increase initial mapping to 64 MB with KALLSYMS

+19 -10
+1 -1
arch/parisc/include/asm/pgtable.h
··· 85 85 printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, (unsigned long)pgd_val(e)) 86 86 87 87 /* This is the size of the initially mapped kernel memory */ 88 - #if defined(CONFIG_64BIT) 88 + #if defined(CONFIG_64BIT) || defined(CONFIG_KALLSYMS) 89 89 #define KERNEL_INITIAL_ORDER 26 /* 1<<26 = 64MB */ 90 90 #else 91 91 #define KERNEL_INITIAL_ORDER 25 /* 1<<25 = 32MB */
+6 -1
arch/parisc/kernel/head.S
··· 56 56 57 57 .import __bss_start,data 58 58 .import __bss_stop,data 59 + .import __end,data 59 60 60 61 load32 PA(__bss_start),%r3 61 62 load32 PA(__bss_stop),%r4 ··· 150 149 * everything ... it will get remapped correctly later */ 151 150 ldo 0+_PAGE_KERNEL_RWX(%r0),%r3 /* Hardwired 0 phys addr start */ 152 151 load32 (1<<(KERNEL_INITIAL_ORDER-PAGE_SHIFT)),%r11 /* PFN count */ 153 - load32 PA(pg0),%r1 152 + load32 PA(_end),%r1 153 + SHRREG %r1,PAGE_SHIFT,%r1 /* %r1 is PFN count for _end symbol */ 154 + cmpb,<<,n %r11,%r1,1f 155 + copy %r1,%r11 /* %r1 PFN count smaller than %r11 */ 156 + 1: load32 PA(pg0),%r1 154 157 155 158 $pgt_fill_loop: 156 159 STREGM %r3,ASM_PTE_ENTRY_SIZE(%r1)
+12 -8
arch/parisc/kernel/setup.c
··· 120 120 #endif 121 121 printk(KERN_CONT ".\n"); 122 122 123 - /* 124 - * Check if initial kernel page mappings are sufficient. 125 - * panic early if not, else we may access kernel functions 126 - * and variables which can't be reached. 127 - */ 128 - if (__pa((unsigned long) &_end) >= KERNEL_INITIAL_SIZE) 129 - panic("KERNEL_INITIAL_ORDER too small!"); 130 - 131 123 #ifdef CONFIG_64BIT 132 124 if(parisc_narrow_firmware) { 133 125 printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n"); ··· 270 278 { 271 279 int ret, cpunum; 272 280 struct pdc_coproc_cfg coproc_cfg; 281 + 282 + /* 283 + * Check if initial kernel page mapping is sufficient. 284 + * Print warning if not, because we may access kernel functions and 285 + * variables which can't be reached yet through the initial mappings. 286 + * Note that the panic() and printk() functions are not functional 287 + * yet, so we need to use direct iodc() firmware calls instead. 288 + */ 289 + const char warn1[] = "CRITICAL: Kernel may crash because " 290 + "KERNEL_INITIAL_ORDER is too small.\n"; 291 + if (__pa((unsigned long) &_end) >= KERNEL_INITIAL_SIZE) 292 + pdc_iodc_print(warn1, sizeof(warn1) - 1); 273 293 274 294 /* check QEMU/SeaBIOS marker in PAGE0 */ 275 295 running_on_qemu = (memcmp(&PAGE0->pad0, "SeaBIOS", 8) == 0);