Message ID | 20210913121956.1776656-1-chenhuang5@huawei.com (mailing list archive) |
---|---|
Headers | show |
Series | riscv: improve unaligned memory accesses | expand |
On Mon, 13 Sep 2021 12:19:54 +0000 Chen Huang <chenhuang5@huawei.com> wrote: > The RISCV ISA can support unaligned memory accesses, so the patchset > selects HAVE_EFFICIENT_UNALIGNED_ACCESS and supports DCACHE_WORD_ACCESS NO, per the spec, "Even when misaligned loads and stores complete successfully, these accesses might run extremely slowly depending on the implementation". it's far away from "efficient" > to improve the efficiency of unaligned memory accesses. > > Chen Huang (2): > riscv: Kconfig: select HAVE_EFFICIENT_UNALIGNED_ACCESS > riscv: Support DCACHE_WORD_ACCESS > > arch/riscv/Kconfig | 2 ++ > arch/riscv/include/asm/word-at-a-time.h | 36 +++++++++++++++++++++++++ > 2 files changed, 38 insertions(+) >
Like ARM,powerpc and m68K,some CPUs don't support the unaligned memory access, offer this as an option that CPU can choose it depending on its own design. I will send v2 soon. 在 2021/9/15 22:13, Jisheng Zhang 写道: > On Mon, 13 Sep 2021 12:19:54 +0000 > Chen Huang <chenhuang5@huawei.com> wrote: > >> The RISCV ISA can support unaligned memory accesses, so the patchset >> selects HAVE_EFFICIENT_UNALIGNED_ACCESS and supports DCACHE_WORD_ACCESS > > NO, per the spec, "Even when misaligned loads and stores complete > successfully, these accesses might run extremely slowly depending on the > implementation". it's far away from "efficient" > >> to improve the efficiency of unaligned memory accesses. >> >> Chen Huang (2): >> riscv: Kconfig: select HAVE_EFFICIENT_UNALIGNED_ACCESS >> riscv: Support DCACHE_WORD_ACCESS >> >> arch/riscv/Kconfig | 2 ++ >> arch/riscv/include/asm/word-at-a-time.h | 36 +++++++++++++++++++++++++ >> 2 files changed, 38 insertions(+) >> > > > . >