• W
    MPAM / ACPI: Refactoring MPAM init process and set MPAM ACPI as entrance · 7e66740a
    Wang ShaoBo 提交于
    hulk inclusion
    category: feature
    bugzilla: 28055
    CVE: NA
    
    ------------------------------
    
    Renaming mpam_late_init() in arch/arm64/kernel/mpam.c to mpam_init(),
    traveling each MPAM ACPI cache / memory node and adding them to a list,
    with that, we use the numa node id it belongs to label cache node and
    proximity_domain to label memory node, once it ends, call mpam_init()
    to initialize all like before.
    
    Code was partially borrowed from James's:
    http://www.linux-arm.org/git?p=linux-jm.git;a=commit;h=10fe7d6363ae96b
    25f584d4a91f9d0f2fd5faf3b,"ACPI / MPAM: Parse the (draft) MPAM table
    [dead]"
    
    v3->v5: mpam.c in drivers/acpi/arm64 should not be compiled when MPAM
    disabled, so we should add CONFIG_ACPI_MPAM macro and make CONFIG_MPAM
    select it. Not only that, as mpam init procedure is strong correlated to
    ACPI for Now (follow-up might be dependent on device tree), and CONFIG_
    ACPI is not always selected under configuration, we should make CONFIG_
    MPAM depends on CONFIG_ACPI before selecting CONFIG_ACPI_MPAM.
    Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
    Reviewed-By: NXie XiuQi <xiexiuqi@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    7e66740a
mpam_sched.h 1.3 KB