Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Aug 2012 12:45:08 -0600
From:      Ian Lepore <freebsd@damnhippie.dyndns.org>
To:        Alan Cox <alc@rice.edu>
Cc:        "arm@freebsd.org" <arm@freebsd.org>
Subject:   Re: arm pmap locking
Message-ID:  <1345315508.27688.260.camel@revolution.hippie.lan>
In-Reply-To: <502FD67A.7030003@rice.edu>
References:  <502FD67A.7030003@rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-zJM3S0EIs7z7F5IYigI9
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

On Sat, 2012-08-18 at 12:52 -0500, Alan Cox wrote:
> Can someone here please test the attached patch?  I'm currently working 
> my way through the various pmap implementations eliminating the use of 
> the page queues lock.  Arm is next on my list.
> 
> Alan

I get a panic for recursion on my dreamplug, see attached.  I applied
the patches over this:

FreeBSD dpcur 10.0-CURRENT FreeBSD 10.0-CURRENT #4 r239193M: Sat Aug 18
12:37:24 MDT 2012

The 'M' is some dreamplug-specific changes (dts files, etc).  I had a
quick look and it didn't seem like any of the checkins since r239193
were related to arm pmap.  I can try a fresher checkout when I have more
time if you think it's important.

I tried adding WITNESS to see if it would get you more info, but it
panics for a LOR before getting to the panic in the attached output.
That's not new, it's been there for a while and I haven't had any time
to chase it down.

-- Ian


--=-zJM3S0EIs7z7F5IYigI9
Content-Disposition: attachment; filename="dp_pmap_panic1.txt"
Content-Type: text/plain; name="dp_pmap_panic1.txt"; charset="us-ascii"
Content-Transfer-Encoding: 7bit



U-Boot 2010.03 (Feb 28 2012 - 15:15:53)
Marvell-DreamPlug

SoC:   Kirkwood 88F6281_A0
DRAM:  512 MB
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0, egiga1
88E1121 Initialized on egiga0
88E1121 Initialized on egiga1
Hit any key to stop autoboot:  0 
Marvell>> run fb
Using egiga0 device
TFTP from server 172.22.42.240; our IP address is 172.22.42.100
Filename 'boot/kernel/kernel.bin'.
Load address: 0x900000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##
done
Bytes transferred = 3839160 (3a94b8 hex)
## Starting application at 0x00900000 ...
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 10.0-CURRENT #3 r239193M: Sat Aug 18 12:31:22 MDT 2012
    ilepore@revolution.hippie.lan:/local/build/staging/freebsd/dp10/obj/arm.arm/local/build/staging/freebsd/dp10/src/sys/DP arm
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
CPU: Feroceon 88FR131 rev 1 (Marvell core)
  Little-endian DC enabled IC enabled WA disabled DC streaming enabled
  BTB disabled L2 enabled L2 prefetch enabled
  WB enabled EABT branch prediction enabled
  16KB/32B 4-way instruction cache
  16KB/32B 4-way write-back-locking-C data cache
real memory  = 536870912 (512 MB)
avail memory = 519340032 (495 MB)
SOC: Marvell 88F6281 rev A1, TClock 200MHz
  Instruction cache prefetch disabled, data cache prefetch disabled
  256KB 4-way set-associative write-through unified L2 cache
