Skip to contentSkip to conversation

s390 patches for 4.13 merge window

GIT PULL Martin Schwidefsky 3 participants 7 messages Jul 3, 2017 – Jul 4, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Linus,

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

to receive the following updates:

The bulk of the s390 patches for 4.13. Some new things but mostly bug fixes and cleanups. Noteworthy changes:

* The SCM block driver is converted to blk-mq

* Switch s390 to 5 level page tables. The virtual address space for a user space process can now have up to 16EB-4KB.

* Introduce a ELF phdr flag for qemu to avoid the global vm.alloc_pgste which forces all processes to large page tables

* A couple of PCI improvements to improve error recovery

* Included is the merge of the base support for proper machine checks for KVM

Christian Borntraeger (1):
s390/smp: fix false positive kmemleak of mcesa data structure

Harald Freudenberger (4):
s390/zcrypt: remove unused function zcrypt_type6_mex_key_de() s390/crypto: fix aes/paes Kconfig dependeny s390/zcrypt: Rework ap init in case of out of range domain param. s390/zcrypt: Add some debug messages on failure.

Heiko Carstens (17):
s390: add missing header includes for type checking s390/pkey: make pkey_init() static
s390/mm: add __rcu annotations
s390/pkey: add missing __user annotations
s390: use two more generic header files
s390/zcrypt: get rid of little/big endian handling s390/hvc_iucv: fix broken Kconfig select statement s390/smp: use sigp condition code define
s390/fault: use _ASCE_ORIGIN instead of PAGE_MASK s390/facilities: remove stfle requirement
s390/mm: remove incorrect _REGION3_ENTRY_ORIGIN define s390/mm: add p?d_folded() helper functions s390/dumpstack: remove raw stack dump
s390/ipl: revert Load Normal semantics for LPAR CCW-type re-IPL s390/mm: use correct address space when enabling DAT
s390: rename psw_bits enums
s390: rename struct psw_bits members

Jan Höppner (3):
s390/dasd: Remove variable sized array s390/dasd: Display read-only attribute correctly s390/dasd: Fix faulty ENODEV for RO sysfs attribute

Logan Gunthorpe (1):
s390: provide default ioremap and iounmap declaration

Martin Schwidefsky (6):
s390/mm: implement 5 level pages tables s390/cputime: simplify account_system_index_scaled s390/vdso: use _install_special_mapping to establish vdso s390/ptrace: guarded storage regset for the current task s390/kvm: avoid global config of vm.alloc_pgste=1 s390/fpu: export save_fpu_regs for all configs

QingFeng Hao (2):
s390/nmi: s390: New low level handling for machine check happening in guest
KVM: s390: Backup the guest's machine check info

Sebastian Ott (14):
s390/scm: remove cluster option
s390/scm: convert to blk-mq
s390/scm: convert tasklet
s390/scm: use multiple queues
s390/cio: introduce io_subchannel_type
s390/pci: don't cleanup in arch_setup_msi_irqs s390/pci: improve error handling during interrupt deregistration s390/pci: improve unreg_ioat error handling
s390/pci: improve error handling during fmb (de)registration s390/pci: introduce clp_get_state
s390/pci: improve pci hotplug
s390/pci: fix handling of PEC 306
s390/pci: provide more debug information
s390/pci: recognize name clashes with uids

Stefan Haberland (2):
s390/dasd: fix unusable device after safe offline processing s390/dasd: fix hanging safe offline

Thomas Huth (1):
s390: Remove 'message security assist' from the list of vital facilities

