[Cbe-oss-dev] [PATCH] axonram: enable partitioning of the Axon's DDR2 DIMMs

Maxim Shchetynin maxim at linux.vnet.ibm.com
Fri Apr 25 01:23:22 EST 2008


Hello,

please, have a look at the following patch. This patch enables accessing Axon RAM which is splitted in partitions.


Subject: axonram: enable partitioning of the Axon's DDR2 DIMMs

From: Maxim Shchetynin <maxim at de.ibm.com>

DDR2 memory DIMMs on the Axon could be accessed only as one partition
when using file system drivers which are using the direct_access() method.
This patch enables for such file system drivers to access Axon's DDR2 memory
even if it is splitted in several partitions.

Signed-off-by: Maxim Shchetynin <maxim at de.ibm.com>

diff -Nuarp linux-2.6.25/arch/powerpc/sysdev/axonram.c linux-2.6.25-axonram/arch/powerpc/sysdev/axonram.c
--- linux-2.6.25/arch/powerpc/sysdev/axonram.c	2008-04-23 17:47:25.608826219 +0200
+++ linux-2.6.25-azfs/arch/powerpc/sysdev/axonram.c	2008-04-24 15:19:35.535276065 +0200
@@ -150,7 +150,10 @@ axon_ram_direct_access(struct block_devi
 	struct axon_ram_bank *bank = device->bd_disk->private_data;
 	loff_t offset;
 
-	offset = sector << AXON_RAM_SECTOR_SHIFT;
+	offset = sector;
+	if (device->bd_part != NULL)
+		offset += device->bd_part->start_sect;
+	offset <<= AXON_RAM_SECTOR_SHIFT;
 	if (offset >= bank->size) {
 		dev_err(&bank->device->dev, "Access outside of address space\n");
 		return -ERANGE;


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!



More information about the cbe-oss-dev mailing list