• Ahmed S. Darwish's avatar
    scsi: hisi_sas: Pass gfp_t flags to libsas event notifiers · 26c7efc3
    Ahmed S. Darwish authored
    Use the new libsas event notifiers API, which requires callers to
    explicitly pass the gfp_t memory allocation flags.
    
    Below are the context analysis for modified functions:
    
    => hisi_sas_bytes_dmaed():
    
    Since it is invoked from both process and atomic contexts, let its callers
    pass the gfp_t flags:
    
      * hisi_sas_main.c:
      ------------------
    
        hisi_sas_phyup_work(): workqueue context
          -> hisi_sas_bytes_dmaed(..., GFP_KERNEL)
    
        hisi_sas_controller_reset_done(): has an msleep()
          -> hisi_sas_rescan_topology()
            -> hisi_sas_phy_down()
              -> hisi_sas_bytes_dmaed(..., GFP_KERNEL)
    
        hisi_sas_debug_I_T_nexus_reset(): calls wait_for_completion_timeout()
          -> hisi_sas_phy_down()
            -> hisi_sas_bytes_dmaed(..., GFP_KERNEL)
    
      * hisi_sas_v1_hw.c:
      -------------------
    
        int_abnormal_v1_hw(): irq handler
          -> hisi_sas_phy_down()
            -> hisi_sas_bytes_dmaed(..., GFP_ATOMIC)
    
      * hisi_sas_v[23]_hw.c:
      ----------------------
    
        int_phy_updown_v[23]_hw(): irq handler
          -> phy_down_v[23]_hw()
            -> hisi_sas_phy_down()
              -> hisi_sas_bytes_dmaed(..., GFP_ATOMIC)
    
    => int_bcast_v1_hw() and phy_bcast_v3_hw():
    
    Both are invoked exclusively from irq handlers. Pass GFP_ATOMIC.
    
    Link: https://lore.kernel.org/r/20210118100955.1761652-12-a.darwish@linutronix.deReviewed-by: default avatarJohn Garry <john.garry@huawei.com>
    Signed-off-by: default avatarAhmed S. Darwish <a.darwish@linutronix.de>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    26c7efc3
hisi_sas_v1_hw.c 54.4 KB