Thomas Richter (1):
s390/perf: fix null string in perf list pmu command

 arch/s390/Kconfig                     |   3 +-
 arch/s390/crypto/Makefile             |   3 +-
 arch/s390/crypto/arch_random.c        |   1 +
 arch/s390/include/asm/Kbuild          |   2 +
 arch/s390/include/asm/device.h        |  10 --
 arch/s390/include/asm/elf.h           |  32 +++++
 arch/s390/include/asm/fb.h            |  12 --
 arch/s390/include/asm/io.h            |   4 +-
 arch/s390/include/asm/kvm_host.h      |  17 ++-
 arch/s390/include/asm/mmu_context.h   |   4 +-
 arch/s390/include/asm/nmi.h           |   7 +
 arch/s390/include/asm/page.h          |   3 +
 arch/s390/include/asm/pci.h           |  15 +-
 arch/s390/include/asm/pci_insn.h      |   2 +-
 arch/s390/include/asm/pgalloc.h       |  25 +++-
 arch/s390/include/asm/pgtable.h       | 105 +++++++++++---
 arch/s390/include/asm/processor.h     |   6 +-
 arch/s390/include/asm/ptrace.h        |  54 +++----
 arch/s390/include/asm/sigp.h          |   2 +-
 arch/s390/include/asm/thread_info.h   |   1 +
 arch/s390/include/asm/tlb.h           |  15 ++
 arch/s390/kernel/asm-offsets.c        |   3 +
 arch/s390/kernel/dumpstack.c          |  33 +----
 arch/s390/kernel/entry.S              |  30 +++-
 arch/s390/kernel/ipl.c                |   7 +-
 arch/s390/kernel/nmi.c                |  84 +++++++++--
 arch/s390/kernel/perf_cpum_sf.c       |  10 +-
 arch/s390/kernel/perf_event.c         |   3 +-
 arch/s390/kernel/ptrace.c             |  15 +-
 arch/s390/kernel/smp.c                |   3 +
 arch/s390/kernel/traps.c              |   1 +
 arch/s390/kernel/uprobes.c            |  12 +-
 arch/s390/kernel/vdso.c               |  91 ++++++++----
 arch/s390/kernel/vtime.c              |  14 +-
 arch/s390/kvm/gaccess.c               |  22 +--
 arch/s390/kvm/gaccess.h               |   4 +-
 arch/s390/kvm/guestdbg.c              |   6 +-
 arch/s390/kvm/kvm-s390.c              |   1 +
 arch/s390/kvm/priv.c                  |   8 +-
 arch/s390/mm/dump_pagetables.c        |  23 ++-
 arch/s390/mm/fault.c                  |   2 +-
 arch/s390/mm/gmap.c                   |  11 +-
 arch/s390/mm/gup.c                    |  33 ++++-
 arch/s390/mm/hugetlbpage.c            |  30 ++--
 arch/s390/mm/init.c                   |   6 +-
 arch/s390/mm/mmap.c                   |   4 +-
 arch/s390/mm/pageattr.c               |  30 +++-
 arch/s390/mm/pgalloc.c                |  57 +++++---
 arch/s390/mm/pgtable.c                |   6 +-
 arch/s390/mm/vmem.c                   |  44 +++++-
 arch/s390/pci/pci.c                   | 173 ++++++++++++----------
 arch/s390/pci/pci_clp.c               |  77 ++++++----
 arch/s390/pci/pci_dma.c               |   4 +-
 arch/s390/pci/pci_event.c             |  14 +-
 arch/s390/pci/pci_insn.c              |  10 +-
 arch/s390/tools/gen_facilities.c      |   2 -
 drivers/crypto/Kconfig                |  15 +-
 drivers/s390/block/Kconfig            |   7 -
 drivers/s390/block/Makefile           |   3 -
 drivers/s390/block/dasd.c             |  76 +++++-----
 drivers/s390/block/dasd_devmap.c      |  75 ++++++----
 drivers/s390/block/scm_blk.c          | 262 +++++++++++++++-------------------
 drivers/s390/block/scm_blk.h          |  60 +-------
 drivers/s390/block/scm_blk_cluster.c  | 255 ---------------------------------
 drivers/s390/cio/css.c                |  49 +++++++
 drivers/s390/cio/device.c             |  42 ------
 drivers/s390/cio/vfio_ccw_drv.c       |  58 +-------
 drivers/s390/crypto/ap_bus.c          |  21 ++-
 drivers/s390/crypto/pkey_api.c        |   6 +-
 drivers/s390/crypto/zcrypt_api.c      |  12 +-
 drivers/s390/crypto/zcrypt_cca_key.h  | 115 +--------------
 drivers/s390/crypto/zcrypt_msgtype6.c |   4 +-
 drivers/tty/hvc/Kconfig               |   2 +-
 73 files changed, 1136 insertions(+), 1122 deletions(-)
 delete mode 100644 arch/s390/include/asm/device.h
 delete mode 100644 arch/s390/include/asm/fb.h
 delete mode 100644 drivers/s390/block/scm_blk_cluster.c
