Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86/debug', 'x86/defconfig', 'x86/detect-hyper', 'x86/doc', 'x86/dumpstack', 'x86/early-printk', 'x86/fpu', 'x86/idle', 'x86/io', 'x86/memory-corruption-check', 'x86/microcode', 'x86/mm', 'x86/mtrr', 'x86/nmi-watchdog', 'x86/pat2', 'x86/pci-ioapic-boot-irq-quirks', 'x86/ptrace', 'x86/quirks', 'x86/reboot', 'x86/setup-memory', 'x86/signal', 'x86/sparse-fixes', 'x86/time', 'x86/uv' and 'x86/xen' into x86/core
This commit is contained in:

parent
3d44cc3e01
1ccedb7cdb
34945ede31
d437797406
c415b3dce3
beeb4195cb
f269b07e86
4e42ebd57b
e1286f2c68
878719e831
fd28a5b58d
adf77bac05
8f2466f45f
93093d099e
bb5574608a
f34a10bd9f
b6fd6f2673
30604bb410
5b9a0e14eb
67bac792cd
7a9787e1eb
f4166c54bf
69b88afa8d
8daa19051e
3e1e9002aa
8403295e0f
4db646b1af
205516c12d
c8182f0016
ecbf29cdb3
commit
fa623d1b02
@@ -67,7 +67,7 @@ static unsigned long __meminitdata table_top;
|
||||
|
||||
static int __initdata after_init_bootmem;
|
||||
|
||||
static __init void *alloc_low_page(unsigned long *phys)
|
||||
static __init void *alloc_low_page(void)
|
||||
{
|
||||
unsigned long pfn = table_end++;
|
||||
void *adr;
|
||||
@@ -77,7 +77,6 @@ static __init void *alloc_low_page(unsigned long *phys)
|
||||
|
||||
adr = __va(pfn * PAGE_SIZE);
|
||||
memset(adr, 0, PAGE_SIZE);
|
||||
*phys = pfn * PAGE_SIZE;
|
||||
return adr;
|
||||
}
|
||||
|
||||
@@ -92,16 +91,17 @@ static pmd_t * __init one_md_table_init(pgd_t *pgd)
|
||||
pmd_t *pmd_table;
|
||||
|
||||
#ifdef CONFIG_X86_PAE
|
||||
unsigned long phys;
|
||||
if (!(pgd_val(*pgd) & _PAGE_PRESENT)) {
|
||||
if (after_init_bootmem)
|
||||
pmd_table = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE);
|
||||
else
|
||||
pmd_table = (pmd_t *)alloc_low_page(&phys);
|
||||
pmd_table = (pmd_t *)alloc_low_page();
|
||||
paravirt_alloc_pmd(&init_mm, __pa(pmd_table) >> PAGE_SHIFT);
|
||||
set_pgd(pgd, __pgd(__pa(pmd_table) | _PAGE_PRESENT));
|
||||
pud = pud_offset(pgd, 0);
|
||||
BUG_ON(pmd_table != pmd_offset(pud, 0));
|
||||
|
||||
return pmd_table;
|
||||
}
|
||||
#endif
|
||||
pud = pud_offset(pgd, 0);
|
||||
@@ -126,10 +126,8 @@ static pte_t * __init one_page_table_init(pmd_t *pmd)
|
||||
if (!page_table)
|
||||
page_table =
|
||||
(pte_t *)alloc_bootmem_low_pages(PAGE_SIZE);
|
||||
} else {
|
||||
unsigned long phys;
|
||||
page_table = (pte_t *)alloc_low_page(&phys);
|
||||
}
|
||||
} else
|
||||
page_table = (pte_t *)alloc_low_page();
|
||||
|
||||
paravirt_alloc_pte(&init_mm, __pa(page_table) >> PAGE_SHIFT);
|
||||
set_pmd(pmd, __pmd(__pa(page_table) | _PAGE_TABLE));
|
||||
@@ -969,8 +967,6 @@ void __init mem_init(void)
|
||||
int codesize, reservedpages, datasize, initsize;
|
||||
int tmp;
|
||||
|
||||
start_periodic_check_for_corruption();
|
||||
|
||||
#ifdef CONFIG_FLATMEM
|
||||
BUG_ON(!mem_map);
|
||||
#endif
|
||||
@@ -1040,11 +1036,25 @@ void __init mem_init(void)
|
||||
(unsigned long)&_text, (unsigned long)&_etext,
|
||||
((unsigned long)&_etext - (unsigned long)&_text) >> 10);
|
||||
|
||||
/*
|
||||
* Check boundaries twice: Some fundamental inconsistencies can
|
||||
* be detected at build time already.
|
||||
*/
|
||||
#define __FIXADDR_TOP (-PAGE_SIZE)
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
BUILD_BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE > FIXADDR_START);
|
||||
BUILD_BUG_ON(VMALLOC_END > PKMAP_BASE);
|
||||
#endif
|
||||
#define high_memory (-128UL << 20)
|
||||
BUILD_BUG_ON(VMALLOC_START >= VMALLOC_END);
|
||||
#undef high_memory
|
||||
#undef __FIXADDR_TOP
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE > FIXADDR_START);
|
||||
BUG_ON(VMALLOC_END > PKMAP_BASE);
|
||||
#endif
|
||||
BUG_ON(VMALLOC_START > VMALLOC_END);
|
||||
BUG_ON(VMALLOC_START >= VMALLOC_END);
|
||||
BUG_ON((unsigned long)high_memory > VMALLOC_START);
|
||||
|
||||
if (boot_cpu_data.wp_works_ok < 0)
|
||||
|
Reference in New Issue
Block a user