LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	"James E.J. Bottomley" <James.Bottomley@SteelEye.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [patch 1/6] ps3: Preallocate bootmem memory for the PS3 FLASH ROM storage driver
Date: Fri, 15 Jun 2007 23:27:19 +1000	[thread overview]
Message-ID: <1181914039.26853.80.camel@localhost.localdomain> (raw)
In-Reply-To: <20070615120848.002575000@pademelon.sonytel.be>

On Fri, 2007-06-15 at 13:39 +0200, Geert Uytterhoeven wrote:
> plain text document attachment (ps3-stable)
> Preallocate 256 KiB of bootmem memory for the PS3 FLASH ROM storage driver.

I still very much dislike the #ifdef xxx_MODULE in main kernel code.

At the end of the day, is it realistic to ever use a PS3 without the
storage driver ? I would suggest just allocating those unconditionally.

Ben.

> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
> ---
>  arch/powerpc/platforms/ps3/setup.c |   19 ++++++++++++++++++-
>  include/asm-powerpc/ps3.h          |    1 +
>  2 files changed, 19 insertions(+), 1 deletion(-)
> 
> --- a/arch/powerpc/platforms/ps3/setup.c
> +++ b/arch/powerpc/platforms/ps3/setup.c
> @@ -107,7 +107,8 @@ static void ps3_panic(char *str)
>  	while(1);
>  }
>  
> -#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE)
> +#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
> +    defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
>  static void prealloc(struct ps3_prealloc *p)
>  {
>  	if (!p->size)
> @@ -123,7 +124,9 @@ static void prealloc(struct ps3_prealloc
>  	printk(KERN_INFO "%s: %lu bytes at %p\n", p->name, p->size,
>  	       p->address);
>  }
> +#endif
>  
> +#if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE)
>  struct ps3_prealloc ps3fb_videomemory = {
>  	.name = "ps3fb videomemory",
>  	.size = CONFIG_FB_PS3_DEFAULT_SIZE_M*1024*1024,
> @@ -146,6 +149,18 @@ early_param("ps3fb", early_parse_ps3fb);
>  #define prealloc_ps3fb_videomemory()	do { } while (0)
>  #endif
>  
> +#if defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
> +struct ps3_prealloc ps3flash_bounce_buffer = {
> +	.name = "ps3flash bounce buffer",
> +	.size = 256*1024,
> +	.align = 256*1024
> +};
> +EXPORT_SYMBOL_GPL(ps3flash_bounce_buffer);
> +#define prealloc_ps3flash_bounce_buffer()	prealloc(&ps3flash_bounce_buffer)
> +#else
> +#define prealloc_ps3flash_bounce_buffer()	do { } while (0)
> +#endif
> +
>  static int ps3_set_dabr(u64 dabr)
>  {
>  	enum {DABR_USER = 1, DABR_KERNEL = 2,};
> @@ -175,6 +190,8 @@ static void __init ps3_setup_arch(void)
>  #endif
>  
>  	prealloc_ps3fb_videomemory();
> +	prealloc_ps3flash_bounce_buffer();
> +
>  	ppc_md.power_save = ps3_power_save;
>  
>  	DBG(" <- %s:%d\n", __func__, __LINE__);
> --- a/include/asm-powerpc/ps3.h
> +++ b/include/asm-powerpc/ps3.h
> @@ -427,6 +427,7 @@ struct ps3_prealloc {
>  };
>  
>  extern struct ps3_prealloc ps3fb_videomemory;
> +extern struct ps3_prealloc ps3flash_bounce_buffer;
>  
> 
>  #endif
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

  reply	other threads:[~2007-06-15 13:27 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 [this message]
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
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 1/6] ps3: Preallocate bootmem memory for the 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 1/6] ps3: Preallocate bootmem memory for the 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=1181914039.26853.80.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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