#1 lore raw

Hi all,

Quoted 11 lines · On Mon, 3 Jul 2017 11:01:34 +0200 Martin Schwidefsky <[email protected]>…

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

to receive the following updates:

The bulk of the s390 patches for 4.13. Some new things but mostly bug fixes and cleanups. Noteworthy changes:

* The SCM block driver is converted to blk-mq

It might have been nice to mention the conflict in this with the block tree which I resolved like this:

drivers/s390/block/scm_blk.c +0 -0
diff --cc drivers/s390/block/scm_blk.c
index 725f912fab41,3c2c84b72877..0071febac9e6
@@@ -228,12 -231,22 +228,12 @@@ static inline void scm_request_init(str
  	aob->request.data = (u64) aobrq;
  	scmrq->bdev = bdev;
  	scmrq->retries = 4;
- 	scmrq->error = 0;
+ 	scmrq->error = BLK_STS_OK;
  	/* We don't use all msbs - place aidaws at the end of the aob page. */
  	scmrq->next_aidaw = (void *) &aob->msb[nr_requests_per_io];
 -	scm_request_cluster_init(scmrq);
  }
  
 -static void scm_ensure_queue_restart(struct scm_blk_dev *bdev)
 -{
 -	if (atomic_read(&bdev->queued_reqs)) {
 -		/* Queue restart is triggered by the next interrupt. */
 -		return;
 -	}
 -	blk_delay_queue(bdev->rq, SCM_QUEUE_DELAY);
 -}
 -
 -void scm_request_requeue(struct scm_request *scmrq)
 +static void scm_request_requeue(struct scm_request *scmrq)
  {
  	struct scm_blk_dev *bdev = scmrq->bdev;
  	int i;
@@@ -271,83 -289,75 +271,83 @@@ static void scm_request_start(struct sc
  		SCM_LOG(5, "no subchannel");
  		scm_request_requeue(scmrq);
  	}
 -	return ret;
  }
  
 -static void scm_blk_request(struct request_queue *rq)
 +struct scm_queue {
 +	struct scm_request *scmrq;
 +	spinlock_t lock;
 +};
 +
