As was mentioned by Dan[1] cxl_memdev_state stores values which are only
used during device probe. This clutters the data structure and is a
hindrance on code maintenance. Those values are best handled with
temporary variables.
Adjust the query of memory devices to read byte sizes in one call which
takes partition information into account. Use the values to create
partitions for device state initialization. Take care to separate the
mailbox queries from the initialization of device state to steer the
mbox code toward taking mailbox objects rather than memdev states.
Update spec references while changing these calls.
Link: https://lore.kernel.org/all/67871f05cd767_20f32947f@xxxxxxxxxxxxxxxxxxxxxxxxx.notmuch/ [1]
Signed-off-by: Ira Weiny <ira.weiny@xxxxxxxxx>