Skip to content

Commit

Permalink
powerpc: Add self-tests of the feature fixup code
Browse files Browse the repository at this point in the history
This commit adds tests of the feature fixup code, they are run during
boot if CONFIG_FTR_FIXUP_SELFTEST=y. Some of the tests manually invoke
the patching routines to check their behaviour, and others use the
macros and so are patched during the normal patching done during boot.

Because we have two sets of macros with different names, we use a macro
to generate the test of the macros, very niiiice.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Jul 1, 2008
1 parent 9b1a735 commit 362e770
Show file tree
Hide file tree
Showing 4 changed files with 939 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/powerpc/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ config CODE_PATCHING_SELFTEST
depends on DEBUG_KERNEL
default n

config FTR_FIXUP_SELFTEST
bool "Run self-tests of the feature-fixup code."
depends on DEBUG_KERNEL
default n

choice
prompt "Serial Port"
depends on KGDB
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o

obj-y += code-patching.o
obj-y += feature-fixups.o
obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
Loading

0 comments on commit 362e770

Please sign in to comment.