Commit f154988a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull s390 fixes from Vasily Gorbik:

 - Fix virtio-ccw DMA regression

 - Fix compiler warnings in uaccess

* tag 's390-5.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/uaccess: avoid (false positive) compiler warnings
  s390/cio: fix virtio-ccw DMA without PV
parents 1c0cc5f1 062795fc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n);
	__rc;							\
})

static inline int __put_user_fn(void *x, void __user *ptr, unsigned long size)
static __always_inline int __put_user_fn(void *x, void __user *ptr, unsigned long size)
{
	unsigned long spec = 0x010000UL;
	int rc;
@@ -113,7 +113,7 @@ static inline int __put_user_fn(void *x, void __user *ptr, unsigned long size)
	return rc;
}

static inline int __get_user_fn(void *x, const void __user *ptr, unsigned long size)
static __always_inline int __get_user_fn(void *x, const void __user *ptr, unsigned long size)
{
	unsigned long spec = 0x01UL;
	int rc;
+1 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ struct subchannel {
	enum sch_todo todo;
	struct work_struct todo_work;
	struct schib_config config;
	u64 dma_mask;
	char *driver_override; /* Driver name to force a match */
} __attribute__ ((aligned(8)));

+6 −1
Original line number Diff line number Diff line
@@ -232,7 +232,12 @@ struct subchannel *css_alloc_subchannel(struct subchannel_id schid,
	 * belong to a subchannel need to fit 31 bit width (e.g. ccw).
	 */
	sch->dev.coherent_dma_mask = DMA_BIT_MASK(31);
	sch->dev.dma_mask = &sch->dev.coherent_dma_mask;
	/*
	 * But we don't have such restrictions imposed on the stuff that
	 * is handled by the streaming API.
	 */
	sch->dma_mask = DMA_BIT_MASK(64);
	sch->dev.dma_mask = &sch->dma_mask;
	return sch;

err:
+1 −1
Original line number Diff line number Diff line
@@ -710,7 +710,7 @@ static struct ccw_device * io_subchannel_allocate_dev(struct subchannel *sch)
	if (!cdev->private)
		goto err_priv;
	cdev->dev.coherent_dma_mask = sch->dev.coherent_dma_mask;
	cdev->dev.dma_mask = &cdev->dev.coherent_dma_mask;
	cdev->dev.dma_mask = sch->dev.dma_mask;
	dma_pool = cio_gp_dma_create(&cdev->dev, 1);
	if (!dma_pool)
		goto err_dma_pool;