Skip to content
  • Ohad Ben-Cohen's avatar
    remoteproc: allocate vrings on demand, free when not needed · 6db20ea8
    Ohad Ben-Cohen authored
    
    
    Dynamically allocate the vrings' DMA when the remote processor
    is about to be powered on (i.e. when ->find_vqs() is invoked),
    and release them as soon as it is powered off (i.e. when ->del_vqs()
    is invoked).
    
    The obvious and immediate benefit is better memory utilization, since
    memory for the vrings is now only allocated when the relevant remote
    processor is used.
    
    Additionally, this approach also makes recovery of a (crashing)
    remote processor easier: one just needs to remove the relevant
    vdevs, and the entire vrings cleanup takes place automagically.
    
    Tested-by: default avatarFernando Guzman Lugo <fernando.lugo@ti.com>
    Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
    6db20ea8