From: John Sigler <linux.kernel@free.fr>
To: unlisted-recipients:; (no To-header on input)
Cc: linux-kernel@vger.kernel.org
Subject: Re: Disabling x86 System Management Mode
Date: Tue, 17 Apr 2007 19:01:26 +0200 [thread overview]
Message-ID: <4624FD66.8000305@free.fr> (raw)
In-Reply-To: <4624FA85.9010704@free.fr>
John Sigler wrote:
> static int hello_init(void)
> {
> int i;
> int *lat;
> printk(KERN_ALERT "INIT\n");
> lat = kmalloc(MAX * sizeof *lat, GFP_KERNEL);
> if (lat == NULL) return -1;
> for (i=0; i < MAX; ++i) lat[i] = 0;
> for (i=0; i < 5; ++i) foo();
> for (i=0; i < N; ++i)
> {
> unsigned count, res;
> set_current_state(TASK_INTERRUPTIBLE);
> schedule_timeout(1);
> foo();
> local_irq_disable();
> count = foo();
> local_irq_enable();
> res = count >> 8;
> if (res < MAX) ++lat[res]; else printk(KERN_ALERT "OUT OF RANGE\n");
> }
>
> for (i=0; i < MAX; ++i)
> if (lat[i] != 0) printk(KERN_ALERT "%d %d\n", i<<8, lat[i]);
kfree(lat);
> return 0;
> }
next prev parent reply other threads:[~2007-04-17 17:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-16 10:47 Disabling x86 System Management Mode John
2007-04-16 11:31 ` John
2007-04-16 15:12 ` Lee Revell
2007-04-16 22:12 ` Andi Kleen
2007-04-17 16:49 ` John Sigler
2007-04-17 16:57 ` Andi Kleen
2007-04-17 21:32 ` John Sigler
2007-04-17 17:01 ` John Sigler [this message]
2007-04-18 8:09 ` John Sigler
2007-04-18 11:41 ` John Sigler
2007-04-18 14:06 ` Andrew Shewmaker
2007-04-18 14:39 ` John Sigler
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=4624FD66.8000305@free.fr \
--to=linux.kernel@free.fr \
--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