* [PATCH 1/2] MIPS: OCTEON: take all memory into use by default
@ 2016-05-24 14:09 Aaro Koskinen
2016-05-24 14:09 ` [PATCH 2/2] MIPS: OCTEON: setup: rename upper case variables Aaro Koskinen
2016-05-24 18:10 ` [PATCH 1/2] MIPS: OCTEON: take all memory into use by default David Daney
0 siblings, 2 replies; 4+ messages in thread
From: Aaro Koskinen @ 2016-05-24 14:09 UTC (permalink / raw)
To: David Daney, Ralf Baechle, linux-mips; +Cc: Sivasubramanian Palanisamy
Take all memory into use by default, instead of limiting to 512 MB.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
This supersedes this patch: http://marc.info/?t=146401648900005&r=1&w=2
arch/mips/cavium-octeon/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index cd7101f..53c1234 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -49,7 +49,7 @@ extern struct plat_smp_ops octeon_smp_ops;
extern void pci_console_init(const char *arg);
#endif
-static unsigned long long MAX_MEMORY = 512ull << 20;
+static unsigned long long MAX_MEMORY = ULLONG_MAX;
DEFINE_SEMAPHORE(octeon_bootbus_sem);
EXPORT_SYMBOL(octeon_bootbus_sem);
--
2.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] MIPS: OCTEON: setup: rename upper case variables
2016-05-24 14:09 [PATCH 1/2] MIPS: OCTEON: take all memory into use by default Aaro Koskinen
@ 2016-05-24 14:09 ` Aaro Koskinen
2016-05-24 18:08 ` David Daney
2016-05-24 18:10 ` [PATCH 1/2] MIPS: OCTEON: take all memory into use by default David Daney
1 sibling, 1 reply; 4+ messages in thread
From: Aaro Koskinen @ 2016-05-24 14:09 UTC (permalink / raw)
To: David Daney, Ralf Baechle, linux-mips; +Cc: Sivasubramanian Palanisamy
Rename upper case variables.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
arch/mips/cavium-octeon/setup.c | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index 53c1234..8719cbf 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -49,7 +49,8 @@ extern struct plat_smp_ops octeon_smp_ops;
extern void pci_console_init(const char *arg);
#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);
EXPORT_SYMBOL(octeon_bootbus_sem);
@@ -59,7 +60,6 @@ struct octeon_boot_descriptor *octeon_boot_desc_ptr;
struct cvmx_bootinfo *octeon_bootinfo;
EXPORT_SYMBOL(octeon_bootinfo);
-static unsigned long long RESERVE_LOW_MEM = 0ull;
#ifdef CONFIG_KEXEC
#ifdef CONFIG_SMP
/*
@@ -109,18 +109,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->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;
if (mem_size <= OCTEON_DDR0_SIZE) {
__cvmx_bootmem_phy_free(addr,
- mem_size - RESERVE_LOW_MEM -
+ mem_size - reserve_low_mem -
low_reserved_bytes, 0);
return;
}
__cvmx_bootmem_phy_free(addr,
- OCTEON_DDR0_SIZE - RESERVE_LOW_MEM -
+ OCTEON_DDR0_SIZE - reserve_low_mem -
low_reserved_bytes, 0);
mem_size -= OCTEON_DDR0_SIZE;
@@ -799,15 +799,15 @@ void __init prom_init(void)
/* Default to 64MB in the simulator to speed things up */
if (octeon_is_simulation())
- MAX_MEMORY = 64ull << 20;
+ max_memory = 64ull << 20;
arg = strstr(arcs_cmdline, "mem=");
if (arg) {
- MAX_MEMORY = memparse(arg + 4, &p);
- if (MAX_MEMORY == 0)
- MAX_MEMORY = 32ull << 30;
+ max_memory = memparse(arg + 4, &p);
+ if (max_memory == 0)
+ max_memory = 32ull << 30;
if (*p == '@')
- RESERVE_LOW_MEM = memparse(p + 1, &p);
+ reserve_low_mem = memparse(p + 1, &p);
}
arcs_cmdline[0] = 0;
@@ -817,11 +817,11 @@ void __init prom_init(void)
cvmx_phys_to_ptr(octeon_boot_desc_ptr->argv[i]);
if ((strncmp(arg, "MEM=", 4) == 0) ||
(strncmp(arg, "mem=", 4) == 0)) {
- MAX_MEMORY = memparse(arg + 4, &p);
- if (MAX_MEMORY == 0)
- MAX_MEMORY = 32ull << 30;
+ max_memory = memparse(arg + 4, &p);
+ if (max_memory == 0)
+ max_memory = 32ull << 30;
if (*p == '@')
- RESERVE_LOW_MEM = memparse(p + 1, &p);
+ reserve_low_mem = memparse(p + 1, &p);
#ifdef CONFIG_KEXEC
} else if (strncmp(arg, "crashkernel=", 12) == 0) {
crashk_size = memparse(arg+12, &p);
@@ -910,13 +910,13 @@ void __init plat_mem_setup(void)
* to consistently work.
*/
mem_alloc_size = 4 << 20;
- if (mem_alloc_size > MAX_MEMORY)
- mem_alloc_size = MAX_MEMORY;
+ if (mem_alloc_size > max_memory)
+ mem_alloc_size = max_memory;
/* Crashkernel ignores bootmem list. It relies on mem=X@Y option */
#ifdef CONFIG_CRASH_DUMP
- add_memory_region(RESERVE_LOW_MEM, MAX_MEMORY, BOOT_MEM_RAM);
- total += MAX_MEMORY;
+ add_memory_region(reserve_low_mem, max_memory, BOOT_MEM_RAM);
+ total += max_memory;
#else
#ifdef CONFIG_KEXEC
if (crashk_size > 0) {
@@ -931,7 +931,7 @@ void __init plat_mem_setup(void)
*/
cvmx_bootmem_lock();
while ((boot_mem_map.nr_map < BOOT_MEM_MAP_MAX)
- && (total < MAX_MEMORY)) {
+ && (total < max_memory)) {
memory = cvmx_bootmem_phy_alloc(mem_alloc_size,
__pa_symbol(&_end), -1,
0x100000,
--
2.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] MIPS: OCTEON: setup: rename upper case variables
2016-05-24 14:09 ` [PATCH 2/2] MIPS: OCTEON: setup: rename upper case variables Aaro Koskinen
@ 2016-05-24 18:08 ` David Daney
0 siblings, 0 replies; 4+ messages in thread
From: David Daney @ 2016-05-24 18:08 UTC (permalink / raw)
To: Aaro Koskinen, Ralf Baechle; +Cc: linux-mips, Sivasubramanian Palanisamy
On 05/24/2016 07:09 AM, Aaro Koskinen wrote:
> Rename upper case variables.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Acked-by: David Daney <david.daney@cavium.com>
> ---
> arch/mips/cavium-octeon/setup.c | 38 +++++++++++++++++++-------------------
> 1 file changed, 19 insertions(+), 19 deletions(-)
>
[...]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] MIPS: OCTEON: take all memory into use by default
2016-05-24 14:09 [PATCH 1/2] MIPS: OCTEON: take all memory into use by default Aaro Koskinen
2016-05-24 14:09 ` [PATCH 2/2] MIPS: OCTEON: setup: rename upper case variables Aaro Koskinen
@ 2016-05-24 18:10 ` David Daney
1 sibling, 0 replies; 4+ messages in thread
From: David Daney @ 2016-05-24 18:10 UTC (permalink / raw)
To: Aaro Koskinen, Ralf Baechle; +Cc: linux-mips, Sivasubramanian Palanisamy
On 05/24/2016 07:09 AM, Aaro Koskinen wrote:
> Take all memory into use by default, instead of limiting to 512 MB.
>
> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Thanks for doing this. I haven't tested it, but I think it is a good idea:
Acked-by: David Daney <david.daney@cavium.com>
> ---
>
> This supersedes this patch: http://marc.info/?t=146401648900005&r=1&w=2
>
> arch/mips/cavium-octeon/setup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
> index cd7101f..53c1234 100644
> --- a/arch/mips/cavium-octeon/setup.c
> +++ b/arch/mips/cavium-octeon/setup.c
> @@ -49,7 +49,7 @@ extern struct plat_smp_ops octeon_smp_ops;
> extern void pci_console_init(const char *arg);
> #endif
>
> -static unsigned long long MAX_MEMORY = 512ull << 20;
> +static unsigned long long MAX_MEMORY = ULLONG_MAX;
>
> DEFINE_SEMAPHORE(octeon_bootbus_sem);
> EXPORT_SYMBOL(octeon_bootbus_sem);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-24 18:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-24 14:09 [PATCH 1/2] MIPS: OCTEON: take all memory into use by default Aaro Koskinen
2016-05-24 14:09 ` [PATCH 2/2] MIPS: OCTEON: setup: rename upper case variables Aaro Koskinen
2016-05-24 18:08 ` David Daney
2016-05-24 18:10 ` [PATCH 1/2] MIPS: OCTEON: take all memory into use by default David Daney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox