History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k fixes from Geert Uytterhoeven: "Summary: - Add missing initialization of max_pfn, which is needed to make selftests/vm/mlock2-tests succeed, - Wire up new mlock2 syscall" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Wire up mlock2 m68knommu: Add missing initialization of max_pfn and {min,max}_low_pfn m68k/mm: sun3 - Add missing initialization of max_pfn and {min,max}_low_pfn m68k/mm: m54xx - Add missing initialization of max_pfn m68k/mm: motorola - Add missing initialization of max_pfn

Linus Torvalds committed 10 years ago

Commit d72aee72 parents 04527fd 21d380e7 files · +13 −8Browse files

Unified · Split

7 files
  1. arch/m68k/coldfire/m54xx.c +1 −1
  2. arch/m68k/include/asm/unistd.h +1 −1
  3. arch/m68k/include/uapi/asm/unistd.h +1 −0
  4. arch/m68k/kernel/setup_no.c +6 −3
  5. arch/m68k/kernel/syscalltable.S +1 −0
  6. arch/m68k/mm/motorola.c +1 −1
  7. arch/m68k/sun3/config.c +2 −2
arch/m68k/coldfire/m54xx.c+1−1
@@ -98,7 +98,7 @@ static void __init mcf54xx_bootmem_alloc(void) · 97 unmodified lines
9898 memstart = PAGE_ALIGN(_ramstart);
9999 min_low_pfn = PFN_DOWN(_rambase);
100100 start_pfn = PFN_DOWN(memstart);
101− max_low_pfn = PFN_DOWN(_ramend);
101+ max_pfn = max_low_pfn = PFN_DOWN(_ramend);
102102 high_memory = (void *)_ramend;
103103
104104 m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6;
arch/m68k/include/asm/unistd.h+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
44 #include <uapi/asm/unistd.h>
55
66
7−#define NR_syscalls 375
7+#define NR_syscalls 376
88
99 #define __ARCH_WANT_OLD_READDIR
1010 #define __ARCH_WANT_OLD_STAT
arch/m68k/include/uapi/asm/unistd.h+1−0
@@ -380,5 +380,6 @@ · 379 unmodified lines
380380 #define __NR_sendmmsg 372
381381 #define __NR_userfaultfd 373
382382 #define __NR_membarrier 374
383+#define __NR_mlock2 375
383384
384385 #endif /* _UAPI_ASM_M68K_UNISTD_H_ */
arch/m68k/kernel/setup_no.c+6−3
@@ -238,11 +238,14 @@ void __init setup_arch(char **cmdline_p) · 237 unmodified lines
238238 * Give all the memory to the bootmap allocator, tell it to put the
239239 * boot mem_map at the start of memory.
240240 */
241+ min_low_pfn = PFN_DOWN(memory_start);
242+ max_pfn = max_low_pfn = PFN_DOWN(memory_end);
243+
241244 bootmap_size = init_bootmem_node(
242245 NODE_DATA(0),
243− memory_start >> PAGE_SHIFT, /* map goes here */
244− PAGE_OFFSET >> PAGE_SHIFT, /* 0 on coldfire */
245− memory_end >> PAGE_SHIFT);
246+ min_low_pfn, /* map goes here */
247+ PFN_DOWN(PAGE_OFFSET),
248+ max_pfn);
246249 /*
247250 * Free the usable memory, we have to make sure we do not free
248251 * the bootmem bitmap so we then reserve it after freeing it :-)
arch/m68k/kernel/syscalltable.S+1−0
@@ -395,3 +395,4 @@ ENTRY(sys_call_table) · 394 unmodified lines
395395 .long sys_sendmmsg
396396 .long sys_userfaultfd
397397 .long sys_membarrier
398+ .long sys_mlock2 /* 375 */
arch/m68k/mm/motorola.c+1−1
@@ -250,7 +250,7 @@ void __init paging_init(void) · 249 unmodified lines
250250 high_memory = phys_to_virt(max_addr);
251251
252252 min_low_pfn = availmem >> PAGE_SHIFT;
253− max_low_pfn = max_addr >> PAGE_SHIFT;
253+ max_pfn = max_low_pfn = max_addr >> PAGE_SHIFT;
254254
255255 for (i = 0; i < m68k_num_memory; i++) {
256256 addr = m68k_memory[i].addr;
arch/m68k/sun3/config.c+2−2
@@ -118,13 +118,13 @@ static void __init sun3_bootmem_alloc(unsigned long memory_start, · 117 unmodified lines
118118 memory_end = memory_end & PAGE_MASK;
119119
120120 start_page = __pa(memory_start) >> PAGE_SHIFT;
121− num_pages = __pa(memory_end) >> PAGE_SHIFT;
121+ max_pfn = num_pages = __pa(memory_end) >> PAGE_SHIFT;
122122
123123 high_memory = (void *)memory_end;
124124 availmem = memory_start;
125125
126126 m68k_setup_node(0);
127− availmem += init_bootmem_node(NODE_DATA(0), start_page, 0, num_pages);
127+ availmem += init_bootmem(start_page, num_pages);
128128 availmem = (availmem + (PAGE_SIZE-1)) & PAGE_MASK;
129129
130130 free_bootmem(__pa(availmem), memory_end - (availmem));