[<prev] [next>] [day] [month] [year] [list]
Message-ID: <b9df5fa10910300818u4b104a50if01f32c26be580d8@mail.gmail.com>
Date: Fri, 30 Oct 2009 21:18:57 +0600
From: Rakib Mullick <rakib.mullick@...il.com>
To: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>
Cc: "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>, x86@...nel.org
Subject: [PATCH] x86, tsc: Remove checking cpu_has_tsc when CONFIG_X86_TSC=n.
When CONFIG_X86_TSC=n, we do not need to check cpu_has_tsc, we can
simply return with 0. Moreover cpu_has_tsc indicates whether cpu
tsc feature on or not, so it doesn't matter when CONFIG_X86_TSC=n.
Am I right? Or I'm missing anything?
----
Signed-off-by: Rakib Mullick <rakib.mullick@...il.com>
--- linus/arch/x86/include/asm/tsc.h 2009-10-17 13:12:59.000000000 +0600
+++ rakib/arch/x86/include/asm/tsc.h 2009-10-30 21:55:29.000000000 +0600
@@ -24,8 +24,7 @@ static inline cycles_t get_cycles(void)
unsigned long long ret = 0;
#ifndef CONFIG_X86_TSC
- if (!cpu_has_tsc)
- return 0;
+ return 0;
#endif
rdtscll(ret);
@@ -39,8 +38,7 @@ static __always_inline cycles_t vget_cyc
* access boot_cpu_data (which is not VDSO-safe):
*/
#ifndef CONFIG_X86_TSC
- if (!cpu_has_tsc)
- return 0;
+ return 0;
#endif
return (cycles_t)__native_read_tsc();
}
--
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