* [U-Boot] [PATCH 1/2] part_dos: align disk buffers on cache line to enable DMA and cache
@ 2012-03-03 22:02 Eric Nelson
2012-03-03 23:14 ` Mike Frysinger
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eric Nelson @ 2012-03-03 22:02 UTC (permalink / raw)
To: u-boot
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
disk/part_dos.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/disk/part_dos.c b/disk/part_dos.c
index b5bcb37..c028aaf 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -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;
--
1.7.9
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/2] part_dos: align disk buffers on cache line to enable DMA and cache
2012-03-03 22:02 [U-Boot] [PATCH 1/2] part_dos: align disk buffers on cache line to enable DMA and cache Eric Nelson
@ 2012-03-03 23:14 ` Mike Frysinger
2012-03-24 7:16 ` Dirk Behme
2012-04-24 9:04 ` Anatolij Gustschin
2 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2012-03-03 23:14 UTC (permalink / raw)
To: u-boot
Acked-by: Mike Frysinger <vapier@gentoo.org>
-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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/2] part_dos: align disk buffers on cache line to enable DMA and cache
2012-03-03 22:02 [U-Boot] [PATCH 1/2] part_dos: align disk buffers on cache line to enable DMA and cache Eric Nelson
2012-03-03 23:14 ` Mike Frysinger
@ 2012-03-24 7:16 ` Dirk Behme
2012-04-24 9:04 ` Anatolij Gustschin
2 siblings, 0 replies; 4+ messages in thread
From: Dirk Behme @ 2012-03-24 7:16 UTC (permalink / raw)
To: u-boot
On 03.03.2012 23:02, Eric Nelson wrote:
> Signed-off-by: Eric Nelson<eric.nelson@boundarydevices.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Anybody likes to comment/apply this patch?
Many thanks!
Dirk
> ---
> disk/part_dos.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/disk/part_dos.c b/disk/part_dos.c
> index b5bcb37..c028aaf 100644
> --- a/disk/part_dos.c
> +++ b/disk/part_dos.c
> @@ -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;
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 1/2] part_dos: align disk buffers on cache line to enable DMA and cache
2012-03-03 22:02 [U-Boot] [PATCH 1/2] part_dos: align disk buffers on cache line to enable DMA and cache Eric Nelson
2012-03-03 23:14 ` Mike Frysinger
2012-03-24 7:16 ` Dirk Behme
@ 2012-04-24 9:04 ` Anatolij Gustschin
2 siblings, 0 replies; 4+ messages in thread
From: Anatolij Gustschin @ 2012-04-24 9:04 UTC (permalink / raw)
To: u-boot
On Sat, 3 Mar 2012 15:02:20 -0700
Eric Nelson <eric.nelson@boundarydevices.com> wrote:
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
> ---
> disk/part_dos.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-staging/agust at denx.de, thanks!
Anatolij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-24 9:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-03 22:02 [U-Boot] [PATCH 1/2] part_dos: align disk buffers on cache line to enable DMA and cache Eric Nelson
2012-03-03 23:14 ` Mike Frysinger
2012-03-24 7:16 ` Dirk Behme
2012-04-24 9:04 ` Anatolij Gustschin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox