[PATCH 1/7] spufs: The SPU file system

Pekka Enberg penberg at cs.helsinki.fi
Fri Aug 26 18:17:19 EST 2005


Hi Arnd,

> This is a work-in-progress version of the SPU file system.

> --- linux-cg.orig/fs/spufs/file.c     1969-12-31 19:00:00.000000000 -0500
> +++ linux-cg/fs/spufs/file.c  2005-08-25 22:27:19.503976592 -0400
> @@ -0,0 +1,716 @@
> +/*
> + * SPU file system -- file contents
> +/* low-level mailbox write */
> +size_t spu_wbox_write(struct spu *spu, u32 data)
> +{
> +     int ret;
> +
> +     spin_lock_irq(&spu->register_lock);
> +
> +     if (in_be32(&spu->problem->mb_stat_R) & 0x00ff00) {
> +             /* we have space to write wbox_data to */
> +             out_be32(&spu->problem->spu_mb_W, data);
> +             ret = 4;
> +     } else {
> +             /* make sure we get woken up by the interrupt when space
> +                becomes available */
> +             out_be64(&spu->priv1->int_mask_class2_RW,
> +                     in_be64(&spu->priv1->int_mask_class2_RW) | 0x10);

I am confused. The code is architecture specific and does device I/O. Why do
you want to put this in fs/ and not drivers/?

                                    Pekka



More information about the Linuxppc64-dev mailing list