random device not loaded; using insecure entropy
localbus0: <Marvell device bus> on fdtbus0
nand0: <Marvell NAND controller> mem 0xf9300000-0xf93fffff on localbus0
nandbus0: <NAND bus> on nand0
lnand0: <Samsung NAND 512MiB 3,3V 8-bit> on nandbus0
lnand0: Found BBT table for chip
simplebus0: <Flattened device tree simple bus> on fdtbus0
ic0: <Marvell Integrated Interrupt Controller> mem 0xf1020200-0xf102023b on simplebus0
timer0: <Marvell CPU Timer> mem 0xf1020300-0xf102032f irq 1 on simplebus0
Event timer "CPUTimer0" frequency 200000000 Hz quality 1000
Timecounter "CPUTimer1" frequency 200000000 Hz quality 1000
gpio0: <Marvell Integrated GPIO Controller> mem 0xf1010100-0xf101011f irq 35,36,37,38,39,40,41 on simplebus0
gpio1: <Marvell Integrated GPIO Controller> on simplebus0
simplebus0: no default resources for rid = 0, type = 3
gpio1: could not allocate resources
device_attach: gpio1 attach returned 6
rtc0: <Marvell Integrated RTC> mem 0xf1010300-0xf1010307 on simplebus0
twsi0: <Marvell Integrated I2C Bus Controller> mem 0xf1011000-0xf101101f irq 43 on simplebus0
iicbus0: <Philips I2C bus> on twsi0
iic0: <I2C generic I/O> on iicbus0
mge0: <Marvell Gigabit Ethernet controller> mem 0xf1072000-0xf1073fff irq 12,13,14,11,46 on simplebus0
mge0: Ethernet address: f0:ad:4e:01:16:62
miibus0: <MII bus> on mge0
e1000phy0: <Marvell 88E1116R Gigabit PHY> PHY 0 on miibus0
e1000phy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
mge1: <Marvell Gigabit Ethernet controller> mem 0xf1076000-0xf1077fff irq 16,17,18,15,47 on simplebus0
mge1: Ethernet address: f0:ad:4e:01:16:63
miibus1: <MII bus> on mge1
e1000phy1: <Marvell 88E1116R Gigabit PHY> PHY 1 on miibus1
e1000phy1:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto
uart0: <16550 or compatible> mem 0xf1012000-0xf101201f irq 33 on simplebus0
uart0: console (1056,n,8,1)
uart1: <16550 or compatible> mem 0xf1012100-0xf101211f irq 34 on simplebus0
ehci0: <Marvell Integrated USB 2.0 controller> mem 0xf1050000-0xf1050fff irq 48,19 on simplebus0
usbus0: EHCI version 1.0
usbus0: stop timeout
usbus0: set host controller mode
usbus0 on ehci0
mvs0: <Marvell 88F6281 SATA controller> mem 0xf1080000-0xf1085fff irq 21 on simplebus0
mvs0: Gen-IIe, 2 3Gbps ports, Port Multiplier supported with FBS
mvsch0: <Marvell SATA channel> at channel 0 on mvs0
mvsch1: <Marvell SATA channel> at channel 1 on mvs0
Timecounters tick every 10.000 msec
usbus0: 480Mbps High Speed USB v2.0
ugen0.1: <Marvell> at usbus0
uhub0: <Marvell EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
bootpc_init: wired to interface 'mge0'
Sending DHCP Discover packet from interface mge0 (f0:ad:4e:01:16:62)
Received DHCP Offer packet on mge0 from 0.0.0.0 (accepted) (no root path)
uhub0: 1 port with 1 removable, self powered
mge0: link state changed to UP
ugen0.2: <vendor 0x1a40> at usbus0
uhub1: <vendor 0x1a40 USB 2.0 Hub, class 9/0, rev 2.00/1.11, addr 2> on usbus0
uhub1: 4 ports with 4 removable, self powered
Sending DHCP Request packet from interface mge0 (f0:ad:4e:01:16:62)
Received DHCP Ack packet on mge0 from 0.0.0.0 (accepted) (got root path)
ugen0.3: <vendor 0x05e3> at usbus0
umass0: <vendor 0x05e3 USB Storage, class 0/0, rev 2.00/99.10, addr 3> on usbus0
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: <Generic STORAGE DEVICE 9910> Removable Direct Access SCSI-0 device 
da0: 40.000MB/s transfers
da0: 3781MB (7744512 512 byte sectors: 255H 63S/T 482C)
da1 at umass-sim0 bus 0 scbus2 target 0 lun 1
da1: <Generic STORAGE DEVICE 9910> Removable Direct Access SCSI-0 device 
da1: 40.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
ugen0.4: <vendor 0x0d8c> at usbus0
uaudio0: <vendor 0x0d8c C-Media USB Headphone Set, class 0/0, rev 1.10/1.00, addr 4> on usbus0
uaudio0: Play: 48000 Hz, 2 ch, 16-bit S-LE PCM format.
uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format.
uaudio0: No midi sequencer.
pcm0: <USB audio> on uaudio0
uhid0: <vendor 0x0d8c C-Media USB Headphone Set, class 0/0, rev 1.10/1.00, addr 4> on usbus0
mge0 at 172.22.42.100 server 0.0.0.0
subnet mask 255.255.255.0 router 172.22.42.254 rootfs 172.22.42.240:/dreamplug 
Adjusted interface mge0
WARNING: DIAGNOSTIC option enabled, expect reduced performance.
Trying to mount root from nfs: []...
ifaddr cache = 0xc3f54400  is deleted
NFS ROOT: 172.22.42.240:/dreamplug
panic: _rw_wlock_hard: recursing but non-recursive rw pmap pv global @ /local/build/staging/freebsd/dp10/src/sys/arm/arm/pmap.c:2836

