Re: [PATCH v2 2/2] pseries/hotplug-memory: leverage xarray API to simplify code

2020-02-21 Thread Nathan Lynch
Hi Scott, Scott Cheloha writes: > -#define for_each_drmem_lmb_in_range(lmb, start, end) \ > - for ((lmb) = (start); (lmb) <= (end); (lmb)++) > - > -#define for_each_drmem_lmb(lmb) \ > - for_each_drmem_lmb_in_range((lmb), \

[PATCH v2 2/2] pseries/hotplug-memory: leverage xarray API to simplify code

2020-02-21 Thread Scott Cheloha
The xarray API has entry marking (xa_set_mark/xa_clear_mark) and a range-based iterator (xa_for_each_range), so there is no need for the pseries hotplug code to maintain its own implementation of these features. This patch introduces an xarray of drmem_lmb structures indexed by each LMB's DRC inde