Blackfin: drop unused bad_page pages and move zero_page to the bss
The empty_bad_page/empty_bad_page_table pages are unused, so punt them. The zero_page is always allocated, so push it out to the bss to speed up the booting process a bit and pack data nicer. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
7a9b149212
commit
f074e48e0a
|
@ -80,7 +80,8 @@ PTE_BIT_FUNC(mkyoung, |= _PAGE_ACCESSED);
|
||||||
* ZERO_PAGE is a global shared page that is always zero: used
|
* ZERO_PAGE is a global shared page that is always zero: used
|
||||||
* for zero-mapped memory areas etc..
|
* for zero-mapped memory areas etc..
|
||||||
*/
|
*/
|
||||||
#define ZERO_PAGE(vaddr) (virt_to_page(0))
|
#define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page)
|
||||||
|
extern char empty_zero_page[];
|
||||||
|
|
||||||
extern unsigned int kobjsize(const void *objp);
|
extern unsigned int kobjsize(const void *objp);
|
||||||
|
|
||||||
|
|
|
@ -15,23 +15,11 @@
|
||||||
#include "blackfin_sram.h"
|
#include "blackfin_sram.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* BAD_PAGE is the page that is used for page faults when linux
|
* ZERO_PAGE is a special page that is used for zero-initialized data and COW.
|
||||||
* is out-of-memory. Older versions of linux just did a
|
* Let the bss do its zero-init magic so we don't have to do it ourselves.
|
||||||
* do_exit(), but using this instead means there is less risk
|
|
||||||
* for a process dying in kernel mode, possibly leaving a inode
|
|
||||||
* unused etc..
|
|
||||||
*
|
|
||||||
* BAD_PAGETABLE is the accompanying page-table: it is initialized
|
|
||||||
* to point to BAD_PAGE entries.
|
|
||||||
*
|
|
||||||
* ZERO_PAGE is a special page that is used for zero-initialized
|
|
||||||
* data and COW.
|
|
||||||
*/
|
*/
|
||||||
static unsigned long empty_bad_page_table;
|
char empty_zero_page[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE)));
|
||||||
|
EXPORT_SYMBOL(empty_zero_page);
|
||||||
static unsigned long empty_bad_page;
|
|
||||||
|
|
||||||
static unsigned long empty_zero_page;
|
|
||||||
|
|
||||||
#ifndef CONFIG_EXCEPTION_L1_SCRATCH
|
#ifndef CONFIG_EXCEPTION_L1_SCRATCH
|
||||||
#if defined CONFIG_SYSCALL_TAB_L1
|
#if defined CONFIG_SYSCALL_TAB_L1
|
||||||
|
@ -59,15 +47,6 @@ void __init paging_init(void)
|
||||||
|
|
||||||
pr_debug("start_mem is %#lx virtual_end is %#lx\n", PAGE_ALIGN(memory_start), end_mem);
|
pr_debug("start_mem is %#lx virtual_end is %#lx\n", PAGE_ALIGN(memory_start), end_mem);
|
||||||
|
|
||||||
/*
|
|
||||||
* initialize the bad page table and bad page to point
|
|
||||||
* to a couple of allocated pages
|
|
||||||
*/
|
|
||||||
empty_bad_page_table = (unsigned long)alloc_bootmem_pages(PAGE_SIZE);
|
|
||||||
empty_bad_page = (unsigned long)alloc_bootmem_pages(PAGE_SIZE);
|
|
||||||
empty_zero_page = (unsigned long)alloc_bootmem_pages(PAGE_SIZE);
|
|
||||||
memset((void *)empty_zero_page, 0, PAGE_SIZE);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up SFC/DFC registers (user data space)
|
* Set up SFC/DFC registers (user data space)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue