All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] MIPS: Loongson fix name confict - MEM_RESERVED
@ 2017-11-16  8:35 Huacai Chen
  2018-01-24 13:32 ` James Hogan
  2018-02-01 16:20 ` James Hogan
  0 siblings, 2 replies; 3+ messages in thread
From: Huacai Chen @ 2017-11-16  8:35 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: James Hogan, Steven J . Hill, linux-mips, Fuxin Zhang,
	Zhangjin Wu, Huacai Chen, YunQiang Su

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>
---
 arch/mips/include/asm/mach-loongson64/boot_param.h | 2 +-
 arch/mips/loongson64/common/mem.c                  | 2 +-
 arch/mips/loongson64/loongson-3/numa.c             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h
index 4f69f08..8c286be 100644
--- a/arch/mips/include/asm/mach-loongson64/boot_param.h
+++ b/arch/mips/include/asm/mach-loongson64/boot_param.h
@@ -4,7 +4,7 @@
 
 #define SYSTEM_RAM_LOW		1
 #define SYSTEM_RAM_HIGH		2
-#define MEM_RESERVED		3
+#define SYSTEM_RAM_RESERVED	3
 #define PCI_IO			4
 #define PCI_MEM			5
 #define LOONGSON_CFG_REG	6
diff --git a/arch/mips/loongson64/common/mem.c b/arch/mips/loongson64/common/mem.c
index b01d524..c549e52 100644
--- a/arch/mips/loongson64/common/mem.c
+++ b/arch/mips/loongson64/common/mem.c
@@ -79,7 +79,7 @@ void __init prom_init_memory(void)
 					(u64)loongson_memmap->map[i].mem_size << 20,
 					BOOT_MEM_RAM);
 				break;
-			case MEM_RESERVED:
+			case SYSTEM_RAM_RESERVED:
 				add_memory_region(loongson_memmap->map[i].mem_start,
 					(u64)loongson_memmap->map[i].mem_size << 20,
 					BOOT_MEM_RESERVED);
diff --git a/arch/mips/loongson64/loongson-3/numa.c b/arch/mips/loongson64/loongson-3/numa.c
index f17ef52..9717106 100644
--- a/arch/mips/loongson64/loongson-3/numa.c
+++ b/arch/mips/loongson64/loongson-3/numa.c
@@ -166,7 +166,7 @@ static void __init szmem(unsigned int node)
 			memblock_add_node(PFN_PHYS(start_pfn),
 				PFN_PHYS(end_pfn - start_pfn), node);
 			break;
-		case MEM_RESERVED:
+		case SYSTEM_RAM_RESERVED:
 			pr_info("Node%d: mem_type:%d, mem_start:0x%llx, mem_size:0x%llx MB\n",
 				(u32)node_id, mem_type, mem_start, mem_size);
 			add_memory_region((node_id << 44) + mem_start,
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] MIPS: Loongson fix name confict - MEM_RESERVED
  2017-11-16  8:35 [PATCH 1/2] MIPS: Loongson fix name confict - MEM_RESERVED Huacai Chen
@ 2018-01-24 13:32 ` James Hogan
  2018-02-01 16:20 ` James Hogan
  1 sibling, 0 replies; 3+ messages in thread
From: James Hogan @ 2018-01-24 13:32 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Ralf Baechle, Steven J . Hill, linux-mips, Fuxin Zhang,
	Zhangjin Wu, YunQiang Su

