Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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. I keep the fingers crossed that we now got
transparent huge pages ready for prime time."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/cio: fix length calculation in idset.c
s390/sclp: fix addressing mode clobber
s390: Move css limits from drivers/s390/cio/ to include/asm/.
s390/thp: respect page protection in pmd_none() and pmd_present()
s390/mm: use pmd_large() instead of pmd_huge()
s390/cio: suppress 2nd path verification during resume

+35 -28
+2
arch/s390/include/asm/cio.h
··· 9 9 10 10 #define LPM_ANYPATH 0xff 11 11 #define __MAX_CSSID 0 12 + #define __MAX_SUBCHANNEL 65535 13 + #define __MAX_SSID 3 12 14 13 15 #include <asm/scsw.h> 14 16
+22 -13
arch/s390/include/asm/pgtable.h
··· 506 506 507 507 static inline int pmd_present(pmd_t pmd) 508 508 { 509 - return (pmd_val(pmd) & _SEGMENT_ENTRY_ORIGIN) != 0UL; 509 + unsigned long mask = _SEGMENT_ENTRY_INV | _SEGMENT_ENTRY_RO; 510 + return (pmd_val(pmd) & mask) == _HPAGE_TYPE_NONE || 511 + !(pmd_val(pmd) & _SEGMENT_ENTRY_INV); 510 512 } 511 513 512 514 static inline int pmd_none(pmd_t pmd) 513 515 { 514 - return (pmd_val(pmd) & _SEGMENT_ENTRY_INV) != 0UL; 516 + return (pmd_val(pmd) & _SEGMENT_ENTRY_INV) && 517 + !(pmd_val(pmd) & _SEGMENT_ENTRY_RO); 515 518 } 516 519 517 520 static inline int pmd_large(pmd_t pmd) ··· 1226 1223 } 1227 1224 1228 1225 #ifdef CONFIG_TRANSPARENT_HUGEPAGE 1226 + 1227 + #define SEGMENT_NONE __pgprot(_HPAGE_TYPE_NONE) 1228 + #define SEGMENT_RO __pgprot(_HPAGE_TYPE_RO) 1229 + #define SEGMENT_RW __pgprot(_HPAGE_TYPE_RW) 1230 + 1229 1231 #define __HAVE_ARCH_PGTABLE_DEPOSIT 1230 1232 extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pgtable_t pgtable); 1231 1233 ··· 1250 1242 1251 1243 static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot) 1252 1244 { 1253 - unsigned long pgprot_pmd = 0; 1254 - 1255 - if (pgprot_val(pgprot) & _PAGE_INVALID) { 1256 - if (pgprot_val(pgprot) & _PAGE_SWT) 1257 - pgprot_pmd |= _HPAGE_TYPE_NONE; 1258 - pgprot_pmd |= _SEGMENT_ENTRY_INV; 1259 - } 1260 - if (pgprot_val(pgprot) & _PAGE_RO) 1261 - pgprot_pmd |= _SEGMENT_ENTRY_RO; 1262 - return pgprot_pmd; 1245 + /* 1246 + * pgprot is PAGE_NONE, PAGE_RO, or PAGE_RW (see __Pxxx / __Sxxx) 1247 + * Convert to segment table entry format. 1248 + */ 1249 + if (pgprot_val(pgprot) == pgprot_val(PAGE_NONE)) 1250 + return pgprot_val(SEGMENT_NONE); 1251 + if (pgprot_val(pgprot) == pgprot_val(PAGE_RO)) 1252 + return pgprot_val(SEGMENT_RO); 1253 + return pgprot_val(SEGMENT_RW); 1263 1254 } 1264 1255 1265 1256 static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) ··· 1276 1269 1277 1270 static inline pmd_t pmd_mkwrite(pmd_t pmd) 1278 1271 { 1279 - pmd_val(pmd) &= ~_SEGMENT_ENTRY_RO; 1272 + /* Do not clobber _HPAGE_TYPE_NONE pages! */ 1273 + if (!(pmd_val(pmd) & _SEGMENT_ENTRY_INV)) 1274 + pmd_val(pmd) &= ~_SEGMENT_ENTRY_RO; 1280 1275 return pmd; 1281 1276 } 1282 1277
+7 -1
arch/s390/kernel/sclp.S
··· 44 44 #endif 45 45 mvc .LoldpswS1-.LbaseS1(16,%r13),0(%r8) 46 46 mvc 0(16,%r8),0(%r9) 47 + #ifdef CONFIG_64BIT 48 + epsw %r6,%r7 # set current addressing mode 49 + nill %r6,0x1 # in new psw (31 or 64 bit mode) 50 + nilh %r7,0x8000 51 + stm %r6,%r7,0(%r8) 52 + #endif 47 53 lhi %r6,0x0200 # cr mask for ext int (cr0.54) 48 54 ltr %r2,%r2 49 55 jz .LsetctS1 ··· 93 87 .long 0x00080000, 0x80000000+.LwaitS1 # PSW to handle ext int 94 88 #ifdef CONFIG_64BIT 95 89 .LextpswS1_64: 96 - .quad 0x0000000180000000, .LwaitS1 # PSW to handle ext int, 64 bit 90 + .quad 0, .LwaitS1 # PSW to handle ext int, 64 bit 97 91 #endif 98 92 .LwaitpswS1: 99 93 .long 0x010a0000, 0x00000000+.LloopS1 # PSW to wait for ext int
+1 -1
arch/s390/lib/uaccess_pt.c
··· 39 39 pmd = pmd_offset(pud, addr); 40 40 if (pmd_none(*pmd)) 41 41 return -0x10UL; 42 - if (pmd_huge(*pmd)) { 42 + if (pmd_large(*pmd)) { 43 43 if (write && (pmd_val(*pmd) & _SEGMENT_ENTRY_RO)) 44 44 return -0x04UL; 45 45 return (pmd_val(*pmd) & HPAGE_MASK) + (addr & ~HPAGE_MASK);
+1 -1
arch/s390/mm/gup.c
··· 126 126 */ 127 127 if (pmd_none(pmd) || pmd_trans_splitting(pmd)) 128 128 return 0; 129 - if (unlikely(pmd_huge(pmd))) { 129 + if (unlikely(pmd_large(pmd))) { 130 130 if (!gup_huge_pmd(pmdp, pmd, addr, next, 131 131 write, pages, nr)) 132 132 return 0;
-3
drivers/s390/cio/css.h
··· 112 112 extern void css_reiterate_subchannels(void); 113 113 void css_update_ssd_info(struct subchannel *sch); 114 114 115 - #define __MAX_SUBCHANNEL 65535 116 - #define __MAX_SSID 3 117 - 118 115 struct channel_subsystem { 119 116 u8 cssid; 120 117 int valid;
+1 -7
drivers/s390/cio/device.c
··· 1424 1424 } 1425 1425 if (device_is_disconnected(cdev)) 1426 1426 return IO_SCH_REPROBE; 1427 - if (cdev->online) 1427 + if (cdev->online && !cdev->private->flags.resuming) 1428 1428 return IO_SCH_VERIFY; 1429 1429 if (cdev->private->state == DEV_STATE_NOT_OPER) 1430 1430 return IO_SCH_UNREG_ATTACH; ··· 1469 1469 rc = 0; 1470 1470 goto out_unlock; 1471 1471 case IO_SCH_VERIFY: 1472 - if (cdev->private->flags.resuming == 1) { 1473 - if (cio_enable_subchannel(sch, (u32)(addr_t)sch)) { 1474 - ccw_device_set_notoper(cdev); 1475 - break; 1476 - } 1477 - } 1478 1472 /* Trigger path verification. */ 1479 1473 io_subchannel_verify(sch); 1480 1474 rc = 0;
+1 -2
drivers/s390/cio/idset.c
··· 125 125 126 126 void idset_add_set(struct idset *to, struct idset *from) 127 127 { 128 - int len = min(__BITOPS_WORDS(to->num_ssid * to->num_id), 129 - __BITOPS_WORDS(from->num_ssid * from->num_id)); 128 + int len = min(to->num_ssid * to->num_id, from->num_ssid * from->num_id); 130 129 131 130 bitmap_or(to->bitmap, to->bitmap, from->bitmap, len); 132 131 }