• H
    sw64: force context reload without hmcall swpctx · eae4c40a
    He Sheng 提交于
    Sunway inclusion
    category: feature
    bugzilla: https://gitee.com/openeuler/kernel/issues/I56OLG
    
    --------------------------------
    
    The hmcall swpctx is a bit heavyweight for context reload, and
    we have provided some other hmcalls to do this:
      - wrfen: enable fpu.
      - wrptbr: update CSR:PTBR only.
      - load_mm: force update CSR:PTBR and CSR:UPN to switch mm.
    
    For smp setup, hmcall swpctx is also heavy because boot CPU only
    has to prepare stack pointer for secondary CPUs. So we remove the
    tidle_pcb[], and take tidle_ksp[] to hold target idle task's ksp.
    Each secondary CPU loads its ksp and update CSR:PTBR at boot time.
    
    With this patch, most hmcall swpctx invocations are removed.
    Signed-off-by: NHe Sheng <hesheng@wxiat.com>
    Signed-off-by: NGu Zitao <guzitao@wxiat.com>
    eae4c40a
fault.c 7.7 KB