Port-arm archive

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

Re: [PATCH] ARM: VIPT cache coherency fix



On Thu, Aug 07, 2008 at 01:40:12PM +0300, Imre Deak wrote:
> On Wed, Aug 06, 2008 at 03:48:22PM -0700, Matt Thomas wrote:
> >
> > On Aug 6, 2008, at 2:55 AM, Imre Deak wrote:
> >
> >> Currently page loaning (at least) is broken on ARM VIPT platforms.
> >> The reason is that possible dirty cache lines are not taken into  
> >> account
> >> at the moment, following is a fix for this.
> >>
> >> The fix is validated against the latest breakage related to the socket
> >> page loaning reported earlier on the list.
> >
> > This is close to what I checked in but actually has a few missing corner
> > cases.  The version I checked works for the always failing
> > scp sdp:/lib/libc.so .
> 
> I have a boot-time crash with your patch see a follow-up mail about it.
> 

The following is easily reproducible with today's -current. Removing the
latest pmap changes gets away with the crash.

--Imre

NetBSD/evbarm (SDP2430) booting ...
initarm: Configuring system ...
Allocating page tables
setup_real_page_tables: physical_freestart 0x80554000
setup_real_page_tables: kernel_l1pt: 0x80554000:0x80554000
setup_real_page_tables: kernel_pt_table:
        0x80558000:0x80558000
        0x80559000:0x80559000
        0x8055a000:0x8055a000
        0x8055b000:0x8055b000
        0x8055c000:0x8055c000
        0x8055d000:0x8055d000
        0x8055e000:0x8055e000
        0x8055f000:0x8055f000
        0x80560000:0x80560000
Creating L1 page table at 0x80554000
Mapping kernel
pmap_map_chunk: pa=0x80300000 va=0x80300000 size=0x1d0000 resid=0x1d0000 prot=01
SLLLLLLLLLLLLL
pmap_map_chunk: pa=0x804d0000 va=0x804d0000 size=0x90000 resid=0x90000 prot=0x31
LLLLLLLLL
Constructing L2 page tables
pmap_map_chunk: pa=0x80562000 va=0x80562000 size=0x1000 resid=0x1000 prot=0x3 c1
P
pmap_map_chunk: pa=0x80563000 va=0x80563000 size=0x1000 resid=0x1000 prot=0x3 c1
P
pmap_map_chunk: pa=0x80564000 va=0x80564000 size=0x1000 resid=0x1000 prot=0x3 c1
P
pmap_map_chunk: pa=0x80565000 va=0x80565000 size=0x2000 resid=0x2000 prot=0x3 c1
PP
pmap_map_chunk: pa=0x80554000 va=0x80554000 size=0x4000 resid=0x4000 prot=0x3 c2
PPPP
pmap_map_chunk: pa=0x80558000 va=0x80558000 size=0x1000 resid=0x1000 prot=0x3 c2
P
pmap_map_chunk: pa=0x80559000 va=0x80559000 size=0x1000 resid=0x1000 prot=0x3 c2
P
pmap_map_chunk: pa=0x8055a000 va=0x8055a000 size=0x1000 resid=0x1000 prot=0x3 c2
P
pmap_map_chunk: pa=0x8055b000 va=0x8055b000 size=0x1000 resid=0x1000 prot=0x3 c2
P
pmap_map_chunk: pa=0x8055c000 va=0x8055c000 size=0x1000 resid=0x1000 prot=0x3 c2
P
pmap_map_chunk: pa=0x8055d000 va=0x8055d000 size=0x1000 resid=0x1000 prot=0x3 c2
P
pmap_map_chunk: pa=0x8055e000 va=0x8055e000 size=0x1000 resid=0x1000 prot=0x3 c2
P
pmap_map_chunk: pa=0x8055f000 va=0x8055f000 size=0x1000 resid=0x1000 prot=0x3 c2
P
pmap_map_chunk: pa=0x80560000 va=0x80560000 size=0x1000 resid=0x1000 prot=0x3 c2
P
devmap: 48000000 -> 480fffff @ 8d000000
pmap_map_chunk: pa=0x48000000 va=0x8d000000 size=0x100000 resid=0x100000 prot=00
S
devmap: 49000000 -> 490fffff @ 8e000000
pmap_map_chunk: pa=0x49000000 va=0x8e000000 size=0x100000 resid=0x100000 prot=00
S
                             Physical              Virtual        Num
                       Starting    Ending    Starting    Ending   Pages
               SDRAM: 0x80300000 0x83ffffff 0x80300000 0x83ffffff 15616
        text section: 0x80300000 0x804c90fb 0x80300000 0x804c90fb 464
        data section: 0x804d0000 0x8051f800 0x804d0000 0x8051f800 80
         bss section: 0x8051f800 0x80553e7c 0x8051f800 0x80553e7c 53
   L1 page directory: 0x80554000 0x80557fff 0x80554000 0x80557fff 4
   Exception Vectors: 0x80561000 0x80561fff 0xffff0000 0xffff0fff 1
           IRQ stack: 0x80562000 0x80562fff 0x80562000 0x80562fff 1
           ABT stack: 0x80563000 0x80563fff 0x80563000 0x80563fff 1
           UND stack: 0x80564000 0x80564fff 0x80564000 0x80564fff 1
           SVC stack: 0x80565000 0x80566fff 0x80565000 0x80566fff 2
      Message Buffer: 0x80567000 0x80567fff                       1
         Free Memory: 0x80568000 0x83ffffff 0x80568000 0x83ffffff 15000
