From: Thomas Gleixner <tglx@linutronix.de>
To: Dimitri Sivanich <sivanich@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2 v5] SGI RTC: add generic timer system interrupt
Date: Sun, 21 Dec 2008 19:22:34 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.0812211915410.4548@localhost.localdomain> (raw)
In-Reply-To: <20081219160919.GA18226@sgi.com>
On Fri, 19 Dec 2008, Dimitri Sivanich wrote:
> This patch allocates a system interrupt vector for platform specific use
> in implementing timer interrupts.
Why is this restricted to timer interrupts. That's simply a dynamic
allocation of an interrupt vector.
> +
> +/* Function pointer for generic timer interrupt handling */
> +static void (*generic_timer_interrupt_extension)(void);
> +
> +int
> +register_generic_timer_extension(void (*fn)(void))
One line. All over the place.
> +{
> + if (generic_timer_interrupt_extension)
> + return 1;
-EBUSY perhaps ?
> + generic_timer_interrupt_extension = fn;
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(register_generic_timer_extension);
> +
> +void
> +unregister_generic_timer_extension(void)
> +{
> + if (generic_timer_interrupt_extension)
> + generic_timer_interrupt_extension = NULL;
> +}
> +EXPORT_SYMBOL_GPL(unregister_generic_timer_extension);
> +
> +void smp_generic_timer_interrupt(struct pt_regs *regs)
> +{
> + struct pt_regs *old_regs = set_irq_regs(regs);
> +
> + ack_APIC_irq();
> +
> + exit_idle();
> +
> + irq_enter();
> +
> + if (generic_timer_interrupt_extension)
> + generic_timer_interrupt_extension();
interrupt statistics are missing.
> + irq_exit();
> +
> + set_irq_regs(old_regs);
> +}
> +
Thanks,
tglx
prev parent reply other threads:[~2008-12-21 18:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-19 16:07 [PATCH 0/2 v5] SGI RTC: add clocksource/clockevent driver and generic timer vector Dimitri Sivanich
2008-12-19 16:09 ` [PATCH 1/2 v5] SGI RTC: add generic timer system interrupt Dimitri Sivanich
2008-12-19 16:11 ` [PATCH 2/2 v5] SGI RTC: add clocksource driver Dimitri Sivanich
2008-12-21 18:13 ` Thomas Gleixner
2008-12-21 18:22 ` Thomas Gleixner [this message]
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=alpine.LFD.2.00.0812211915410.4548@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sivanich@sgi.com \
/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
all inboxes | Powered by JetHome®