Merge branch 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (74 commits) x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S xen: Cope with unmapped pages when initializing kernel pagetable memblock, bootmem: Round pfn properly for memory and reserved regions memblock: Annotate memblock functions with __init_memblock memblock: Allow memblock_init to be called early memblock/arm: Fix memblock_region_is_memory() typo x86, memblock: Remove __memblock_x86_find_in_range_size() memblock: Fix wraparound in find_region() x86-32, memblock: Make add_highpages honor early reserved ranges x86, memblock: Fix crashkernel allocation arm, memblock: Fix the sparsemem build memblock: Fix section mismatch warnings powerpc, memblock: Fix memblock API change fallout memblock, microblaze: Fix memblock API change fallout x86: Remove old bootmem code x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve x86: Remove not used early_res code x86, memblock: Replace e820_/_early string with memblock_ x86: Use memblock to replace early_res x86, memblock: Use memblock_debug to control debug message print out ... Fix up trivial conflicts in arch/x86/kernel/setup.c and kernel/Makefile
This commit is contained in:
@@ -923,11 +923,7 @@ initial_mmu:
|
||||
mtspr SPRN_PID,r0
|
||||
sync
|
||||
|
||||
/* Configure and load two entries into TLB slots 62 and 63.
|
||||
* In case we are pinning TLBs, these are reserved in by the
|
||||
* other TLB functions. If not reserving, then it doesn't
|
||||
* matter where they are loaded.
|
||||
*/
|
||||
/* Configure and load one entry into TLB slots 63 */
|
||||
clrrwi r4,r4,10 /* Mask off the real page number */
|
||||
ori r4,r4,(TLB_WR | TLB_EX) /* Set the write and execute bits */
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ void __init allocate_pacas(void)
|
||||
* the first segment. On iSeries they must be within the area mapped
|
||||
* by the HV, which is HvPagesToMap * HVPAGESIZE bytes.
|
||||
*/
|
||||
limit = min(0x10000000ULL, memblock.rmo_size);
|
||||
limit = min(0x10000000ULL, ppc64_rma_size);
|
||||
if (firmware_has_feature(FW_FEATURE_ISERIES))
|
||||
limit = min(limit, HvPagesToMap * HVPAGESIZE);
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
int __initdata iommu_is_off;
|
||||
int __initdata iommu_force_on;
|
||||
unsigned long tce_alloc_start, tce_alloc_end;
|
||||
u64 ppc64_rma_size;
|
||||
#endif
|
||||
|
||||
static int __init early_parse_mem(char *p)
|
||||
@@ -98,7 +99,7 @@ static void __init move_device_tree(void)
|
||||
|
||||
if ((memory_limit && (start + size) > memory_limit) ||
|
||||
overlaps_crashkernel(start, size)) {
|
||||
p = __va(memblock_alloc_base(size, PAGE_SIZE, memblock.rmo_size));
|
||||
p = __va(memblock_alloc(size, PAGE_SIZE));
|
||||
memcpy(p, initial_boot_params, size);
|
||||
initial_boot_params = (struct boot_param_header *)p;
|
||||
DBG("Moved device tree to 0x%p\n", p);
|
||||
@@ -492,7 +493,7 @@ static int __init early_init_dt_scan_memory_ppc(unsigned long node,
|
||||
|
||||
void __init early_init_dt_add_memory_arch(u64 base, u64 size)
|
||||
{
|
||||
#if defined(CONFIG_PPC64)
|
||||
#ifdef CONFIG_PPC64
|
||||
if (iommu_is_off) {
|
||||
if (base >= 0x80000000ul)
|
||||
return;
|
||||
@@ -501,9 +502,13 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
|
||||
}
|
||||
#endif
|
||||
|
||||
memblock_add(base, size);
|
||||
|
||||
/* First MEMBLOCK added, do some special initializations */
|
||||
if (memstart_addr == ~(phys_addr_t)0)
|
||||
setup_initial_memory_limit(base, size);
|
||||
memstart_addr = min((u64)memstart_addr, base);
|
||||
|
||||
/* Add the chunk to the MEMBLOCK list */
|
||||
memblock_add(base, size);
|
||||
}
|
||||
|
||||
u64 __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
|
||||
@@ -655,7 +660,6 @@ static void __init phyp_dump_reserve_mem(void)
|
||||
static inline void __init phyp_dump_reserve_mem(void) {}
|
||||
#endif /* CONFIG_PHYP_DUMP && CONFIG_PPC_RTAS */
|
||||
|
||||
|
||||
void __init early_init_devtree(void *params)
|
||||
{
|
||||
phys_addr_t limit;
|
||||
@@ -683,6 +687,7 @@ void __init early_init_devtree(void *params)
|
||||
|
||||
/* Scan memory nodes and rebuild MEMBLOCKs */
|
||||
memblock_init();
|
||||
|
||||
of_scan_flat_dt(early_init_dt_scan_root, NULL);
|
||||
of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL);
|
||||
|
||||
|
||||
@@ -969,7 +969,7 @@ void __init rtas_initialize(void)
|
||||
*/
|
||||
#ifdef CONFIG_PPC64
|
||||
if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) {
|
||||
rtas_region = min(memblock.rmo_size, RTAS_INSTANTIATE_MAX);
|
||||
rtas_region = min(ppc64_rma_size, RTAS_INSTANTIATE_MAX);
|
||||
ibm_suspend_me_token = rtas_token("ibm,suspend-me");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -246,7 +246,7 @@ static void __init irqstack_early_init(void)
|
||||
unsigned int i;
|
||||
|
||||
/* interrupt stacks must be in lowmem, we get that for free on ppc32
|
||||
* as the memblock is limited to lowmem by MEMBLOCK_REAL_LIMIT */
|
||||
* as the memblock is limited to lowmem by default */
|
||||
for_each_possible_cpu(i) {
|
||||
softirq_ctx[i] = (struct thread_info *)
|
||||
__va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
|
||||
|
||||
@@ -486,7 +486,7 @@ static void __init emergency_stack_init(void)
|
||||
* bringup, we need to get at them in real mode. This means they
|
||||
* must also be within the RMO region.
|
||||
*/
|
||||
limit = min(slb0_limit(), memblock.rmo_size);
|
||||
limit = min(slb0_limit(), ppc64_rma_size);
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
unsigned long sp;
|
||||
|
||||
Reference in New Issue
Block a user