mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
msm: Add low power mode for dynamic memory managment.
Add Low Power mode TAG. Add new API's for mem lowpower modes. Create new sys file for mem low power modes. Set SECTION_SIZE_BITS to 28. Change NPA_MEMORY_NODE_NAME to "/mem/apps/ddr_dpd". Fix NPA node create function to do atomic_inc() in atomic_dec_and_test() failure case. Change-Id: Ia5cb18b99338c43165d5401e619c773cd8d6b3f6 Signed-off-by: Larry Bassel <lbassel@codeaurora.org> (cherry picked from commit b054046e708f8c5b044e76c2df6f72fd607be558) Conflicts: arch/arm/include/asm/setup.h arch/arm/kernel/setup.c arch/arm/mach-msm/include/mach/memory.h arch/arm/mach-msm/memory.c drivers/base/memory.c include/linux/memory_hotplug.h
This commit is contained in:
parent
8a57f81411
commit
e188e3e5cb
2 changed files with 14 additions and 2 deletions
|
@ -12,6 +12,9 @@ struct pglist_data;
|
|||
struct mem_section;
|
||||
struct memory_block;
|
||||
|
||||
extern unsigned long movable_reserved_start, movable_reserved_size;
|
||||
extern unsigned long low_power_memory_start, low_power_memory_size;
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
|
||||
/*
|
||||
|
@ -263,3 +266,5 @@ extern int physical_remove_memory(u64 start, u64 size);
|
|||
extern int arch_physical_remove_memory(u64 start, u64 size);
|
||||
extern int physical_low_power_memory(u64 start, u64 size);
|
||||
extern int arch_physical_low_power_memory(u64 start, u64 size);
|
||||
extern int physical_active_memory(u64 start, u64 size);
|
||||
extern int arch_physical_active_memory(u64 start, u64 size);
|
||||
|
|
|
@ -1178,7 +1178,6 @@ int __ref physical_remove_memory(u64 start, u64 size)
|
|||
res = kzalloc(sizeof(struct resource), GFP_KERNEL);
|
||||
BUG_ON(!res);
|
||||
|
||||
/* call arch's memory hotremove */
|
||||
ret = arch_physical_remove_memory(start, size);
|
||||
if (ret) {
|
||||
kfree(res);
|
||||
|
@ -1199,11 +1198,19 @@ int __ref physical_remove_memory(u64 start, u64 size)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(physical_remove_memory);
|
||||
|
||||
int __ref physical_active_memory(u64 start, u64 size)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = arch_physical_active_memory(start, size);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(physical_active_memory);
|
||||
|
||||
int __ref physical_low_power_memory(u64 start, u64 size)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* call arch's memory low power routine */
|
||||
ret = arch_physical_low_power_memory(start, size);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue