Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6d70f4c authored by Vinayak Menon's avatar Vinayak Menon
Browse files

Revert "mm/memblock: disable local irqs while late memblock changes"



This reverts commit a87081cf.
The reverted patch is part of the unused no-map-fixup feature which is
being removed.

Change-Id: I95c78f62e4c73a9a79a85afa30796c28d946b465
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent 14943829
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -181,16 +181,15 @@ static void removed_region_fixup(struct removed_region *dma_mem, int index)
{
	unsigned long fixup_size;
	unsigned long base_pfn;
	unsigned long flags;

	if (index > dma_mem->nr_pages)
		return;

	/* carve-out */
	flags = memblock_region_resize_late_begin();
	memblock_region_resize_late_begin();
	memblock_free(dma_mem->base, dma_mem->nr_pages * PAGE_SIZE);
	memblock_remove(dma_mem->base, index * PAGE_SIZE);
	memblock_region_resize_late_end(flags);
	memblock_region_resize_late_end();

	/* clear page-mappings */
	base_pfn = dma_mem->base >> PAGE_SHIFT;
+2 −2
Original line number Diff line number Diff line
@@ -90,8 +90,8 @@ int memblock_mark_mirror(phys_addr_t base, phys_addr_t size);
int memblock_mark_nomap(phys_addr_t base, phys_addr_t size);
int memblock_clear_nomap(phys_addr_t base, phys_addr_t size);
ulong choose_memblock_flags(void);
unsigned long memblock_region_resize_late_begin(void);
void memblock_region_resize_late_end(unsigned long flags);
void memblock_region_resize_late_begin(void);
void memblock_region_resize_late_end(void);

/* Low level functions */
int memblock_add_range(struct memblock_type *type,
+5 −11
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@
#include <linux/memblock.h>
#include <linux/preempt.h>
#include <linux/seqlock.h>
#include <linux/irqflags.h>

#include <asm/sections.h>
#include <linux/io.h>
@@ -1773,35 +1772,30 @@ void __init memblock_allow_resize(void)
	memblock_can_resize = 1;
}

static unsigned long __init_memblock
memblock_resize_late(int begin, unsigned long flags)
static void __init_memblock memblock_resize_late(int begin)
{
	static int memblock_can_resize_old;

	if (begin) {
		preempt_disable();
		local_irq_save(flags);
		memblock_can_resize_old = memblock_can_resize;
		memblock_can_resize = 0;
		raw_write_seqcount_begin(&memblock_seq);
	} else {
		raw_write_seqcount_end(&memblock_seq);
		memblock_can_resize = memblock_can_resize_old;
		local_irq_restore(flags);
		preempt_enable();
	}

	return flags;
}

unsigned long __init_memblock memblock_region_resize_late_begin(void)
void __init_memblock memblock_region_resize_late_begin(void)
{
	return memblock_resize_late(1, 0);
	memblock_resize_late(1);
}

void __init_memblock memblock_region_resize_late_end(unsigned long flags)
void __init_memblock memblock_region_resize_late_end(void)
{
	memblock_resize_late(0, flags);
	memblock_resize_late(0);
}

static int __init early_memblock(char *p)