From: Michael Holzheu Subject: S390: Generate Kerntypes file Patch-mainline: Not yet s390 core changes: - Remove rule to generate kernel listing. - Add code to generate kerntypes for use with the lkcd utils. Signed-off-by: Michael Holzheu Signed-off-by: Martin Schwidefsky Signed-off-by: Michal Marek --- arch/s390/Makefile | 4 arch/s390/boot/Makefile | 19 ++ arch/s390/boot/kerntypes.c | 311 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 328 insertions(+), 6 deletions(-) --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -105,12 +105,12 @@ drivers-$(CONFIG_OPROFILE) += arch/s390/ boot := arch/s390/boot -all: image bzImage +all: image bzImage kerntypes.o install: vmlinux $(Q)$(MAKE) $(build)=$(boot) $@ -image bzImage: vmlinux +image bzImage kerntypes.o: vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ zfcpdump: --- a/arch/s390/boot/Makefile +++ b/arch/s390/boot/Makefile @@ -2,15 +2,26 @@ # Makefile for the linux s390-specific parts of the memory manager. # -COMPILE_VERSION := __linux_compile_version_id__`hostname | \ - tr -c '[0-9A-Za-z]' '_'`__`date | \ - tr -c '[0-9A-Za-z]' '_'`_t +COMPILE_VERSION := __linux_compile_version_id__$(shell hostname | \ + tr -c '[0-9A-Za-z]' '_')__$(shell date | \ + tr -c '[0-9A-Za-z]' '_')_t + +chk-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ + > /dev/null 2>&1; then echo "$(1)"; fi ;) + +# Remove possible '-g' from CFLAGS_KERNEL, since we want to use stabs +# debug format. +override CFLAGS_KERNEL := $(shell echo $(CFLAGS_KERNEL) | sed 's/-g//') EXTRA_CFLAGS := -DCOMPILE_VERSION=$(COMPILE_VERSION) -gstabs -I. +# Assume we don't need the flag if the compiler doesn't know about it +EXTRA_CFLAGS += $(call chk-option,-fno-eliminate-unused-debug-types) + targets := image targets += bzImage subdir- := compressed +targets += kerntypes.o $(obj)/image: vmlinux FORCE $(call if_changed,objcopy) @@ -23,4 +34,4 @@ $(obj)/compressed/vmlinux: FORCE install: $(CONFIGURE) $(obj)/image sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/image \ - System.map Kerntypes "$(INSTALL_PATH)" + System.map "$(INSTALL_PATH)" --- /dev/null +++ b/arch/s390/boot/kerntypes.c @@ -0,0 +1,311 @@ +/* + * kerntypes.c + * + * Dummy module that includes headers for all kernel types of interest. + * The kernel type information is used by the lcrash utility when + * analyzing system crash dumps or the live system. Using the type + * information for the running system, rather than kernel header files, + * makes for a more flexible and robust analysis tool. + * + * This source code is released under the GNU GPL. + */ + +/* generate version for this file */ +typedef char *COMPILE_VERSION; + +/* General linux types */ + +#include +#include +#include +#include +#include +#include +#ifdef CONFIG_SLUB + #include +#endif +#ifdef CONFIG_SLAB + #include +#endif +#ifdef CONFIG_SLQB + #include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * s390 specific includes + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* channel subsystem driver */ +#include "drivers/s390/cio/cio.h" +#include "drivers/s390/cio/chsc.h" +#include "drivers/s390/cio/css.h" +#include "drivers/s390/cio/device.h" +#include "drivers/s390/cio/chsc_sch.h" + +/* dasd device driver */ +#include "drivers/s390/block/dasd_int.h" +#include "drivers/s390/block/dasd_diag.h" +#include "drivers/s390/block/dasd_eckd.h" +#include "drivers/s390/block/dasd_fba.h" + +/* networking drivers */ +#include "include/net/iucv/iucv.h" +#include "drivers/s390/net/fsm.h" +#include "drivers/s390/net/ctcm_main.h" +#include "drivers/s390/net/ctcm_fsms.h" +#include "drivers/s390/net/lcs.h" +#include "drivers/s390/net/qeth_core.h" +#include "drivers/s390/net/qeth_core_mpc.h" +#include "drivers/s390/net/qeth_l3.h" + +/* zfcp device driver */ +#include "drivers/s390/scsi/zfcp_def.h" +#include "drivers/s390/scsi/zfcp_fsf.h" + +/* crypto device driver */ +#include "drivers/s390/crypto/ap_bus.h" +#include "drivers/s390/crypto/zcrypt_api.h" +#include "drivers/s390/crypto/zcrypt_cca_key.h" +#include "drivers/s390/crypto/zcrypt_pcica.h" +#include "drivers/s390/crypto/zcrypt_pcicc.h" +#include "drivers/s390/crypto/zcrypt_pcixcc.h" +#include "drivers/s390/crypto/zcrypt_cex2a.h" + +/* sclp device driver */ +#include "drivers/s390/char/sclp.h" +#include "drivers/s390/char/sclp_rw.h" +#include "drivers/s390/char/sclp_tty.h" + +/* vmur device driver */ +#include "drivers/s390/char/vmur.h" + +/* qdio device driver */ +#include "drivers/s390/cio/qdio.h" +#include "drivers/s390/cio/qdio_thinint.c" + + +/* KVM */ +#include "include/linux/kvm.h" +#include "include/linux/kvm_host.h" +#include "include/linux/kvm_para.h" + +/* Virtio */ +#include "include/linux/virtio.h" +#include "include/linux/virtio_config.h" +#include "include/linux/virtio_ring.h" +#include "include/linux/virtio_9p.h" +#include "include/linux/virtio_console.h" +#include "include/linux/virtio_rng.h" +#include "include/linux/virtio_balloon.h" +#include "include/linux/virtio_net.h" +#include "include/linux/virtio_blk.h" + +/* + * include sched.c for types: + * - struct prio_array + * - struct runqueue + */ +#include "kernel/sched.c" +/* + * include slab.c for struct kmem_cache + */ +#ifdef CONFIG_SLUB + #include "mm/slub.c" +#endif +#ifdef CONFIG_SLAB + #include "mm/slab.c" +#endif +#ifdef CONFIG_SLQB + #include "mm/slqb.c" +#endif + +/* include driver core private structures */ +#include "drivers/base/base.h"