- static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
++static blk_status_t scm_blk_request(struct blk_mq_hw_ctx *hctx,
 +			   const struct blk_mq_queue_data *qd)
  {
 -	struct scm_device *scmdev = rq->queuedata;
 +	struct scm_device *scmdev = hctx->queue->queuedata;
  	struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);
 -	struct scm_request *scmrq = NULL;
 -	struct request *req;
 +	struct scm_queue *sq = hctx->driver_data;
 +	struct request *req = qd->rq;
 +	struct scm_request *scmrq;
  
 -	while ((req = blk_peek_request(rq))) {
 -		if (!scm_permit_request(bdev, req))
 -			goto out;
 +	spin_lock(&sq->lock);
 +	if (!scm_permit_request(bdev, req)) {
 +		spin_unlock(&sq->lock);
- 		return BLK_MQ_RQ_QUEUE_BUSY;
++		return BLK_STS_RESOURCE;
 +	}
  
 +	scmrq = sq->scmrq;
 +	if (!scmrq) {
 +		scmrq = scm_request_fetch();
  		if (!scmrq) {
 -			scmrq = scm_request_fetch();
 -			if (!scmrq) {
 -				SCM_LOG(5, "no request");
 -				goto out;
 -			}
 -			scm_request_init(bdev, scmrq);
 +			SCM_LOG(5, "no request");
 +			spin_unlock(&sq->lock);
- 			return BLK_MQ_RQ_QUEUE_BUSY;
++			return BLK_STS_RESOURCE;
  		}
 -		scm_request_set(scmrq, req);
 +		scm_request_init(bdev, scmrq);
 +		sq->scmrq = scmrq;
 +	}
 +	scm_request_set(scmrq, req);
  
 -		if (!scm_reserve_cluster(scmrq)) {
 -			SCM_LOG(5, "cluster busy");
 -			scm_request_set(scmrq, NULL);
 -			if (scmrq->aob->request.msb_count)
 -				goto out;
 +	if (scm_request_prepare(scmrq)) {
 +		SCM_LOG(5, "aidaw alloc failed");
 +		scm_request_set(scmrq, NULL);
  
 -			scm_request_done(scmrq);
 -			return;
 -		}
 +		if (scmrq->aob->request.msb_count)
 +			scm_request_start(scmrq);
  
 -		if (scm_need_cluster_request(scmrq)) {
 -			if (scmrq->aob->request.msb_count) {
 -				/* Start cluster requests separately. */
 -				scm_request_set(scmrq, NULL);
 -				if (scm_request_start(scmrq))
 -					return;
 -			} else {
 -				atomic_inc(&bdev->queued_reqs);
 -				blk_start_request(req);
 -				scm_initiate_cluster_request(scmrq);
 -			}
 -			scmrq = NULL;
 -			continue;
 -		}
 +		sq->scmrq = NULL;
 +		spin_unlock(&sq->lock);
- 		return BLK_MQ_RQ_QUEUE_BUSY;
++		return BLK_STS_RESOURCE;
 +	}
 +	blk_mq_start_request(req);
  
 -		if (scm_request_prepare(scmrq)) {
 -			SCM_LOG(5, "aidaw alloc failed");
 -			scm_request_set(scmrq, NULL);
 -			goto out;
 -		}
 -		blk_start_request(req);
 +	if (qd->last || scmrq->aob->request.msb_count == nr_requests_per_io) {
 +		scm_request_start(scmrq);
 +		sq->scmrq = NULL;
 +	}
 +	spin_unlock(&sq->lock);
- 	return BLK_MQ_RQ_QUEUE_OK;
++	return BLK_STS_OK;
 +}
  
 -		if (scmrq->aob->request.msb_count < nr_requests_per_io)
 -			continue;
 +static int scm_blk_init_hctx(struct blk_mq_hw_ctx *hctx, void *data,
 +			     unsigned int idx)
 +{
 +	struct scm_queue *qd = kzalloc(sizeof(*qd), GFP_KERNEL);
  
 -		if (scm_request_start(scmrq))
 -			return;
 +	if (!qd)
 +		return -ENOMEM;
  
 -		scmrq = NULL;
 -	}
 -out:
 -	if (scmrq)
 -		scm_request_start(scmrq);
 -	else
 -		scm_ensure_queue_restart(bdev);
 +	spin_lock_init(&qd->lock);
 +	hctx->driver_data = qd;
 +
 +	return 0;
 +}
 +
 +static void scm_blk_exit_hctx(struct blk_mq_hw_ctx *hctx, unsigned int idx)
 +{
 +	struct scm_queue *qd = hctx->driver_data;
 +
 +	WARN_ON(qd->scmrq);
 +	kfree(hctx->driver_data);
 +	hctx->driver_data = NULL;
  }
  
  static void __scmrq_log_error(struct scm_request *scmrq)
@@@ -394,28 -419,43 +394,28 @@@ restart
  		return;
  
  requeue:
 -	spin_lock_irqsave(&bdev->rq_lock, flags);
  	scm_request_requeue(scmrq);
 -	spin_unlock_irqrestore(&bdev->rq_lock, flags);
  }
  
- void scm_blk_irq(struct scm_device *scmdev, void *data, int error)
 -static void scm_blk_tasklet(struct scm_blk_dev *bdev)
