All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/memremap: Drop unused SECTION_SIZE and SECTION_MASK
@ 2019-09-24  8:00 Anshuman Khandual
  2019-09-24  8:35 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Anshuman Khandual @ 2019-09-24  8:00 UTC (permalink / raw)
  To: linux-mm
  Cc: Anshuman Khandual, Dan Williams, Andrew Morton, Jason Gunthorpe,
	Logan Gunthorpe, Ira Weiny, linux-kernel

SECTION_SIZE and SECTION_MASK macros are not getting used anymore. But they
do conflict with existing definitions on arm64 platform causing following
warning during build. Lets drop these unused macros.

mm/memremap.c:16: warning: "SECTION_MASK" redefined
 #define SECTION_MASK ~((1UL << PA_SECTION_SHIFT) - 1)

In file included from ./arch/arm64/include/asm/processor.h:34,
                 from ./include/linux/mutex.h:19,
                 from ./include/linux/kernfs.h:12,
                 from ./include/linux/sysfs.h:16,
                 from ./include/linux/kobject.h:20,
                 from ./include/linux/device.h:16,
                 from mm/memremap.c:3:
./arch/arm64/include/asm/pgtable-hwdef.h:79: note: this is the location of
the previous definition
 #define SECTION_MASK  (~(SECTION_SIZE-1))

mm/memremap.c:17: warning: "SECTION_SIZE" redefined
 #define SECTION_SIZE (1UL << PA_SECTION_SHIFT)

In file included from ./arch/arm64/include/asm/processor.h:34,
                 from ./include/linux/mutex.h:19,
                 from ./include/linux/kernfs.h:12,
                 from ./include/linux/sysfs.h:16,
                 from ./include/linux/kobject.h:20,
                 from ./include/linux/device.h:16,
                 from mm/memremap.c:3:
./arch/arm64/include/asm/pgtable-hwdef.h:78: note: this is the location of
the previous definition
 #define SECTION_SIZE  (_AC(1, UL) << SECTION_SHIFT)

Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Logan Gunthorpe <logang@deltatee.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: linux-kernel@vger.kernel.org
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
Build and boot tested on arm64 platform with ZONE_DEVICE enabled. But
only boot tested on arm64 and some other platforms with allmodconfig.

 mm/memremap.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/memremap.c b/mm/memremap.c
index f6c17339cd0d..bf2882bfbf48 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -13,8 +13,6 @@
 #include <linux/xarray.h>
 
 static DEFINE_XARRAY(pgmap_array);
-#define SECTION_MASK ~((1UL << PA_SECTION_SHIFT) - 1)
-#define SECTION_SIZE (1UL << PA_SECTION_SHIFT)
 
 #ifdef CONFIG_DEV_PAGEMAP_OPS
 DEFINE_STATIC_KEY_FALSE(devmap_managed_key);
-- 
2.20.1


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

* Re: [PATCH] mm/memremap: Drop unused SECTION_SIZE and SECTION_MASK
  2019-09-24  8:00 [PATCH] mm/memremap: Drop unused SECTION_SIZE and SECTION_MASK Anshuman Khandual
@ 2019-09-24  8:35 ` David Hildenbrand
  0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2019-09-24  8:35 UTC (permalink / raw)
  To: Anshuman Khandual, linux-mm
  Cc: Dan Williams, Andrew Morton, Jason Gunthorpe, Logan Gunthorpe,
	Ira Weiny, linux-kernel

On 24.09.19 10:00, Anshuman Khandual wrote:
> SECTION_SIZE and SECTION_MASK macros are not getting used anymore. But they
> do conflict with existing definitions on arm64 platform causing following
> warning during build. Lets drop these unused macros.
> 
> mm/memremap.c:16: warning: "SECTION_MASK" redefined
>  #define SECTION_MASK ~((1UL << PA_SECTION_SHIFT) - 1)
> 
> In file included from ./arch/arm64/include/asm/processor.h:34,
>                  from ./include/linux/mutex.h:19,
>                  from ./include/linux/kernfs.h:12,
>                  from ./include/linux/sysfs.h:16,
>                  from ./include/linux/kobject.h:20,
>                  from ./include/linux/device.h:16,
>                  from mm/memremap.c:3:
> ./arch/arm64/include/asm/pgtable-hwdef.h:79: note: this is the location of
> the previous definition
>  #define SECTION_MASK  (~(SECTION_SIZE-1))
> 
> mm/memremap.c:17: warning: "SECTION_SIZE" redefined
>  #define SECTION_SIZE (1UL << PA_SECTION_SHIFT)
> 
> In file included from ./arch/arm64/include/asm/processor.h:34,
>                  from ./include/linux/mutex.h:19,
>                  from ./include/linux/kernfs.h:12,
>                  from ./include/linux/sysfs.h:16,
>                  from ./include/linux/kobject.h:20,
>                  from ./include/linux/device.h:16,
>                  from mm/memremap.c:3:
> ./arch/arm64/include/asm/pgtable-hwdef.h:78: note: this is the location of
> the previous definition
>  #define SECTION_SIZE  (_AC(1, UL) << SECTION_SHIFT)
> 
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Logan Gunthorpe <logang@deltatee.com>
> Cc: Ira Weiny <ira.weiny@intel.com>
> Cc: linux-kernel@vger.kernel.org
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> Build and boot tested on arm64 platform with ZONE_DEVICE enabled. But
> only boot tested on arm64 and some other platforms with allmodconfig.
> 
>  mm/memremap.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/mm/memremap.c b/mm/memremap.c
> index f6c17339cd0d..bf2882bfbf48 100644
> --- a/mm/memremap.c
> +++ b/mm/memremap.c
> @@ -13,8 +13,6 @@
>  #include <linux/xarray.h>
>  
>  static DEFINE_XARRAY(pgmap_array);
> -#define SECTION_MASK ~((1UL << PA_SECTION_SHIFT) - 1)
> -#define SECTION_SIZE (1UL << PA_SECTION_SHIFT)
>  
>  #ifdef CONFIG_DEV_PAGEMAP_OPS
>  DEFINE_STATIC_KEY_FALSE(devmap_managed_key);
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb

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

end of thread, other threads:[~2019-09-24  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24  8:00 [PATCH] mm/memremap: Drop unused SECTION_SIZE and SECTION_MASK Anshuman Khandual
2019-09-24  8:35 ` David Hildenbrand

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.