Skip to content

Commit 45b6ae7

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky: "A couple of bug fixes, minor cleanup and a change to the default config" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/dasd: fix failing CUIR assignment under LPAR s390/pageattr: handle numpages parameter correctly s390/dasd: fix hanging device after clear subchannel s390/qdio: avoid reschedule of outbound tasklet once killed s390/qdio: remove checks for ccw device internal state s390/qdio: fix double return code evaluation s390/qdio: get rid of spin_lock_irqsave usage s390/cio: remove subchannel_id from ccw_device_private s390/qdio: obtain subchannel_id via ccw_device_get_schid() s390/cio: stop using subchannel_id from ccw_device_private s390/config: make the vector optimized crc function builtin s390/lib: fix memcmp and strstr s390/crc32-vx: Fix checksum calculation for small sizes s390: clarify compressed image code path
2 parents ae5d68b + af77521 commit 45b6ae7

File tree

15 files changed

+107
-83
lines changed

15 files changed

+107
-83
lines changed

arch/s390/boot/compressed/head.S

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,21 @@ ENTRY(startup_continue)
2121
lg %r15,.Lstack-.LPG1(%r13)
2222
aghi %r15,-160
2323
brasl %r14,decompress_kernel
24-
# setup registers for memory mover & branch to target
24+
# Set up registers for memory mover. We move the decompressed image to
25+
# 0x11000, starting at offset 0x11000 in the decompressed image so
26+
# that code living at 0x11000 in the image will end up at 0x11000 in
27+
# memory.
2528
lgr %r4,%r2
2629
lg %r2,.Loffset-.LPG1(%r13)
2730
la %r4,0(%r2,%r4)
2831
lg %r3,.Lmvsize-.LPG1(%r13)
2932
lgr %r5,%r3
30-
# move the memory mover someplace safe
33+
# Move the memory mover someplace safe so it doesn't overwrite itself.
3134
la %r1,0x200
3235
mvc 0(mover_end-mover,%r1),mover-.LPG1(%r13)
33-
# decompress image is started at 0x11000
36+
# When the memory mover is done we pass control to
37+
# arch/s390/kernel/head64.S:startup_continue which lives at 0x11000 in
38+
# the decompressed image.
3439
lgr %r6,%r2
3540
br %r1
3641
mover:

arch/s390/configs/default_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ CONFIG_CRYPTO_SHA512_S390=m
678678
CONFIG_CRYPTO_DES_S390=m
679679
CONFIG_CRYPTO_AES_S390=m
680680
CONFIG_CRYPTO_GHASH_S390=m
681-
CONFIG_CRYPTO_CRC32_S390=m
681+
CONFIG_CRYPTO_CRC32_S390=y
682682
CONFIG_ASYMMETRIC_KEY_TYPE=y
683683
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m
684684
CONFIG_X509_CERTIFICATE_PARSER=m

arch/s390/configs/gcov_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ CONFIG_CRYPTO_SHA512_S390=m
616616
CONFIG_CRYPTO_DES_S390=m
617617
CONFIG_CRYPTO_AES_S390=m
618618
CONFIG_CRYPTO_GHASH_S390=m
619-
CONFIG_CRYPTO_CRC32_S390=m
619+
CONFIG_CRYPTO_CRC32_S390=y
620620
CONFIG_ASYMMETRIC_KEY_TYPE=y
621621
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m
622622
CONFIG_X509_CERTIFICATE_PARSER=m

arch/s390/configs/performance_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ CONFIG_CRYPTO_SHA512_S390=m
615615
CONFIG_CRYPTO_DES_S390=m
616616
CONFIG_CRYPTO_AES_S390=m
617617
CONFIG_CRYPTO_GHASH_S390=m
618-
CONFIG_CRYPTO_CRC32_S390=m
618+
CONFIG_CRYPTO_CRC32_S390=y
619619
CONFIG_ASYMMETRIC_KEY_TYPE=y
620620
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=m
621621
CONFIG_X509_CERTIFICATE_PARSER=m

arch/s390/crypto/crc32-vx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ u32 crc32c_le_vgfm_16(u32 crc, unsigned char const *buf, size_t size);
5151
struct kernel_fpu vxstate; \
5252
unsigned long prealign, aligned, remaining; \
5353
\
54+
if (datalen < VX_MIN_LEN + VX_ALIGN_MASK) \
55+
return ___crc32_sw(crc, data, datalen); \
56+
\
5457
if ((unsigned long)data & VX_ALIGN_MASK) { \
5558
prealign = VX_ALIGNMENT - \
5659
((unsigned long)data & VX_ALIGN_MASK); \
@@ -59,9 +62,6 @@ u32 crc32c_le_vgfm_16(u32 crc, unsigned char const *buf, size_t size);
5962
data = (void *)((unsigned long)data + prealign); \
6063
} \
6164
\
62-
if (datalen < VX_MIN_LEN) \
63-
return ___crc32_sw(crc, data, datalen); \
64-
\
6565
aligned = datalen & ~VX_ALIGN_MASK; \
6666
remaining = datalen & VX_ALIGN_MASK; \
6767
\