[-- Attachment #1: Type: text/plain, Size: 2460 bytes --]

On Thu, Nov 16, 2017 at 04:35:04PM +0800, Huacai Chen wrote:
> 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>

Cheers
James

> ---
>  arch/mips/include/asm/mach-loongson64/boot_param.h | 2 +-
>  arch/mips/loongson64/common/mem.c                  | 2 +-
>  arch/mips/loongson64/loongson-3/numa.c             | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h
> index 4f69f08..8c286be 100644
> --- a/arch/mips/include/asm/mach-loongson64/boot_param.h
> +++ b/arch/mips/include/asm/mach-loongson64/boot_param.h
> @@ -4,7 +4,7 @@
>  
>  #define SYSTEM_RAM_LOW		1
>  #define SYSTEM_RAM_HIGH		2
> -#define MEM_RESERVED		3
> +#define SYSTEM_RAM_RESERVED	3
>  #define PCI_IO			4
>  #define PCI_MEM			5
>  #define LOONGSON_CFG_REG	6
> diff --git a/arch/mips/loongson64/common/mem.c b/arch/mips/loongson64/common/mem.c
> index b01d524..c549e52 100644
> --- a/arch/mips/loongson64/common/mem.c
> +++ b/arch/mips/loongson64/common/mem.c
> @@ -79,7 +79,7 @@ void __init prom_init_memory(void)
>  					(u64)loongson_memmap->map[i].mem_size << 20,
>  					BOOT_MEM_RAM);
>  				break;
> -			case MEM_RESERVED:
> +			case SYSTEM_RAM_RESERVED:
>  				add_memory_region(loongson_memmap->map[i].mem_start,
>  					(u64)loongson_memmap->map[i].mem_size << 20,
>  					BOOT_MEM_RESERVED);
> diff --git a/arch/mips/loongson64/loongson-3/numa.c b/arch/mips/loongson64/loongson-3/numa.c
> index f17ef52..9717106 100644
> --- a/arch/mips/loongson64/loongson-3/numa.c
> +++ b/arch/mips/loongson64/loongson-3/numa.c
> @@ -166,7 +166,7 @@ static void __init szmem(unsigned int node)
>  			memblock_add_node(PFN_PHYS(start_pfn),
>  				PFN_PHYS(end_pfn - start_pfn), node);
>  			break;
> -		case MEM_RESERVED:
> +		case SYSTEM_RAM_RESERVED:
>  			pr_info("Node%d: mem_type:%d, mem_start:0x%llx, mem_size:0x%llx MB\n",
>  				(u32)node_id, mem_type, mem_start, mem_size);
>  			add_memory_region((node_id << 44) + mem_start,
> -- 
> 2.7.0
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] MIPS: Loongson fix name confict - MEM_RESERVED
  2017-11-16  8:35 [PATCH 1/2] MIPS: Loongson fix name confict - MEM_RESERVED Huacai Chen
  2018-01-24 13:32 ` James Hogan
@ 2018-02-01 16:20 ` James Hogan
  1 sibling, 0 replies; 3+ messages in thread
From: James Hogan @ 2018-02-01 16:20 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Ralf Baechle, Steven J . Hill, linux-mips, Fuxin Zhang,
	Zhangjin Wu, YunQiang Su

[-- Attachment #1: Type: text/plain, Size: 2442 bytes --]

On Thu, Nov 16, 2017 at 04:35:04PM +0800, Huacai Chen wrote:
> 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>

Applied to my 4.16 branch.

Thanks
James

> ---
>  arch/mips/include/asm/mach-loongson64/boot_param.h | 2 +-
>  arch/mips/loongson64/common/mem.c                  | 2 +-
>  arch/mips/loongson64/loongson-3/numa.c             | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h
> index 4f69f08..8c286be 100644
> --- a/arch/mips/include/asm/mach-loongson64/boot_param.h
> +++ b/arch/mips/include/asm/mach-loongson64/boot_param.h
> @@ -4,7 +4,7 @@
>  
>  #define SYSTEM_RAM_LOW		1
>  #define SYSTEM_RAM_HIGH		2
> -#define MEM_RESERVED		3
> +#define SYSTEM_RAM_RESERVED	3
>  #define PCI_IO			4
>  #define PCI_MEM			5
>  #define LOONGSON_CFG_REG	6
> diff --git a/arch/mips/loongson64/common/mem.c b/arch/mips/loongson64/common/mem.c
> index b01d524..c549e52 100644
> --- a/arch/mips/loongson64/common/mem.c
> +++ b/arch/mips/loongson64/common/mem.c
> @@ -79,7 +79,7 @@ void __init prom_init_memory(void)
>  					(u64)loongson_memmap->map[i].mem_size << 20,
>  					BOOT_MEM_RAM);
>  				break;
> -			case MEM_RESERVED:
> +			case SYSTEM_RAM_RESERVED:
>  				add_memory_region(loongson_memmap->map[i].mem_start,
>  					(u64)loongson_memmap->map[i].mem_size << 20,
>  					BOOT_MEM_RESERVED);
> diff --git a/arch/mips/loongson64/loongson-3/numa.c b/arch/mips/loongson64/loongson-3/numa.c
> index f17ef52..9717106 100644
> --- a/arch/mips/loongson64/loongson-3/numa.c
> +++ b/arch/mips/loongson64/loongson-3/numa.c
> @@ -166,7 +166,7 @@ static void __init szmem(unsigned int node)
>  			memblock_add_node(PFN_PHYS(start_pfn),
>  				PFN_PHYS(end_pfn - start_pfn), node);
>  			break;
> -		case MEM_RESERVED:
> +		case SYSTEM_RAM_RESERVED:
>  			pr_info("Node%d: mem_type:%d, mem_start:0x%llx, mem_size:0x%llx MB\n",
>  				(u32)node_id, mem_type, mem_start, mem_size);
>  			add_memory_region((node_id << 44) + mem_start,
> -- 
> 2.7.0
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-01 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16  8:35 [PATCH 1/2] MIPS: Loongson fix name confict - MEM_RESERVED Huacai Chen
2018-01-24 13:32 ` James Hogan
2018-02-01 16:20 ` James Hogan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.