MIPS: Octeon: Rename upper case variables at setup time.
Rename upper case variables. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Acked-by: David Daney <david.daney@cavium.com> Cc: Sivasubramanian Palanisamy <sivasubramanian.palanisamy@nokia.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13352/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
4c0f5a7124
commit
fd6ecf42fb
@@ -65,7 +65,8 @@ EXPORT_SYMBOL(octeon_should_swizzle_table);
|
|||||||
extern void pci_console_init(const char *arg);
|
extern void pci_console_init(const char *arg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned long long MAX_MEMORY = ULLONG_MAX;
|
static unsigned long long max_memory = ULLONG_MAX;
|
||||||
|
static unsigned long long reserve_low_mem;
|
||||||
|
|
||||||
DEFINE_SEMAPHORE(octeon_bootbus_sem);
|
DEFINE_SEMAPHORE(octeon_bootbus_sem);
|
||||||
EXPORT_SYMBOL(octeon_bootbus_sem);
|
EXPORT_SYMBOL(octeon_bootbus_sem);
|
||||||
@@ -75,7 +76,6 @@ struct octeon_boot_descriptor *octeon_boot_desc_ptr;
|
|||||||
struct cvmx_bootinfo *octeon_bootinfo;
|
struct cvmx_bootinfo *octeon_bootinfo;
|
||||||
EXPORT_SYMBOL(octeon_bootinfo);
|
EXPORT_SYMBOL(octeon_bootinfo);
|
||||||
|
|
||||||
static unsigned long long RESERVE_LOW_MEM = 0ull;
|
|
||||||
#ifdef CONFIG_KEXEC
|
#ifdef CONFIG_KEXEC
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
/*
|
/*
|
||||||
@@ -125,18 +125,18 @@ static void kexec_bootmem_init(uint64_t mem_size, uint32_t low_reserved_bytes)
|
|||||||
bootmem_desc->major_version = CVMX_BOOTMEM_DESC_MAJ_VER;
|
bootmem_desc->major_version = CVMX_BOOTMEM_DESC_MAJ_VER;
|
||||||
bootmem_desc->minor_version = CVMX_BOOTMEM_DESC_MIN_VER;
|
bootmem_desc->minor_version = CVMX_BOOTMEM_DESC_MIN_VER;
|
||||||
|
|
||||||
addr = (OCTEON_DDR0_BASE + RESERVE_LOW_MEM + low_reserved_bytes);
|
addr = (OCTEON_DDR0_BASE + reserve_low_mem + low_reserved_bytes);
|
||||||
bootmem_desc->head_addr = 0;
|
bootmem_desc->head_addr = 0;
|
||||||
|
|
||||||
if (mem_size <= OCTEON_DDR0_SIZE) {
|
if (mem_size <= OCTEON_DDR0_SIZE) {
|
||||||
__cvmx_bootmem_phy_free(addr,
|
__cvmx_bootmem_phy_free(addr,
|
||||||
mem_size - RESERVE_LOW_MEM -
|
mem_size - reserve_low_mem -
|
||||||
low_reserved_bytes, 0);
|
low_reserved_bytes, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
__cvmx_bootmem_phy_free(addr,
|
__cvmx_bootmem_phy_free(addr,
|
||||||
OCTEON_DDR0_SIZE - RESERVE_LOW_MEM -
|
OCTEON_DDR0_SIZE - reserve_low_mem -
|
||||||
low_reserved_bytes, 0);
|
low_reserved_bytes, 0);
|
||||||
|
|
||||||
mem_size -= OCTEON_DDR0_SIZE;
|
mem_size -= OCTEON_DDR0_SIZE;
|
||||||
@@ -846,15 +846,15 @@ void __init prom_init(void)
|
|||||||
|
|
||||||
/* Default to 64MB in the simulator to speed things up */
|
/* Default to 64MB in the simulator to speed things up */
|
||||||
if (octeon_is_simulation())
|
if (octeon_is_simulation())
|
||||||
MAX_MEMORY = 64ull << 20;
|
max_memory = 64ull << 20;
|
||||||
|
|
||||||
arg = strstr(arcs_cmdline, "mem=");
|
arg = strstr(arcs_cmdline, "mem=");
|
||||||
if (arg) {
|
if (arg) {
|
||||||
MAX_MEMORY = memparse(arg + 4, &p);
|
max_memory = memparse(arg + 4, &p);
|
||||||
if (MAX_MEMORY == 0)
|
if (max_memory == 0)
|
||||||
MAX_MEMORY = 32ull << 30;
|
max_memory = 32ull << 30;
|
||||||
if (*p == '@')
|
if (*p == '@')
|
||||||
RESERVE_LOW_MEM = memparse(p + 1, &p);
|
reserve_low_mem = memparse(p + 1, &p);
|
||||||
}
|
}
|
||||||
|
|
||||||
arcs_cmdline[0] = 0;
|
arcs_cmdline[0] = 0;
|
||||||
@@ -864,11 +864,11 @@ void __init prom_init(void)
|
|||||||
cvmx_phys_to_ptr(octeon_boot_desc_ptr->argv[i]);
|
cvmx_phys_to_ptr(octeon_boot_desc_ptr->argv[i]);
|
||||||
if ((strncmp(arg, "MEM=", 4) == 0) ||
|
if ((strncmp(arg, "MEM=", 4) == 0) ||
|
||||||
(strncmp(arg, "mem=", 4) == 0)) {
|
(strncmp(arg, "mem=", 4) == 0)) {
|
||||||
MAX_MEMORY = memparse(arg + 4, &p);
|
max_memory = memparse(arg + 4, &p);
|
||||||
if (MAX_MEMORY == 0)
|
if (max_memory == 0)
|
||||||
MAX_MEMORY = 32ull << 30;
|
max_memory = 32ull << 30;
|
||||||
if (*p == '@')
|
if (*p == '@')
|
||||||
RESERVE_LOW_MEM = memparse(p + 1, &p);
|
reserve_low_mem = memparse(p + 1, &p);
|
||||||
#ifdef CONFIG_KEXEC
|
#ifdef CONFIG_KEXEC
|
||||||
} else if (strncmp(arg, "crashkernel=", 12) == 0) {
|
} else if (strncmp(arg, "crashkernel=", 12) == 0) {
|
||||||
crashk_size = memparse(arg+12, &p);
|
crashk_size = memparse(arg+12, &p);
|
||||||
@@ -957,13 +957,13 @@ void __init plat_mem_setup(void)
|
|||||||
* to consistently work.
|
* to consistently work.
|
||||||
*/
|
*/
|
||||||
mem_alloc_size = 4 << 20;
|
mem_alloc_size = 4 << 20;
|
||||||
if (mem_alloc_size > MAX_MEMORY)
|
if (mem_alloc_size > max_memory)
|
||||||
mem_alloc_size = MAX_MEMORY;
|
mem_alloc_size = max_memory;
|
||||||
|
|
||||||
/* Crashkernel ignores bootmem list. It relies on mem=X@Y option */
|
/* Crashkernel ignores bootmem list. It relies on mem=X@Y option */
|
||||||
#ifdef CONFIG_CRASH_DUMP
|
#ifdef CONFIG_CRASH_DUMP
|
||||||
add_memory_region(RESERVE_LOW_MEM, MAX_MEMORY, BOOT_MEM_RAM);
|
add_memory_region(reserve_low_mem, max_memory, BOOT_MEM_RAM);
|
||||||
total += MAX_MEMORY;
|
total += max_memory;
|
||||||
#else
|
#else
|
||||||
#ifdef CONFIG_KEXEC
|
#ifdef CONFIG_KEXEC
|
||||||
if (crashk_size > 0) {
|
if (crashk_size > 0) {
|
||||||
@@ -978,7 +978,7 @@ void __init plat_mem_setup(void)
|
|||||||
*/
|
*/
|
||||||
cvmx_bootmem_lock();
|
cvmx_bootmem_lock();
|
||||||
while ((boot_mem_map.nr_map < BOOT_MEM_MAP_MAX)
|
while ((boot_mem_map.nr_map < BOOT_MEM_MAP_MAX)
|
||||||
&& (total < MAX_MEMORY)) {
|
&& (total < max_memory)) {
|
||||||
memory = cvmx_bootmem_phy_alloc(mem_alloc_size,
|
memory = cvmx_bootmem_phy_alloc(mem_alloc_size,
|
||||||
__pa_symbol(&_end), -1,
|
__pa_symbol(&_end), -1,
|
||||||
0x100000,
|
0x100000,
|
||||||
|
Reference in New Issue
Block a user