From: Peter Zijlstra <peterz@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de,
linux-tip-commits@vger.kernel.org
Subject: Re: [tip:perf/core] perf/x86: Clean up cap_user_time* setting
Date: Mon, 7 Oct 2013 11:33:22 +0200 [thread overview]
Message-ID: <20131007093322.GA3081@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20131006091054.GA4342@gmail.com>
On Sun, Oct 06, 2013 at 11:10:54AM +0200, Ingo Molnar wrote:
> I'm fully with you, please zap the 'notsc' boot option - it's an ancient
> relic, if any box is still broken with the TSC on we want to hear about it
> and fix it!
something like so?
---
Subject: x86: Remove 'notsc' option for X86_TSC=y kernels
The 'notsc' thing is an ancient relic, if there's still any hardware
that needs this we need to hear about it.
This only removes the option for X86_TSC=y kernels; X86_TSC=n kernels
can still use it to force remove the TSC capability flag.
Since this removes the tsc_disabled=1 assignment, also remove all
tsc_disabled>0 tests as those will never be true.
Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
---
arch/x86/kernel/tsc.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 930e5d48f560..693c0226b014 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -89,20 +89,7 @@ int check_tsc_unstable(void)
}
EXPORT_SYMBOL_GPL(check_tsc_unstable);
-int check_tsc_disabled(void)
-{
- return tsc_disabled;
-}
-EXPORT_SYMBOL_GPL(check_tsc_disabled);
-
-#ifdef CONFIG_X86_TSC
-int __init notsc_setup(char *str)
-{
- pr_warn("Kernel compiled with CONFIG_X86_TSC, cannot disable TSC completely\n");
- tsc_disabled = 1;
- return 1;
-}
-#else
+#ifndef CONFIG_X86_TSC
/*
* disable flag for tsc. Takes effect by clearing the TSC cpu flag
* in cpu/common.c
@@ -112,9 +99,9 @@ int __init notsc_setup(char *str)
setup_clear_cpu_cap(X86_FEATURE_TSC);
return 1;
}
-#endif
__setup("notsc", notsc_setup);
+#endif
static int no_sched_irq_time;
@@ -935,7 +922,7 @@ static void tsc_refine_calibration_work(struct work_struct *work)
static int __init init_tsc_clocksource(void)
{
- if (!cpu_has_tsc || tsc_disabled > 0 || !tsc_khz)
+ if (!cpu_has_tsc || !tsc_khz)
return 0;
if (tsc_clocksource_reliable)
@@ -998,9 +985,6 @@ void __init tsc_init(void)
for_each_possible_cpu(cpu)
set_cyc2ns_scale(cpu_khz, cpu);
- if (tsc_disabled > 0)
- return;
-
/* now allow native_sched_clock() to use rdtsc */
tsc_disabled = 0;
next prev parent reply other threads:[~2013-10-07 9:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 17:31 [tip:perf/core] perf/x86: Clean up cap_user_time* setting tip-bot for Peter Zijlstra
2013-10-04 18:31 ` Adrian Hunter
2013-10-04 18:55 ` Peter Zijlstra
2013-10-06 9:10 ` Ingo Molnar
2013-10-07 9:33 ` Peter Zijlstra [this message]
2013-10-07 15:59 ` Peter Zijlstra
2013-10-07 17:22 ` H. Peter Anvin
2013-10-07 17:40 ` Peter Zijlstra
2013-10-07 18:30 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131007093322.GA3081@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=adrian.hunter@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox