Skip to content

Commit

Permalink
Merge tag 's390-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/s390/linux

Pull s390 updates from Martin Schwidefsky:

 - A larger update for the zcrypt / AP bus code:
    + Update two inline assemblies in the zcrypt driver to make gcc happy
    + Add a missing reply code for invalid special commands for zcrypt
    + Allow AP device reset to be triggered from user space
    + Split the AP scan function into smaller, more readable functions

 - Updates for vfio-ccw and vfio-ap
    + Add maintainers and reviewer for vfio-ccw
    + Include facility.h in vfio_ap_drv.c to avoid fragile include chain
    + Simplicy vfio-ccw state machine

 - Use the common code version of bust_spinlocks

 - Make use of the DEFINE_SHOW_ATTRIBUTE

 - Fix three incorrect file permissions in the DASD driver

 - Remove bit spin-lock from the PCI interrupt handler

 - Fix GFP_ATOMIC vs GFP_KERNEL in the PCI code

* tag 's390-4.21-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/zcrypt: rework ap scan bus code
  s390/zcrypt: make sysfs reset attribute trigger queue reset
  s390/pci: fix sleeping in atomic during hotplug
  s390/pci: remove bit_lock usage in interrupt handler
  s390/drivers: fix proc/debugfs file permissions
  s390: convert to DEFINE_SHOW_ATTRIBUTE
  MAINTAINERS/vfio-ccw: add Farhan and Eric, make Halil Reviewer
  vfio: ccw: Merge BUSY and BOXED states
  s390: use common bust_spinlocks()
  s390/zcrypt: improve special ap message cmd handling
  s390/ap: rework assembler functions to use unions for in/out register variables
  s390: vfio-ap: include <asm/facility> for test_facility()
  • Loading branch information
torvalds committed Jan 3, 2019
2 parents e6b9257 + ec10574 commit 04a17ed
Show file tree
Hide file tree
Showing 17 changed files with 222 additions and 204 deletions.
4 changes: 3 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -13162,7 +13162,9 @@ F: drivers/pci/hotplug/s390_pci_hpc.c

S390 VFIO-CCW DRIVER
M: Cornelia Huck <[email protected]>
M: Halil Pasic <[email protected]>
M: Farhan Ali <[email protected]>
M: Eric Farman <[email protected]>
R: Halil Pasic <[email protected]>
L: [email protected]
L: [email protected]
S: Supported
Expand Down
28 changes: 19 additions & 9 deletions arch/s390/include/asm/ap.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,22 @@ static inline struct ap_queue_status ap_aqic(ap_qid_t qid,
void *ind)
{
register unsigned long reg0 asm ("0") = qid | (3UL << 24);
register struct ap_qirq_ctrl reg1_in asm ("1") = qirqctrl;
register struct ap_queue_status reg1_out asm ("1");
register union {
unsigned long value;
struct ap_qirq_ctrl qirqctrl;
struct ap_queue_status status;
} reg1 asm ("1");
register void *reg2 asm ("2") = ind;

reg1.qirqctrl = qirqctrl;

asm volatile(
".long 0xb2af0000" /* PQAP(AQIC) */
: "=d" (reg1_out)
: "d" (reg0), "d" (reg1_in), "d" (reg2)
: "+d" (reg1)
: "d" (reg0), "d" (reg2)
: "cc");
return reg1_out;

return reg1.status;
}

/*
Expand Down Expand Up @@ -264,17 +270,21 @@ static inline struct ap_queue_status ap_qact(ap_qid_t qid, int ifbit,
{
register unsigned long reg0 asm ("0") = qid | (5UL << 24)
| ((ifbit & 0x01) << 22);
register unsigned long reg1_in asm ("1") = apinfo->val;
register struct ap_queue_status reg1_out asm ("1");
register union {
unsigned long value;
struct ap_queue_status status;
} reg1 asm ("1");
register unsigned long reg2 asm ("2");

reg1.value = apinfo->val;

asm volatile(
".long 0xb2af0000" /* PQAP(QACT) */
: "+d" (reg1_in), "=d" (reg1_out), "=d" (reg2)
: "+d" (reg1), "=d" (reg2)
: "d" (reg0)
: "cc");
apinfo->val = reg2;
return reg1_out;
return reg1.status;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions arch/s390/include/uapi/asm/zcrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ struct ica_xcRB {
* @cprb_len: CPRB header length [0x0020]
* @cprb_ver_id: CPRB version id. [0x04]
* @pad_000: Alignment pad bytes
* @flags: Admin cmd [0x80] or functional cmd [0x00]
* @func_id: Function id / subtype [0x5434]
* @flags: Admin bit [0x80], Special bit [0x20]
* @func_id: Function id / subtype [0x5434] "T4"
* @source_id: Source id [originator id]
* @target_id: Target id [usage/ctrl domain id]
* @ret_code: Return code
Expand Down
24 changes: 0 additions & 24 deletions arch/s390/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,30 +81,6 @@ static inline int notify_page_fault(struct pt_regs *regs)
return ret;
}


/*
* Unlock any spinlocks which will prevent us from getting the
* message out.
*/
void bust_spinlocks(int yes)
{
if (yes) {
oops_in_progress = 1;
} else {
int loglevel_save = console_loglevel;
console_unblank();
oops_in_progress = 0;
/*
* OK, the message is on the console. Now we call printk()
* without oops_in_progress set so that printk will give klogd
* a poke. Hold onto your hats...
*/
console_loglevel = 15;
printk(" ");
console_loglevel = loglevel_save;
}
}

/*
* Find out which address space caused the exception.
* Access register mode is impossible, ignore space == 3.
Expand Down
4 changes: 1 addition & 3 deletions arch/s390/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,7 @@ static void zpci_irq_handler(struct airq_struct *airq)
if (ai == -1UL)
break;
inc_irq_stat(IRQIO_MSI);
airq_iv_lock(aibv, ai);
generic_handle_irq(airq_iv_get_data(aibv, ai));
airq_iv_unlock(aibv, ai);
}
}
}
Expand All @@ -410,7 +408,7 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
zdev->aisb = aisb;

/* Create adapter interrupt vector */
zdev->aibv = airq_iv_create(msi_vecs, AIRQ_IV_DATA | AIRQ_IV_BITLOCK);
zdev->aibv = airq_iv_create(msi_vecs, AIRQ_IV_DATA);
if (!zdev->aibv)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion arch/s390/pci/pci_clp.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ int clp_get_state(u32 fid, enum zpci_state *state)
struct clp_state_data sd = {fid, ZPCI_FN_STATE_RESERVED};
int rc;

rrb = clp_alloc_block(GFP_KERNEL);
rrb = clp_alloc_block(GFP_ATOMIC);
if (!rrb)
return -ENOMEM;

Expand Down
15 changes: 1 addition & 14 deletions drivers/s390/block/dasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,20 +1192,7 @@ static int dasd_hosts_show(struct seq_file *m, void *v)
return rc;
}

static int dasd_hosts_open(struct inode *inode, struct file *file)
{
struct dasd_device *device = inode->i_private;

return single_open(file, dasd_hosts_show, device);
}

static const struct file_operations dasd_hosts_fops = {
.owner = THIS_MODULE,
.open = dasd_hosts_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
DEFINE_SHOW_ATTRIBUTE(dasd_hosts);

static void dasd_hosts_exit(struct dasd_device *device)
{
Expand Down
3 changes: 1 addition & 2 deletions drivers/s390/block/dasd_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ dasd_proc_init(void)
dasd_proc_root_entry = proc_mkdir("dasd", NULL);
if (!dasd_proc_root_entry)
goto out_nodasd;
dasd_devices_entry = proc_create_seq("devices",
S_IFREG | S_IRUGO | S_IWUSR,
dasd_devices_entry = proc_create_seq("devices", 0444,
dasd_proc_root_entry,
&dasd_devices_seq_ops);
if (!dasd_devices_entry)
Expand Down
7 changes: 2 additions & 5 deletions drivers/s390/char/tape_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,8 @@ static const struct seq_operations tape_proc_seq = {
void
tape_proc_init(void)
{
tape_proc_devices = proc_create_seq("tapedevices",
S_IFREG | S_IRUGO | S_IWUSR, NULL, &tape_proc_seq);
if (tape_proc_devices == NULL) {
return;
}
tape_proc_devices = proc_create_seq("tapedevices", 0444, NULL,
&tape_proc_seq);
}

/*
Expand Down
18 changes: 3 additions & 15 deletions drivers/s390/cio/qdio_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,7 @@ static int qstat_show(struct seq_file *m, void *v)
return 0;
}

static int qstat_seq_open(struct inode *inode, struct file *filp)
{
return single_open(filp, qstat_show,
file_inode(filp)->i_private);
}

static const struct file_operations debugfs_fops = {
.owner = THIS_MODULE,
.open = qstat_seq_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
DEFINE_SHOW_ATTRIBUTE(qstat);

static char *qperf_names[] = {
"Assumed adapter interrupts",
Expand Down Expand Up @@ -305,8 +293,8 @@ static void setup_debugfs_entry(struct qdio_q *q)
snprintf(name, QDIO_DEBUGFS_NAME_LEN, "%s_%d",
q->is_input_q ? "input" : "output",
q->nr);
q->debugfs_q = debugfs_create_file(name, S_IFREG | S_IRUGO | S_IWUSR,
q->irq_ptr->debugfs_dev, q, &debugfs_fops);
q->debugfs_q = debugfs_create_file(name, 0444,
q->irq_ptr->debugfs_dev, q, &qstat_fops);
if (IS_ERR(q->debugfs_q))
q->debugfs_q = NULL;
}
Expand Down
7 changes: 1 addition & 6 deletions drivers/s390/cio/vfio_ccw_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static void fsm_io_request(struct vfio_ccw_private *private,
struct mdev_device *mdev = private->mdev;
char *errstr = "request";

private->state = VFIO_CCW_STATE_BOXED;
private->state = VFIO_CCW_STATE_BUSY;

memcpy(scsw, io_region->scsw_area, sizeof(*scsw));

Expand Down Expand Up @@ -216,11 +216,6 @@ fsm_func_t *vfio_ccw_jumptable[NR_VFIO_CCW_STATES][NR_VFIO_CCW_EVENTS] = {
[VFIO_CCW_EVENT_IO_REQ] = fsm_io_request,
[VFIO_CCW_EVENT_INTERRUPT] = fsm_irq,
},
[VFIO_CCW_STATE_BOXED] = {
[VFIO_CCW_EVENT_NOT_OPER] = fsm_notoper,
[VFIO_CCW_EVENT_IO_REQ] = fsm_io_busy,
[VFIO_CCW_EVENT_INTERRUPT] = fsm_irq,
},
[VFIO_CCW_STATE_BUSY] = {
[VFIO_CCW_EVENT_NOT_OPER] = fsm_notoper,
[VFIO_CCW_EVENT_IO_REQ] = fsm_io_busy,
Expand Down
1 change: 0 additions & 1 deletion drivers/s390/cio/vfio_ccw_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ enum vfio_ccw_state {
VFIO_CCW_STATE_NOT_OPER,
VFIO_CCW_STATE_STANDBY,
VFIO_CCW_STATE_IDLE,
VFIO_CCW_STATE_BOXED,
VFIO_CCW_STATE_BUSY,
/* last element! */
NR_VFIO_CCW_STATES
Expand Down
Loading

0 comments on commit 04a17ed

Please sign in to comment.