arm,arm64,drivers: reduce scope of cap_parsing_failed
Reduce the scope of cap_parsing_failed (making it static in drivers/base/arch_topology.c) by slightly changing {arm,arm64} DT parsing code. For arm checking for !cap_parsing_failed before calling normalize_ cpu_capacity() is superfluous, as returning an error from parse_ cpu_capacity() (above) means cap_from _dt is set to false. For arm64 we can simply check if raw_capacity points to something, which is not if capacity parsing has failed. Suggested-by: Morten Rasmussen <morten.rasmussen@arm.com> Signed-off-by: Juri Lelli <juri.lelli@arm.com> Acked-by: Russell King <rmk+kernel@armlinux.org.uk> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Цей коміт міститься в:

зафіксовано
Greg Kroah-Hartman

джерело
2ef7a2953c
коміт
c105aa3118
@@ -76,7 +76,6 @@ static unsigned long *__cpu_capacity;
|
||||
|
||||
static unsigned long middle_capacity = 1;
|
||||
static bool cap_from_dt = true;
|
||||
extern bool cap_parsing_failed;
|
||||
extern void normalize_cpu_capacity(void);
|
||||
extern int __init parse_cpu_capacity(struct device_node *cpu_node, int cpu);
|
||||
|
||||
@@ -165,7 +164,7 @@ static void __init parse_dt_topology(void)
|
||||
middle_capacity = ((max_capacity / 3)
|
||||
>> (SCHED_CAPACITY_SHIFT-1)) + 1;
|
||||
|
||||
if (cap_from_dt && !cap_parsing_failed)
|
||||
if (cap_from_dt)
|
||||
normalize_cpu_capacity();
|
||||
}
|
||||
|
||||
|
Посилання в новій задачі
Заблокувати користувача