Skip to content

Commit 6045f24

Browse files
chenhuacaiamalon
authored andcommitted
MIPS: Loongson fix name confict - MEM_RESERVED
MEM_RESERVED is used as a value of enum mem_type in include/linux/ edac.h. This will make failure to build for Loongson in some case: for example with CONFIG_RAS enabled. So here rename MEM_RESERVED to SYSTEM_RAM_RESERVED in Loongson code. Signed-off-by: YunQiang Su <yunqiang.su@imgtec.com> Signed-off-by: Huacai Chen <chenhc@lemote.com> Reviewed-by: James Hogan <jhogan@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17724/ Signed-off-by: James Hogan <jhogan@kernel.org>
1 parent 6507831 commit 6045f24

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arch/mips/include/asm/mach-loongson64/boot_param.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#define SYSTEM_RAM_LOW 1
66
#define SYSTEM_RAM_HIGH 2
7-
#define MEM_RESERVED 3
7+
#define SYSTEM_RAM_RESERVED 3
88
#define PCI_IO 4
99
#define PCI_MEM 5
1010
#define LOONGSON_CFG_REG 6

arch/mips/loongson64/common/mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void __init prom_init_memory(void)
7979
(u64)loongson_memmap->map[i].mem_size << 20,
8080
BOOT_MEM_RAM);
8181
break;
82-
case MEM_RESERVED:
82+
case SYSTEM_RAM_RESERVED:
8383
add_memory_region(loongson_memmap->map[i].mem_start,
8484
(u64)loongson_memmap->map[i].mem_size << 20,
8585
BOOT_MEM_RESERVED);

arch/mips/loongson64/loongson-3/numa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static void __init szmem(unsigned int node)
166166
memblock_add_node(PFN_PHYS(start_pfn),
167167
PFN_PHYS(end_pfn - start_pfn), node);
168168
break;
169-
case MEM_RESERVED:
169+
case SYSTEM_RAM_RESERVED:
170170
pr_info("Node%d: mem_type:%d, mem_start:0x%llx, mem_size:0x%llx MB\n",
171171
(u32)node_id, mem_type, mem_start, mem_size);
172172
add_memory_region((node_id << 44) + mem_start,

0 commit comments

Comments
 (0)