[PATCH 09/10] UBUNTU: SAUCE: Add definitions for NVME_CTRL_PAGE_(SHIFT|SIZE)

Stefan Bader stefan.bader at canonical.com
Fri Sep 17 08:34:56 UTC 2021


On 17.09.21 07:48, Khalid Elmously wrote:
> BugLink: https://bugs.launchpad.net/bugs/1943902
> 
> Those defines were added in mainline
>    6c3c05b087ada8947cd31895f67e433070446234
> 
> Only the definitions are needed not the whole patch, so I am
> including that part as SAUCE
> 
> Signed-off-by: Khalid Elmously <khalid.elmously at canonical.com>
> ---

I am a bit worried about adding those defines. The upstream change basically 
addresses that the page size could be different. Having those defines but not 
the code in the background might lead to the false impression that other parts 
could change the definition and work with that alternative size.
Maybe in that case it would be safer to make the next patch a backport and hard 
code the 4k there.

-Stefan

>   drivers/nvme/host/nvme.h | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
> index 2df90d4355b9a..1c62ec1662f47 100644
> --- a/drivers/nvme/host/nvme.h
> +++ b/drivers/nvme/host/nvme.h
> @@ -28,6 +28,16 @@ extern unsigned int admin_timeout;
>   #define NVME_DEFAULT_KATO	5
>   #define NVME_KATO_GRACE		10
>   
> +
> +/*
> + * Default to a 4K page size, with the intention to update this
> + * path in the future to accommodate architectures with differing
> + * kernel and IO page sizes.
> + */
> +#define NVME_CTRL_PAGE_SHIFT   12
> +#define NVME_CTRL_PAGE_SIZE    (1 << NVME_CTRL_PAGE_SHIFT)
> +
> +
>   extern struct workqueue_struct *nvme_wq;
>   extern struct workqueue_struct *nvme_reset_wq;
>   extern struct workqueue_struct *nvme_delete_wq;
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20210917/cb8a6809/attachment.sig>


More information about the kernel-team mailing list