* [PATCH] arm64/cpuinfo: Move device_initcall() near cpuinfo_regs_init()
@ 2020-05-04 12:29 Anshuman Khandual
2020-05-04 12:43 ` Mark Rutland
2020-05-04 21:04 ` Will Deacon
0 siblings, 2 replies; 3+ messages in thread
From: Anshuman Khandual @ 2020-05-04 12:29 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Mark Rutland, Suzuki Poulose, Catalin Marinas, Anshuman Khandual,
linux-kernel, Mark Brown, Will Deacon
This moves device_initcall() near cpuinfo_regs_init() making the calling
sequence clear. Besides it is a standard practice to have device_initcall()
(any __initcall for that matter) just after the function it actually calls.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
Based on 5.7-rc4
arch/arm64/kernel/cpuinfo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index 86136075ae41..a515d8f3639e 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -311,6 +311,8 @@ static int __init cpuinfo_regs_init(void)
}
return 0;
}
+device_initcall(cpuinfo_regs_init);
+
static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
{
unsigned int cpu = smp_processor_id();
@@ -403,5 +405,3 @@ void __init cpuinfo_store_boot_cpu(void)
boot_cpu_data = *info;
init_cpu_features(&boot_cpu_data);
}
-
-device_initcall(cpuinfo_regs_init);
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] arm64/cpuinfo: Move device_initcall() near cpuinfo_regs_init()
2020-05-04 12:29 [PATCH] arm64/cpuinfo: Move device_initcall() near cpuinfo_regs_init() Anshuman Khandual
@ 2020-05-04 12:43 ` Mark Rutland
2020-05-04 21:04 ` Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: Mark Rutland @ 2020-05-04 12:43 UTC (permalink / raw)
To: Anshuman Khandual
Cc: Suzuki Poulose, Catalin Marinas, linux-kernel, Mark Brown,
Will Deacon, linux-arm-kernel
On Mon, May 04, 2020 at 05:59:37PM +0530, Anshuman Khandual wrote:
> This moves device_initcall() near cpuinfo_regs_init() making the calling
> sequence clear. Besides it is a standard practice to have device_initcall()
> (any __initcall for that matter) just after the function it actually calls.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Suzuki Poulose <suzuki.poulose@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
>
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Mark.
> ---
> Based on 5.7-rc4
>
> arch/arm64/kernel/cpuinfo.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index 86136075ae41..a515d8f3639e 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -311,6 +311,8 @@ static int __init cpuinfo_regs_init(void)
> }
> return 0;
> }
> +device_initcall(cpuinfo_regs_init);
> +
> static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
> {
> unsigned int cpu = smp_processor_id();
> @@ -403,5 +405,3 @@ void __init cpuinfo_store_boot_cpu(void)
> boot_cpu_data = *info;
> init_cpu_features(&boot_cpu_data);
> }
> -
> -device_initcall(cpuinfo_regs_init);
> --
> 2.20.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] arm64/cpuinfo: Move device_initcall() near cpuinfo_regs_init()
2020-05-04 12:29 [PATCH] arm64/cpuinfo: Move device_initcall() near cpuinfo_regs_init() Anshuman Khandual
2020-05-04 12:43 ` Mark Rutland
@ 2020-05-04 21:04 ` Will Deacon
1 sibling, 0 replies; 3+ messages in thread
From: Will Deacon @ 2020-05-04 21:04 UTC (permalink / raw)
To: Anshuman Khandual, linux-arm-kernel
Cc: Mark Rutland, Suzuki Poulose, catalin.marinas, linux-kernel,
Mark Brown, Will Deacon
On Mon, 4 May 2020 17:59:37 +0530, Anshuman Khandual wrote:
> This moves device_initcall() near cpuinfo_regs_init() making the calling
> sequence clear. Besides it is a standard practice to have device_initcall()
> (any __initcall for that matter) just after the function it actually calls.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Suzuki Poulose <suzuki.poulose@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
Applied to arm64 (for-next/misc), thanks!
[1/1] arm64/cpuinfo: Move device_initcall() near cpuinfo_regs_init()
https://git.kernel.org/arm64/c/da7bad98eebb
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-04 21:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-04 12:29 [PATCH] arm64/cpuinfo: Move device_initcall() near cpuinfo_regs_init() Anshuman Khandual
2020-05-04 12:43 ` Mark Rutland
2020-05-04 21:04 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox