HomeFreeBSD

nvme: MPS is a power of two, not a size / 8k

Description

nvme: MPS is a power of two, not a size / 8k

Setting MPS in the CC should be a power of 2 number (it specifies the
page size of the host is 2^(12+MPS)), so adjust the calcuation. There is
no functional change because we do not support any architecutres != 4k
pages (yet). Other changes are needed for architectures with 16k or 64k
pages, especially when the underlying NVMe drive doesn't support that
page size (Most drives support a range that's small, and many only
support 4k), but let's at least do this calculation correctly. 12 - 12
is just as much 0 as 4096 >> 13 is :)

Sponsored by: Netflix
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D34707

Details

Provenance
impAuthored on Mar 29 2022, 7:21 PM
Reviewer
mav
Differential Revision
D34707: nvme: MPS is a power of two
Parents
rGab71bbb75a92: acpica: Import ACPICA 20220331
Branches
Unknown
Tags
Unknown