Currently the kmem driver can be built as a module, and I don't
need to drop that flexibility. What about wrapping these core
...into a common exported (gpl) helper like:
int try_remove_memory(int nid, struct resource *res)
Because as far as I can see there's nothing device-dax specific about
this "try remove iff offline" functionality outside of looking up the
related 'struct resource'. The check_devdax_mem_offlined_cb callback
can be made generic if the callback argument is the resource pointer.
Makes sense, I will do both things that you suggested.