Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: powerpc/pic/intr.c IPL_HIGH vs IPL_NONE



Hi! Frank,


From: Frank Wille <frank%phoenix.owl.de@localhost>
Date: Wed, 03 Oct 2012 19:24:27 +0200

> KIYOHARA Takashi wrote:
> 
> > The hangup reason is changing imask[IPL_HIGH] to 0x3ffe0000 from
> > 0x7ffe0000.
> 
> Which means it was 0x7ffe0000 before, and now it is 0x3ffe0000?
> 
> Can you compile the kernel with PIC_DEBUG, to get some more information
> about the irqs, virqs and masks in your system?

The attached ipl.log is after r1.23:

  ih->ih_ipl = ipl;

And attached maxipl.log is before r1.22:

  ih->ih_ipl = maxipl;


'hwirq 42 to virq 1' is established i8259 with IPL_NONE in
arch/bebox/bebox/machdep.c:cpu_startup().
# 42 => 16(cascading i8259) + 26(cascaded to bebox pic)

Interrupt is enabled by spl0() in genppc_cpu_configure.
And pic_handle_intr() is called the interrupt 26.  However imask[0..7]
is not masked virq 1.

pic_handler_intr() ---
1st call
========
        if ((imask[pcpl] & v_imen) != 0) {
                :                               <-- Don't reached.
                pic->pic_disable_irq(pic, picirq);
        } else {
                :
                splraise(is->is_ipl);           <-- splraise(IPL_HIGH)
                mtmsr(msr | PSL_EE);            <-- interrupt enable!!
                                                    And 2nd call
                intr_deliver(is, virq);         <-- not reached...
        }


2nd call
========
        if ((imask[pcpl] & v_imen) != 0) {
                :                               <-- Oops, don't reached.
                pic->pic_disable_irq(pic, picirq);
        } else {
                :
                splraise(is->is_ipl);           <-- splraise(IPL_HIGH)
                mtmsr(msr | PSL_EE);            <-- interrupt enable!!
                                                    And 3rd call, 4th, 5th...
                intr_deliver(is, virq);         <-- not reached...  X-<
        }

--- pic_handler_intr()

Shall I change to call intr_establish() with IPL_HIGH in cpu_startup()?
Or

  ih->ih_ipl = (ipl != IPL_NONE) ? ipl : maxipl;

Thanks,
--
kiyohara
>> NetBSD/bebox BOOT, Revision 1.10 (Mon Dec 24 21:29:57 JST 2012)
>> Memory: 262144 k

/dev/disk/scsi/0/0/0: <FIREBALL ST4.3S >
/dev/disk/ide/0/master/0: <WDC AC36400L>

Boot: /dev/disk/scsi/000/0_0:/netbsd.ipl -s
Loading /dev/disk/scsi/000/0_0:/netbsd.ipl
3576092+144980 [216448+207854]=0x3f4574
start=0x100000

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 6.99.15 (GENERIC) #7: Fri Dec 28 23:41:13 JST 2012
        lance%magician.fool@localhost:/usr/src/sys/arch/bebox/compile/GENERIC
total memory = 256 MB
avail memory = 244 MB
mapping hwirq 42 to virq 1
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 00000000 -> 00000000
6: 00000000 -> 00000000
7: 00000000 -> 00000000
befs_init
mainbus0 (root)
cpu0 at mainbus0: 603e (Revision 4.0), ID 0 (primary)
cpu0: HID0 0x90c000<DOZE,DPM,ICE,DCE>, powersave: 1
cpu1 at mainbus0: ID 1
cpu1: processor off-line; multiprocessor support not present in kernel
pci0 at mainbus0 bus 0: indirect configuration space access
pchb0 at pci0 dev 0 function 0
pchb0: Motorola MPC105 "Eagle" Host Bridge (rev. 0x24)
pchb0: L2 cache: 256K, multiprocessor mode
pcib0 at pci0 dev 11 function 0: Intel 82378ZB System I/O (rev. 0x43)
siop0 at pci0 dev 12 function 0: Symbios Logic 53c810 (fast scsi)
mapping hwirq 26 to virq 2
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 00000000 -> 20000000
6: 00000000 -> 20000000
7: 00000000 -> 20000000
siop0: interrupting at irq 26
scsibus0 at siop0: 8 targets, 8 luns per target
ppb0 at pci0 dev 13 function 0: HiNT HB1 PCI-PCI Bridge (rev. 0x15)
pci1 at ppb0 bus 1
Texas Instruments product 0x8025 (Firewire serial bus, interface 0x10, revision
0x01) at pci1 dev 0 function 0 not configured
NEC USB Host Controller (USB serial bus, interface 0x10, revision 0x43) at pci1
dev 1 function 0 not configured
NEC USB Host Controller (USB serial bus, interface 0x10, revision 0x43) at pci1
dev 1 function 1 not configured
NEC USB2 Host Controller (USB serial bus, interface 0x20, revision 0x04) at pci1
 dev 1 function 2 not configured
