From: Christian Hildner <christian.hildner@hob.de>
To: linux-ia64@vger.kernel.org
Subject: IA64 probe instruction
Date: Tue, 14 Sep 2004 09:55:22 +0000 [thread overview]
Message-ID: <4146C00A.8060505@hob.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
Hi,
there is behavior of the probe instruction that confuses me a little
bit. Testing of the attached module shows differences whether executed
with interrupts enabled or not.
# cat cpuinfo
processor : 0
vendor : GenuineIntel
arch : IA-64
family : Itanium 2
model : 0
revision : 7
archrev : 0
features : branchlong
cpu number : 0
cpu regs : 4
cpu MHz : 900.000000
itc MHz : 900.000000
BogoMIPS : 1346.37
#dmesg
init_module called ...
init_module result 0x0000000000000001
init_module done
cleanup_module called ...
Unable to handle kernel paging request at virtual address e00000404391fe30
...
Of course the reported address has nothing to do with the (nested!)
fault of the second
probe instruction since interrupt resources are not written. But why
does the second
probe interrupt instead of returning 0 or 1? The reference manual does
not distinct between
psr.ic 0 or 1.
Although this is not really linux related maybe someone from Intel can
comment on this.
Christian
[-- Attachment #2: probe.c --]
[-- Type: text/plain, Size: 1146 bytes --]
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_DESCRIPTION("Probe test");
MODULE_AUTHOR("Christian Hildner");
MODULE_LICENSE("GPL");
int init_module(void)
{
unsigned long addr;
unsigned long res;
printk("init_module called ...\n");
asm volatile ("\n\n"
"movl %0=0xe000100000000000\n\n"
";;\n\n"
"probe.r %1=%0,0\n\n"
";;\n\n"
: "=r"(addr), "=r"(res)
:);
printk("init_module result 0x%016lx\n", res);
printk("init_module done\n");
return(0);
}
void cleanup_module(void)
{
unsigned long addr;
unsigned long res;
printk("cleanup_module called ...\n");
asm volatile ("\n\n"
"rsm psr.i | psr.ic\n\n"
"movl %0=0xe000100000000000\n\n"
";;\n\n"
"srlz.i\n\n"
";;\n\n"
"probe.r %1=%0,0\n\n"
";;\n\n"
"ssm psr.ic\n\n"
";;\n\n"
"srlz.d\n\n"
"ssm psr.i\n\n"
";;\n\n"
"srlz.i\n\n"
";;\n\n"
: "=r"(addr), "=r"(res)
:);
printk("cleanup_module result 0x%016lx\n", res);
printk("cleanup_module done\n");
return;
}
next reply other threads:[~2004-09-14 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-14 9:55 Christian Hildner [this message]
2004-09-14 10:53 ` IA64 probe instruction Darren Williams
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=4146C00A.8060505@hob.de \
--to=christian.hildner@hob.de \
--cc=linux-ia64@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