switching to new L1 page table  @0x80554000...OK.
bootstrap done.
init subsystems: stacks vectors undefined page pmap done.
initarm done.
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008
    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 4.99.72 (TISDP2420) #0: Thu Aug  7 11:54:53 EEST 2008
total memory = 62464 KB
avail memory = 58188 KB
mainbus0 (root)
cpu0 at mainbus0: ARM1136J-S r0p2 (ARM11J core)
cpu0: DC enabled IC enabled WB enabled LABT
cpu0: 32KB/32B 4-way Instruction cache
cpu0: 32KB/32B 4-way write-back-locking-C Data cache
obio0 at mainbus0 base 0x48000000-0x48ffffff: On-Board IO
com0 at obio0 addr 0x4806a000-0x4806a3ff: ns16550a, working fifo
com0: console
omapicu0 at obio0 addr 0x480fe000-0x480fefff intrbase 0
omapgpio0 at obio0 addr 0x48018000-0x480183ff intr 29 intrbase 96: interrupts 99
omapgpio1 at obio0 addr 0x4801a000-0x4801a3ff intr 30 intrbase 128: interrupts 0
omapgpio2 at obio0 addr 0x4801c000-0x4801c3ff intr 31 intrbase 160: interrupts 1
omapgpio3 at obio0 addr 0x4801e000-0x4801e3ff intr 32 intrbase 192: interrupts 2
omap2430mputmr0 at obio0 addr 0x4802a000-0x4802a0ff intr 38: OMAP MPU Timer #2
omap2430mputmr1 at obio0 addr 0x48078000-0x480780ff intr 39: OMAP MPU Timer #3
omap2430mputmr2 at obio0 addr 0x4807a000-0x4807a0ff intr 40: OMAP MPU Timer #4
omapwdt32k0 at obio0 addr 0x48026000-0x480267ff: rev 1.1
obio1 at mainbus0 base 0x49000000-0x497fffff: On-Board IO
L3i0 at mainbus0: L3i Interconnect
gpmc0 at mainbus0 base 0x6800a000: General Purpose Memory Controller, rev 2.0
gpmc0: CS#0 valid, addr 0x04000000, size  64MB
gpmc0: CS#1 valid, addr 0x08000000, size  16MB
sm0 at gpmc0 addr 0x08000300 intr 188
sm0: SMC91C94/91C96, revision 9, buffer size: 6144
sm0: MAC address 08:00:28:01:17:e8, default media UTP
clock: hz=100 stathz=64
gpio0 at omapgpio0: 32 pins
gpio1 at omapgpio1: 32 pins
gpio2 at omapgpio2: 32 pins
gpio3 at omapgpio3: 32 pins
boot device: <unknown>
root on sm0
nfs_boot: trying static
nfs_boot: client_addr=192.168.1.101
nfs_boot: gateway=192.168.1.150
nfs_boot: netmask=255.255.255.0
nfs_boot: server=192.168.1.150
nfs_boot: root=192.168.1.150:/home/imde/work/netbsd-dist
root on 192.168.1.150:/home/imde/work/netbsd-dist
WARNING: no TOD clock present
WARNING: using filesystem time
WARNING: CHECK AND RESET THE DATE!
warning: no /dev/console

