mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: Andi Kleen <ak@suse.de>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] Intel thermal monitor for x86_64
Date: Sun, 14 Nov 2004 09:16:49 +0100	[thread overview]
Message-ID: <20041114081649.GA16795@wotan.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0411130629190.3062@musoma.fsmlabs.com>

On Sat, Nov 13, 2004 at 11:36:47AM -0700, Zwane Mwaikambo wrote:
> Patch adds support for notification of overheating conditions on intel 
> x86_64 processors. Tested on EM64T, test booted on AMD64.
> 
> Hardware courtesy of Intel Corporation

Did you actually execute the code by faking/forcing such a event? 

>  
> +#if defined(CONFIG_X86_MCE_INTEL)
> +ENTRY(thermal_interrupt)
> +	apicinterrupt THERMAL_APIC_VECTOR,smp_thermal_interrupt
> +#endif

Cleaner would be probably to add a weak dummy smp_thermal_interrupt
in traps.c and drop all the ifdefs.

> +
> +asmlinkage void smp_thermal_interrupt(void)
> +{
> +	u64 status;
> +
> +	ack_APIC_irq();
> +
> +	irq_enter();
> +	rdmsrl(MSR_IA32_THERM_STATUS, status);
> +	if (status & 0x1) {
> +		cpu_set(smp_processor_id(), cpu_thermal_status);
> +		add_taint(TAINT_MACHINE_CHECK);

Maybe this should be made a different taint bit? 

> +	} else {
> +		cpu_clear(smp_processor_id(), cpu_thermal_status);
> +	}
> +
> +	if (time_after(jiffies, next_thermal_check))
> +		tasklet_schedule(&thermal_tasklet);

I think there is actually a better way to do this (sorry for telling
you late, but I also only realized it later). Can you just make
the thermal APIC interrupt non NMI? Then the normal locking rules
apply and printk should work directly. 

Also can you at least additionally log an synthetic event using mce_log() ?
This way someone collecting these log entries centrally get its it 
all in the same log file. 

-Andi

  reply	other threads:[~2004-11-14  8:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-13 18:36 Zwane Mwaikambo
2004-11-14  8:16 ` Andi Kleen [this message]
2004-11-15  1:07   ` Zwane Mwaikambo
2004-11-15  9:01     ` Andi Kleen
2004-11-17 17:03       ` Zwane Mwaikambo

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=20041114081649.GA16795@wotan.suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zwane@linuxpower.ca \
    /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®