Subject: Re: [PATCH] powerpc: rtas_flash cannot be a module

From: Anton Blanchard <[email-masked]>
Date: Sat, 12 Jun 2010 23:46:28 +1000

Hi,

> So we should use that rtas_data_buf with its lock ...
> 
> Oh look, the driver already uses that buffer for the call to verify_flash
> 
> untested patch to follow

Thanks, it built and tested OK with the following patch. Will send a
complete patch with these changes in a minute.

Anton

--- build/arch/powerpc/kernel/rtas_flash.c~	2010-06-12 09:06:43.000000000 -0400
+++ build/arch/powerpc/kernel/rtas_flash.c	2010-06-12 09:08:30.000000000 -0400
@@ -613,9 +613,9 @@
 	 * the kernel data segment.
 	 */
 	spin_lock(&rtas_data_buf_lock);
-	flist = (struct rtas_flash_list *)&rtas_data_buf[0];
-	flist.num_blocks = 0;
-	flist.next = rtas_firmware_flash_list;
+	flist = (struct flash_block_list *)&rtas_data_buf[0];
+	flist->num_blocks = 0;
+	flist->next = rtas_firmware_flash_list;
 	rtas_block_list = virt_to_abs(flist);
 	if (rtas_block_list >= 4UL*1024*1024*1024) {
 		printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n");