Commit 2c669275 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull more s390 updates from Martin Schwidefsky:

 - The fixup for the blk-mq clash with the scm driver

 - An improvement for the dasd driver in regard to raw I/O

 - Bug fixes and cleanup

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  Update my email address
  s390/syscalls: Fix out of bounds arguments access
  s390/vfio_ccw: remove unused variable
  s390/dasd: remove unneeded code
  s390/crash: Remove unused KEXEC_NOTE_BYTES
  s390/zcrypt: Fix missing newlines at some debug feature messages.
  s390/dasd: Make raw I/O usable without prefix support
  s390/dasd: Rename dasd_raw_build_cp()
  s390/dasd: Refactor prefix_LRE() and related functions
  s390: fix up for "blk-mq: switch ->queue_rq return value to blk_status_t"
parents 6e6c5b96 0c6b2975
...@@ -41,24 +41,6 @@ ...@@ -41,24 +41,6 @@
/* The native architecture */ /* The native architecture */
#define KEXEC_ARCH KEXEC_ARCH_S390 #define KEXEC_ARCH KEXEC_ARCH_S390
/*
* Size for s390x ELF notes per CPU
*
* Seven notes plus zero note at the end: prstatus, fpregset, timer,
* tod_cmp, tod_reg, control regs, and prefix
*/
#define KEXEC_NOTE_BYTES \
(ALIGN(sizeof(struct elf_note), 4) * 8 + \
ALIGN(sizeof("CORE"), 4) * 7 + \
ALIGN(sizeof(struct elf_prstatus), 4) + \
ALIGN(sizeof(elf_fpregset_t), 4) + \
ALIGN(sizeof(u64), 4) + \
ALIGN(sizeof(u64), 4) + \
ALIGN(sizeof(u32), 4) + \
ALIGN(sizeof(u64) * 16, 4) + \
ALIGN(sizeof(u32), 4) \
)
/* Provide a dummy definition to avoid build failures. */ /* Provide a dummy definition to avoid build failures. */
static inline void crash_setup_regs(struct pt_regs *newregs, static inline void crash_setup_regs(struct pt_regs *newregs,
struct pt_regs *oldregs) { } struct pt_regs *oldregs) { }
......
...@@ -64,6 +64,12 @@ static inline void syscall_get_arguments(struct task_struct *task, ...@@ -64,6 +64,12 @@ static inline void syscall_get_arguments(struct task_struct *task,
{ {
unsigned long mask = -1UL; unsigned long mask = -1UL;
/*
* No arguments for this syscall, there's nothing to do.
*/
if (!n)
return;
BUG_ON(i + n > 6); BUG_ON(i + n > 6);
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
if (test_tsk_thread_flag(task, TIF_31BIT)) if (test_tsk_thread_flag(task, TIF_31BIT))
......
...@@ -3921,7 +3921,6 @@ EXPORT_SYMBOL(dasd_schedule_requeue); ...@@ -3921,7 +3921,6 @@ EXPORT_SYMBOL(dasd_schedule_requeue);
int dasd_generic_pm_freeze(struct ccw_device *cdev) int dasd_generic_pm_freeze(struct ccw_device *cdev)
{ {
struct dasd_device *device = dasd_device_from_cdev(cdev); struct dasd_device *device = dasd_device_from_cdev(cdev);
int rc;
if (IS_ERR(device)) if (IS_ERR(device))
return PTR_ERR(device); return PTR_ERR(device);
...@@ -3930,7 +3929,7 @@ int dasd_generic_pm_freeze(struct ccw_device *cdev) ...@@ -3930,7 +3929,7 @@ int dasd_generic_pm_freeze(struct ccw_device *cdev)
set_bit(DASD_FLAG_SUSPENDED, &device->flags); set_bit(DASD_FLAG_SUSPENDED, &device->flags);
if (device->discipline->freeze) if (device->discipline->freeze)
rc = device->discipline->freeze(device); device->discipline->freeze(device);
/* disallow new I/O */ /* disallow new I/O */
dasd_device_set_stop_bits(device, DASD_STOPPED_PM); dasd_device_set_stop_bits(device, DASD_STOPPED_PM);
......
...@@ -754,7 +754,6 @@ static void flush_all_alias_devices_on_lcu(struct alias_lcu *lcu) ...@@ -754,7 +754,6 @@ static void flush_all_alias_devices_on_lcu(struct alias_lcu *lcu)
struct alias_pav_group *pavgroup; struct alias_pav_group *pavgroup;
struct dasd_device *device, *temp; struct dasd_device *device, *temp;
struct dasd_eckd_private *private; struct dasd_eckd_private *private;
int rc;
unsigned long flags; unsigned long flags;
LIST_HEAD(active); LIST_HEAD(active);
...@@ -785,7 +784,7 @@ static void flush_all_alias_devices_on_lcu(struct alias_lcu *lcu) ...@@ -785,7 +784,7 @@ static void flush_all_alias_devices_on_lcu(struct alias_lcu *lcu)
device = list_first_entry(&active, struct dasd_device, device = list_first_entry(&active, struct dasd_device,
alias_list); alias_list);
spin_unlock_irqrestore(&lcu->lock, flags); spin_unlock_irqrestore(&lcu->lock, flags);
rc = dasd_flush_device_queue(device); dasd_flush_device_queue(device);
spin_lock_irqsave(&lcu->lock, flags); spin_lock_irqsave(&lcu->lock, flags);
/* /*
* only move device around if it wasn't moved away while we * only move device around if it wasn't moved away while we
......
...@@ -150,7 +150,7 @@ static int __init dasd_busid(char *str, int *id0, int *id1, int *devno) ...@@ -150,7 +150,7 @@ static int __init dasd_busid(char *str, int *id0, int *id1, int *devno)
/* Old style 0xXXXX or XXXX */ /* Old style 0xXXXX or XXXX */
if (!kstrtouint(str, 16, &val)) { if (!kstrtouint(str, 16, &val)) {
*id0 = *id1 = 0; *id0 = *id1 = 0;
if (val < 0 || val > 0xffff) if (val > 0xffff)
return -EINVAL; return -EINVAL;
*devno = val; *devno = val;
return 0; return 0;
......
This diff is collapsed.
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#define DASD_ECKD_CCW_SNID 0x34 #define DASD_ECKD_CCW_SNID 0x34
#define DASD_ECKD_CCW_RSSD 0x3e #define DASD_ECKD_CCW_RSSD 0x3e
#define DASD_ECKD_CCW_LOCATE_RECORD 0x47 #define DASD_ECKD_CCW_LOCATE_RECORD 0x47
#define DASD_ECKD_CCW_LOCATE_RECORD_EXT 0x4b
#define DASD_ECKD_CCW_SNSS 0x54 #define DASD_ECKD_CCW_SNSS 0x54
#define DASD_ECKD_CCW_DEFINE_EXTENT 0x63 #define DASD_ECKD_CCW_DEFINE_EXTENT 0x63
#define DASD_ECKD_CCW_WRITE_MT 0x85 #define DASD_ECKD_CCW_WRITE_MT 0x85
......
...@@ -278,7 +278,7 @@ struct scm_queue { ...@@ -278,7 +278,7 @@ struct scm_queue {
spinlock_t lock; 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) const struct blk_mq_queue_data *qd)
{ {
struct scm_device *scmdev = hctx->queue->queuedata; struct scm_device *scmdev = hctx->queue->queuedata;
...@@ -290,7 +290,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx, ...@@ -290,7 +290,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
spin_lock(&sq->lock); spin_lock(&sq->lock);
if (!scm_permit_request(bdev, req)) { if (!scm_permit_request(bdev, req)) {
spin_unlock(&sq->lock); spin_unlock(&sq->lock);
return BLK_MQ_RQ_QUEUE_BUSY; return BLK_STS_RESOURCE;
} }
scmrq = sq->scmrq; scmrq = sq->scmrq;
...@@ -299,7 +299,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx, ...@@ -299,7 +299,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
if (!scmrq) { if (!scmrq) {
SCM_LOG(5, "no request"); SCM_LOG(5, "no request");
spin_unlock(&sq->lock); spin_unlock(&sq->lock);
return BLK_MQ_RQ_QUEUE_BUSY; return BLK_STS_RESOURCE;
} }
scm_request_init(bdev, scmrq); scm_request_init(bdev, scmrq);
sq->scmrq = scmrq; sq->scmrq = scmrq;
...@@ -315,7 +315,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx, ...@@ -315,7 +315,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
sq->scmrq = NULL; sq->scmrq = NULL;
spin_unlock(&sq->lock); spin_unlock(&sq->lock);
return BLK_MQ_RQ_QUEUE_BUSY; return BLK_STS_RESOURCE;
} }
blk_mq_start_request(req); blk_mq_start_request(req);
...@@ -324,7 +324,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx, ...@@ -324,7 +324,7 @@ static int scm_blk_request(struct blk_mq_hw_ctx *hctx,
sq->scmrq = NULL; sq->scmrq = NULL;
} }
spin_unlock(&sq->lock); 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, static int scm_blk_init_hctx(struct blk_mq_hw_ctx *hctx, void *data,
......
...@@ -69,12 +69,10 @@ int vfio_ccw_sch_quiesce(struct subchannel *sch) ...@@ -69,12 +69,10 @@ int vfio_ccw_sch_quiesce(struct subchannel *sch)
static void vfio_ccw_sch_io_todo(struct work_struct *work) static void vfio_ccw_sch_io_todo(struct work_struct *work)
{ {
struct vfio_ccw_private *private; struct vfio_ccw_private *private;
struct subchannel *sch;
struct irb *irb; struct irb *irb;
private = container_of(work, struct vfio_ccw_private, io_work); private = container_of(work, struct vfio_ccw_private, io_work);
irb = &private->irb; irb = &private->irb;
sch = private->sch;
if (scsw_is_solicited(&irb->scsw)) { if (scsw_is_solicited(&irb->scsw)) {
cp_update_scsw(&private->cp, &irb->scsw); cp_update_scsw(&private->cp, &irb->scsw);
......
...@@ -94,7 +94,7 @@ static inline int zcrypt_process_rescan(void) ...@@ -94,7 +94,7 @@ static inline int zcrypt_process_rescan(void)
atomic_set(&zcrypt_rescan_req, 0); atomic_set(&zcrypt_rescan_req, 0);
atomic_inc(&zcrypt_rescan_count); atomic_inc(&zcrypt_rescan_count);
ap_bus_force_rescan(); ap_bus_force_rescan();
ZCRYPT_DBF(DBF_INFO, "rescan count=%07d", ZCRYPT_DBF(DBF_INFO, "rescan count=%07d\n",
atomic_inc_return(&zcrypt_rescan_count)); atomic_inc_return(&zcrypt_rescan_count));
return 1; return 1;
} }
...@@ -822,7 +822,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, ...@@ -822,7 +822,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
rc = zcrypt_rsa_modexpo(&mex); rc = zcrypt_rsa_modexpo(&mex);
} while (rc == -EAGAIN); } while (rc == -EAGAIN);
if (rc) { if (rc) {
ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSAMODEXPO rc=%d", rc); ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSAMODEXPO rc=%d\n", rc);
return rc; return rc;
} }
return put_user(mex.outputdatalength, &umex->outputdatalength); return put_user(mex.outputdatalength, &umex->outputdatalength);
...@@ -841,7 +841,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, ...@@ -841,7 +841,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
rc = zcrypt_rsa_crt(&crt); rc = zcrypt_rsa_crt(&crt);
} while (rc == -EAGAIN); } while (rc == -EAGAIN);
if (rc) { if (rc) {
ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSACRT rc=%d", rc); ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSACRT rc=%d\n", rc);
return rc; return rc;
} }
return put_user(crt.outputdatalength, &ucrt->outputdatalength); return put_user(crt.outputdatalength, &ucrt->outputdatalength);
...@@ -860,7 +860,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, ...@@ -860,7 +860,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
rc = zcrypt_send_cprb(&xcRB); rc = zcrypt_send_cprb(&xcRB);
} while (rc == -EAGAIN); } while (rc == -EAGAIN);
if (rc) if (rc)
ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDCPRB rc=%d", rc); ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDCPRB rc=%d\n", rc);
if (copy_to_user(uxcRB, &xcRB, sizeof(xcRB))) if (copy_to_user(uxcRB, &xcRB, sizeof(xcRB)))
return -EFAULT; return -EFAULT;
return rc; return rc;
...@@ -879,7 +879,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, ...@@ -879,7 +879,7 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
rc = zcrypt_send_ep11_cprb(&xcrb); rc = zcrypt_send_ep11_cprb(&xcrb);
} while (rc == -EAGAIN); } while (rc == -EAGAIN);
if (rc) if (rc)
ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDEP11CPRB rc=%d", rc); ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDEP11CPRB rc=%d\n", rc);
if (copy_to_user(uxcrb, &xcrb, sizeof(xcrb))) if (copy_to_user(uxcrb, &xcrb, sizeof(xcrb)))
return -EFAULT; return -EFAULT;
return rc; return rc;
......
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
#define CRASH_CORE_NOTE_NAME_BYTES ALIGN(sizeof(CRASH_CORE_NOTE_NAME), 4) #define CRASH_CORE_NOTE_NAME_BYTES ALIGN(sizeof(CRASH_CORE_NOTE_NAME), 4)
#define CRASH_CORE_NOTE_DESC_BYTES ALIGN(sizeof(struct elf_prstatus), 4) #define CRASH_CORE_NOTE_DESC_BYTES ALIGN(sizeof(struct elf_prstatus), 4)
/*
* The per-cpu notes area is a list of notes terminated by a "NULL"
* note header. For kdump, the code in vmcore.c runs in the context
* of the second kernel to combine them into one note.
*/
#define CRASH_CORE_NOTE_BYTES ((CRASH_CORE_NOTE_HEAD_BYTES * 2) + \ #define CRASH_CORE_NOTE_BYTES ((CRASH_CORE_NOTE_HEAD_BYTES * 2) + \
CRASH_CORE_NOTE_NAME_BYTES + \ CRASH_CORE_NOTE_NAME_BYTES + \
CRASH_CORE_NOTE_DESC_BYTES) CRASH_CORE_NOTE_DESC_BYTES)
......
...@@ -62,15 +62,6 @@ ...@@ -62,15 +62,6 @@
#define KEXEC_CORE_NOTE_NAME CRASH_CORE_NOTE_NAME #define KEXEC_CORE_NOTE_NAME CRASH_CORE_NOTE_NAME
/*
* The per-cpu notes area is a list of notes terminated by a "NULL"
* note header. For kdump, the code in vmcore.c runs in the context
* of the second kernel to combine them into one note.
*/
#ifndef KEXEC_NOTE_BYTES
#define KEXEC_NOTE_BYTES CRASH_CORE_NOTE_BYTES
#endif
/* /*
* This structure is used to hold the arguments that are used when loading * This structure is used to hold the arguments that are used when loading
* kernel binaries. * kernel binaries.
......
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