<div dir="ltr"><font face="sans-serif">$B$O$8$a$^$7$F!#(B<br>Armadillo440$B$r;HMQ$7!"AH$_9~$_(BLinux$B$NJY6/Cf$G!"3d$j9~$_$N%W%m%0%i%`$N%3%s%Q%$%k$,$&$^$/$$$+$:$K5M$^$C$F$*$j$^$9!#(B</font>
<br>
<br><font face="sans-serif">Armadillo $B<BA)3+H/%,%$%I!AAH$_9~$_(BLinux
$B$NF3F~$+$i@=IJ2=$^$G!A$r;29M$K%3%s%Q%$%k$7$F$$$^$9!#(B</font>
<br>
<br><font face="sans-serif">$B4D6-$O0J2<$NDL$j$G@_Dj$O$9$Y$F%G%U%)%k%H$N$^$^$G$9!#(B</font>
<br><font face="sans-serif">VMware ATDE3</font>
<br><font face="sans-serif">Linux 2.6.26-2-686</font>
<br>
<br><font face="sans-serif">gcc hoge.c$B!!$@$H(B<module.h>$B$,$_$D$+$i$J$$$H$G$?$N$G(B</font>
<br><font face="sans-serif">gcc -I /usr/src/linux/include hoge.c$B$HF~NO$7$?$H$3$m0J2<$N%(%i!<$,$G$^$7$?!#(B</font>
<br><font face="sans-serif">$B%$%s%/%k!<%I%Q%9$,4V0c$C$F$$$k$N$G$7$g$&$+!)(B</font>
<br><font face="sans-serif">$B$465<x$*4j$$$7$^$9!#(B</font>
<br>
<br><font face="sans-serif">$B0J2<!"%=!<%9!&%(%i!<$G$9(B</font>
<br><font face="sans-serif">--------------------------------------------------------------------------------$B%=!<%9(B</font>
<br>
<br><font face="sans-serif">#include <linux/module.h></font>
<br><font face="sans-serif">#include <linux/interrupt.h></font>
<br><font face="sans-serif">#include <linux/kernel.h></font>
<br><font face="sans-serif">#include <linux/sched.h></font>
<br>
<br><font face="sans-serif">static char *devname="inttest";</font>
<br><font face="sans-serif">static int irq=158;
</font>
<br><font face="sans-serif">static char *id="interrupt test";
</font>
<br><font face="sans-serif">#if LINUX_VERSION_CODE > 0x20115</font>
<br><font face="sans-serif">MODULE_PARM(devname, "s");</font>
<br><font face="sans-serif">MODULE_PARM(irq, "i");</font>
<br><font face="sans-serif">MODULE_PARM(id, "s");</font>
<br><font face="sans-serif">#endif</font>
<br>
<br><font face="sans-serif">static void inttest_interrupt(int irq,
void *dev_id, struct pt_regs *regs)</font>
<br><font face="sans-serif">{</font>
<br><font face="sans-serif"> printk("interrupted irq:%d
dev_id:%s jiffies:%ld(J\n",</font>
<br><font face="sans-serif"> irq,(char
*)dev_id,jiffies);</font>
<br><font face="sans-serif">}</font>
<br>
<br><font face="sans-serif">int init_module(void)</font>
<br><font face="sans-serif">{</font>
<br><font face="sans-serif"> printk("install '%s' into
irq %d\n",devname,irq);</font>
<br><font face="sans-serif"> if (request_irq(irq, inttest_interrupt,
SA_INTERRUPT|SA_SHIRQ, </font>
<br><font face="sans-serif">
devname, id)) </font>
<br><font face="sans-serif"> return -EBUSY; </font><br>
<br><font face="sans-serif"> return 0;</font>
<br><font face="sans-serif">}</font>
<br>
<br><font face="sans-serif">void cleanup_module(void)</font>
<br><font face="sans-serif">{</font>
<br><font face="sans-serif"> printk("remove '%s' from
irq %d\n",devname,irq);</font>
<br><font face="sans-serif"> free_irq(irq,id);</font>
<br><font face="sans-serif">};</font>
<br>
<br><font face="sans-serif">--------------------------------------------------------------------------------$B%(%i!<(B</font>
<br>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:58:
error: conflicting types for ‘irqreturn_t’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/irqreturn.h:19:
error: previous definition of ‘irqreturn_t’ was here</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:61:
error: expected specifier-qualifier-list before ‘irq_handler_t’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:60:
warning: empty declaration</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:71:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘no_action’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:72:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘request_irq’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:74:
error: storage class specified for parameter ‘free_irq’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:76:
warning: empty declaration</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:78:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘devm_request_irq’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:81:
error: storage class specified for parameter ‘devm_free_irq’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:101:
error: storage class specified for parameter ‘disable_irq_nosync’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:102:
error: storage class specified for parameter ‘disable_irq’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:103:
error: storage class specified for parameter ‘enable_irq’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:113:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:118:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:206:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:211:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:225:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘cli’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:229:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘sti’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:233:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘save_flags’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:238:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘restore_flags’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:243:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘save_and_cli’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:266:
warning: empty declaration</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:285:
warning: empty declaration</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:293:
error: storage class specified for parameter ‘open_softirq’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:294:
error: storage class specified for parameter ‘softirq_init’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:296:
error: storage class specified for parameter ‘raise_softirq_irqoff’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:297:
error: storage class specified for parameter ‘raise_softirq’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:320:
warning: empty declaration</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:336:
warning: empty declaration</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:364:
error: storage class specified for parameter ‘__tasklet_schedule’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:367:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:372:
error: storage class specified for parameter ‘__tasklet_hi_schedule’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:375:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:382:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:388:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:395:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:401:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:406:
error: storage class specified for parameter ‘tasklet_kill’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:407:
error: storage class specified for parameter ‘tasklet_kill_immediate’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:409:
error: storage class specified for parameter ‘tasklet_init’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:453:
error: storage class specified for parameter ‘probe_irq_on’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:454:
error: storage class specified for parameter ‘probe_irq_off’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:455:
error: storage class specified for parameter ‘probe_irq_mask’</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:463:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘{’ token</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:467:
warning: ‘struct seq_file’ declared inside parameter list</font>
<br><font face="sans-serif">irq_3.c:6: error: storage class specified
for parameter ‘devname’</font>
<br><font face="sans-serif">irq_3.c:6: error: parameter ‘devname’
is initialized</font>
<br><font face="sans-serif">irq_3.c:7: error: storage class specified
for parameter ‘irq’</font>
<br><font face="sans-serif">irq_3.c:7: error: parameter ‘irq’
is initialized</font>
<br><font face="sans-serif">irq_3.c:8: error: storage class specified
for parameter ‘id’</font>
<br><font face="sans-serif">irq_3.c:8: error: parameter ‘id’
is initialized</font>
<br><font face="sans-serif">irq_3.c:17: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token</font>
<br><font face="sans-serif">irq_3.c:23: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token</font>
<br><font face="sans-serif">irq_3.c:33: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token</font>
<br><font face="sans-serif">irq_3.c:36: error: expected declaration
specifiers before ‘;’ token</font>
<br><font face="sans-serif">irq_3.c:8: error: declaration for parameter
‘id’ but no such parameter</font>
<br><font face="sans-serif">irq_3.c:7: error: declaration for parameter
‘irq’ but no such parameter</font>
<br><font face="sans-serif">irq_3.c:6: error: declaration for parameter
‘devname’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:467:
error: declaration for parameter ‘show_interrupts’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:455:
error: declaration for parameter ‘probe_irq_mask’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:454:
error: declaration for parameter ‘probe_irq_off’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:453:
error: declaration for parameter ‘probe_irq_on’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:408:
error: declaration for parameter ‘tasklet_init’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:407:
error: declaration for parameter ‘tasklet_kill_immediate’ but no such
parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:406:
error: declaration for parameter ‘tasklet_kill’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:372:
error: declaration for parameter ‘__tasklet_hi_schedule’ but no such
parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:364:
error: declaration for parameter ‘__tasklet_schedule’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:297:
error: declaration for parameter ‘raise_softirq’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:296:
error: declaration for parameter ‘raise_softirq_irqoff’ but no such
parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:294:
error: declaration for parameter ‘softirq_init’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:293:
error: declaration for parameter ‘open_softirq’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:292:
error: declaration for parameter ‘__do_softirq’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:291:
error: declaration for parameter ‘do_softirq’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:103:
error: declaration for parameter ‘enable_irq’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:102:
error: declaration for parameter ‘disable_irq’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:101:
error: declaration for parameter ‘disable_irq_nosync’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:81:
error: declaration for parameter ‘devm_free_irq’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:74:
error: declaration for parameter ‘free_irq’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/interrupt.h:58:
error: declaration for parameter ‘irqreturn_t’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/hardirq.h:162:
error: declaration for parameter ‘irq_exit’ but no such parameter</font>
<br><font face="sans-serif">/usr/src/linux/include/linux/hardirq.h:146:
error: declaration for parameter ‘irq_enter’ but no such parameter</font>
</div>