Skip to content
  • Jon Hunter's avatar
    irqchip/gic: Isolate early GIC initialisation code · d6ce564c
    Jon Hunter authored
    
    
    To re-use the code that initialises the GIC (found in
    __gic_init_bases()), from within a platform driver, it is necessary to
    move the code from the __init section so that it is always present and
    not removed. Unfortunately, it is not possible to simply drop the __init
    from the function declaration for __gic_init_bases() because it contains
    calls to set_smp_cross_call() and set_handle_irq() which are both
    located in the __init section. Fortunately, these calls are only
    required for the root controller and because the initial platform driver
    will only support non-root controllers that can be initialised later in
    the boot process, we can move these calls to another function.
    
    Move the bulk of the code from __gic_init_bases() to a new function
    called gic_init_bases() which is not located in the __init section and
    can be used by the platform driver. Update __gic_init_bases() to call
    gic_init_bases() and if necessary, set_smp_cross_call() and
    set_handle_irq().
    
    Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    d6ce564c