All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvdimm: use 'u64' for pfn flags
@ 2016-02-22 21:58 ` Arnd Bergmann
  0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2016-02-22 21:58 UTC (permalink / raw)
  To: Dan Williams
  Cc: linux-arm-kernel, Arnd Bergmann, Stuart Foster, Julian Margetson,
	Andrew Morton, linux-mm, Ross Zwisler, linux-nvdimm,
	linux-kernel

A recent bugfix changed pfn_t to always be 64-bit wide, but did not
change the code in pmem.c, which is now broken on 32-bit architectures
as reported by gcc:

In file included from ../drivers/nvdimm/pmem.c:28:0:
drivers/nvdimm/pmem.c: In function 'pmem_alloc':
include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
 #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))

This changes the intermediate pfn_flags in struct pmem_device to
be 64 bit wide as well, so they can store the flags correctly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: db78c22230d0 ("mm: fix pfn_t vs highmem")
---
 drivers/nvdimm/pmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 7edf31671dab..8d0b54670184 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -41,7 +41,7 @@ struct pmem_device {
 	phys_addr_t		phys_addr;
 	/* when non-zero this device is hosting a 'pfn' instance */
 	phys_addr_t		data_offset;
-	unsigned long		pfn_flags;
+	u64			pfn_flags;
 	void __pmem		*virt_addr;
 	size_t			size;
 	struct badblocks	bb;
-- 
2.7.0

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

* [PATCH] nvdimm: use 'u64' for pfn flags
@ 2016-02-22 21:58 ` Arnd Bergmann
  0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2016-02-22 21:58 UTC (permalink / raw)
  To: Dan Williams
  Cc: linux-arm-kernel, Arnd Bergmann, Stuart Foster, Julian Margetson,
	Andrew Morton, linux-mm, Ross Zwisler, linux-nvdimm,
	linux-kernel

A recent bugfix changed pfn_t to always be 64-bit wide, but did not
change the code in pmem.c, which is now broken on 32-bit architectures
as reported by gcc:

In file included from ../drivers/nvdimm/pmem.c:28:0:
drivers/nvdimm/pmem.c: In function 'pmem_alloc':
include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
 #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))

