From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] part_dos: align disk buffers on cache line to enable DMA and cache
Date: Sat, 24 Mar 2012 08:16:29 +0100 [thread overview]
Message-ID: <4F6D74CD.3000405@googlemail.com> (raw)
In-Reply-To: <1330812140-25766-1-git-send-email-eric.nelson@boundarydevices.com>
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;
>
next prev parent reply other threads:[~2012-03-24 7:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2012-04-24 9:04 ` Anatolij Gustschin
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=4F6D74CD.3000405@googlemail.com \
--to=dirk.behme@googlemail.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.