ARM: tegra: reserve PSTORE memory daily-2014.06.03.0_l4t/l4t-r19.3 tegra-l4t-r19-er-2014-05-20
Sumit Singh [Fri, 31 Jan 2014 14:08:07 +0000 (19:08 +0530)]
Configure to reserve memory for PSTORE ftrace and console
as 1MB each.

Bug 1449479

Change-Id: I5392d3f1aee81aa02c09108a562085278d5ad39b
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Reviewed-on: http://git-master/r/362430
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
(cherry picked from commit bcb186075677a767c07a89b3bde1f34cc0d788ee)
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/408433
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

arch/arm/mach-tegra/common.c

index 8536ed5..f4961dd 100644 (file)
 #define   ADDR_BNDRY(x)        (((x) & 0xf) << 21)
 #define   INACTIVITY_TIMEOUT(x)        (((x) & 0xffff) << 0)
 
+#ifdef CONFIG_PSTORE_RAM
+#define RAMOOPS_MEM_SIZE SZ_2M
+#define FTRACE_MEM_SIZE SZ_1M
+#endif
+
 phys_addr_t tegra_bootloader_fb_start;
 phys_addr_t tegra_bootloader_fb_size;
 phys_addr_t tegra_bootloader_fb2_start;
@@ -1846,7 +1851,8 @@ static void __init tegra_reserve_ramoops_memory(unsigned long reserve_size)
 {
        ramoops_data.mem_size = reserve_size;
        ramoops_data.mem_address = memblock_end_of_4G() - reserve_size;
-       ramoops_data.console_size = reserve_size;
+       ramoops_data.console_size = reserve_size - FTRACE_MEM_SIZE;
+       ramoops_data.ftrace_size = FTRACE_MEM_SIZE;
        ramoops_data.dump_oops = 1;
        memblock_reserve(ramoops_data.mem_address, ramoops_data.mem_size);
 }
@@ -2155,7 +2161,7 @@ void __init tegra_reserve(unsigned long carveout_size, unsigned long fb_size,
 
        tegra_fb_linear_set(map);
 #ifdef CONFIG_PSTORE_RAM
-       tegra_reserve_ramoops_memory(SZ_1M);
+       tegra_reserve_ramoops_memory(RAMOOPS_MEM_SIZE);
 #endif
 }