um_arch.c (ea68a3e9d14e9e0bf017d178fb4bd53b6deb1482) | um_arch.c (6032aca0deb9c138df122192f8ef02de1fdccf25) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 4 */ 5 6#include <linux/delay.h> 7#include <linux/init.h> 8#include <linux/mm.h> --- 312 unchanged lines hidden (view full) --- 321 } 322 if (have_root == 0) 323 add_arg(DEFAULT_COMMAND_LINE_ROOT); 324 325 if (have_console == 0) 326 add_arg(DEFAULT_COMMAND_LINE_CONSOLE); 327 328 host_task_size = os_get_top_address(); | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) 4 */ 5 6#include <linux/delay.h> 7#include <linux/init.h> 8#include <linux/mm.h> --- 312 unchanged lines hidden (view full) --- 321 } 322 if (have_root == 0) 323 add_arg(DEFAULT_COMMAND_LINE_ROOT); 324 325 if (have_console == 0) 326 add_arg(DEFAULT_COMMAND_LINE_CONSOLE); 327 328 host_task_size = os_get_top_address(); |
329 /* reserve two pages for the stubs */ 330 host_task_size -= 2 * PAGE_SIZE; 331 stub_start = host_task_size; | 329 /* reserve a few pages for the stubs (taking care of data alignment) */ 330 /* align the data portion */ 331 BUILD_BUG_ON(!is_power_of_2(STUB_DATA_PAGES)); 332 stub_start = (host_task_size - 1) & ~(STUB_DATA_PAGES * PAGE_SIZE - 1); 333 /* another page for the code portion */ 334 stub_start -= PAGE_SIZE; 335 host_task_size = stub_start; |
332 333 /* 334 * TASK_SIZE needs to be PGDIR_SIZE aligned or else exit_mmap craps 335 * out 336 */ 337 task_size = host_task_size & PGDIR_MASK; 338 339 /* OS sanity checks that need to happen before the kernel runs */ --- 197 unchanged lines hidden --- | 336 337 /* 338 * TASK_SIZE needs to be PGDIR_SIZE aligned or else exit_mmap craps 339 * out 340 */ 341 task_size = host_task_size & PGDIR_MASK; 342 343 /* OS sanity checks that need to happen before the kernel runs */ --- 197 unchanged lines hidden --- |