++void scm_blk_irq(struct scm_device *scmdev, void *data, blk_status_t error)
  {
 -	struct scm_request *scmrq;
 -	unsigned long flags;
 -
 -	spin_lock_irqsave(&bdev->lock, flags);
 -	while (!list_empty(&bdev->finished_requests)) {
 -		scmrq = list_first_entry(&bdev->finished_requests,
 -					 struct scm_request, list);
 -		list_del(&scmrq->list);
 -		spin_unlock_irqrestore(&bdev->lock, flags);
 +	struct scm_request *scmrq = data;
  
 -		if (scmrq->error && scmrq->retries-- > 0) {
 +	scmrq->error = error;
 +	if (error) {
 +		__scmrq_log_error(scmrq);
 +		if (scmrq->retries-- > 0) {
  			scm_blk_handle_error(scmrq);
 -
 -			/* Request restarted or requeued, handle next. */
 -			spin_lock_irqsave(&bdev->lock, flags);
 -			continue;
 +			return;
  		}
 +	}
  
 -		if (scm_test_cluster_request(scmrq)) {
 -			scm_cluster_request_irq(scmrq);
 -			spin_lock_irqsave(&bdev->lock, flags);
 -			continue;
 -		}
 +	scm_request_finish(scmrq);
 +}
  
 -		scm_request_finish(scmrq);
 -		spin_lock_irqsave(&bdev->lock, flags);
 -	}
 -	spin_unlock_irqrestore(&bdev->lock, flags);
 -	/* Look out for more requests. */
 -	blk_run_queue(bdev->rq);
 +static void scm_blk_request_done(struct request *req)
 +{
 +	blk_mq_end_request(req, 0);
  }
  
  static const struct block_device_operations scm_blk_devops = {
drivers/s390/block/scm_blk.h +0 -0
diff --cc drivers/s390/block/scm_blk.h
index 242d17a91920,cd598d1a4eae..71288dd9dd7f
@@@ -32,7 -35,14 +32,7 @@@ struct scm_request 
  	struct aob *aob;
  	struct list_head list;
  	u8 retries;
- 	int error;
+ 	blk_status_t error;
 -#ifdef CONFIG_SCM_BLOCK_CLUSTER_WRITE
 -	struct {
 -		enum {CLUSTER_NONE, CLUSTER_READ, CLUSTER_WRITE} state;
 -		struct list_head list;
 -		void **buf;
 -	} cluster;
 -#endif
  };
  
  #define to_aobrq(rq) container_of((void *) rq, struct aob_rq_header, data)
@@@ -40,8 -50,11 +40,8 @@@
  int scm_blk_dev_setup(struct scm_blk_dev *, struct scm_device *);
  void scm_blk_dev_cleanup(struct scm_blk_dev *);
  void scm_blk_set_available(struct scm_blk_dev *);
- void scm_blk_irq(struct scm_device *, void *, int);
+ void scm_blk_irq(struct scm_device *, void *, blk_status_t);
  
 -void scm_request_finish(struct scm_request *);
 -void scm_request_requeue(struct scm_request *);
 -
  struct aidaw *scm_aidaw_fetch(struct scm_request *scmrq, unsigned int bytes);
  
  int scm_drv_init(void);
Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
In reply to Martin Schwidefsky
Quoted 4 lines · Martin Schwidefsky

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

So my conflict resolution looks different from the one Stephen posted, which may be due to various reasons, ranging from "linux-next has other things that conflict" to just "I didn't notice some semantic conflict since unlike linux-next I don't build for s390".

Regardless, you should check my current -git tree just to verify, and send me a patch if I screwed something up.

Linus

#3 lore raw

Hi Linus,

Quoted 8 lines · On Mon, 3 Jul 2017 15:46:00 -0700 Linus Torvalds…
Quoted 4 lines · Martin Schwidefsky

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

Quoted 7 lines

So my conflict resolution looks different from the one Stephen posted, which may be due to various reasons, ranging from "linux-next has other things that conflict" to just "I didn't notice some semantic conflict since unlike linux-next I don't build for s390".

Regardless, you should check my current -git tree just to verify, and send me a patch if I screwed something up.

At least part of the difference is the following merge fix patch I have been carrying. It is needed due to a build failure.

From: Stephen Rothwell <[email protected]>
Date: Tue, 13 Jun 2017 20:51:32 +1000
Subject: [PATCH] s390: fix up for "blk-mq: switch ->queue_rq return value to
blk_status_t"

---
 drivers/s390/block/scm_blk.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/s390/block/scm_blk.c +5 -5
index 42018a20f2b7..0071febac9e6 100644
@@ -278,7 +278,7 @@ struct scm_queue {
 	spinlock_t lock;
 };
 
-static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
+static blk_status_t scm_blk_request(struct blk_mq_hw_ctx *hctx,
 			   const struct blk_mq_queue_data *qd)
 {
 	struct scm_device *scmdev = hctx->queue->queuedata;
@@ -290,7 +290,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 	spin_lock(&sq->lock);
 	if (!scm_permit_request(bdev, req)) {
 		spin_unlock(&sq->lock);
-		return BLK_MQ_RQ_QUEUE_BUSY;
+		return BLK_STS_RESOURCE;
 	}
 
 	scmrq = sq->scmrq;
@@ -299,7 +299,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 		if (!scmrq) {
 			SCM_LOG(5, "no request");
 			spin_unlock(&sq->lock);
-			return BLK_MQ_RQ_QUEUE_BUSY;
+			return BLK_STS_RESOURCE;
 		}
 		scm_request_init(bdev, scmrq);
 		sq->scmrq = scmrq;
@@ -315,7 +315,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 
 		sq->scmrq = NULL;
 		spin_unlock(&sq->lock);
-		return BLK_MQ_RQ_QUEUE_BUSY;
+		return BLK_STS_RESOURCE;
 	}
 	blk_mq_start_request(req);
 
@@ -324,7 +324,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 		sq->scmrq = NULL;
 	}
 	spin_unlock(&sq->lock);
