Thread (9 messages) flat view 9 messages, 4 authors, 2021-06-16

Re: [PATCH v1 1/1] powerpc/papr_scm: Properly handle UUID types and API

From: Vaibhav Jain <hidden>
Date: 2021-04-16 15:07:43
Also in: lkml

Andy Shevchenko [off-list ref] writes:
On Thu, Apr 15, 2021 at 8:10 PM Vaibhav Jain [off-list ref] wrote:
quoted

Thanks for the patch Andy,

Unfortunately ran into a compilation issue due to missing "#include
<asm/unaligned.h>" that provides definition for
get_unaligned_le64(). Gcc reported following error:

error: implicit declaration of function ‘get_unaligned_le64’
Right, I have not tested it (as mentioned in the comments to the patch)
quoted
After including the necessary header file, kernel compiled fine and I
was able to test & verify the patch.
Thank you very much for the testing.

I'm not sure what the coverage of your test is.
Your patch updates the way the interleaved set-cookies are populated in
papr_scm which are then used to populate label entry for a namespace. I
verified that the reported region setcookie hasnt changed for an nvdimm
region before and after applying your patch for both BE and LE variants:

# 64-bit Little endian kernel before applying the patch
$ sudo cat /sys/devices/ndbus0/region0/set_cookie
0x8b6b26cbc930e2b5

# 64-bit Little endian kernel after applying your patch
$ sudo cat /sys/devices/ndbus0/region0/set_cookie
0x8b6b26cbc930e2b5

# 64-bit Big endian kernel before applying your patch
$ sudo cat /sys/devices/ndbus0/region0/set_cookie
0x8b6b26cbc930e2b5

# 64-bit Big endian kernel after applying your patch
$ sudo cat /sys/devices/ndbus0/region0/set_cookie
0x8b6b26cbc930e2b5
That's why I have an
additional question below. Is the byte ordering kept the same in BE
(32- and 64-bit) cases? Because I'm worrying that I might have missed
something.
Libnvdimm store these cookies in label area as little endian values and
based on the results above I think we are good.

-- 
With Best Regards,
Andy Shevchenko
-- 
Cheers
~ Vaibhav
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help