[lkml]   [2010]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectUSB mass storage and ARM cache coherency
    Hi Matthew,

    I've been trying for some time to use a rootfs (ext2) on a USB memory
    stick on ARM platforms but without any success. The USB HCD driver is
    ISP1760 which doesn't use DMA.

    ARM has a Harvard cache architecture and what I get is incoherency
    between the I and D caches. The CPU I'm using (ARM11MPCore) has PIPT
    caches with D-cache lines allocation on write.

    Basically, when user space tries to execute from a new page, it faults
    and the data is requested via the VFS layer, SCSI block device and USB
    mass storage from the ISP1760 driver. The page is then mapped into user
    space and update_mmu_cache() called.

    However, since the driver is PIO, the data copied from the USB device
    into RAM gets stuck in the D-cache. On the above page requesting path
    there is no call to flush_dcache_page() to handle D-cache maintenance
    (for DMA drivers, that's handled by the DMA API).

    Since the USB mass storage code has the information about the USB driver
    capabilities (DMA or PIO), it looks like the best place to call
    flush_dcache_page(). But I got lost in the SCSI emulation and all my
    attempts failed to get a working rootfs.

    Adding flush_dcache_page() higher up in mpage_end_io_read() solves the
    problem but that's not the correct fix as it has wider implications and
    it's not needed for DMA-capable devices.



     \ /
      Last update: 2010-01-29 15:37    [W:0.018 / U:40.576 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site