KDB: enter: panic
[ thread pid 1 tid 100001 ]
Stopped at      kdb_enter+0x48: ldrb    r15, [r15, r15, ror r15]!
db> bt
Tracing pid 1 tid 100001 td 0xc350f000
db_md_set_watchpoint() at db_md_set_watchpoint+0x18
scp=0xc0babd98 rlv=0xc0babfcc (db_trace_thread+0x40)
        rsp=0xcf70b43c rfp=0xcf70b448
        r10=0x00000001 r9=0x600000d3
        r8=0xc0cac948 r7=0xc0cac11c r6=0x00000010 r5=0x00000000
        r4=0xc350f000
db_trace_thread() at db_trace_thread+0x14
scp=0xc0babfa0 rlv=0xc092ad90 (db_command_init+0x5f4)
        rsp=0xcf70b44c rfp=0xcf70b46c
db_command_init() at db_command_init+0x574
scp=0xc092ad10 rlv=0xc092a41c (db_skip_to_eol+0x38c)
        rsp=0xcf70b470 rfp=0xcf70b514
        r6=0x00000002 r5=0x00000000
        r4=0xc0c7b334
db_skip_to_eol() at db_skip_to_eol+0x1d0
scp=0xc092a260 rlv=0xc092a638 (db_command_loop+0x50)
        rsp=0xcf70b518 rfp=0xcf70b528
        r10=0xc0cc03e4 r8=0xc0cc03e0
        r7=0x00000001 r6=0x00000000 r5=0xcf70b6f4 r4=0xc0cac118
db_command_loop() at db_command_loop+0x18
scp=0xc092a600 rlv=0xc092ca0c (X_db_sym_numargs+0xa0)
        rsp=0xcf70b52c rfp=0xcf70b648
        r4=0xcf70b530
X_db_sym_numargs() at X_db_sym_numargs+0x18
scp=0xc092c984 rlv=0xc0a83478 (kdb_trap+0xd4)
        rsp=0xcf70b64c rfp=0xcf70b674
        r4=0xc0c7b5fc
kdb_trap() at kdb_trap+0x10
scp=0xc0a833b4 rlv=0xc0bbd6b0 (undefinedinstruction+0x12c)
        rsp=0xcf70b678 rfp=0xcf70b6f0
        r10=0xc350f000 r9=0xc0ca6624
        r8=0xc0a82f7c r7=0xe7ffffff r6=0xcf70b6f4 r5=0x00000000
        r4=0x00000000
undefinedinstruction() at undefinedinstruction+0x10
scp=0xc0bbd594 rlv=0xc0bad868 (address_exception_entry+0x50)
        rsp=0xcf70b6f4 rfp=0xcf70b754
        r10=0x00000070 r9=0xc17b7000
        r8=0xc0c98198 r7=0xc350f000 r6=0xc0c0bf78 r5=0xffff1004
        r4=0xffffffff
kdb_enter() at kdb_enter+0x14
scp=0xc0a82f48 rlv=0xc0a5556c (panic+0x12c)
        rsp=0xcf70b758 rfp=0xcf70b76c
        r5=0xc0cb29f8 r4=0x00000100
panic() at panic+0x18
scp=0xc0a55458 rlv=0xc0a53794 (_rw_wlock_hard+0x180)
        rsp=0xcf70b780 rfp=0xcf70b7a4
