Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7708fac authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 update from Martin Schwidefsky:
 "Add support to generate code for the latest machine zEC12, MOD and XOR
  instruction support for the BPF jit compiler, the dasd safe offline
  feature and the big one: the s390 architecture gets PCI support!!
  Right before the world ends on the 21st ;-)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (41 commits)
  s390/qdio: rename the misleading PCI flag of qdio devices
  s390/pci: remove obsolete email addresses
  s390/pci: speed up __iowrite64_copy by using pci store block insn
  s390/pci: enable NEED_DMA_MAP_STATE
  s390/pci: no msleep in potential IRQ context
  s390/pci: fix potential NULL pointer dereference in dma_free_seg_table()
  s390/pci: use kmem_cache_zalloc instead of kmem_cache_alloc/memset
  s390/bpf,jit: add support for XOR instruction
  s390/bpf,jit: add support MOD instruction
  s390/cio: fix pgid reserved check
  vga: compile fix, disable vga for s390
  s390/pci: add PCI Kconfig options
  s390/pci: s390 specific PCI sysfs attributes
  s390/pci: PCI hotplug support via SCLP
  s390/pci: CHSC PCI support for error and availability events
  s390/pci: DMA support
  s390/pci: PCI adapter interrupts for MSI/MSI-X
  s390/bitops: find leftmost bit instruction support
  s390/pci: CLP interface
  s390/pci: base support
  ...
parents 3127f23f 6726a807
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -6,3 +6,4 @@ obj-$(CONFIG_S390_HYPFS_FS) += hypfs/
obj-$(CONFIG_APPLDATA_BASE)	+= appldata/
obj-$(CONFIG_APPLDATA_BASE)	+= appldata/
obj-$(CONFIG_MATHEMU)		+= math-emu/
obj-$(CONFIG_MATHEMU)		+= math-emu/
obj-y				+= net/
obj-y				+= net/
obj-$(CONFIG_PCI)		+= pci/
+64 −6
Original line number Original line Diff line number Diff line
@@ -34,12 +34,6 @@ config GENERIC_BUG
config GENERIC_BUG_RELATIVE_POINTERS
config GENERIC_BUG_RELATIVE_POINTERS
	def_bool y
	def_bool y


config NO_IOMEM
	def_bool y

config NO_DMA
	def_bool y

config ARCH_DMA_ADDR_T_64BIT
config ARCH_DMA_ADDR_T_64BIT
	def_bool 64BIT
	def_bool 64BIT


@@ -58,6 +52,12 @@ config KEXEC
config AUDIT_ARCH
config AUDIT_ARCH
	def_bool y
	def_bool y


config NO_IOPORT
	def_bool y

config PCI_QUIRKS
	def_bool n

config S390
config S390
	def_bool y
	def_bool y
	select USE_GENERIC_SMP_HELPERS if SMP
	select USE_GENERIC_SMP_HELPERS if SMP
@@ -171,6 +171,10 @@ config HAVE_MARCH_Z196_FEATURES
	def_bool n
	def_bool n
	select HAVE_MARCH_Z10_FEATURES
	select HAVE_MARCH_Z10_FEATURES


config HAVE_MARCH_ZEC12_FEATURES
	def_bool n
	select HAVE_MARCH_Z196_FEATURES

choice
choice
	prompt "Processor type"
	prompt "Processor type"
	default MARCH_G5
	default MARCH_G5
@@ -222,6 +226,13 @@ config MARCH_Z196
	  (2818 and 2817 series). The kernel will be slightly faster but will
	  (2818 and 2817 series). The kernel will be slightly faster but will
	  not work on older machines.
	  not work on older machines.


config MARCH_ZEC12
	bool "IBM zEC12"
	select HAVE_MARCH_ZEC12_FEATURES if 64BIT
	help
	  Select this to enable optimizations for IBM zEC12 (2827 series). The
	  kernel will be slightly faster but will not work on older machines.

endchoice
endchoice


config 64BIT
config 64BIT
@@ -426,6 +437,53 @@ config QDIO


	  If unsure, say Y.
	  If unsure, say Y.


menuconfig PCI
	bool "PCI support"
	default n
	depends on 64BIT
	select ARCH_SUPPORTS_MSI
	select PCI_MSI
	help
	  Enable PCI support.

if PCI

config PCI_NR_FUNCTIONS
	int "Maximum number of PCI functions (1-4096)"
	range 1 4096
	default "64"
	help
	  This allows you to specify the maximum number of PCI functions which
	  this kernel will support.

source "drivers/pci/Kconfig"
source "drivers/pci/pcie/Kconfig"
source "drivers/pci/hotplug/Kconfig"

endif	# PCI

config PCI_DOMAINS
	def_bool PCI

config HAS_IOMEM
	def_bool PCI

config IOMMU_HELPER
	def_bool PCI

config HAS_DMA
	def_bool PCI
	select HAVE_DMA_API_DEBUG

config NEED_SG_DMA_LENGTH
	def_bool PCI

