[U-Boot] [PATCH v2 0/7] Add cache line alignment support

Anton Staaf robotboy at chromium.org
Tue Oct 4 23:24:44 CEST 2011


The cache line alignment issue has gone around a couple of times now.  This
patch set implements all of the details that we have discussed about the
implementation of ALLOC_CACHE_ALIGN_BUFFER other than the switch to the Linux
style L1_CACHE_BYTES, L1_CACHE_SHIFT, and ARCH_DMA_MINALIGN defines mentioned
by Mike Frysinger.  It also includes patches that use the macro to fix MMC
and ext2 buffers, as well as define the CONFIG_SYS_CACHELINE_SIZE value for
Tegra and add a default value for CONFIG_SYS_CACHELINE_SIZE with a warning if
it is used.

About the Linux defines that Mike suggests.  It may make sense to move these
patches over to use that mechanism, especially since there are only a few
configs that define CONFIG_SYS_CACHELINE_SIZE anyway.  Also, since this is an
architecture specific parameter and not a board specific one it makes sense
that these configs would be architecture specific.  I am also not supper happy
with the fact that most boards generate a warning with this patchset, because
they don't set CONFIG_SYS_CACHELINE_SIZE.  But I'm not sure that silently
providing a default is a good idea.

I think we can discuss the relative merrits of that move independently of the
implementation of this fix though, and I wanted to get this discussion going
again.

Thanks,
    Anton

---

Changes for v2:
- Add comment describing why we are setting a default cacheline size
- Remove Gerrit generated Change-Id: tags from commit messages
- Add additional buffer alignments for mmc and part_efi code

Anton Staaf (7):
  cache: add ALLOC_CACHE_ALIGN_BUFFER macro
  cache: add default setting for CONFIG_SYS_CACHELINE_SIZE
  tegra: define CONFIG_SYS_CACHELINE_SIZE for tegra
  mmc: dcache: allocate cache aligned buffer for scr and switch_status
  ext2: Cache line aligned partial sector bounce buffer
  mmc: dcache: allocate cache aligned buffers for ext_csd
  part_efi: dcache: allocate cacheline aligned buffers

 disk/part_efi.c                 |   18 +++++-----
 doc/README.arm-caches           |    2 +
 drivers/mmc/mmc.c               |   14 ++++----
 fs/ext2/dev.c                   |    2 +-
 include/common.h                |   73 +++++++++++++++++++++++++++++++++++++++
 include/configs/tegra2-common.h |    2 +
 6 files changed, 94 insertions(+), 17 deletions(-)

-- 
1.7.3.1



More information about the U-Boot mailing list