This changes the intermediate pfn_flags in struct pmem_device to
be 64 bit wide as well, so they can store the flags correctly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: db78c22230d0 ("mm: fix pfn_t vs highmem")
---
 drivers/nvdimm/pmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 7edf31671dab..8d0b54670184 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -41,7 +41,7 @@ struct pmem_device {
 	phys_addr_t		phys_addr;
 	/* when non-zero this device is hosting a 'pfn' instance */
 	phys_addr_t		data_offset;
-	unsigned long		pfn_flags;
+	u64			pfn_flags;
 	void __pmem		*virt_addr;
 	size_t			size;
 	struct badblocks	bb;
-- 
2.7.0

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

* [PATCH] nvdimm: use 'u64' for pfn flags
@ 2016-02-22 21:58 ` Arnd Bergmann
  0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2016-02-22 21:58 UTC (permalink / raw)
  To: Dan Williams
  Cc: linux-arm-kernel, Arnd Bergmann, Stuart Foster, Julian Margetson,
	Andrew Morton, linux-mm, Ross Zwisler, linux-nvdimm,
	linux-kernel

A recent bugfix changed pfn_t to always be 64-bit wide, but did not
change the code in pmem.c, which is now broken on 32-bit architectures
as reported by gcc:

In file included from ../drivers/nvdimm/pmem.c:28:0:
drivers/nvdimm/pmem.c: In function 'pmem_alloc':
include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
 #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))

This changes the intermediate pfn_flags in struct pmem_device to
be 64 bit wide as well, so they can store the flags correctly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: db78c22230d0 ("mm: fix pfn_t vs highmem")
---
 drivers/nvdimm/pmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 7edf31671dab..8d0b54670184 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -41,7 +41,7 @@ struct pmem_device {
 	phys_addr_t		phys_addr;
 	/* when non-zero this device is hosting a 'pfn' instance */
 	phys_addr_t		data_offset;
-	unsigned long		pfn_flags;
+	u64			pfn_flags;
 	void __pmem		*virt_addr;
 	size_t			size;
 	struct badblocks	bb;
-- 
2.7.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH] nvdimm: use 'u64' for pfn flags
@ 2016-02-22 21:58 ` Arnd Bergmann
  0 siblings, 0 replies; 7+ messages in thread
From: Arnd Bergmann @ 2016-02-22 21:58 UTC (permalink / raw)
  To: linux-arm-kernel

A recent bugfix changed pfn_t to always be 64-bit wide, but did not
change the code in pmem.c, which is now broken on 32-bit architectures
as reported by gcc:

In file included from ../drivers/nvdimm/pmem.c:28:0:
drivers/nvdimm/pmem.c: In function 'pmem_alloc':
include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
 #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))

This changes the intermediate pfn_flags in struct pmem_device to
be 64 bit wide as well, so they can store the flags correctly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: db78c22230d0 ("mm: fix pfn_t vs highmem")
---
 drivers/nvdimm/pmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 7edf31671dab..8d0b54670184 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -41,7 +41,7 @@ struct pmem_device {
 	phys_addr_t		phys_addr;
 	/* when non-zero this device is hosting a 'pfn' instance */
 	phys_addr_t		data_offset;
-	unsigned long		pfn_flags;
+	u64			pfn_flags;
 	void __pmem		*virt_addr;
 	size_t			size;
 	struct badblocks	bb;
-- 
2.7.0

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

* Re: [PATCH] nvdimm: use 'u64' for pfn flags
  2016-02-22 21:58 ` Arnd Bergmann
  (?)
@ 2016-02-22 22:19   ` Dan Williams
  -1 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2016-02-22 22:19 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Stuart Foster, Julian Margetson, Andrew Morton,
	Linux MM, Ross Zwisler, linux-nvdimm, linux-kernel

On Mon, Feb 22, 2016 at 1:58 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> A recent bugfix changed pfn_t to always be 64-bit wide, but did not
> change the code in pmem.c, which is now broken on 32-bit architectures
> as reported by gcc:
>
> In file included from ../drivers/nvdimm/pmem.c:28:0:
> drivers/nvdimm/pmem.c: In function 'pmem_alloc':
> include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
>  #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
>
> This changes the intermediate pfn_flags in struct pmem_device to
> be 64 bit wide as well, so they can store the flags correctly.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: db78c22230d0 ("mm: fix pfn_t vs highmem")

Thanks Arnd, I'll roll this up.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] nvdimm: use 'u64' for pfn flags
@ 2016-02-22 22:19   ` Dan Williams
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2016-02-22 22:19 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Stuart Foster, Julian Margetson, Andrew Morton,
	Linux MM, Ross Zwisler, linux-nvdimm@lists.01.org, linux-kernel

On Mon, Feb 22, 2016 at 1:58 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> A recent bugfix changed pfn_t to always be 64-bit wide, but did not
> change the code in pmem.c, which is now broken on 32-bit architectures
> as reported by gcc:
>
> In file included from ../drivers/nvdimm/pmem.c:28:0:
> drivers/nvdimm/pmem.c: In function 'pmem_alloc':
> include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
>  #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
>
> This changes the intermediate pfn_flags in struct pmem_device to
> be 64 bit wide as well, so they can store the flags correctly.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: db78c22230d0 ("mm: fix pfn_t vs highmem")

Thanks Arnd, I'll roll this up.

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

* [PATCH] nvdimm: use 'u64' for pfn flags
@ 2016-02-22 22:19   ` Dan Williams
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Williams @ 2016-02-22 22:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 22, 2016 at 1:58 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> A recent bugfix changed pfn_t to always be 64-bit wide, but did not
> change the code in pmem.c, which is now broken on 32-bit architectures
> as reported by gcc:
>
> In file included from ../drivers/nvdimm/pmem.c:28:0:
> drivers/nvdimm/pmem.c: In function 'pmem_alloc':
> include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
>  #define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
>
> This changes the intermediate pfn_flags in struct pmem_device to
> be 64 bit wide as well, so they can store the flags correctly.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: db78c22230d0 ("mm: fix pfn_t vs highmem")

Thanks Arnd, I'll roll this up.

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

end of thread, other threads:[~2016-02-22 22:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 21:58 [PATCH] nvdimm: use 'u64' for pfn flags Arnd Bergmann
2016-02-22 21:58 ` Arnd Bergmann
2016-02-22 21:58 ` Arnd Bergmann
2016-02-22 21:58 ` Arnd Bergmann
2016-02-22 22:19 ` Dan Williams
2016-02-22 22:19   ` Dan Williams
2016-02-22 22:19   ` Dan Williams

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.