public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: ak@suse.de
Cc: john stultz <johnstul@us.ibm.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 3/6] x86_64: Remove apic_runs_main_timer
Date: Wed, 6 Sep 2006 20:19:01 -0600	[thread overview]
Message-ID: <20060907021839.31476.9424.sendpatchset@localhost> (raw)
In-Reply-To: <20060907021820.31476.17484.sendpatchset@localhost>

Part of the x86-64 cleanup for generic timekeeping. 
Remove apic_runs_main_timer, on request from Andi, since it doesn't 
work on many systems.

Signed-off-by: John Stultz <johnstul@us.ibm.com>

 arch/x86_64/kernel/apic.c |   30 +-----------------------------
 arch/x86_64/kernel/time.c |    2 --
 include/asm-x86_64/apic.h |    1 -
 3 files changed, 1 insertion(+), 32 deletions(-)

linux-2.6.18-rc6_timeofday-arch-x86-64-part2_C6.patch
============================================
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index 1b9e3d3..6173b2f 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -39,7 +39,6 @@
 #include <asm/hpet.h>
 
 int apic_verbosity;
-int apic_runs_main_timer;
 int apic_calibrate_pmtmr __initdata;
 
 int disable_apic_timer __initdata;
@@ -747,16 +746,6 @@ static void setup_APIC_timer(unsigned in
 		} while (c2 - c1 < 300);
 	}
 	__setup_APIC_LVTT(clocks);
-	/* Turn off PIT interrupt if we use APIC timer as main timer.
-	   Only works with the PM timer right now
-	   TBD fix it for HPET too. */
-	if (vxtime.mode == VXTIME_PMTMR &&
-		smp_processor_id() == boot_cpu_id &&
-		apic_runs_main_timer == 1 &&
-		!cpu_isset(boot_cpu_id, timer_interrupt_broadcast_ipi_mask)) {
-		stop_timer_interrupt();
-		apic_runs_main_timer++;
-	}
 	local_irq_restore(flags);
 }
 
@@ -946,8 +935,6 @@ void smp_local_timer_interrupt(struct pt
 #ifdef CONFIG_SMP
 	update_process_times(user_mode(regs));
 #endif
-	if (apic_runs_main_timer > 1 && smp_processor_id() == boot_cpu_id)
-		main_timer_handler(regs);
 	/*
 	 * We take the 'long' return path, and there every subsystem
 	 * grabs the appropriate locks (kernel lock/ irq lock).
@@ -1162,26 +1149,11 @@ static __init int setup_noapictimer(char
 	return 1;
 } 
 
-static __init int setup_apicmaintimer(char *str)
-{
-	apic_runs_main_timer = 1;
-	nohpet = 1;
-	return 1;
-}
-__setup("apicmaintimer", setup_apicmaintimer);
-
-static __init int setup_noapicmaintimer(char *str)
-{
-	apic_runs_main_timer = -1;
-	return 1;
-}
-__setup("noapicmaintimer", setup_noapicmaintimer);
-
 static __init int setup_apicpmtimer(char *s)
 {
 	apic_calibrate_pmtmr = 1;
 	notsc_setup(NULL);
-	return setup_apicmaintimer(NULL);
+	return 1;
 }
 __setup("apicpmtimer", setup_apicpmtimer);
 
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index da89e60..a4aef4e 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -469,8 +469,6 @@ void main_timer_handler(struct pt_regs *
 
 static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	if (apic_runs_main_timer > 1)
-		return IRQ_HANDLED;
 	main_timer_handler(regs);
 #ifdef CONFIG_X86_LOCAL_APIC
 	if (using_apic_timer)
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h
index 9c96a0a..06fcdc2 100644
--- a/include/asm-x86_64/apic.h
+++ b/include/asm-x86_64/apic.h
@@ -16,7 +16,6 @@
 #define APIC_DEBUG   2
 
 extern int apic_verbosity;
-extern int apic_runs_main_timer;
 
 /*
  * Define the default level of output to be very little

  parent reply	other threads:[~2006-09-07  2:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07  2:18 [PATCH 0/6] x86_64: Generic timekeeping for x86_64 john stultz
2006-09-07  2:18 ` [PATCH 1/6] x86_64: Enable arch-generic vsyscall support john stultz
2006-09-07  2:18 ` [PATCH 2/6] x86_64: hpet_address cleanup john stultz
2006-09-07  2:19 ` john stultz [this message]
2006-09-07  2:19 ` [PATCH 4/6] x86_64: Enable CONFIG_GENERIC_TIME john stultz
2006-09-07  2:19 ` [PATCH 5/6] x86_64: Clocksources for x86-64 john stultz
2006-09-07  2:19 ` [PATCH 6/6] x86_64: GENERIC_TIME based vsyscall code john stultz
2006-09-09 20:30 ` [PATCH 0/6] x86_64: Generic timekeeping for x86_64 Andi Kleen

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=20060907021839.31476.9424.sendpatchset@localhost \
    --to=johnstul@us.ibm.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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