All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lightnvm: clear reserved bit on generic addr
@ 2016-05-11 12:08 Javier González
  2016-05-25  7:11 ` Matias Bjørling
  0 siblings, 1 reply; 2+ messages in thread
From: Javier González @ 2016-05-11 12:08 UTC (permalink / raw)
  To: mb; +Cc: linux-kernel, linux-block, Javier González

When an address is converted from device to generic mode, the reserved
bit needs to be cleared in order to signal that the address points to a
flash block, not to a cacheline on the write buffer.

Signed-off-by: Javier González <javier@cnexlabs.com>
---
 include/linux/lightnvm.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 45be892..3d2c380 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -418,6 +418,9 @@ static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev,
 	l.g.ch |= (r.ppa >> dev->ppaf.ch_offset) &
 					(((1 << dev->ppaf.ch_len) - 1));
 
+	/* On device side, reserved bit is always 0 */
+	l.g.reserved = 0;
+
 	return l;
 }
 
-- 
2.5.0


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

* Re: [PATCH] lightnvm: clear reserved bit on generic addr
  2016-05-11 12:08 [PATCH] lightnvm: clear reserved bit on generic addr Javier González
@ 2016-05-25  7:11 ` Matias Bjørling
  0 siblings, 0 replies; 2+ messages in thread
From: Matias Bjørling @ 2016-05-25  7:11 UTC (permalink / raw)
  To: Javier González; +Cc: linux-kernel, linux-block, Javier González

On 05/11/2016 02:08 PM, Javier González wrote:
> When an address is converted from device to generic mode, the reserved
> bit needs to be cleared in order to signal that the address points to a
> flash block, not to a cacheline on the write buffer.
>
> Signed-off-by: Javier González <javier@cnexlabs.com>
> ---
>   include/linux/lightnvm.h | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
> index 45be892..3d2c380 100644
> --- a/include/linux/lightnvm.h
> +++ b/include/linux/lightnvm.h
> @@ -418,6 +418,9 @@ static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev,
>   	l.g.ch |= (r.ppa >> dev->ppaf.ch_offset) &
>   					(((1 << dev->ppaf.ch_len) - 1));
>
> +	/* On device side, reserved bit is always 0 */
> +	l.g.reserved = 0;
> +
>   	return l;
>   }
>
>

Thanks Javier. Applied for 4.8. I have changed it to l.ppa = 0 and 
updated the description a bit.

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

end of thread, other threads:[~2016-05-25  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 12:08 [PATCH] lightnvm: clear reserved bit on generic addr Javier González
2016-05-25  7:11 ` Matias Bjørling

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.