From: Milton Miller <miltonm@bga•com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom•com>
Cc: ppcdev <linuxppc-dev@ozlabs•org>
Subject: Re: [patch 6/6] ps3: FLASH ROM Storage Driver
Date: Mon, 18 Jun 2007 11:30:06 -0500 [thread overview]
Message-ID: <89ca7c200ed0f7c47387af99643df6a1@bga.com> (raw)
In-Reply-To: <20070615120848.558678000@pademelon.sonytel.be>
> From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom•com>
>
> Add a FLASH ROM Storage Driver for the PS3:
> - Implemented as a misc character device driver
> - Uses a fixed 256 KiB buffer allocated from boot memory as the
> hypervisor
> requires the writing of aligned 256 KiB blocks
>
> CC: Geoff Levand <geoffrey.levand@am•sony.com>
> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom•com>
> ---
> Changes since previous submission:
> o Don't use `default y' in Kconfig
> o #include <linux/uaccess.h> instead of <asm/uaccess.h>
> o Set up sysfs links between misc character device and PS3
> system device:
> . /sys/class/misc/ps3flash/device ->
> ../../../devices/ps3_system/sb_01
> . /sys/devices/ps3_system/sb_01/misc:ps3flash ->
> ../../../class/misc/ps3flash
>
> arch/powerpc/platforms/ps3/Kconfig | 11 +
> drivers/char/Makefile | 2
> drivers/char/ps3flash.c | 404
> +++++++++++++++++++++++++++++++++++++
> 3 files changed, 417 insertions(+)
You indicated that the primary reasons to use this driver were to boot
back into GameOS, or reinstall the boot loader, yet your Kconfig entry
says "In general, all users will say Y or M". This could give a bit
more guidance.
ps3flash_read_write_sectors chooses a string every call that is only
used on the error path.
ps3flash_read gives priority to returning an encountered error. If it
made partial progress (eg partially mapped user buffer) it should
return the count of bytes sent to the user.
ps3_write will call the hypervisor to write an aligned chunk of memory
every call. I'm guessing the hypervisor does no buffering of the
flash. If the file is written with a small block size, this will
cause unnecessary flash wear. Have you considered requiring the
application to write the full 256MiB, or alternatively delaying the
actual write call until either close, the write reaches the boundary,
or a read or write accesses another chunk? Yes, the later would mean
short writes would receive the error on close.
milton
next prev parent reply other threads:[~2007-06-18 16:30 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 11:39 [patch 0/6] PS3 Storage Drivers for 2.6.23, take 2 Geert Uytterhoeven
2007-06-15 11:39 ` [patch 1/6] ps3: Preallocate bootmem memory for the PS3 FLASH ROM storage driver Geert Uytterhoeven
2007-06-15 13:27 ` Benjamin Herrenschmidt
2007-06-15 13:32 ` Geert Uytterhoeven
2007-06-18 16:25 ` [patch 1/6] ps3: Preallocate bootmem memory for the PS3 FLASH Milton Miller
2007-06-19 11:36 ` Geert Uytterhoeven
2007-06-15 11:39 ` [patch 2/6] ps3: Storage Driver Core Geert Uytterhoeven
2007-06-15 11:39 ` [patch 3/6] PS3: Storage device registration routines Geert Uytterhoeven
2007-06-15 11:39 ` [patch 4/6] ps3: Disk Storage Driver Geert Uytterhoeven
2007-06-15 14:35 ` David Woodhouse
2007-06-15 14:41 ` Arnd Bergmann
2007-06-15 14:43 ` Geert Uytterhoeven
2007-06-15 16:15 ` Alan Cox
2007-06-15 18:05 ` Geert Uytterhoeven
2007-06-15 21:19 ` David Miller
2007-06-15 22:40 ` James Bottomley
2007-06-15 23:08 ` David Miller
2007-06-15 23:28 ` James Bottomley
2007-06-15 23:37 ` David Miller
2007-06-19 5:56 ` Christoph Hellwig
2007-06-19 6:07 ` David Miller
2007-06-19 8:15 ` Christoph Hellwig
2007-06-15 23:11 ` Alan Cox
2007-06-16 6:21 ` Geert Uytterhoeven
2007-06-19 5:53 ` Christoph Hellwig
2007-06-19 6:03 ` David Miller
2007-06-19 7:06 ` Geert Uytterhoeven
2007-06-15 21:17 ` David Miller
2007-06-15 21:28 ` Jeff Garzik
2007-06-15 21:37 ` David Miller
2007-06-15 21:50 ` Jeff Garzik
2007-06-15 21:55 ` David Miller
2007-06-19 5:43 ` Christoph Hellwig
2007-06-19 12:51 ` Geert Uytterhoeven
2007-06-19 17:19 ` Christoph Hellwig
2007-06-15 11:39 ` [patch 5/6] ps3: ROM " Geert Uytterhoeven
2007-06-18 16:30 ` Milton Miller
2007-06-19 5:44 ` Christoph Hellwig
2007-06-19 12:29 ` Geert Uytterhoeven
2007-06-20 12:16 ` Milton Miller
2007-06-19 5:51 ` Christoph Hellwig
2007-06-15 11:39 ` [patch 6/6] ps3: FLASH " Geert Uytterhoeven
2007-06-18 16:30 ` Milton Miller [this message]
2007-06-19 12:02 ` Geert Uytterhoeven
-- strict thread matches above, loose matches on Subject: below --
2007-06-21 14:14 [patch 0/6] PS3 Storage Drivers for 2.6.23, take 3 Geert Uytterhoeven
2007-06-21 14:14 ` [patch 6/6] ps3: FLASH ROM Storage Driver Geert Uytterhoeven
2007-07-04 13:22 [patch 0/6] PS3 Storage Drivers for 2.6.23, take 4 Geert Uytterhoeven
2007-07-04 13:22 ` [patch 6/6] ps3: FLASH ROM Storage Driver Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=89ca7c200ed0f7c47387af99643df6a1@bga.com \
--to=miltonm@bga$(echo .)com \
--cc=Geert.Uytterhoeven@sonycom$(echo .)com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox