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:
 "The big one is support for fake NUMA, splitting a really large machine
  in more manageable piece improves performance in some cases, e.g. for
  a KVM host.

  The FICON Link Incident handling has been improved, this helps the
  operator to identify degraded or non-operational FICON connections.

  The save and restore of floating point and vector registers has been
  overhauled to allow the future use of vector registers in the kernel.

  A few small enhancement, magic sys-requests for the vt220 console via
  SCLP, some more assembler code has been converted to C, the PCI error
  handling is improved.

  And the usual cleanup and bug fixing"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (59 commits)
  s390/jump_label: Use %*ph to print small buffers
  s390/sclp_vt220: support magic sysrequests
  s390/ctrlchar: improve handling of magic sysrequests
  s390/numa: remove superfluous ARCH_WANT defines
  s390/3270: redraw screen on unsolicited device end
  s390/dcssblk: correct out of bounds array indexes
  s390/mm: simplify page table alloc/free code
  s390/pci: move debug messages to debugfs
  s390/nmi: initialize control register 0 earlier
  s390/zcrypt: use msleep() instead of mdelay()
  s390/hmcdrv: fix interrupt registration
  s390/setup: fix novx parameter
  s390/uaccess: remove uaccess_primary kernel parameter
  s390: remove unneeded sizeof(void *) comparisons
  s390/facilities: remove transactional-execution bits
  s390/numa: re-add DIE sched_domain_topology_level
  s390/dasd: enhance CUIR scope detection
  s390/dasd: fix failing path verification
  s390/vdso: emit a GNU hash
  s390/numa: make core to node mapping data dynamic
  ...
  • Loading branch information
torvalds committed Aug 31, 2015
2 parents 7c01919 + e4ec735 commit 9c6a019
Show file tree
Hide file tree
Showing 94 changed files with 3,696 additions and 1,368 deletions.
6 changes: 0 additions & 6 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5907,7 +5907,6 @@ F: arch/powerpc/kvm/
KERNEL VIRTUAL MACHINE for s390 (KVM/s390)
M: Christian Borntraeger <[email protected]>
M: Cornelia Huck <[email protected]>
M: [email protected]
L: [email protected]
W: http://www.ibm.com/developerworks/linux/linux390/
S: Supported
Expand Down Expand Up @@ -8718,7 +8717,6 @@ F: drivers/video/fbdev/savage/
S390
M: Martin Schwidefsky <[email protected]>
M: Heiko Carstens <[email protected]>
M: [email protected]
L: [email protected]
W: http://www.ibm.com/developerworks/linux/linux390/
S: Supported
Expand Down Expand Up @@ -8746,7 +8744,6 @@ F: block/partitions/ibm.c

S390 NETWORK DRIVERS
M: Ursula Braun <[email protected]>
M: [email protected]
L: [email protected]
W: http://www.ibm.com/developerworks/linux/linux390/
S: Supported
Expand All @@ -8763,23 +8760,20 @@ F: drivers/pci/hotplug/s390_pci_hpc.c

S390 ZCRYPT DRIVER
M: Ingo Tuchscherer <[email protected]>
M: [email protected]
L: [email protected]
W: http://www.ibm.com/developerworks/linux/linux390/
S: Supported
F: drivers/s390/crypto/

S390 ZFCP DRIVER
M: Steffen Maier <[email protected]>
M: [email protected]
L: [email protected]
W: http://www.ibm.com/developerworks/linux/linux390/
S: Supported
F: drivers/s390/scsi/zfcp_*

S390 IUCV NETWORK LAYER
M: Ursula Braun <[email protected]>
M: [email protected]
L: [email protected]
W: http://www.ibm.com/developerworks/linux/linux390/
S: Supported
Expand Down
1 change: 1 addition & 0 deletions arch/s390/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ obj-$(CONFIG_S390_HYPFS_FS) += hypfs/
obj-$(CONFIG_APPLDATA_BASE) += appldata/
obj-y += net/
obj-$(CONFIG_PCI) += pci/
obj-$(CONFIG_NUMA) += numa/
75 changes: 75 additions & 0 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,22 @@ config S390
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
select ARCH_SAVE_PAGE_KEYS if HIBERNATION
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_NUMA_BALANCING
select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_WANTS_PROT_NUMA_PROT_NONE
select ARCH_WANT_IPC_PARSE_VERSION
select BUILDTIME_EXTABLE_SORT
select CLONE_BACKWARDS2
select DYNAMIC_FTRACE if FUNCTION_TRACER
select GENERIC_CLOCKEVENTS
select GENERIC_CPU_AUTOPROBE
select GENERIC_CPU_DEVICES if !SMP
select GENERIC_FIND_FIRST_BIT
select GENERIC_SMP_IDLE_THREAD
select GENERIC_TIME_VSYSCALL
select HAVE_ALIGNED_STRUCT_PAGE if SLUB
select HAVE_ARCH_AUDITSYSCALL
select HAVE_ARCH_EARLY_PFN_TO_NID
select HAVE_ARCH_JUMP_LABEL
select HAVE_ARCH_SECCOMP_FILTER
select HAVE_ARCH_TRACEHOOK
Expand Down Expand Up @@ -153,6 +157,7 @@ config S390
select VIRT_CPU_ACCOUNTING
select VIRT_TO_BUS


