lkml.org 
[lkml]   [2016]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 14/16] arm: Set SD_ASYM_CPUCAPACITY for big.LITTLE platforms
    Date
    Set the SD_ASYM_CPUCAPACITY flag for DIE level sched_domain on
    big.LITTLE systems.

    cc: Russell King <linux@arm.linux.org.uk>

    Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
    ---
    arch/arm/kernel/topology.c | 10 +++++++++-
    1 file changed, 9 insertions(+), 1 deletion(-)

    diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
    index ec279d1..1b81b31 100644
    --- a/arch/arm/kernel/topology.c
    +++ b/arch/arm/kernel/topology.c
    @@ -78,6 +78,7 @@ static unsigned long *__cpu_capacity;
    #define cpu_capacity(cpu) __cpu_capacity[cpu]

    static unsigned long middle_capacity = 1;
    +static unsigned int big_little;

    /*
    * Iterate all CPUs' descriptor in DT and compute the efficiency
    @@ -151,6 +152,8 @@ static void __init parse_dt_topology(void)
    middle_capacity = ((max_capacity / 3)
    >> (SCHED_CAPACITY_SHIFT-1)) + 1;

    + if (max_capacity && max_capacity != min_capacity)
    + big_little = 1;
    }

    /*
    @@ -280,12 +283,17 @@ static inline int cpu_corepower_flags(void)
    return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN;
    }

    +static inline int arm_cpu_cpu_flags(void)
    +{
    + return big_little ? SD_ASYM_CPUCAPACITY : 0;
    +}
    +
    static struct sched_domain_topology_level arm_topology[] = {
    #ifdef CONFIG_SCHED_MC
    { cpu_corepower_mask, cpu_corepower_flags, SD_INIT_NAME(GMC) },
    { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
    #endif
    - { cpu_cpu_mask, SD_INIT_NAME(DIE) },
    + { cpu_cpu_mask, arm_cpu_cpu_flags, SD_INIT_NAME(DIE) },
    { NULL, },
    };

    --
    1.9.1
    \
     
     \ /
      Last update: 2016-05-23 13:21    [W:2.688 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site