vga0 at pci0 dev 14 function 0: S3 Trio32/64 (rev. 0x44)
wsdisplay1 at vga0 kbdmux 1
drm at vga0 not configured
bktr0 at pci0 dev 15 function 0
mapping hwirq 29 to virq 3
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 20000000 -> 30000000
6: 20000000 -> 30000000
7: 20000000 -> 30000000
bktr0: interrupting at irq 29
bktr0: Hauppauge Model 56111 C
bktr0: Hauppauge WinCast/TV, Philips NTSC tuner, dbx stereo.
isa0 at pcib0
lpt0 at isa0 port 0x378-0x37b irq 7
mapping hwirq 7 to virq 4
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 30000000 -> 38000000
6: 30000000 -> 38000000
7: 30000000 -> 38000000
ne0 at isa0 port 0x300-0x31f irq 5
ne0: NE2000 (RTL8019) Ethernet
ne0: Ethernet address 00:c0:26:38:61:94
ne0: 10base2, 10baseT, 10baseT-FDX, auto, default [0x00 0x30] auto
mapping hwirq 5 to virq 5
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 38000000 -> 3c000000
6: 38000000 -> 3c000000
7: 38000000 -> 3c000000
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
mapping hwirq 4 to virq 6
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c000000
6: 3c000000 -> 3c000000
7: 3c000000 -> 3e000000
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
mapping hwirq 3 to virq 7
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c000000
6: 3c000000 -> 3c000000
7: 3e000000 -> 3f000000
com2 at isa0 port 0x380-0x387 irq 22: ns16550a, working fifo
mapping hwirq 22 to virq 8
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c000000
6: 3c000000 -> 3c000000
7: 3f000000 -> 3f800000
com3 at isa0 port 0x388-0x38f irq 23: ns16550a, working fifo
mapping hwirq 23 to virq 9
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c000000
6: 3c000000 -> 3c000000
7: 3f800000 -> 3fc00000
pckbc0 at isa0 port 0x60-0x64
pckbdprobe: reset response 0x0
pms0 at pckbc0 (aux slot)
mapping hwirq 12 to virq 10
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c200000
6: 3c000000 -> 3c200000
7: 3fc00000 -> 3fe00000
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer0 at isa0 port 0x40-0x43
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
mapping hwirq 14 to virq 11
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c200000 -> 3c300000
6: 3c200000 -> 3c300000
7: 3fe00000 -> 3ff00000
atabus0 at wdc0 channel 0
joy0 at isa0 port 0x201
joy0: joystick not connected
wss0 at isa0 port 0x82c-0x833 irq 30 drq 6,7mapping hwirq 30 to virq 12
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c300000 -> 3c300000
6: 3c300000 -> 3c380000
7: 3ff00000 -> 3ff80000
: CS4231A
audio0 at wss0: full duplex, playback, capture, mmap
mcclock0 at isa0 port 0x70-0x71: mc146818 compatible time-of-day clock
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
mapping hwirq 6 to virq 13
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c300000 -> 3c340000
6: 3c380000 -> 3c3c0000
7: 3ff80000 -> 3ffc0000
vmmask 3c340000 schedmask 3c3c0000 highmask 3ffc0000
>> NetBSD/bebox BOOT, Revision 1.10 (Mon Dec 24 21:29:57 JST 2012)
>> Memory: 262144 k

/dev/disk/scsi/0/0/0: <FIREBALL ST4.3S >
/dev/disk/ide/0/master/0: <WDC AC36400L>

Boot: /dev/disk/scsi/000/0_0:/netbsd.maxipl -s
Loading /dev/disk/scsi/000/0_0:/netbsd.maxipl
3576092+144980 [216448+207854]=0x3f4574
start=0x100000

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 6.99.15 (GENERIC) #8: Fri Dec 28 23:48:19 JST 2012
        lance%magician.fool@localhost:/usr/src/sys/arch/bebox/compile/GENERIC
total memory = 256 MB
avail memory = 244 MB
mapping hwirq 42 to virq 1
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 00000000 -> 00000000
6: 00000000 -> 00000000
7: 00000000 -> 40000000
befs_init
mainbus0 (root)
cpu0 at mainbus0: 603e (Revision 4.0), ID 0 (primary)
cpu0: HID0 0x90c000<DOZE,DPM,ICE,DCE>, powersave: 1
cpu1 at mainbus0: ID 1
cpu1: processor off-line; multiprocessor support not present in kernel
pci0 at mainbus0 bus 0: indirect configuration space access
pchb0 at pci0 dev 0 function 0
pchb0: Motorola MPC105 "Eagle" Host Bridge (rev. 0x24)
pchb0: L2 cache: 256K, multiprocessor mode
pcib0 at pci0 dev 11 function 0: Intel 82378ZB System I/O (rev. 0x43)
siop0 at pci0 dev 12 function 0: Symbios Logic 53c810 (fast scsi)
mapping hwirq 26 to virq 2
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 00000000 -> 20000000
6: 00000000 -> 20000000
7: 40000000 -> 60000000
siop0: interrupting at irq 26
scsibus0 at siop0: 8 targets, 8 luns per target
ppb0 at pci0 dev 13 function 0: HiNT HB1 PCI-PCI Bridge (rev. 0x15)
pci1 at ppb0 bus 1
Texas Instruments product 0x8025 (Firewire serial bus, interface 0x10, revision
0x01) at pci1 dev 0 function 0 not configured
NEC USB Host Controller (USB serial bus, interface 0x10, revision 0x43) at pci1
dev 1 function 0 not configured
NEC USB Host Controller (USB serial bus, interface 0x10, revision 0x43) at pci1
dev 1 function 1 not configured
NEC USB2 Host Controller (USB serial bus, interface 0x20, revision 0x04) at pci1
 dev 1 function 2 not configured