config SCHED_OMIT_FRAME_POINTER
def_bool y

Expand Down Expand Up @@ -385,6 +390,76 @@ config HOTPLUG_CPU
config SCHED_SMT
def_bool n

# Some NUMA nodes have memory ranges that span
# other nodes. Even though a pfn is valid and
# between a node's start and end pfns, it may not
# reside on that node. See memmap_init_zone()
# for details. <- They meant memory holes!
config NODES_SPAN_OTHER_NODES
def_bool NUMA

config NUMA
bool "NUMA support"
depends on SMP && 64BIT && SCHED_TOPOLOGY
default n
help
Enable NUMA support

This option adds NUMA support to the kernel.

An operation mode can be selected by appending
numa=<method> to the kernel command line.

The default behaviour is identical to appending numa=plain to
the command line. This will create just one node with all
available memory and all CPUs in it.

config NODES_SHIFT
int "Maximum NUMA nodes (as a power of 2)"
range 1 10
depends on NUMA
default "4"
help
Specify the maximum number of NUMA nodes available on the target
system. Increases memory reserved to accommodate various tables.

menu "Select NUMA modes"
depends on NUMA

config NUMA_EMU
bool "NUMA emulation"
default y
help
Numa emulation mode will split the available system memory into
equal chunks which then are distributed over the configured number
of nodes in a round-robin manner.

The number of fake nodes is limited by the number of available memory
chunks (i.e. memory size / fake size) and the number of supported
nodes in the kernel.

The CPUs are assigned to the nodes in a way that partially respects
the original machine topology (if supported by the machine).
Fair distribution of the CPUs is not guaranteed.

config EMU_SIZE
hex "NUMA emulation memory chunk size"
default 0x10000000
range 0x400000 0x100000000
depends on NUMA_EMU
help
Select the default size by which the memory is chopped and then
assigned to emulated NUMA nodes.

This can be overridden by specifying

emu_size=<n>

on the kernel command line where also suffixes K, M, G, and T are
supported.

endmenu

config SCHED_MC
def_bool n

Expand Down
2 changes: 2 additions & 0 deletions arch/s390/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ mflags-$(CONFIG_MARCH_Z196) := -march=z196
mflags-$(CONFIG_MARCH_ZEC12) := -march=zEC12
mflags-$(CONFIG_MARCH_Z13) := -march=z13

export CC_FLAGS_MARCH := $(mflags-y)

aflags-y += $(mflags-y)
cflags-y += $(mflags-y)

Expand Down
2 changes: 2 additions & 0 deletions arch/s390/configs/default_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_RCU_FAST_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_NUMA_BALANCING=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
Expand Down Expand Up @@ -50,6 +51,7 @@ CONFIG_LIVEPATCH=y
CONFIG_MARCH_Z196=y
CONFIG_TUNE_ZEC12=y
CONFIG_NR_CPUS=256
CONFIG_NUMA=y
CONFIG_PREEMPT=y
CONFIG_HZ_100=y
CONFIG_MEMORY_HOTPLUG=y
Expand Down
2 changes: 2 additions & 0 deletions arch/s390/configs/gcov_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_RCU_FAST_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_NUMA_BALANCING=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
Expand Down Expand Up @@ -49,6 +50,7 @@ CONFIG_DEFAULT_DEADLINE=y
CONFIG_MARCH_Z196=y
CONFIG_TUNE_ZEC12=y
CONFIG_NR_CPUS=256
CONFIG_NUMA=y
CONFIG_HZ_100=y
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTREMOVE=y
Expand Down
3 changes: 3 additions & 0 deletions arch/s390/configs/performance_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_RCU_FAST_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_NUMA_BALANCING=y
# CONFIG_NUMA_BALANCING_DEFAULT_ENABLED is not set
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
Expand Down Expand Up @@ -48,6 +50,7 @@ CONFIG_LIVEPATCH=y
CONFIG_MARCH_Z196=y
CONFIG_TUNE_ZEC12=y
CONFIG_NR_CPUS=512
CONFIG_NUMA=y
CONFIG_HZ_100=y
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTREMOVE=y
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/crypto/aes_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <crypto/algapi.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include "crypt_s390.h"
Expand Down Expand Up @@ -976,7 +977,7 @@ static void __exit aes_s390_fini(void)
crypto_unregister_alg(&aes_alg);
}

