[Cbe-oss-dev] [patch 3/5] cell: updated driver for DDR2 memory on AXON

Maxim Shchetynin maxim at de.ibm.com
Wed Jun 27 00:57:11 EST 2007


Hi,

Actually, axon_ram's direct_access method would not be used by ext2 at all
- ext2 feels comfortable with make_request().
We have the direct_access method here only because it is needed for the
azfs file-system, which we recommend to use for accessing the Axon's RAM
rather then ext2 or any other buffered file-systems.

Mit freundlichen Grüßen / met vriendelijke groeten / avec regards

    Maxim V. Shchetynin
    Linux Kernel Entwicklung
    IBM Deutschland Entwicklung GmbH
    Linux für Cell, Abteilung 3250
    Schönaicher Straße 220
    71032 Böblingen

Vorsitzender des Aufsichtsrats: Johann Weihen
Geschäftsführung: Herbert Kircher
Sitz der Gesellschaft: Böblingen
Registriergericht: Amtsgericht Stuttgart, HRB 243294

Fahr nur so schnell wie dein Schutzengel fliegen kann!



On Tuesday 26 June 2007, Christophe Lamoureux wrote:
>
> > +/**
> > + * axon_ram_direct_access - direct_access() method for block device
> > + * @device, @sector, @data: see block_device_operations method
> > + */
> > +static int
> > +axon_ram_direct_access(struct block_device *device, sector_t sector,
> > + unsigned long *data)
> > +{
> > + struct axon_ram_bank *bank = device->bd_disk->private_data;
> > + loff_t offset;
> > +
> > + offset = sector << AXON_RAM_SECTOR_SHIFT;
> > + if (offset >= bank->size) {
> > + dev_err(&bank->device->dev, "Access outside of address space\n");
> > + return -ERANGE;
> > + }
> > +
> > + *data = bank->ph_addr + offset;
> > +
> > + return 0;
> > +}
>
> By looking the ext2 implementation in 2.6.21 and doing some trials ( this
is
> the only file-system that looks to use the direct_access method of block
> device )  I do not understand how this direct access function (
> axon_ram_direct_access ) implementation could work.
>
> The value of *data returned is a physical address of the DDR as seen from
the
> PPU ( something like 0x100_0000_0000+ offset )
>
> The method ext2_clear_xip_target() will call clear_page() with this
physical
> address. This does not work.
>
> There is the same kind of issue later in method ext2_get_xip_page() with
> virt_to_page() with the physical address.
>
> Note, that if the line
>
>            *data = bank->ph_addr + offset;
>
> in axon_ram_direct_access is changed to
>
>            *data = bank->io_addr + offset;
>
> the issue in ext2_clear_xip_target()  --> clear_page() would be corrected
but
> the  ext2_get_xip_page() --> virt_to_page() would not work as the virtual

> address given would be the result of a ioremap_flags().
>
> Did I misunderstood or miss something ?

>From looking at the code, I'd say you are right. Maxim, could you give
Christoph
some insight on this?

             Arnd <><





More information about the cbe-oss-dev mailing list