vga0 at pci0 dev 14 function 0: S3 Trio32/64 (rev. 0x44)
wsdisplay1 at vga0 kbdmux 1
drm at vga0 not configured
bktr0 at pci0 dev 15 function 0
mapping hwirq 29 to virq 3
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 20000000 -> 30000000
6: 20000000 -> 30000000
7: 60000000 -> 70000000
bktr0: interrupting at irq 29
bktr0: Hauppauge Model 56111 C
bktr0: Hauppauge WinCast/TV, Philips NTSC tuner, dbx stereo.
isa0 at pcib0
lpt0 at isa0 port 0x378-0x37b irq 7
mapping hwirq 7 to virq 4
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 30000000 -> 38000000
6: 30000000 -> 38000000
7: 70000000 -> 78000000
ne0 at isa0 port 0x300-0x31f irq 5
ne0: NE2000 (RTL8019) Ethernet
ne0: Ethernet address 00:c0:26:38:61:94
ne0: 10base2, 10baseT, 10baseT-FDX, auto, default [0x00 0x30] auto
mapping hwirq 5 to virq 5
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 38000000 -> 3c000000
6: 38000000 -> 3c000000
7: 78000000 -> 7c000000
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
mapping hwirq 4 to virq 6
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c000000
6: 3c000000 -> 3c000000
7: 7c000000 -> 7e000000
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
mapping hwirq 3 to virq 7
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c000000
6: 3c000000 -> 3c000000
7: 7e000000 -> 7f000000
com2 at isa0 port 0x380-0x387 irq 22: ns16550a, working fifo
mapping hwirq 22 to virq 8
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c000000
6: 3c000000 -> 3c000000
7: 7f000000 -> 7f800000
com3 at isa0 port 0x388-0x38f irq 23: ns16550a, working fifo
mapping hwirq 23 to virq 9
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c000000
6: 3c000000 -> 3c000000
7: 7f800000 -> 7fc00000
pckbc0 at isa0 port 0x60-0x64
pckbdprobe: reset response 0x0
pms0 at pckbc0 (aux slot)
mapping hwirq 12 to virq 10
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c000000 -> 3c200000
6: 3c000000 -> 3c200000
7: 7fc00000 -> 7fe00000
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer0 at isa0 port 0x40-0x43
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
mapping hwirq 14 to virq 11
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c200000 -> 3c300000
6: 3c200000 -> 3c300000
7: 7fe00000 -> 7ff00000
atabus0 at wdc0 channel 0
joy0 at isa0 port 0x201
joy0: joystick not connected
wss0 at isa0 port 0x82c-0x833 irq 30 drq 6,7mapping hwirq 30 to virq 12
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c300000 -> 3c300000
6: 3c300000 -> 3c380000
7: 7ff00000 -> 7ff80000
: CS4231A
audio0 at wss0: full duplex, playback, capture, mmap
mcclock0 at isa0 port 0x70-0x71: mc146818 compatible time-of-day clock
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
mapping hwirq 6 to virq 13
0: 00000000 -> 00000000
1: 00000000 -> 00000000
2: 00000000 -> 00000000
3: 00000000 -> 00000000
4: 00000000 -> 00000000
5: 3c300000 -> 3c340000
6: 3c380000 -> 3c3c0000
7: 7ff80000 -> 7ffc0000
vmmask 3c340000 schedmask 3c3c0000 highmask 7ffc0000
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <QUANTUM, FIREBALL ST4.3S, 0F0C> disk fixed
sd0: 4159 MB, 7068 cyl, 6 head, 200 sec, 512 bytes/sect x 8519216 sectors
sd0: sync (100.00ns offset 8), 8-bit (10.000MB/s) transfers, tagged queueing
fd0 at fdc0 drive 1: 1.44MB, 80 cyl, 2 head, 18 sec
cd0 at scsibus0 target 5 lun 0: <TEAC, CD-ROM CD-56S, 1.0D> cdrom removable
cd0: sync (100.00ns offset 8), 8-bit (10.000MB/s) transfers
wd0 at atabus0 drive 0
wd0: <WDC AC36400L>
wd0: 6149 MB, 13328 cyl, 15 head, 63 sec, 512 bytes/sect x 12594960 sectors
boot device: sd0
root on sd0a dumps on sd0b
root file system type: ffs
Enter pathname of shell or RETURN for /bin/sh:
We recommend that you create a non-root account and use su(1) for root access.


Home | Main Index | Thread Index | Old Index