提交 d5b35cff 编写于 作者: A Alistair Popple 提交者: Benjamin Herrenschmidt

ppc476: Enable a linker work around for IBM errata #46

This patch adds an option to enable a work around for an icache bug on
476 that can cause execution of stale instructions when falling
through pages (IBM errata #46). It requires a recent version of
binutils which supports the --ppc476-workaround option.

The work around enables the appropriate linker options and ensures
that all module output sections are aligned to 4K page boundaries. The
work around is only required when building modules.
Signed-off-by: NAlistair Popple <alistair@popple.id.au>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 e2c37d90
...@@ -159,6 +159,11 @@ CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE) ...@@ -159,6 +159,11 @@ CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)
KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
ifeq ($(CONFIG_476FPE_ERR46),y)
KBUILD_LDFLAGS_MODULE += --ppc476-workaround \
-T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds
endif
# No AltiVec or VSX instructions when building kernel # No AltiVec or VSX instructions when building kernel
KBUILD_CFLAGS += $(call cc-option,-mno-altivec) KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
KBUILD_CFLAGS += $(call cc-option,-mno-vsx) KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
......
...@@ -351,6 +351,20 @@ config APM821xx ...@@ -351,6 +351,20 @@ config APM821xx
select IBM_EMAC_EMAC4 select IBM_EMAC_EMAC4
select IBM_EMAC_TAH select IBM_EMAC_TAH
config 476FPE_ERR46
depends on 476FPE
bool "Enable linker work around for PPC476FPE errata #46"
help
This option enables a work around for an icache bug on 476
that can cause execution of stale instructions when falling
through pages (IBM errata #46). It requires a recent version
of binutils which supports the --ppc476-workaround option.
The work around enables the appropriate linker options and
ensures that all module output sections are aligned to 4K
page boundaries. The work around is only required when
building modules.
# 44x errata/workaround config symbols, selected by the CPU models above # 44x errata/workaround config symbols, selected by the CPU models above
config IBM440EP_ERR42 config IBM440EP_ERR42
bool bool
......
SECTIONS
{
.text : ALIGN(4096)
{
*(.text .text.* .fixup)
}
.init.text : ALIGN(4096)
{
*(.init.text .init.text.*)
}
.exit.text : ALIGN(4096)
{
*(.exit.text .exit.text.*)
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册