arch/s390/defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ CONFIG_CRYPTO_SHA256_S390=m
234234
CONFIG_CRYPTO_SHA512_S390=m
235235
CONFIG_CRYPTO_DES_S390=m
236236
CONFIG_CRYPTO_AES_S390=m
237-
CONFIG_CRYPTO_CRC32_S390=m
237+
CONFIG_CRYPTO_CRC32_S390=y
238238
CONFIG_CRC7=m
239239
# CONFIG_XZ_DEC_X86 is not set
240240
# CONFIG_XZ_DEC_POWERPC is not set

arch/s390/kernel/head.S

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ ENTRY(startup_kdump)
309309
l %r15,.Lstack-.LPG0(%r13)
310310
ahi %r15,-STACK_FRAME_OVERHEAD
311311
brasl %r14,verify_facilities
312-
/* Continue with startup code in head64.S */
312+
# For uncompressed images, continue in
313+
# arch/s390/kernel/head64.S. For compressed images, continue in
314+
# arch/s390/boot/compressed/head.S.
313315
jg startup_continue
314316

315317
.Lstack:

arch/s390/lib/string.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,10 @@ char * strrchr(const char * s, int c)
237237
EXPORT_SYMBOL(strrchr);
238238

239239
static inline int clcle(const char *s1, unsigned long l1,
240-
const char *s2, unsigned long l2,
241-
int *diff)
240+
const char *s2, unsigned long l2)
242241
{
243242
register unsigned long r2 asm("2") = (unsigned long) s1;
244-
register unsigned long r3 asm("3") = (unsigned long) l2;
243+
register unsigned long r3 asm("3") = (unsigned long) l1;
245244
register unsigned long r4 asm("4") = (unsigned long) s2;
246245
register unsigned long r5 asm("5") = (unsigned long) l2;
247246
int cc;
@@ -252,7 +251,6 @@ static inline int clcle(const char *s1, unsigned long l1,
252251
" srl %0,28"
253252
: "=&d" (cc), "+a" (r2), "+a" (r3),
254253
"+a" (r4), "+a" (r5) : : "cc");
255-
*diff = *(char *)r2 - *(char *)r4;
256254
return cc;
257255
}
258256

@@ -270,9 +268,9 @@ char * strstr(const char * s1,const char * s2)
270268
return (char *) s1;
271269
l1 = __strend(s1) - s1;
272270
while (l1-- >= l2) {
273-
int cc, dummy;
271+
int cc;
274272

275-
cc = clcle(s1, l1, s2, l2, &dummy);
273+
cc = clcle(s1, l2, s2, l2);
276274
if (!cc)
277275
return (char *) s1;
278276
s1++;
@@ -313,11 +311,11 @@ EXPORT_SYMBOL(memchr);
313311
*/
314312
int memcmp(const void *cs, const void *ct, size_t n)
315313
{
316-
int ret, diff;
314+
int ret;
317315

318-
ret = clcle(cs, n, ct, n, &diff);
316+
ret = clcle(cs, n, ct, n);
319317
if (ret)
320-
ret = diff;
318+
ret = ret == 1 ? -1 : 1;
321319
return ret;
322320
}
323321
EXPORT_SYMBOL(memcmp);

arch/s390/mm/pageattr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ static int change_page_attr(unsigned long addr, unsigned long end,
252252
int rc = -EINVAL;
253253
pgd_t *pgdp;
254254

255+
if (addr == end)
256+
return 0;
255257
if (end >= MODULES_END)
256258
return -EINVAL;
257259
mutex_lock(&cpa_mutex);

drivers/s390/block/dasd.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1643,9 +1643,18 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
16431643
u8 *sense = NULL;
16441644
int expires;
16451645

1646+
cqr = (struct dasd_ccw_req *) intparm;
16461647
if (IS_ERR(irb)) {
16471648
switch (PTR_ERR(irb)) {
16481649
case -EIO:
1650+
if (cqr && cqr->status == DASD_CQR_CLEAR_PENDING) {
1651+
device = (struct dasd_device *) cqr->startdev;
1652+
cqr->status = DASD_CQR_CLEARED;
1653+
dasd_device_clear_timer(device);
1654+
wake_up(&dasd_flush_wq);
1655+
dasd_schedule_device_bh(device);
1656+
return;
1657+
}
16491658
break;
16501659
case -ETIMEDOUT:
16511660
DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s: "
@@ -1661,7 +1670,6 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
16611670
}
16621671

16631672
now = get_tod_clock();
1664-
cqr = (struct dasd_ccw_req *) intparm;
16651673
/* check for conditions that should be handled immediately */
16661674
if (!cqr ||
16671675
!(scsw_dstat(&irb->scsw) == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) &&

0 commit comments

Comments
 (0)