summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2015-11-02 17:12:27 +0100
committerJens Axboe <axboe@fb.com>2015-11-03 09:53:24 -0700
commitb7ceb7d50048d0dd4830f106f0fb7f5424031598 (patch)
tree63907b30b02b8ca1cb6c6ea108114a696a6ffff2 /include/linux
parentca0640850e43f5f80c6029e2895b119b705f23bd (diff)
lightnvm: refactor phys addrs type to u64
For cases where CONFIG_LBDAF is not set. The struct ppa_addr exceeds its type on 32 bit architectures. ppa_addr requires a 64bit integer to hold the generic ppa format. We therefore refactor it to u64 and replaces the sector_t usages with u64 for physical addresses. Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/lightnvm.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 122b176600fa..5ebd70d12f35 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -134,26 +134,26 @@ struct ppa_addr {
union {
/* Channel-based PPA format in nand 4x2x2x2x8x10 */
struct {
- sector_t ch : 4;
- sector_t sec : 2; /* 4 sectors per page */
- sector_t pl : 2; /* 4 planes per LUN */
- sector_t lun : 2; /* 4 LUNs per channel */
- sector_t pg : 8; /* 256 pages per block */
- sector_t blk : 10;/* 1024 blocks per plane */
- sector_t resved : 36;
+ u64 ch : 4;
+ u64 sec : 2; /* 4 sectors per page */
+ u64 pl : 2; /* 4 planes per LUN */
+ u64 lun : 2; /* 4 LUNs per channel */
+ u64 pg : 8; /* 256 pages per block */
+ u64 blk : 10;/* 1024 blocks per plane */
+ u64 resved : 36;
} chnl;
/* Generic structure for all addresses */
struct {
- sector_t sec : NVM_SEC_BITS;
- sector_t pl : NVM_PL_BITS;
- sector_t pg : NVM_PG_BITS;
- sector_t blk : NVM_BLK_BITS;
- sector_t lun : NVM_LUN_BITS;
- sector_t ch : NVM_CH_BITS;
+ u64 sec : NVM_SEC_BITS;
+ u64 pl : NVM_PL_BITS;
+ u64 pg : NVM_PG_BITS;
+ u64 blk : NVM_BLK_BITS;
+ u64 lun : NVM_LUN_BITS;
+ u64 ch : NVM_CH_BITS;
} g;
- sector_t ppa;
+ u64 ppa;
};
} __packed;