Commit f154988a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 's390-5.4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

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
...@@ -83,7 +83,7 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n); ...@@ -83,7 +83,7 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n);
__rc; \ __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; unsigned long spec = 0x010000UL;
int rc; int rc;
...@@ -113,7 +113,7 @@ static inline int __put_user_fn(void *x, void __user *ptr, unsigned long size) ...@@ -113,7 +113,7 @@ static inline int __put_user_fn(void *x, void __user *ptr, unsigned long size)
return rc; 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; unsigned long spec = 0x01UL;
int rc; int rc;
......
...@@ -113,6 +113,7 @@ struct subchannel { ...@@ -113,6 +113,7 @@ struct subchannel {
enum sch_todo todo; enum sch_todo todo;
struct work_struct todo_work; struct work_struct todo_work;
struct schib_config config; struct schib_config config;
u64 dma_mask;
char *driver_override; /* Driver name to force a match */ char *driver_override; /* Driver name to force a match */
} __attribute__ ((aligned(8))); } __attribute__ ((aligned(8)));
......
...@@ -232,7 +232,12 @@ struct subchannel *css_alloc_subchannel(struct subchannel_id schid, ...@@ -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). * belong to a subchannel need to fit 31 bit width (e.g. ccw).
*/ */
sch->dev.coherent_dma_mask = DMA_BIT_MASK(31); 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; return sch;
err: err:
......
...@@ -710,7 +710,7 @@ static struct ccw_device * io_subchannel_allocate_dev(struct subchannel *sch) ...@@ -710,7 +710,7 @@ static struct ccw_device * io_subchannel_allocate_dev(struct subchannel *sch)
if (!cdev->private) if (!cdev->private)
goto err_priv; goto err_priv;
cdev->dev.coherent_dma_mask = sch->dev.coherent_dma_mask; 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); dma_pool = cio_gp_dma_create(&cdev->dev, 1);
if (!dma_pool) if (!dma_pool)
goto err_dma_pool; goto err_dma_pool;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment