• Matthew R. Ochs's avatar
    cxlflash: Split out context initialization · 5e6632d1
    Matthew R. Ochs authored
    Presently, context information structures are allocated and
    initialized in the same routine, create_context(). This imposes
    an ordering restriction such that all pieces of information needed
    to initialize a context must be known before the context is even
    allocated.
    
    This design point is not flexible when the order of context
    creation needs to be modified. Specifically, this can lead to
    problems when members of the context information structure are
    a part of an ordering dependency (i.e. - the 'work' structure
    embedded within the context).
    
    To remedy, the allocation is left as-is, inside of the existing
    create_context() routine and the initialization is transitioned
    to a new void routine, init_context(). At the same time, in
    anticipation of these routines not being called in sequence, a
    state boolean is added to the context information structure to
    track when the context has been initilized. The context teardown
    routine, destroy_context(), is modified to support being called
    with a non-initialized context.
    Signed-off-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
    Reviewed-by: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    5e6632d1
superpipe.c 59.5 KB