_rw_wlock_hard() at _rw_wlock_hard+0x10
scp=0xc0a53624 rlv=0xc0a53830 (_rw_wlock+0x90)
        rsp=0xcf70b7a8 rfp=0xcf70b7c0
        r8=0x0000001c r7=0xc0ccf318
        r6=0xc0ca6624 r5=0xc0c2f544 r4=0x00000b14
_rw_wlock() at _rw_wlock+0x10
scp=0xc0a537b0 rlv=0xc0bb8fd8 (pmap_qenter+0x204)
        rsp=0xcf70b7c4 rfp=0xcf70b814
        r6=0x00000304 r5=0x00000c17
        r4=0xc0ecbf58
pmap_qenter() at pmap_qenter+0x10
scp=0xc0bb8de4 rlv=0xc0b83fe4 (uma_print_zone+0x2fc)
        rsp=0xcf70b818 rfp=0xcf70b854
        r10=0x00000000 r9=0x00000000
        r8=0x00000017 r7=0xc17b7000 r6=0x00000000 r5=0x00000017
        r4=0x00000001
uma_print_zone() at uma_print_zone+0x274
scp=0xc0b83f5c rlv=0xc0b85c4c (uma_zcreate+0xec)
        rsp=0xcf70b858 rfp=0xcf70b890
        r10=0xc0b83f4c r9=0xc0e096e0
        r8=0x00000101 r7=0x00000000 r6=0x00000001 r5=0xc0e0a600
        r4=0x00000001
uma_zcreate() at uma_zcreate+0x70
scp=0xc0b85bd0 rlv=0xc0b861f4 (uma_prealloc+0x22c)
        rsp=0xcf70b894 rfp=0xcf70b8bc
        r10=0xc0e0a608 r9=0x00000080
        r8=0x00000000 r7=0xc0e096e0 r6=0x00000001 r5=0xc0e0a600
        r4=0xc0e0a600
uma_prealloc() at uma_prealloc+0x134
scp=0xc0b860fc rlv=0xc0b8638c (uma_prealloc+0x3c4)
        rsp=0xcf70b8c0 rfp=0xcf70b8d8
        r10=0xc0df5a3c r8=0xc0e096e0
        r7=0x00000068 r6=0xc0e096e0 r5=0x00000001 r4=0xc0e0a600
uma_prealloc() at uma_prealloc+0x398
scp=0xc0b86360 rlv=0xc0b87940 (uma_zalloc_arg+0x400)
        rsp=0xcf70b8dc rfp=0xcf70b920
        r6=0xc17b6de8 r5=0x00000068
        r4=0x00000069
uma_zalloc_arg() at uma_zalloc_arg+0x10
scp=0xc0b87550 rlv=0xc0bb6ed0 (pmap_release+0xd54)
        rsp=0xcf70b924 rfp=0xcf70b998
        r10=0x00000000 r9=0x0279200e
        r8=0xc35110b0 r7=0xc3f80e90 r6=0x00000000 r5=0xc3f80e90
        r4=0x02792002
pmap_release() at pmap_release+0x320
scp=0xc0bb649c rlv=0xc0bb75ac (pmap_enter_quick+0x6c)
        rsp=0xcf70b99c rfp=0xcf70b9c8
        r10=0xc0ccffac r9=0x00000000
        r8=0x000b6000 r7=0xc0ecbf0c r6=0x00000000 r5=0xc35110b0
        r4=0xc0c2f544
pmap_enter_quick() at pmap_enter_quick+0x10
scp=0xc0bb7550 rlv=0xc0b8a764 (vm_fault_hold+0x1a80)
        rsp=0xcf70b9cc rfp=0xcf70bb4c
        r10=0xc0df9940 r8=0x000000ae
        r7=0x00000000 r6=0x00000000 r5=0xc0dfdd80 r4=0x000ae000
vm_fault_hold() at vm_fault_hold+0x10
scp=0xc0b88cf4 rlv=0xc0b8a974 (vm_fault+0x48)
        rsp=0xcf70bb50 rfp=0xcf70bb64
        r10=0x00000001 r9=0xcf70bef8
        r8=0xcf70bc0c r7=0xc350f000 r6=0x000b7000 r5=0x00000000
        r4=0x000b7000