-	return BLK_MQ_RQ_QUEUE_OK;
+	return BLK_STS_OK;
 }
 
 static int scm_blk_init_hctx(struct blk_mq_hw_ctx *hctx, void *data,
Signature · 5 lines
2.11.0

-- 
Cheers,
Stephen Rothwell
#4 lore raw
Quoted 73 lines · On Tue, 4 Jul 2017 17:58:18 +1000 Stephen Rothwell <[email protected]> wrote:

Hi Linus,

Quoted 8 lines · On Mon, 3 Jul 2017 15:46:00 -0700 Linus Torvalds…
Quoted 4 lines · Martin Schwidefsky

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

Quoted 7 lines

So my conflict resolution looks different from the one Stephen posted, which may be due to various reasons, ranging from "linux-next has other things that conflict" to just "I didn't notice some semantic conflict since unlike linux-next I don't build for s390".

Regardless, you should check my current -git tree just to verify, and send me a patch if I screwed something up.

At least part of the difference is the following merge fix patch I have been carrying. It is needed due to a build failure.

From: Stephen Rothwell <[email protected]>
Date: Tue, 13 Jun 2017 20:51:32 +1000
Subject: [PATCH] s390: fix up for "blk-mq: switch ->queue_rq return value to
blk_status_t"

---
 drivers/s390/block/scm_blk.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/s390/block/scm_blk.c +4 -4
index 42018a20f2b7..0071febac9e6 100644
@@ -278,7 +278,7 @@ struct scm_queue {
 	spinlock_t lock;
 };
 
-static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
+static blk_status_t scm_blk_request(struct blk_mq_hw_ctx *hctx,
 			   const struct blk_mq_queue_data *qd)
 {
 	struct scm_device *scmdev = hctx->queue->queuedata;
@@ -290,7 +290,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 	spin_lock(&sq->lock);
 	if (!scm_permit_request(bdev, req)) {
 		spin_unlock(&sq->lock);
-		return BLK_MQ_RQ_QUEUE_BUSY;
+		return BLK_STS_RESOURCE;
 	}
 
 	scmrq = sq->scmrq;
@@ -299,7 +299,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 		if (!scmrq) {
 			SCM_LOG(5, "no request");
 			spin_unlock(&sq->lock);
-			return BLK_MQ_RQ_QUEUE_BUSY;
+			return BLK_STS_RESOURCE;
 		}
 		scm_request_init(bdev, scmrq);
 		sq->scmrq = scmrq;
@@ -315,7 +315,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 
 		sq->scmrq = NULL;
 		spin_unlock(&sq->lock);
-		return BLK_MQ_RQ_QUEUE_BUSY;
+		return BLK_STS_RESOURCE;
 	}
 	blk_mq_start_request(req);
 

drivers/s390/block/scm_blk.c static int scm_blk_request(struct blk_mq_hw_ctx *hctx, · line 330

Quoted 8 lines
drivers/s390/block/scm_blk.c +1 -1
@@ -324,7 +324,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 		sq->scmrq = NULL;
 	}
 	spin_unlock(&sq->lock);
-	return BLK_MQ_RQ_QUEUE_OK;
+	return BLK_STS_OK;
 }
 
 static int scm_blk_init_hctx(struct blk_mq_hw_ctx *hctx, void *data,

This is the same patch I came up with to get it to compile. I asked Sebastian to verify that the driver actually works with these changes.

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.
#5 lore raw
Quoted 83 lines · On Tue, 4 Jul 2017 10:05:30 +0200 Martin Schwidefsky <[email protected]>…
Quoted 80 lines · On Tue, 4 Jul 2017 17:58:18 +1000 Stephen Rothwell <[email protected]> wrote:

Hi Linus,

Quoted 8 lines · On Mon, 3 Jul 2017 15:46:00 -0700 Linus Torvalds…
Quoted 4 lines · Martin Schwidefsky

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

Quoted 7 lines

So my conflict resolution looks different from the one Stephen posted, which may be due to various reasons, ranging from "linux-next has other things that conflict" to just "I didn't notice some semantic conflict since unlike linux-next I don't build for s390".

Regardless, you should check my current -git tree just to verify, and send me a patch if I screwed something up.

At least part of the difference is the following merge fix patch I have been carrying. It is needed due to a build failure.

From: Stephen Rothwell <[email protected]>
Date: Tue, 13 Jun 2017 20:51:32 +1000
Subject: [PATCH] s390: fix up for "blk-mq: switch ->queue_rq return value to
blk_status_t"

---
 drivers/s390/block/scm_blk.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/s390/block/scm_blk.c +5 -5
index 42018a20f2b7..0071febac9e6 100644
@@ -278,7 +278,7 @@ struct scm_queue {
 	spinlock_t lock;
 };
 
-static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
+static blk_status_t scm_blk_request(struct blk_mq_hw_ctx *hctx,
 			   const struct blk_mq_queue_data *qd)
 {
 	struct scm_device *scmdev = hctx->queue->queuedata;
@@ -290,7 +290,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 	spin_lock(&sq->lock);
 	if (!scm_permit_request(bdev, req)) {
 		spin_unlock(&sq->lock);
-		return BLK_MQ_RQ_QUEUE_BUSY;
+		return BLK_STS_RESOURCE;
 	}
 
 	scmrq = sq->scmrq;
@@ -299,7 +299,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 		if (!scmrq) {
 			SCM_LOG(5, "no request");
 			spin_unlock(&sq->lock);
-			return BLK_MQ_RQ_QUEUE_BUSY;
+			return BLK_STS_RESOURCE;
 		}
 		scm_request_init(bdev, scmrq);
 		sq->scmrq = scmrq;
@@ -315,7 +315,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 
 		sq->scmrq = NULL;
 		spin_unlock(&sq->lock);
-		return BLK_MQ_RQ_QUEUE_BUSY;
+		return BLK_STS_RESOURCE;
 	}
 	blk_mq_start_request(req);
 
@@ -324,7 +324,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
 		sq->scmrq = NULL;
 	}
 	spin_unlock(&sq->lock);
-	return BLK_MQ_RQ_QUEUE_OK;
+	return BLK_STS_OK;
 }
 
Quoted 4 lines

drivers/s390/block/scm_blk.c static int scm_blk_request(struct blk_mq_hw_ctx *hctx, · line 330

Quoted 1 line
drivers/s390/block/scm_blk.c +0 -0
 static int scm_blk_init_hctx(struct blk_mq_hw_ctx *hctx, void *data,  

This is the same patch I came up with to get it to compile. I asked Sebastian to verify that the driver actually works with these changes.

Looks good. Sebastian confirmed that the scm driver will be fine with the add-on patch from Stephen.

@Linus:
I can add this to the s390 tree and sent the patch with the next please-pull. Or you can apply the patch directly, whatever you prefer.

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.
#6 lore raw
Quoted 4 lines · Martin Schwidefsky

@Linus:
I can add this to the s390 tree and sent the patch with the next please-pull. Or you can apply the patch directly, whatever you prefer.

I'll wait for your pull. Thanks,

Linus