Skip to content

Commit 8d99688

Browse files
committed
Merge tag 's390-7.0-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Vasily Gorbik: - Revert IRQ entry/exit path optimization that incorrectly cleared some PSW bits before irqentry_exit(), causing boot failures with linux-next and HRTIMER_REARM_DEFERRED (which only uncovered the problem) - Fix zcrypt code to show CCA card serial numbers even when the default crypto domain is offline by selecting any domain available, preventing empty sysfs entries * tag 's390-7.0-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/zcrypt: Enable AUTOSEL_DOM for CCA serialnr sysfs attribute s390: Revert "s390/irq/idle: Remove psw bits early"
2 parents 2c361c9 + 598bbef commit 8d99688

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

arch/s390/kernel/irq.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,8 @@ void noinstr do_io_irq(struct pt_regs *regs)
147147
bool from_idle;
148148

149149
from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT);
150-
if (from_idle) {
150+
if (from_idle)
151151
update_timer_idle();
152-
regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
153-
}
154152

155153
irq_enter_rcu();
156154

@@ -176,6 +174,9 @@ void noinstr do_io_irq(struct pt_regs *regs)
176174

177175
set_irq_regs(old_regs);
178176
irqentry_exit(regs, state);
177+
178+
if (from_idle)
179+
regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
179180
}
180181

181182
void noinstr do_ext_irq(struct pt_regs *regs)
@@ -185,10 +186,8 @@ void noinstr do_ext_irq(struct pt_regs *regs)
185186
bool from_idle;
186187

187188
from_idle = test_and_clear_cpu_flag(CIF_ENABLED_WAIT);
188-
if (from_idle) {
189+
if (from_idle)
189190
update_timer_idle();
190-
regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
191-
}
192191

193192
irq_enter_rcu();
194193

@@ -210,6 +209,9 @@ void noinstr do_ext_irq(struct pt_regs *regs)
210209
irq_exit_rcu();
211210
set_irq_regs(old_regs);
212211
irqentry_exit(regs, state);
212+
213+
if (from_idle)
214+
regs->psw.mask &= ~(PSW_MASK_EXT | PSW_MASK_IO | PSW_MASK_WAIT);
213215
}
214216

215217
static void show_msi_interrupt(struct seq_file *p, int irq)

drivers/s390/crypto/zcrypt_ccamisc.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,11 +1639,13 @@ int cca_get_info(u16 cardnr, u16 domain, struct cca_info *ci, u32 xflags)
16391639

16401640
memset(ci, 0, sizeof(*ci));
16411641

1642-
/* get first info from zcrypt device driver about this apqn */
1643-
rc = zcrypt_device_status_ext(cardnr, domain, &devstat);
1644-
if (rc)
1645-
return rc;
1646-
ci->hwtype = devstat.hwtype;
1642+
/* if specific domain given, fetch status and hw info for this apqn */
1643+
if (domain != AUTOSEL_DOM) {
1644+
rc = zcrypt_device_status_ext(cardnr, domain, &devstat);
1645+
if (rc)
1646+
return rc;
1647+
ci->hwtype = devstat.hwtype;
1648+
}
16471649

16481650
/*
16491651
* Prep memory for rule array and var array use.

drivers/s390/crypto/zcrypt_cex4.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ static ssize_t cca_serialnr_show(struct device *dev,
8585

8686
memset(&ci, 0, sizeof(ci));
8787

88-
if (ap_domain_index >= 0)
89-
cca_get_info(ac->id, ap_domain_index, &ci, 0);
88+
cca_get_info(ac->id, AUTOSEL_DOM, &ci, 0);
9089

9190
return sysfs_emit(buf, "%s\n", ci.serial);
9291
}

0 commit comments

Comments
 (0)