From: "Russell Leidich" <rml@google.com>
To: "Andrew Morton" <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, "Andi Kleen" <ak@suse.de>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@elte.hu>
Subject: Re: [PATCH] AMD Thermal Interrupt Support
Date: Thu, 27 Dec 2007 10:57:20 -0800 [thread overview]
Message-ID: <3f1a065b0712271057s150b62f8nb11ebc28dc55f811@mail.gmail.com> (raw)
In-Reply-To: <20071225140413.e8b4f2cd.akpm@linux-foundation.org>
Thanks Andrew. I have a few questions on your comments...
On Dec 25, 2007 2:04 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
> > + unsigned int apic_lv_therm;
> > +
> > + /* Set up APIC_LVTTHMR to issue THERMAL_APIC_VECTOR. */
> > + apic_lv_therm = apic_read(APIC_LVTTHMR);
> > + /*
> > + * See if some agent other than this routine has already initialized
> > + * APIC_LVTTHMR, i.e. if it's unmasked, but not equal to the value that
> > + * we would have programmed, had we been here before on this core.
> > + */
> > + if ((!(apic_lv_therm & APIC_LVT_MASKED)) && ((apic_lv_therm &
> > + (APIC_MODE_MASK | APIC_VECTOR_MASK)) != (APIC_DM_FIXED |
> > + THERMAL_APIC_VECTOR))) {
> > + unsigned int cpu = smp_processor_id();
>
> afaict this function is called while the calling thread is running
> preemptibly. This smp_processor_id() call should have generated a runtime
> warning if it was tested with all debug options enabled?
I thought that the whole point of on_each_cpu(&thermal_apic_init,
NULL, 1, 0) was to ensure that thermal_apic_init() runs
(nonpreemptibly) on each core. No?
> > +static void default_smp_thermal_interrupt(void) {}
>
> static void default_smp_thermal_interrupt(void)
> {
> }
>
> please.
>
>
> Can this function ever actually be called?
My colleauge was concerned that we have a do-nothing handler in case
we get a spurious thermal interrupt. In my view, there's no point
programming for the possibility of broken hardware. On the other
hand, I do need some sort of indirection to bind the entry.S thermal
handler from assembly language to either Intel or AMD C code. Trouble
is, at compiletime, we might have both Intel and AMD support
installed, but only one of them should actually receive the interrupt
at runtime. So I think I need to do runtime binding, unless I want to
do CPUID inside the ISR. What do you think?
--
Russell Leidich
next prev parent reply other threads:[~2007-12-27 18:57 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 18:54 Russell Leidich
2007-12-25 22:04 ` Andrew Morton
2007-12-27 18:57 ` Russell Leidich [this message]
2007-12-28 7:34 ` Andrew Morton
2007-12-28 20:40 ` Russell Leidich
2007-12-29 2:11 ` Andi Kleen
2007-12-29 2:30 ` Valdis.Kletnieks
2007-12-29 2:34 ` Andi Kleen
2007-12-29 2:57 ` Valdis.Kletnieks
2007-12-30 18:39 ` Andi Kleen
2008-01-02 19:43 ` Russell Leidich
2008-01-02 20:00 ` Andi Kleen
2008-01-02 21:12 ` Russell Leidich
2008-01-02 21:33 ` Torsten Kaiser
2008-01-02 21:50 ` Russell Leidich
2008-01-02 21:54 ` Andi Kleen
2008-01-02 22:32 ` Russell Leidich
2008-01-04 21:33 ` Russell Leidich
2008-01-04 22:26 ` Andi Kleen
2008-01-05 0:53 ` Russell Leidich
2008-01-05 13:24 ` Andi Kleen
2008-01-05 20:08 ` Russell Leidich
2008-01-08 23:42 ` Russell Leidich
2008-01-08 23:52 ` Andi Kleen
2008-01-09 2:28 ` Russell Leidich
2008-01-09 2:37 ` Andi Kleen
2008-01-11 2:21 ` Russell Leidich
2008-01-18 1:06 ` Russell Leidich
2008-02-03 0:10 ` Andrew Morton
2008-02-03 0:27 ` Harvey Harrison
2008-02-03 0:39 ` Andrew Morton
2008-02-03 0:50 ` [PATCH] x86: Remove pt_regs arg from smp_thermal_interrupt Harvey Harrison
2008-02-03 1:01 ` Harvey Harrison
2008-02-04 7:12 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2007-12-11 18:44 [PATCH] AMD Thermal Interrupt Support Russell Leidich
2007-12-11 19:13 ` Russell Leidich
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=3f1a065b0712271057s150b62f8nb11ebc28dc55f811@mail.gmail.com \
--to=rml@google.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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
all inboxes | Powered by JetHome®