Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,9 @@ void __init setup_arch(char **cmdline_p)
high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1;
#endif

/*[x86_64] [mm] [Junwei]: x86 will split the memeory map(from e820) by 4G(1<<32)*/
printk(KERN_INFO "%s: max_pfn=%lu(%lx), max_low_pfn=%lu(%lx), highmem=%p\n",
__func__, max_pfn, max_pfn, max_low_pfn, max_low_pfn, high_memory);
/*
* Find and reserve possible boot-time SMP configuration:
*/
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/setup_percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ void __init setup_per_cpu_areas(void)
if (pcpu_chosen_fc == PCPU_FC_AUTO && pcpu_need_numa())
pcpu_chosen_fc = PCPU_FC_PAGE;
#endif
printk(KERN_INFO "%s: pcpu_chosen_fc=%d\n", __FUNCTION__, pcpu_chosen_fc);
rc = -EINVAL;
if (pcpu_chosen_fc != PCPU_FC_PAGE) {
const size_t dyn_size = PERCPU_MODULE_RESERVE +
Expand Down
1 change: 1 addition & 0 deletions arch/x86/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
end_pfn = ((pos + (PMD_SIZE - 1))>>PMD_SHIFT)
<< (PMD_SHIFT - PAGE_SHIFT);
#else /* CONFIG_X86_64 */
/*[x86_64][mm]] let end_pfn align with 1<<PMD_SHIT*/
end_pfn = ((pos + (PMD_SIZE - 1)) >> PMD_SHIFT)
<< (PMD_SHIFT - PAGE_SHIFT);
#endif
Expand Down
2 changes: 2 additions & 0 deletions include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ static __always_inline void *lowmem_page_address(const struct page *page)
return __va(PFN_PHYS(page_to_pfn(page)));
}

/*[x86_64][mm] CONFIG_HIGHMEM and WANT_PAGE_VIRTUAL is NOT defined for X86_64*/
#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
#define HASHED_PAGE_VIRTUAL
#endif
Expand All @@ -760,6 +761,7 @@ void set_page_address(struct page *page, void *virtual);
void page_address_init(void);
#endif

/*[x86_64][mm] X86_64 uses this branch. */
#if !defined(HASHED_PAGE_VIRTUAL) && !defined(WANT_PAGE_VIRTUAL)
#define page_address(page) lowmem_page_address(page)
#define set_page_address(page, address) do { } while(0)
Expand Down
2 changes: 2 additions & 0 deletions linux.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
make J=2
7 changes: 7 additions & 0 deletions mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2356,6 +2356,13 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets,
unsigned long base, start, end, last_end;
bool purged = false;

{
int i;
for (i=0; i<nr_vms; i++) {
printk(KERN_ERR "%s: offsets[%d]=%d, size[%d]=%d\n",
__FUNCTION__, i, offsets[i], i, sizes[i], i);
}
}
/* verify parameters and allocate data structures */
BUG_ON(align & ~PAGE_MASK || !is_power_of_2(align));
for (last_area = 0, area = 0; area < nr_vms; area++) {
Expand Down