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 'parisc-4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parsic fixes from Helge Deller:
"One patch from Mikulas fixes a bug on parisc by artifically
incrementing the counter in pmd_free when the kernel tries to free
the preallocated pmd.

Other than that we now prevent that syscalls gets added without
incrementing __NR_Linux_syscalls and fix the initial pmd setup code
if a default page size greater than 4k has been selected"

* 'parisc-4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Fix pmd code to depend on PT_NLEVELS value, not on CONFIG_64BIT
parisc: mm: don't count preallocated pmds
parisc: Add compile-time check when adding new syscalls

+16 -10
+10 -7
arch/parisc/include/asm/pgalloc.h
··· 26 26 27 27 if (likely(pgd != NULL)) { 28 28 memset(pgd, 0, PAGE_SIZE<<PGD_ALLOC_ORDER); 29 - #ifdef CONFIG_64BIT 29 + #if PT_NLEVELS == 3 30 30 actual_pgd += PTRS_PER_PGD; 31 31 /* Populate first pmd with allocated memory. We mark it 32 32 * with PxD_FLAG_ATTACHED as a signal to the system that this ··· 45 45 46 46 static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) 47 47 { 48 - #ifdef CONFIG_64BIT 48 + #if PT_NLEVELS == 3 49 49 pgd -= PTRS_PER_PGD; 50 50 #endif 51 51 free_pages((unsigned long)pgd, PGD_ALLOC_ORDER); ··· 72 72 73 73 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) 74 74 { 75 - #ifdef CONFIG_64BIT 76 75 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) 77 - /* This is the permanent pmd attached to the pgd; 78 - * cannot free it */ 76 + /* 77 + * This is the permanent pmd attached to the pgd; 78 + * cannot free it. 79 + * Increment the counter to compensate for the decrement 80 + * done by generic mm code. 81 + */ 82 + mm_inc_nr_pmds(mm); 79 83 return; 80 - #endif 81 84 free_pages((unsigned long)pmd, PMD_ORDER); 82 85 } 83 86 ··· 102 99 static inline void 103 100 pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) 104 101 { 105 - #ifdef CONFIG_64BIT 102 + #if PT_NLEVELS == 3 106 103 /* preserve the gateway marker if this is the beginning of 107 104 * the permanent pmd */ 108 105 if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED)
+6 -3
arch/parisc/kernel/syscall_table.S
··· 55 55 #define ENTRY_COMP(_name_) .word sys_##_name_ 56 56 #endif 57 57 58 - ENTRY_SAME(restart_syscall) /* 0 */ 59 - ENTRY_SAME(exit) 58 + 90: ENTRY_SAME(restart_syscall) /* 0 */ 59 + 91: ENTRY_SAME(exit) 60 60 ENTRY_SAME(fork_wrapper) 61 61 ENTRY_SAME(read) 62 62 ENTRY_SAME(write) ··· 439 439 ENTRY_SAME(bpf) 440 440 ENTRY_COMP(execveat) 441 441 442 - /* Nothing yet */ 442 + 443 + .ifne (. - 90b) - (__NR_Linux_syscalls * (91b - 90b)) 444 + .error "size of syscall table does not fit value of __NR_Linux_syscalls" 445 + .endif 443 446 444 447 #undef ENTRY_SAME 445 448 #undef ENTRY_DIFF