Dave Jiang wrote: > When the CXL region is formed, the driver would computed the performance s/would computed/computes/ ...fixed that up locally. > data for the region. However this data is not available at the node data > collection that has been populated by the HMAT during kernel > initialization. Add a memory hotplug notifier to update the access > coordinates to the 'struct memory_target' context kept by the > HMAT_REPORTING code. > > Add CXL_CALLBACK_PRI for a memory hotplug callback priority. Set the > priority number to be called before HMAT_CALLBACK_PRI. The CXL update must > happen before hmat_callback(). > > A new HMAT_REPORTING helper hmat_update_target_coordinates() is added in > order to allow CXL to update the memory_target access coordinates. > > A new ext_updated member is added to the memory_target to indicate that > the access coordinates within the memory_target has been updated by an > external agent such as CXL. This prevents data being overwritten by the > hmat_update_target_attrs() triggered by hmat_callback(). > > Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> > Cc: Rafael J. Wysocki <rafael@xxxxxxxxxx> > Reviewed-by: "Huang, Ying" <ying.huang@xxxxxxxxx> > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > Tested-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx> > --- > v7: > - Fix typo in commit log (Jonathan) > - Move memory_notifier registration to devm_cxl_add_region(). (Dan) With that change, looks good.