uvm_fault(0x81cbddd0, 0, 1) -> e
Fatal kernel mode data abort: 'Translation Fault (P)'
trapframe: 0x8295bce8
FSR=00000007, FAR=00000040, spsr=60000013
r0 =80556040, r1 =8055d1f1, r2 =8055d1f1, r3 =00000461
r4 =8055248c, r5 =00000000, r6 =00000552, r7 =00000000
r8 =8054e830, r9 =8055273c, r10=00000000, r11=8295bd80
r12=00000000, ssp=8295bd34, slr=00002040, pc =80482850

Stopped in pid 2.1 (sh) at      netbsd:pmap_enter+0x328:        ldr     r2, [r12
, #0x040]

db> bt
netbsd:pmap_enter+0xc
        scp=0x80482534 rlv=0x8047e5e4 (netbsd:mmrw+0x120)
        rsp=0x8295bd84 rfp=0x8295bda8
        r10=0x8296df50 r9=0x8295be98
        r8=0x00000000 r7=0x00000000 r6=0x8055269c r5=0x8295be98
        r4=0x8055272c
netbsd:mmrw+0x18
        scp=0x8047e4dc rlv=0x804094a4 (netbsd:cdev_write+0x3c)
        rsp=0x8295bdac rfp=0x8295bdc4
        r8=0x2020f400 r7=0x0000002d
        r6=0x00000000 r5=0x00000010 r4=0x8295be98
netbsd:cdev_write+0xc
        scp=0x80409474 rlv=0x804634d0 (netbsd:spec_write+0x98)
        rsp=0x8295bdc8 rfp=0x8295be24
        r6=0x82973004 r5=0x8296fc40
        r4=0x8295be44
netbsd:spec_write+0x10
        scp=0x80463448 rlv=0x8035cd34 (netbsd:tmpfs_spec_write+0x64)
        rsp=0x8295be28 rfp=0x8295be3c
        r10=0x8296df50 r9=0x00000004
        r8=0x2020f400 r7=0x0000002d r6=0x8295be98 r5=0x8295be44
        r4=0x82973004
netbsd:tmpfs_spec_write+0x10
        scp=0x8035cce0 rlv=0x8045c95c (netbsd:VOP_WRITE+0x38)
        rsp=0x8295be40 rfp=0x8295be64
        r5=0x82973004 r4=0x00000010
netbsd:VOP_WRITE+0xc
        scp=0x8045c930 rlv=0x80456694 (netbsd:vn_write+0xb0)
        rsp=0x8295be68 rfp=0x8295be8c
netbsd:vn_write+0xc
        scp=0x804565f0 rlv=0x8041a5a8 (netbsd:dofilewrite+0x84)
        rsp=0x8295be90 rfp=0x8295bee0
        r10=0x8051ef74 r8=0x2020f400
        r7=0x00000001 r6=0x8295bf60 r5=0x0000002d r4=0x00000001
netbsd:dofilewrite+0xc
        scp=0x8041a530 rlv=0x8041a6dc (netbsd:sys_write+0x74)
        rsp=0x8295bee4 rfp=0x8295bf08
        r10=0x7fffe8b8 r8=0x8296fc40
        r7=0x8295bfb8 r6=0x8295bf60 r5=0x8295bfb8 r4=0x00000001
netbsd:sys_write+0xc
        scp=0x8041a674 rlv=0x8047a1dc (netbsd:syscall_plain+0x130)
        rsp=0x8295bf0c rfp=0x8295bf90
        r6=0x8295bfb4 r5=0x00000003
        r4=0x8295bfb4
netbsd:syscall_plain+0x10
        scp=0x8047a0bc rlv=0x8047a708 (netbsd:swi_handler+0x88)
        rsp=0x8295bf94 rfp=0x8295bfb0
        r10=0x7fffe8b8 r9=0x0003019c
        r8=0x0000002d r7=0x81cb8c08 r6=0xefa00004 r5=0x8296fc40
        r4=0x8295bfb4
netbsd:swi_handler+0x14
        scp=0x8047a694 rlv=0x8047d3c0 (netbsd:swi_entry+0x2c)
        rsp=0x8295bfb4 rfp=0x7fffe73c
        r7=0x00000000 r6=0x00000001
        r5=0x2020f400 r4=0x8051ef74



Home | Main Index | Thread Index | Old Index