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
This commit is contained in:
Коммит
d72aee78e9
|
@ -98,7 +98,7 @@ static void __init mcf54xx_bootmem_alloc(void)
|
||||||
memstart = PAGE_ALIGN(_ramstart);
|
memstart = PAGE_ALIGN(_ramstart);
|
||||||
min_low_pfn = PFN_DOWN(_rambase);
|
min_low_pfn = PFN_DOWN(_rambase);
|
||||||
start_pfn = PFN_DOWN(memstart);
|
start_pfn = PFN_DOWN(memstart);
|
||||||
max_low_pfn = PFN_DOWN(_ramend);
|
max_pfn = max_low_pfn = PFN_DOWN(_ramend);
|
||||||
high_memory = (void *)_ramend;
|
high_memory = (void *)_ramend;
|
||||||
|
|
||||||
m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6;
|
m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include <uapi/asm/unistd.h>
|
#include <uapi/asm/unistd.h>
|
||||||
|
|
||||||
|
|
||||||
#define NR_syscalls 375
|
#define NR_syscalls 376
|
||||||
|
|
||||||
#define __ARCH_WANT_OLD_READDIR
|
#define __ARCH_WANT_OLD_READDIR
|
||||||
#define __ARCH_WANT_OLD_STAT
|
#define __ARCH_WANT_OLD_STAT
|
||||||
|
|
|
@ -380,5 +380,6 @@
|
||||||
#define __NR_sendmmsg 372
|
#define __NR_sendmmsg 372
|
||||||
#define __NR_userfaultfd 373
|
#define __NR_userfaultfd 373
|
||||||
#define __NR_membarrier 374
|
#define __NR_membarrier 374
|
||||||
|
#define __NR_mlock2 375
|
||||||
|
|
||||||
#endif /* _UAPI_ASM_M68K_UNISTD_H_ */
|
#endif /* _UAPI_ASM_M68K_UNISTD_H_ */
|
||||||
|
|
|
@ -238,11 +238,14 @@ void __init setup_arch(char **cmdline_p)
|
||||||
* Give all the memory to the bootmap allocator, tell it to put the
|
* Give all the memory to the bootmap allocator, tell it to put the
|
||||||
* boot mem_map at the start of memory.
|
* boot mem_map at the start of memory.
|
||||||
*/
|
*/
|
||||||
|
min_low_pfn = PFN_DOWN(memory_start);
|
||||||
|
max_pfn = max_low_pfn = PFN_DOWN(memory_end);
|
||||||
|
|
||||||
bootmap_size = init_bootmem_node(
|
bootmap_size = init_bootmem_node(
|
||||||
NODE_DATA(0),
|
NODE_DATA(0),
|
||||||
memory_start >> PAGE_SHIFT, /* map goes here */
|
min_low_pfn, /* map goes here */
|
||||||
PAGE_OFFSET >> PAGE_SHIFT, /* 0 on coldfire */
|
PFN_DOWN(PAGE_OFFSET),
|
||||||
memory_end >> PAGE_SHIFT);
|
max_pfn);
|
||||||
/*
|
/*
|
||||||
* Free the usable memory, we have to make sure we do not free
|
* Free the usable memory, we have to make sure we do not free
|
||||||
* the bootmem bitmap so we then reserve it after freeing it :-)
|
* the bootmem bitmap so we then reserve it after freeing it :-)
|
||||||
|
|
|
@ -395,3 +395,4 @@ ENTRY(sys_call_table)
|
||||||
.long sys_sendmmsg
|
.long sys_sendmmsg
|
||||||
.long sys_userfaultfd
|
.long sys_userfaultfd
|
||||||
.long sys_membarrier
|
.long sys_membarrier
|
||||||
|
.long sys_mlock2 /* 375 */
|
||||||
|
|
|
@ -250,7 +250,7 @@ void __init paging_init(void)
|
||||||
high_memory = phys_to_virt(max_addr);
|
high_memory = phys_to_virt(max_addr);
|
||||||
|
|
||||||
min_low_pfn = availmem >> PAGE_SHIFT;
|
min_low_pfn = availmem >> PAGE_SHIFT;
|
||||||
max_low_pfn = max_addr >> PAGE_SHIFT;
|
max_pfn = max_low_pfn = max_addr >> PAGE_SHIFT;
|
||||||
|
|
||||||
for (i = 0; i < m68k_num_memory; i++) {
|
for (i = 0; i < m68k_num_memory; i++) {
|
||||||
addr = m68k_memory[i].addr;
|
addr = m68k_memory[i].addr;
|
||||||
|
|
|
@ -118,13 +118,13 @@ static void __init sun3_bootmem_alloc(unsigned long memory_start,
|
||||||
memory_end = memory_end & PAGE_MASK;
|
memory_end = memory_end & PAGE_MASK;
|
||||||
|
|
||||||
start_page = __pa(memory_start) >> PAGE_SHIFT;
|
start_page = __pa(memory_start) >> PAGE_SHIFT;
|
||||||
num_pages = __pa(memory_end) >> PAGE_SHIFT;
|
max_pfn = num_pages = __pa(memory_end) >> PAGE_SHIFT;
|
||||||
|
|
||||||
high_memory = (void *)memory_end;
|
high_memory = (void *)memory_end;
|
||||||
availmem = memory_start;
|
availmem = memory_start;
|
||||||
|
|
||||||
m68k_setup_node(0);
|
m68k_setup_node(0);
|
||||||
availmem += init_bootmem_node(NODE_DATA(0), start_page, 0, num_pages);
|
availmem += init_bootmem(start_page, num_pages);
|
||||||
availmem = (availmem + (PAGE_SIZE-1)) & PAGE_MASK;
|
availmem = (availmem + (PAGE_SIZE-1)) & PAGE_MASK;
|
||||||
|
|
||||||
free_bootmem(__pa(availmem), memory_end - (availmem));
|
free_bootmem(__pa(availmem), memory_end - (availmem));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче