mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[S390] cleanup lowcore access from external interrupts
Read external interrupts parameters from the lowcore in the first level interrupt handler in entry[64].S. Signed-off-by: Martin Schwidefsky <[email protected]>
This commit is contained in:
parent
1e54622e04
commit
f6649a7e5a
15 changed files with 57 additions and 49 deletions
|
|
@ -228,25 +228,22 @@ dasd_diag_term_IO(struct dasd_ccw_req * cqr)
|
|||
}
|
||||
|
||||
/* Handle external interruption. */
|
||||
static void
|
||||
dasd_ext_handler(__u16 code)
|
||||
static void dasd_ext_handler(unsigned int ext_int_code,
|
||||
unsigned int param32, unsigned long param64)
|
||||
{
|
||||
struct dasd_ccw_req *cqr, *next;
|
||||
struct dasd_device *device;
|
||||
unsigned long long expires;
|
||||
unsigned long flags;
|
||||
u8 int_code, status;
|
||||
addr_t ip;
|
||||
int rc;
|
||||
|
||||
int_code = *((u8 *) DASD_DIAG_LC_INT_CODE);
|
||||
status = *((u8 *) DASD_DIAG_LC_INT_STATUS);
|
||||
switch (int_code) {
|
||||
switch (ext_int_code >> 24) {
|
||||
case DASD_DIAG_CODE_31BIT:
|
||||
ip = (addr_t) *((u32 *) DASD_DIAG_LC_INT_PARM_31BIT);
|
||||
ip = (addr_t) param32;
|
||||
break;
|
||||
case DASD_DIAG_CODE_64BIT:
|
||||
ip = (addr_t) *((u64 *) DASD_DIAG_LC_INT_PARM_64BIT);
|
||||
ip = (addr_t) param64;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
|
@ -281,7 +278,7 @@ dasd_ext_handler(__u16 code)
|
|||
cqr->stopclk = get_clock();
|
||||
|
||||
expires = 0;
|
||||
if (status == 0) {
|
||||
if ((ext_int_code & 0xff0000) == 0) {
|
||||
cqr->status = DASD_CQR_SUCCESS;
|
||||
/* Start first request on queue if possible -> fast_io. */
|
||||
if (!list_empty(&device->ccw_queue)) {
|
||||
|
|
@ -296,8 +293,8 @@ dasd_ext_handler(__u16 code)
|
|||
} else {
|
||||
cqr->status = DASD_CQR_QUEUED;
|
||||
DBF_DEV_EVENT(DBF_DEBUG, device, "interrupt status for "
|
||||
"request %p was %d (%d retries left)", cqr, status,
|
||||
cqr->retries);
|
||||
"request %p was %d (%d retries left)", cqr,
|
||||
(ext_int_code >> 16) & 0xff, cqr->retries);
|
||||
dasd_diag_erp(device);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,6 @@
|
|||
#define DEV_CLASS_FBA 0x01
|
||||
#define DEV_CLASS_ECKD 0x04
|
||||
|
||||
#define DASD_DIAG_LC_INT_CODE 132
|
||||
#define DASD_DIAG_LC_INT_STATUS 133
|
||||
#define DASD_DIAG_LC_INT_PARM_31BIT 128
|
||||
#define DASD_DIAG_LC_INT_PARM_64BIT 4536
|
||||
#define DASD_DIAG_CODE_31BIT 0x03
|
||||
#define DASD_DIAG_CODE_64BIT 0x07
|
||||
|
||||
|
|
|
|||
|
|
@ -395,16 +395,16 @@ __sclp_find_req(u32 sccb)
|
|||
/* Handler for external interruption. Perform request post-processing.
|
||||
* Prepare read event data request if necessary. Start processing of next
|
||||
* request on queue. */
|
||||
static void
|
||||
sclp_interrupt_handler(__u16 code)
|
||||
static void sclp_interrupt_handler(unsigned int ext_int_code,
|
||||
unsigned int param32, unsigned long param64)
|
||||
{
|
||||
struct sclp_req *req;
|
||||
u32 finished_sccb;
|
||||
u32 evbuf_pending;
|
||||
|
||||
spin_lock(&sclp_lock);
|
||||
finished_sccb = S390_lowcore.ext_params & 0xfffffff8;
|
||||
evbuf_pending = S390_lowcore.ext_params & 0x3;
|
||||
finished_sccb = param32 & 0xfffffff8;
|
||||
evbuf_pending = param32 & 0x3;
|
||||
if (finished_sccb) {
|
||||
del_timer(&sclp_request_timer);
|
||||
sclp_running_state = sclp_running_state_reset_pending;
|
||||
|
|
@ -819,12 +819,12 @@ EXPORT_SYMBOL(sclp_reactivate);
|
|||
|
||||
/* Handler for external interruption used during initialization. Modify
|
||||
* request state to done. */
|
||||
static void
|
||||
sclp_check_handler(__u16 code)
|
||||
static void sclp_check_handler(unsigned int ext_int_code,
|
||||
unsigned int param32, unsigned long param64)
|
||||
{
|
||||
u32 finished_sccb;
|
||||
|
||||
finished_sccb = S390_lowcore.ext_params & 0xfffffff8;
|
||||
finished_sccb = param32 & 0xfffffff8;
|
||||
/* Is this the interrupt we are waiting for? */
|
||||
if (finished_sccb == 0)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -372,21 +372,22 @@ static void hotplug_devices(struct work_struct *dummy)
|
|||
/*
|
||||
* we emulate the request_irq behaviour on top of s390 extints
|
||||
*/
|
||||
static void kvm_extint_handler(u16 code)
|
||||
static void kvm_extint_handler(unsigned int ext_int_code,
|
||||
unsigned int param32, unsigned long param64)
|
||||
{
|
||||
struct virtqueue *vq;
|
||||
u16 subcode;
|
||||
u32 param;
|
||||
|
||||
subcode = S390_lowcore.cpu_addr;
|
||||
subcode = ext_int_code >> 16;
|
||||
if ((subcode & 0xff00) != VIRTIO_SUBCODE_64)
|
||||
return;
|
||||
|
||||
/* The LSB might be overloaded, we have to mask it */
|
||||
vq = (struct virtqueue *)(S390_lowcore.ext_params2 & ~1UL);
|
||||
vq = (struct virtqueue *)(param64 & ~1UL);
|
||||
|
||||
/* We use ext_params to decide what this interrupt means */
|
||||
param = S390_lowcore.ext_params & VIRTIO_PARAM_MASK;
|
||||
param = param32 & VIRTIO_PARAM_MASK;
|
||||
|
||||
switch (param) {
|
||||
case VIRTIO_PARAM_CONFIG_CHANGED:
|
||||
|
|
|
|||
Loading…
Reference in a new issue