vm_fault() at vm_fault+0x10
scp=0xc0b8a93c rlv=0xc0bbc8d8 (data_abort_handler+0x1ec)
        rsp=0xcf70bb68 rfp=0xcf70bc08
        r4=0xc350d088
data_abort_handler() at data_abort_handler+0x10
scp=0xc0bbc6fc rlv=0xc0bad868 (address_exception_entry+0x50)
        rsp=0xcf70bc0c rfp=0xcf70bcd8
        r10=0xcf70bcdc r9=0x00000000
        r8=0xc0cc2424 r7=0x05000104 r6=0x00000000 r5=0xffff1004
        r4=0xffffffff
namei() at namei+0x10
scp=0xc0ad3390 rlv=0xc0ae4768 (kern_readlinkat+0x80)
        rsp=0xcf70bcdc rfp=0xcf70bda4
        r10=0xcf70bcdc r9=0x00000000
        r8=0xcf70be30 r7=0xc350f000 r6=0x00000000 r5=0x00000000
        r4=0x00000000
kern_readlinkat() at kern_readlinkat+0x10
scp=0xc0ae46f8 rlv=0xc0ae48a8 (kern_readlink+0x38)
        rsp=0xcf70bda8 rfp=0xcf70bdc4
        r10=0x00000000 r9=0x00000000
        r8=0xcf70be30 r7=0xc350f000 r6=0x00000000 r5=0xc350d000
        r4=0x00000400
kern_readlink() at kern_readlink+0x10
scp=0xc0ae4880 rlv=0xc0ae48dc (sys_readlink+0x2c)
        rsp=0xcf70bdc8 rfp=0xcf70bddc
        r4=0xbfffe9ff
sys_readlink() at sys_readlink+0x10
scp=0xc0ae48c0 rlv=0xc0bbcf70 (swi_handler+0x370)
        rsp=0xcf70bde0 rfp=0xcf70bea4
swi_handler() at swi_handler+0x10
scp=0xc0bbcc10 rlv=0xc0bad644 (swi_entry+0x44)
        rsp=0xcf70bea8 rfp=0xbfffee30
        r10=0x00000001 r8=0x000e1118
        r7=0x00000000 r6=0xcf70beac r5=0xfffffbf7 r4=0xbfffe9ff
fiqvector() at 0x24d30
scp=0x00024d30 rlv=0x00025b1c (0x25b1c)
        rsp=0xbfffee34 rfp=0xbfffee48
        r10=0x00000000 r9=0x00000000
        r8=0x000e1118 r7=0x00000000 r6=0x00000002 r5=0x00000001
        r4=0x00000040
fiqvector() at 0x25b14
scp=0x00025b14 rlv=0x00025b94 (0x25b94)
        rsp=0xbfffee4c rfp=0xbfffee58
        r5=0x00000000 r4=0x00000008
fiqvector() at 0x25b8c
scp=0x00025b8c rlv=0x0001f48c (0x1f48c)
        rsp=0xbfffee5c rfp=0xbfffee80
fiqvector() at 0x1f454
scp=0x0001f454 rlv=0x0001f404 (0x1f404)
        rsp=0xbfffee84 rfp=0xbfffee98
        r10=0x00000000 r8=0x00000000
        r7=0x00000000 r6=0x00000002 r5=0x00000038 r4=0x00000004
fiqvector() at 0x1f300
scp=0x0001f300 rlv=0x000081cc (0x81cc)
        rsp=0xbfffee9c rfp=0xbfffeebc
        r5=0xbfffeed0 r4=0xbfffeedc
fiqvector() at 0x8150
scp=0x00008150 rlv=0x00008110 (0x8110)
        rsp=0xbfffeec0 rfp=0x00000000
        r8=0x00000000 r7=0x00000000
        r6=0x00000000 r5=0x00000000 r4=0x00000000
db> 


--=-zJM3S0EIs7z7F5IYigI9--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1345315508.27688.260.camel>