IA64 probe instruction
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
#dmesginit_module called ...init_module result 0x0000000000000001init_module donecleanup_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
#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;
}Hi Christian
We have an ia64 technical mailing list at:
[email protected]
that has just started for this pariticlar type
of question you can sign up for the list at:
https://www.gelato.unsw.edu.au/mailman/listinfo/ia64-technical
Regards
Darren
Quoted 86 lines · Christian Hildner
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_modulecalled ...init_moduleresult0x0000000000000001init_moduledonecleanup_modulecalled ...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
#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"
Quoted 9 lines
"srlz.i\n\n"
";;\n\n"
: "=r"(addr), "=r"(res)
:);
printk("cleanup_module result 0x%016lx\n", res);
printk("cleanup_module done\n");
return;
}--------------------------------------------------
Darren Williams <dsw AT gelato.unsw.edu.au>
Gelato@UNSW <www.gelato.unsw.edu.au>
--------------------------------------------------