Skip to content

Commit

Permalink
Merge branch 'x86/mm' into x86/core
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingo Molnar committed Mar 5, 2009
2 parents caab36b + ed26dbe commit 28e93a0
Show file tree
Hide file tree
Showing 13 changed files with 472 additions and 491 deletions.
18 changes: 18 additions & 0 deletions arch/x86/include/asm/init.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef _ASM_X86_INIT_32_H
#define _ASM_X86_INIT_32_H

#ifdef CONFIG_X86_32
extern void __init early_ioremap_page_table_range_init(void);
#endif

extern unsigned long __init
kernel_physical_mapping_init(unsigned long start,
unsigned long end,
unsigned long page_size_mask);


extern unsigned long __initdata e820_table_start;
extern unsigned long __meminitdata e820_table_end;
extern unsigned long __meminitdata e820_table_top;

#endif /* _ASM_X86_INIT_32_H */
6 changes: 0 additions & 6 deletions arch/x86/include/asm/page_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,8 @@

#ifndef __ASSEMBLY__

struct pgprot;

extern int page_is_ram(unsigned long pagenr);
extern int devmem_is_allowed(unsigned long pagenr);
extern void map_devmem(unsigned long pfn, unsigned long size,
struct pgprot vma_prot);
extern void unmap_devmem(unsigned long pfn, unsigned long size,
struct pgprot vma_prot);

extern unsigned long max_low_pfn_mapped;
extern unsigned long max_pfn_mapped;
Expand Down
5 changes: 5 additions & 0 deletions arch/x86/include/asm/pat.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _ASM_X86_PAT_H

#include <linux/types.h>
#include <asm/pgtable_types.h>

#ifdef CONFIG_X86_PAT
extern int pat_enabled;
Expand All @@ -17,5 +18,9 @@ extern int free_memtype(u64 start, u64 end);

extern int kernel_map_sync_memtype(u64 base, unsigned long size,
unsigned long flag);
extern void map_devmem(unsigned long pfn, unsigned long size,
struct pgprot vma_prot);
extern void unmap_devmem(unsigned long pfn, unsigned long size,
struct pgprot vma_prot);

#endif /* _ASM_X86_PAT_H */
5 changes: 5 additions & 0 deletions arch/x86/include/asm/pgtable_32_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
* area for the same reason. ;)
*/
#define VMALLOC_OFFSET (8 * 1024 * 1024)

#ifndef __ASSEMBLER__
extern bool __vmalloc_start_set; /* set once high_memory is set */
#endif

#define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET)
#ifdef CONFIG_X86_PAE
#define LAST_PKMAP 512
Expand Down
1 change: 1 addition & 0 deletions arch/x86/include/asm/pgtable_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ typedef struct page *pgtable_t;

extern pteval_t __supported_pte_mask;
extern int nx_enabled;
extern void set_nx(void);

#define pgprot_writecombine pgprot_writecombine
extern pgprot_t pgprot_writecombine(pgprot_t prot);
Expand Down
25 changes: 22 additions & 3 deletions arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,19 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)

static struct mpf_intel *mpf_found;

static unsigned long __init get_mpc_size(unsigned long physptr)
{
struct mpc_table *mpc;
unsigned long size;

mpc = early_ioremap(physptr, PAGE_SIZE);
size = mpc->length;
early_iounmap(mpc, PAGE_SIZE);
apic_printk(APIC_VERBOSE, " mpc: %lx-%lx\n", physptr, physptr + size);

return size;
}

/*
* Scan the memory blocks for an SMP configuration block.
*/
Expand Down Expand Up @@ -611,21 +624,27 @@ static void __init __get_smp_config(unsigned int early)
construct_default_ISA_mptable(mpf->feature1);

} else if (mpf->physptr) {
struct mpc_table *mpc;
unsigned long size;

size = get_mpc_size(mpf->physptr);
mpc = early_ioremap(mpf->physptr, size);
/*
* Read the physical hardware table. Anything here will
* override the defaults.
*/
if (!smp_read_mpc(phys_to_virt(mpf->physptr), early)) {
if (!smp_read_mpc(mpc, early)) {
#ifdef CONFIG_X86_LOCAL_APIC
smp_found_config = 0;
#endif
printk(KERN_ERR
"BIOS bug, MP table errors detected!...\n");
printk(KERN_ERR "... disabling SMP support. "
"(tell your hw vendor)\n");
early_iounmap(mpc, size);
return;
}
early_iounmap(mpc, size);

if (early)
return;
Expand Down Expand Up @@ -697,10 +716,10 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,

if (!reserve)
return 1;
reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE,
reserve_bootmem_generic(virt_to_phys(mpf), sizeof(*mpf),
BOOTMEM_DEFAULT);
if (mpf->physptr) {
unsigned long size = PAGE_SIZE;
unsigned long size = get_mpc_size(mpf->physptr);
#ifdef CONFIG_X86_32
/*
* We cannot access to MPC table to compute
Expand Down
4 changes: 3 additions & 1 deletion arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ struct ist_info ist_info;
#endif

#else
struct cpuinfo_x86 boot_cpu_data __read_mostly;
struct cpuinfo_x86 boot_cpu_data __read_mostly = {
.x86_phys_bits = MAX_PHYSMEM_BITS,
};
EXPORT_SYMBOL(boot_cpu_data);
#endif

Expand Down
9 changes: 0 additions & 9 deletions arch/x86/mm/highmem_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ EXPORT_SYMBOL(kunmap);
EXPORT_SYMBOL(kmap_atomic);
EXPORT_SYMBOL(kunmap_atomic);

#ifdef CONFIG_NUMA
void __init set_highmem_pages_init(void)
{
struct zone *zone;
Expand All @@ -182,11 +181,3 @@ void __init set_highmem_pages_init(void)
}
totalram_pages += totalhigh_pages;
}
#else
void __init set_highmem_pages_init(void)
{
add_highpages_with_active_regions(0, highstart_pfn, highend_pfn);

totalram_pages += totalhigh_pages;
}
#endif /* CONFIG_NUMA */
Loading

0 comments on commit 28e93a0

Please sign in to comment.