part_dos: align disk buffers on cache line to enable DMA and cache
PATCH 1/2 part_dos: align disk buffers on cache line to enable DMA and cache
Signed-off-by Eric Nelson <[email protected]>
--- disk/part_dos.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
disk/part_dos.c +3 -3
@@ -87,7 +87,7 @@ static int test_block_type(unsigned char *buffer)int test_part_dos (block_dev_desc_t *dev_desc) { -unsigned char buffer[dev_desc->blksz]; + ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz); if ((dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *) buffer) != 1) || (buffer[DOS_PART_MAGIC_OFFSET + 0] != 0x55) ||
@@ -102,7 +102,7 @@ int test_part_dos (block_dev_desc_t *dev_desc)static void print_partition_extended (block_dev_desc_t *dev_desc,int ext_part_sector,int relative,int part_num) { -unsigned char buffer[dev_desc->blksz]; + ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);dos_partition_t *pt;int i;
@@ -166,7 +166,7 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part int relative, int part_num, int which_part, disk_partition_t *info) { - unsigned char buffer[dev_desc->blksz]; + ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);dos_partition_t *pt;int i;
Signature · 1 line
1.7.9
PATCH 1/2 part_dos: align disk buffers on cache line to enable DMA and cache
Acked-by Mike Frysinger <[email protected]>
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120303/d5442704/attachment.pgp>
PATCH 1/2 part_dos: align disk buffers on cache line to enable DMA and cache
In reply to Eric NelsonQuoted 1 line · Eric Nelson
Signed-off-by Eric Nelson<[email protected]>
Acked-by Mike Frysinger <[email protected]>
Anybody likes to comment/apply this patch?
Many thanks!
Dirk
Quoted 35 lines
--- disk/part_dos.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)disk/part_dos.c +3
-3@@ -87,7 +87,7 @@ static int test_block_type(unsigned char *buffer)int test_part_dos (block_dev_desc_t *dev_desc) { -unsigned char buffer[dev_desc->blksz]; + ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz); if ((dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *) buffer) != 1) || (buffer[DOS_PART_MAGIC_OFFSET + 0] != 0x55) ||@@ -102,7 +102,7 @@ int test_part_dos (block_dev_desc_t *dev_desc)static void print_partition_extended (block_dev_desc_t *dev_desc,int ext_part_sector,int relative,int part_num) { -unsigned char buffer[dev_desc->blksz]; + ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);dos_partition_t *pt;int i;@@ -166,7 +166,7 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part int relative, int part_num, int which_part, disk_partition_t *info) { - unsigned char buffer[dev_desc->blksz]; + ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz);dos_partition_t *pt;int i;
PATCH 1/2 part_dos: align disk buffers on cache line to enable DMA and cache
In reply to Eric NelsonQuoted 4 lines · On Sat, 3 Mar 2012 15:02:20 -0700 Eric Nelson…
Signed-off-by Eric Nelson <[email protected]>--- disk/part_dos.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-staging/agust at denx.de, thanks!
Anatolij