Re: [PATCH v4 3/9] mm/memory_hotplug: export mhp_get_default_online_type
From: David Hildenbrand (Arm)
Date: Tue Jun 09 2026 - 06:01:16 EST
On 6/5/26 23:19, Gregory Price wrote:
> Drivers which may pass hotplug policy down to DAX need MMOP_ symbols
> and the mhp_get_default_online_type function for hotplug use cases.
>
> Some drivers (cxl) co-mingle their hotplug and devdax use-cases into
> the same driver code, and chose the dax_kmem path as the default driver
> path - making it difficult to require hotplug as a predicate to building
> the overall driver (it may break other non-hotplug use-cases).
>
> Export mhp_get_default_online_type function to allow these drivers to
> build when hotplug is disabled and still use the DAX use case.
>
> In the built-out case we simply return MMOP_OFFLINE as it's
Ah, you mean without CONFIG_MEMORY_HOTPLUG
> non-destructive. The internal function can never return -1 either,
> so we choose this to allow for defining the function with 'enum mmop'.
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David