s390/facilities: add helper tool to generate facility lists
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 2 Feb 2015 06:08:44 +0000 (07:08 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 18 Dec 2015 13:59:20 +0000 (14:59 +0100)
commitc30f6828fed9d33c2d54dfaf3621717c56f9c779
tree70ceed0eaf29d2410f8ac06c999a53d62368a44b
parent76cdd44c2e56ffabc297494c090c6babc8985998
s390/facilities: add helper tool to generate facility lists

Modifying the architecture level set facility lists was always very
error prone. Given the numbering of the facility bits within the
Principles of Operation, where the most significant bit number is 0,
it happened a lot of times that wrong bits were set or cleared.

Therefore this patch adds a tool "gen_facilities" which generates
include/generated/facilites.h.  The definition of the bits to be set
is contained within arch/s390/include/asm/facilities_src.h and can be
easily extended to e.g. also generate such lists for the KVM module.

The generated file looks like this:

 #define FACILITIES_ALS _AC(0xc1006450f0040000,UL)
 #define FACILITIES_ALS_DWORDS 1

The facility bits defined in this patch match 1:1 to the current masks
that can be found in head.S.

That is if the tool gets executed with -march=z990 then the generated
masks will equal the masks in head.S for CONFIG_MARCH_Z990.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/Makefile
arch/s390/include/asm/facilities_src.h [new file with mode: 0644]
arch/s390/include/asm/facility.h
arch/s390/tools/.gitignore [new file with mode: 0644]
arch/s390/tools/Makefile [new file with mode: 0644]
arch/s390/tools/gen_facilities.c [new file with mode: 0644]