mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Clean up for tsc_init()
@ 2017-11-08  9:33 Dou Liyang
  2017-11-08  9:33 ` [PATCH 1/2] x86/tsc: Mark cyc2ns_init() __init Dou Liyang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dou Liyang @ 2017-11-08  9:33 UTC (permalink / raw)
  To: x86, linux-kernel; +Cc: tglx, mingo, hpa, peterz, Dou Liyang

cyc2ns_init() and detect_art() which is invoked in tsc_init(), are 
only called during boot time. So they should be a "__init" function.

Dou Liyang (2):
  x86/tsc: Mark cyc2ns_init() __init
  x86/tsc: Mark detect_art() __init

 arch/x86/kernel/tsc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.5.5

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] x86/tsc: Mark cyc2ns_init() __init
  2017-11-08  9:33 [PATCH 0/2] Clean up for tsc_init() Dou Liyang
@ 2017-11-08  9:33 ` Dou Liyang
  2017-11-08  9:33 ` [PATCH 2/2] x86/tsc: Mark detect_art() __init Dou Liyang
  2017-11-08  9:42 ` [PATCH 0/2] Clean up for tsc_init() Ingo Molnar
  2 siblings, 0 replies; 5+ messages in thread
From: Dou Liyang @ 2017-11-08  9:33 UTC (permalink / raw)
  To: x86, linux-kernel; +Cc: tglx, mingo, hpa, peterz, Dou Liyang

This function is only called by tsc_init(), which is an __init
function, so mark it __init as well.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
 arch/x86/kernel/tsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 796d96b..3e7f186 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -112,7 +112,7 @@ static void cyc2ns_data_init(struct cyc2ns_data *data)
 	data->cyc2ns_offset = 0;
 }
 
-static void cyc2ns_init(int cpu)
+static void __init cyc2ns_init(int cpu)
 {
 	struct cyc2ns *c2n = &per_cpu(cyc2ns, cpu);
 
-- 
2.5.5

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] x86/tsc: Mark detect_art() __init
  2017-11-08  9:33 [PATCH 0/2] Clean up for tsc_init() Dou Liyang
  2017-11-08  9:33 ` [PATCH 1/2] x86/tsc: Mark cyc2ns_init() __init Dou Liyang
@ 2017-11-08  9:33 ` Dou Liyang
  2017-11-08  9:42 ` [PATCH 0/2] Clean up for tsc_init() Ingo Molnar
  2 siblings, 0 replies; 5+ messages in thread
From: Dou Liyang @ 2017-11-08  9:33 UTC (permalink / raw)
  To: x86, linux-kernel; +Cc: tglx, mingo, hpa, peterz, Dou Liyang

This function is only called by tsc_init(), which is an __init
function, so mark it __init as well.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
 arch/x86/kernel/tsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 3e7f186..9b29f39 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -959,7 +959,7 @@ core_initcall(cpufreq_register_tsc_scaling);
 /*
  * If ART is present detect the numerator:denominator to convert to TSC
  */
-static void detect_art(void)
+static void __init detect_art(void)
 {
 	unsigned int unused[2];
 
-- 
2.5.5

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Clean up for tsc_init()
  2017-11-08  9:33 [PATCH 0/2] Clean up for tsc_init() Dou Liyang
  2017-11-08  9:33 ` [PATCH 1/2] x86/tsc: Mark cyc2ns_init() __init Dou Liyang
  2017-11-08  9:33 ` [PATCH 2/2] x86/tsc: Mark detect_art() __init Dou Liyang
@ 2017-11-08  9:42 ` Ingo Molnar
  2017-11-08  9:55   ` Dou Liyang
  2 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2017-11-08  9:42 UTC (permalink / raw)
  To: Dou Liyang; +Cc: x86, linux-kernel, tglx, mingo, hpa, peterz


* Dou Liyang <douly.fnst@cn.fujitsu.com> wrote:

> cyc2ns_init() and detect_art() which is invoked in tsc_init(), are 
> only called during boot time. So they should be a "__init" function.
> 
> Dou Liyang (2):
>   x86/tsc: Mark cyc2ns_init() __init
>   x86/tsc: Mark detect_art() __init
> 
>  arch/x86/kernel/tsc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

This should really be a single patch, but other than that:

Reviewed-by: Ingo Molnar <mingo@kernel.org>

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Clean up for tsc_init()
  2017-11-08  9:42 ` [PATCH 0/2] Clean up for tsc_init() Ingo Molnar
@ 2017-11-08  9:55   ` Dou Liyang
  0 siblings, 0 replies; 5+ messages in thread
From: Dou Liyang @ 2017-11-08  9:55 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: x86, linux-kernel, tglx, mingo, hpa, peterz

Hi Ingo,

At 11/08/2017 05:42 PM, Ingo Molnar wrote:
>
> * Dou Liyang <douly.fnst@cn.fujitsu.com> wrote:
>
>> cyc2ns_init() and detect_art() which is invoked in tsc_init(), are
>> only called during boot time. So they should be a "__init" function.
>>
>> Dou Liyang (2):
>>   x86/tsc: Mark cyc2ns_init() __init
>>   x86/tsc: Mark detect_art() __init
>>
>>  arch/x86/kernel/tsc.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> This should really be a single patch, but other than that:
>
> Reviewed-by: Ingo Molnar <mingo@kernel.org>
>

Thank you, Indeed, I will merge them together.

Thanks,
	dou.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-08  9:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08  9:33 [PATCH 0/2] Clean up for tsc_init() Dou Liyang
2017-11-08  9:33 ` [PATCH 1/2] x86/tsc: Mark cyc2ns_init() __init Dou Liyang
2017-11-08  9:33 ` [PATCH 2/2] x86/tsc: Mark detect_art() __init Dou Liyang
2017-11-08  9:42 ` [PATCH 0/2] Clean up for tsc_init() Ingo Molnar
2017-11-08  9:55   ` Dou Liyang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®