module_init(aes_s390_init);
module_cpu_feature_match(MSA, aes_s390_init);
module_exit(aes_s390_fini);

MODULE_ALIAS_CRYPTO("aes-all");
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/crypto/des_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <linux/init.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
#include <linux/crypto.h>
#include <crypto/algapi.h>
#include <crypto/des.h>
Expand Down Expand Up @@ -616,7 +617,7 @@ static void __exit des_s390_exit(void)
crypto_unregister_alg(&des_alg);
}

module_init(des_s390_init);
module_cpu_feature_match(MSA, des_s390_init);
module_exit(des_s390_exit);

MODULE_ALIAS_CRYPTO("des");
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/crypto/ghash_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <crypto/internal/hash.h>
#include <linux/module.h>
#include <linux/cpufeature.h>

#include "crypt_s390.h"

Expand Down Expand Up @@ -158,7 +159,7 @@ static void __exit ghash_mod_exit(void)
crypto_unregister_shash(&ghash_alg);
}

module_init(ghash_mod_init);
module_cpu_feature_match(MSA, ghash_mod_init);
module_exit(ghash_mod_exit);

MODULE_ALIAS_CRYPTO("ghash");
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/crypto/prng.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/mutex.h>
#include <linux/cpufeature.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <asm/debug.h>
Expand Down Expand Up @@ -914,6 +915,5 @@ static void __exit prng_exit(void)
}
}


module_init(prng_init);
module_cpu_feature_match(MSA, prng_init);
module_exit(prng_exit);
3 changes: 2 additions & 1 deletion arch/s390/crypto/sha1_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <crypto/internal/hash.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
#include <crypto/sha.h>

#include "crypt_s390.h"
Expand Down Expand Up @@ -100,7 +101,7 @@ static void __exit sha1_s390_fini(void)
crypto_unregister_shash(&alg);
}

module_init(sha1_s390_init);
module_cpu_feature_match(MSA, sha1_s390_init);
module_exit(sha1_s390_fini);

MODULE_ALIAS_CRYPTO("sha1");
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/crypto/sha256_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <crypto/internal/hash.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
#include <crypto/sha.h>

#include "crypt_s390.h"
Expand Down Expand Up @@ -140,7 +141,7 @@ static void __exit sha256_s390_fini(void)
crypto_unregister_shash(&sha256_alg);
}

module_init(sha256_s390_init);
module_cpu_feature_match(MSA, sha256_s390_init);
module_exit(sha256_s390_fini);

MODULE_ALIAS_CRYPTO("sha256");
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/crypto/sha512_s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/cpufeature.h>

#include "sha.h"
#include "crypt_s390.h"
Expand Down Expand Up @@ -148,7 +149,7 @@ static void __exit fini(void)
crypto_unregister_shash(&sha384_alg);
}

module_init(init);
module_cpu_feature_match(MSA, init);
module_exit(fini);

MODULE_LICENSE("GPL");
Expand Down
29 changes: 29 additions & 0 deletions arch/s390/include/asm/cpufeature.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Module interface for CPU features
*
* Copyright IBM Corp. 2015
* Author(s): Hendrik Brueckner <[email protected]>
*/

#ifndef __ASM_S390_CPUFEATURE_H
#define __ASM_S390_CPUFEATURE_H

#include <asm/elf.h>

/* Hardware features on Linux on z Systems are indicated by facility bits that
* are mapped to the so-called machine flags. Particular machine flags are
* then used to define ELF hardware capabilities; most notably hardware flags
* that are essential for user space / glibc.
*
* Restrict the set of exposed CPU features to ELF hardware capabilities for
* now. Additional machine flags can be indicated by values larger than
* MAX_ELF_HWCAP_FEATURES.
*/
#define MAX_ELF_HWCAP_FEATURES (8 * sizeof(elf_hwcap))
#define MAX_CPU_FEATURES MAX_ELF_HWCAP_FEATURES

#define cpu_feature(feat) ilog2(HWCAP_S390_ ## feat)

int cpu_have_feature(unsigned int nr);

#endif /* __ASM_S390_CPUFEATURE_H */
2 changes: 2 additions & 0 deletions arch/s390/include/asm/ctl_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ static inline void __ctl_clear_bit(unsigned int cr, unsigned int bit)
__ctl_load(reg, cr, cr);
}

void __ctl_set_vx(void);

void smp_ctl_set_bit(int cr, int bit);
void smp_ctl_clear_bit(int cr, int bit);

Expand Down
Loading

0 comments on commit 9c6a019

Please sign in to comment.