Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

soc: samsung: exynos-pmu: Annotate online/offline functions with __must_hold

Annotate functions writing to PMU registers to online and offline CPUs
as __must_hold() the necessary spinlock for code correctness. These are
static functions so possibility of mistakes is low here, but
__must_hold() serves as self-documenting code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

+2
+2
drivers/soc/samsung/exynos-pmu.c
··· 364 364 * disabled and cpupm_lock held. 365 365 */ 366 366 static int __gs101_cpu_pmu_online(unsigned int cpu) 367 + __must_hold(&pmu_context->cpupm_lock) 367 368 { 368 369 unsigned int cpuhint = smp_processor_id(); 369 370 u32 reg, mask; ··· 425 424 426 425 /* Common function shared by both CPU hot plug and CPUIdle */ 427 426 static int __gs101_cpu_pmu_offline(unsigned int cpu) 427 + __must_hold(&pmu_context->cpupm_lock) 428 428 { 429 429 unsigned int cpuhint = smp_processor_id(); 430 430 u32 reg, mask;