Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/s390/linux

Pull s390 updates from Martin Schwidefsky:
 "Bug fixes, small improvements and one notable change: the system call
  table and the unistd.h header are now generated automatically with a
  shell script from a text file"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/decompressor: discard __ksymtab and .eh_frame sections
  s390: fix handling of -1 in set{,fs}[gu]id16 syscalls
  s390/tools: generate header files in arch/s390/include/generated/
  s390/syscalls: use generated syscall_table.h and unistd.h header files
  s390/syscalls: add Makefile to generate system call header files
  s390/syscalls: add syscalltbl script
  s390/syscalls: add system call table
  s390/decompressor: swap .text and .rodata.compressed sections
  s390/sclp: fix .data section specification
  s390/ipl: avoid usage of __section(.data)
  s390/head: replace hard coded values with constants
  s390/disassembler: add generated gen_opcode_table tool to .gitignore
  s390: remove bogus system call table entries
  s390/kprobes: remove duplicate includes
  s390/dasd: Remove dead return code checks
  s390/dasd: Simplify code
  s390/vdso: revise CFI annotations of vDSO functions
  s390/kernel: emit CFI data in .debug_frame and discard .eh_frame sections
  • Loading branch information
torvalds committed Feb 1, 2018
2 parents 255442c + 47d67fa commit ca0c836
Show file tree
Hide file tree
Showing 37 changed files with 856 additions and 863 deletions.
14 changes: 11 additions & 3 deletions arch/s390/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ KBUILD_CFLAGS += -DCC_USING_HOTPATCH
endif
endif

# Test CFI features of binutils
cfi := $(call as-instr,.cfi_startproc\n.cfi_val_offset 15$(comma)-160\n.cfi_endproc,-DCONFIG_AS_CFI_VAL_OFFSET=1)

KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y)
KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
KBUILD_AFLAGS += $(aflags-y)
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables $(cfi)
KBUILD_AFLAGS += $(aflags-y) $(cfi)

OBJCOPYFLAGS := -O binary

Expand All @@ -107,6 +111,7 @@ drivers-y += drivers/s390/
drivers-$(CONFIG_OPROFILE) += arch/s390/oprofile/

boot := arch/s390/boot
syscalls := arch/s390/kernel/syscalls
tools := arch/s390/tools

all: image bzImage
Expand All @@ -128,9 +133,12 @@ archclean:
$(Q)$(MAKE) $(clean)=$(boot)
$(Q)$(MAKE) $(clean)=$(tools)

archheaders:
$(Q)$(MAKE) $(build)=$(syscalls) uapi

archprepare:
$(Q)$(MAKE) $(build)=$(tools) include/generated/facilities.h
$(Q)$(MAKE) $(build)=$(tools) include/generated/dis.h
$(Q)$(MAKE) $(build)=$(syscalls) kapi
$(Q)$(MAKE) $(build)=$(tools) kapi

# Don't use tabs in echo arguments
define archhelp
Expand Down
1 change: 1 addition & 0 deletions arch/s390/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ targets += misc.o piggy.o sizes.h head.o
KBUILD_CFLAGS := -m64 -D__KERNEL__ -O2
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
KBUILD_CFLAGS += $(cflags-y) -fno-delete-null-pointer-checks -msoft-float
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
KBUILD_CFLAGS += $(call cc-option,-mpacked-stack)
KBUILD_CFLAGS += $(call cc-option,-ffreestanding)

Expand Down
12 changes: 9 additions & 3 deletions arch/s390/boot/compressed/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ SECTIONS
HEAD_TEXT
_ehead = . ;
}
.rodata.compressed : {
*(.rodata.compressed)
}
.text : {
_text = .; /* Text */
*(.text)
*(.text.*)
_etext = . ;
}
.rodata.compressed : {
*(.rodata.compressed)
}
.rodata : {
_rodata = . ;
*(.rodata) /* read-only data */
Expand All @@ -48,4 +48,10 @@ SECTIONS
_ebss = .;
}
_end = .;

/* Sections to be discarded */
/DISCARD/ : {
*(.eh_frame)
*(*__ksymtab*)
}
}
5 changes: 5 additions & 0 deletions arch/s390/include/asm/Kbuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
generated-y += dis-defs.h
generated-y += facility-defs.h
generated-y += syscall_table.h
generated-y += unistd_nr.h

generic-y += asm-offsets.h
generic-y += cacheflush.h
generic-y += clkdev.h
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/include/asm/dis.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef __ASM_S390_DIS_H__
#define __ASM_S390_DIS_H__

#include <generated/dis.h>
#include <asm/dis-defs.h>

static inline int insn_length(unsigned char code)
{
Expand Down
37 changes: 37 additions & 0 deletions arch/s390/include/asm/dwarf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_S390_DWARF_H
#define _ASM_S390_DWARF_H

#ifdef __ASSEMBLY__

#define CFI_STARTPROC .cfi_startproc
#define CFI_ENDPROC .cfi_endproc
#define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset
#define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset
#define CFI_RESTORE .cfi_restore

#ifdef CONFIG_AS_CFI_VAL_OFFSET
#define CFI_VAL_OFFSET .cfi_val_offset
#else
#define CFI_VAL_OFFSET #
#endif

#ifndef BUILD_VDSO
/*
* Emit CFI data in .debug_frame sections and not in .eh_frame
* sections. The .eh_frame CFI is used for runtime unwind
* information that is not being used. Hence, vmlinux.lds.S
* can discard the .eh_frame sections.
*/
.cfi_sections .debug_frame
#else
/*
* For vDSO, emit CFI data in both, .eh_frame and .debug_frame
* sections.
*/
.cfi_sections .eh_frame, .debug_frame
#endif

#endif /* __ASSEMBLY__ */

#endif /* _ASM_S390_DWARF_H */
2 changes: 1 addition & 1 deletion arch/s390/include/asm/facility.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef __ASM_FACILITY_H
#define __ASM_FACILITY_H

#include <generated/facilities.h>
#include <asm/facility-defs.h>
#include <linux/string.h>
#include <linux/preempt.h>
#include <asm/lowcore.h>
Expand Down
1 change: 1 addition & 0 deletions arch/s390/include/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define _ASM_S390_UNISTD_H_

#include <uapi/asm/unistd.h>
#include <asm/unistd_nr.h>

#define __IGNORE_time
#define __IGNORE_pkey_mprotect
Expand Down
3 changes: 3 additions & 0 deletions arch/s390/include/uapi/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm

generated-y += unistd_32.h
generated-y += unistd_64.h

generic-y += errno.h
generic-y += fcntl.h
generic-y += ioctl.h
Expand Down
Loading

0 comments on commit ca0c836

Please sign in to comment.