lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 16 Nov 2006 21:45:36 +0100
From:	Thomas Gleixner <tglx@...esys.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Alan Stern <stern@...land.harvard.edu>,
	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...l.org>,
	john stultz <johnstul@...ibm.com>,
	David Miller <davem@...emloft.net>,
	Arjan van de Ven <arjan@...radead.org>,
	Andrew Morton <akpm@...l.org>, Andi Kleen <ak@...e.de>
Subject: Re: [patch] cpufreq: mark cpufreq_tsc() as core_initcall_sync

On Thu, 2006-11-16 at 21:15 +0100, Ingo Molnar wrote:
> From: Ingo Molnar <mingo@...e.hu>
> Subject: [patch] cpufreq: mark cpufreq_tsc() as core_initcall_sync
> 
> init_cpufreq_transition_notifier_list() should execute first, which is a 
> core_initcall, so mark cpufreq_tsc() core_initcall_sync.
> 
> Signed-off-by: Ingo Molnar <mingo@...e.hu>
> 
> --- linux.orig/arch/x86_64/kernel/tsc.c
> +++ linux/arch/x86_64/kernel/tsc.c
> @@ -138,7 +138,11 @@ static int __init cpufreq_tsc(void)
>  	return 0;
>  }

Here is the i386/sparc fixup

--------------->

From: Thomas Gleixner <tglx@...utronix.de>
Subject: [patch] cpufreq: register notifiers after the head init

init_cpufreq_transition_notifier_list() must execute first, which is a
core_initcall, so move the registration to core_initcall_sync.

Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index fbc9582..4ebd903 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -315,7 +315,7 @@ static int __init cpufreq_tsc(void)
 	return ret;
 }
 
-core_initcall(cpufreq_tsc);
+core_initcall_sync(cpufreq_tsc);
 
 #endif
 
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 061e1b1..c6eadcc 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -973,6 +973,13 @@ static struct notifier_block sparc64_cpu
 	.notifier_call	= sparc64_cpufreq_notifier
 };
 
+static int __init sparc64_cpu_freq_init(void)
+{
+	return cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
+					 CPUFREQ_TRANSITION_NOTIFIER);
+}
+core_initcall_sync(sparc64_cpu_freq_init);
+
 #endif /* CONFIG_CPU_FREQ */
 
 static struct time_interpolator sparc64_cpu_interpolator = {
@@ -999,10 +1006,6 @@ void __init time_init(void)
 		(((NSEC_PER_SEC << SPARC64_NSEC_PER_CYC_SHIFT) +
 		  (clock / 2)) / clock);
 
-#ifdef CONFIG_CPU_FREQ
-	cpufreq_register_notifier(&sparc64_cpufreq_notifier_block,
-				  CPUFREQ_TRANSITION_NOTIFIER);
-#endif
 }
 
 unsigned long long sched_clock(void)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