config HAVE_DMA_ATTRS
	def_bool PCI

config NEED_DMA_MAP_STATE
	def_bool PCI

config CHSC_SCH
config CHSC_SCH
	def_tristate m
	def_tristate m
	prompt "Support for CHSC subchannels"
	prompt "Support for CHSC subchannels"
+1 −0
Original line number Original line Diff line number Diff line
@@ -41,6 +41,7 @@ cflags-$(CONFIG_MARCH_Z990) += $(call cc-option,-march=z990)
cflags-$(CONFIG_MARCH_Z9_109) += $(call cc-option,-march=z9-109)
cflags-$(CONFIG_MARCH_Z9_109) += $(call cc-option,-march=z9-109)
cflags-$(CONFIG_MARCH_Z10) += $(call cc-option,-march=z10)
cflags-$(CONFIG_MARCH_Z10) += $(call cc-option,-march=z10)
cflags-$(CONFIG_MARCH_Z196) += $(call cc-option,-march=z196)
cflags-$(CONFIG_MARCH_Z196) += $(call cc-option,-march=z196)
cflags-$(CONFIG_MARCH_ZEC12) += $(call cc-option,-march=zEC12)


#KBUILD_IMAGE is necessary for make rpm
#KBUILD_IMAGE is necessary for make rpm
KBUILD_IMAGE	:=arch/s390/boot/image
KBUILD_IMAGE	:=arch/s390/boot/image
+12 −6
Original line number Original line Diff line number Diff line
@@ -325,7 +325,8 @@ static int ecb_aes_crypt(struct blkcipher_desc *desc, long func, void *param,
		u8 *in = walk->src.virt.addr;
		u8 *in = walk->src.virt.addr;


		ret = crypt_s390_km(func, param, out, in, n);
		ret = crypt_s390_km(func, param, out, in, n);
		BUG_ON((ret < 0) || (ret != n));
		if (ret < 0 || ret != n)
			return -EIO;


		nbytes &= AES_BLOCK_SIZE - 1;
		nbytes &= AES_BLOCK_SIZE - 1;
		ret = blkcipher_walk_done(desc, walk, nbytes);
		ret = blkcipher_walk_done(desc, walk, nbytes);
@@ -457,7 +458,8 @@ static int cbc_aes_crypt(struct blkcipher_desc *desc, long func, void *param,
		u8 *in = walk->src.virt.addr;
		u8 *in = walk->src.virt.addr;


		ret = crypt_s390_kmc(func, param, out, in, n);
		ret = crypt_s390_kmc(func, param, out, in, n);
		BUG_ON((ret < 0) || (ret != n));
		if (ret < 0 || ret != n)
			return -EIO;


		nbytes &= AES_BLOCK_SIZE - 1;
		nbytes &= AES_BLOCK_SIZE - 1;
		ret = blkcipher_walk_done(desc, walk, nbytes);
		ret = blkcipher_walk_done(desc, walk, nbytes);
@@ -625,7 +627,8 @@ static int xts_aes_crypt(struct blkcipher_desc *desc, long func,
	memcpy(xts_ctx->pcc.tweak, walk->iv, sizeof(xts_ctx->pcc.tweak));
	memcpy(xts_ctx->pcc.tweak, walk->iv, sizeof(xts_ctx->pcc.tweak));
	param = xts_ctx->pcc.key + offset;
	param = xts_ctx->pcc.key + offset;
	ret = crypt_s390_pcc(func, param);
	ret = crypt_s390_pcc(func, param);
	BUG_ON(ret < 0);
	if (ret < 0)
		return -EIO;


	memcpy(xts_ctx->xts_param, xts_ctx->pcc.xts, 16);
	memcpy(xts_ctx->xts_param, xts_ctx->pcc.xts, 16);
	param = xts_ctx->key + offset;
	param = xts_ctx->key + offset;
@@ -636,7 +639,8 @@ static int xts_aes_crypt(struct blkcipher_desc *desc, long func,
		in = walk->src.virt.addr;
		in = walk->src.virt.addr;


		ret = crypt_s390_km(func, param, out, in, n);
		ret = crypt_s390_km(func, param, out, in, n);
		BUG_ON(ret < 0 || ret != n);
		if (ret < 0 || ret != n)
			return -EIO;


		nbytes &= AES_BLOCK_SIZE - 1;
		nbytes &= AES_BLOCK_SIZE - 1;
		ret = blkcipher_walk_done(desc, walk, nbytes);
		ret = blkcipher_walk_done(desc, walk, nbytes);
@@ -769,7 +773,8 @@ static int ctr_aes_crypt(struct blkcipher_desc *desc, long func,
				crypto_inc(ctrblk + i, AES_BLOCK_SIZE);
				crypto_inc(ctrblk + i, AES_BLOCK_SIZE);
			}
			}
			ret = crypt_s390_kmctr(func, sctx->key, out, in, n, ctrblk);
			ret = crypt_s390_kmctr(func, sctx->key, out, in, n, ctrblk);
			BUG_ON(ret < 0 || ret != n);
			if (ret < 0 || ret != n)
				return -EIO;
			if (n > AES_BLOCK_SIZE)
			if (n > AES_BLOCK_SIZE)
				memcpy(ctrblk, ctrblk + n - AES_BLOCK_SIZE,
				memcpy(ctrblk, ctrblk + n - AES_BLOCK_SIZE,
				       AES_BLOCK_SIZE);
				       AES_BLOCK_SIZE);
@@ -788,7 +793,8 @@ static int ctr_aes_crypt(struct blkcipher_desc *desc, long func,
		in = walk->src.virt.addr;
		in = walk->src.virt.addr;
		ret = crypt_s390_kmctr(func, sctx->key, buf, in,
		ret = crypt_s390_kmctr(func, sctx->key, buf, in,
				       AES_BLOCK_SIZE, ctrblk);
				       AES_BLOCK_SIZE, ctrblk);
		BUG_ON(ret < 0 || ret != AES_BLOCK_SIZE);
		if (ret < 0 || ret != AES_BLOCK_SIZE)
			return -EIO;
		memcpy(out, buf, nbytes);
		memcpy(out, buf, nbytes);
		crypto_inc(ctrblk, AES_BLOCK_SIZE);
		crypto_inc(ctrblk, AES_BLOCK_SIZE);
		ret = blkcipher_walk_done(desc, walk, 0);
		ret = blkcipher_walk_done(desc, walk, 0);
+8 −4
Original line number Original line Diff line number Diff line
@@ -94,7 +94,8 @@ static int ecb_desall_crypt(struct blkcipher_desc *desc, long func,
		u8 *in = walk->src.virt.addr;
		u8 *in = walk->src.virt.addr;


		ret = crypt_s390_km(func, key, out, in, n);
		ret = crypt_s390_km(func, key, out, in, n);
		BUG_ON((ret < 0) || (ret != n));
		if (ret < 0 || ret != n)
			return -EIO;


		nbytes &= DES_BLOCK_SIZE - 1;
		nbytes &= DES_BLOCK_SIZE - 1;
		ret = blkcipher_walk_done(desc, walk, nbytes);
		ret = blkcipher_walk_done(desc, walk, nbytes);
@@ -120,7 +121,8 @@ static int cbc_desall_crypt(struct blkcipher_desc *desc, long func,
		u8 *in = walk->src.virt.addr;
		u8 *in = walk->src.virt.addr;


		ret = crypt_s390_kmc(func, iv, out, in, n);
		ret = crypt_s390_kmc(func, iv, out, in, n);
		BUG_ON((ret < 0) || (ret != n));
		if (ret < 0 || ret != n)
			return -EIO;


		nbytes &= DES_BLOCK_SIZE - 1;
		nbytes &= DES_BLOCK_SIZE - 1;
		ret = blkcipher_walk_done(desc, walk, nbytes);
		ret = blkcipher_walk_done(desc, walk, nbytes);
@@ -386,7 +388,8 @@ static int ctr_desall_crypt(struct blkcipher_desc *desc, long func,
				crypto_inc(ctrblk + i, DES_BLOCK_SIZE);
				crypto_inc(ctrblk + i, DES_BLOCK_SIZE);
			}
			}
			ret = crypt_s390_kmctr(func, ctx->key, out, in, n, ctrblk);
			ret = crypt_s390_kmctr(func, ctx->key, out, in, n, ctrblk);
			BUG_ON((ret < 0) || (ret != n));
			if (ret < 0 || ret != n)
				return -EIO;
			if (n > DES_BLOCK_SIZE)
			if (n > DES_BLOCK_SIZE)
				memcpy(ctrblk, ctrblk + n - DES_BLOCK_SIZE,
				memcpy(ctrblk, ctrblk + n - DES_BLOCK_SIZE,
				       DES_BLOCK_SIZE);
				       DES_BLOCK_SIZE);
@@ -404,7 +407,8 @@ static int ctr_desall_crypt(struct blkcipher_desc *desc, long func,
		in = walk->src.virt.addr;
		in = walk->src.virt.addr;
		ret = crypt_s390_kmctr(func, ctx->key, buf, in,
		ret = crypt_s390_kmctr(func, ctx->key, buf, in,
				       DES_BLOCK_SIZE, ctrblk);
				       DES_BLOCK_SIZE, ctrblk);
		BUG_ON(ret < 0 || ret != DES_BLOCK_SIZE);
		if (ret < 0 || ret != DES_BLOCK_SIZE)
			return -EIO;
		memcpy(out, buf, nbytes);
		memcpy(out, buf, nbytes);
		crypto_inc(ctrblk, DES_BLOCK_SIZE);
		crypto_inc(ctrblk, DES_BLOCK_SIZE);
		ret = blkcipher_walk_done(desc, walk, 0);
		ret = blkcipher_walk_done(desc, walk, 0);
Loading