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 more s390 patches from Martin Schwidefsky:
"A couple of bug fixes: one of the transparent huge page primitives is
broken, the sched_clock function overflows after 417 days, the XFS
module has grown too large for -fpic and the new pci code has broken
normal channel subsystem notifications."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/chsc: fix SEI usage
s390/time: fix sched_clock() overflow
s390: use -fPIC for module compile
s390/mm: fix pmd_pfn() for thp

+45 -27
+2 -2
arch/s390/Makefile
··· 24 24 else 25 25 LD_BFD := elf64-s390 26 26 LDFLAGS := -m elf64_s390 27 - KBUILD_AFLAGS_MODULE += -fpic -D__PIC__ 28 - KBUILD_CFLAGS_MODULE += -fpic -D__PIC__ 27 + KBUILD_AFLAGS_MODULE += -fPIC 28 + KBUILD_CFLAGS_MODULE += -fPIC 29 29 KBUILD_CFLAGS += -m64 30 30 KBUILD_AFLAGS += -m64 31 31 UTS_MACHINE := s390x
+1 -4
arch/s390/include/asm/pgtable.h
··· 1387 1387 1388 1388 static inline unsigned long pmd_pfn(pmd_t pmd) 1389 1389 { 1390 - if (pmd_trans_huge(pmd)) 1391 - return pmd_val(pmd) >> HPAGE_SHIFT; 1392 - else 1393 - return pmd_val(pmd) >> PAGE_SHIFT; 1390 + return pmd_val(pmd) >> PAGE_SHIFT; 1394 1391 } 1395 1392 #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ 1396 1393
+28
arch/s390/include/asm/timex.h
··· 128 128 return get_clock_xt() - sched_clock_base_cc; 129 129 } 130 130 131 + /** 132 + * tod_to_ns - convert a TOD format value to nanoseconds 133 + * @todval: to be converted TOD format value 134 + * Returns: number of nanoseconds that correspond to the TOD format value 135 + * 136 + * Converting a 64 Bit TOD format value to nanoseconds means that the value 137 + * must be divided by 4.096. In order to achieve that we multiply with 125 138 + * and divide by 512: 139 + * 140 + * ns = (todval * 125) >> 9; 141 + * 142 + * In order to avoid an overflow with the multiplication we can rewrite this. 143 + * With a split todval == 2^32 * th + tl (th upper 32 bits, tl lower 32 bits) 144 + * we end up with 145 + * 146 + * ns = ((2^32 * th + tl) * 125 ) >> 9; 147 + * -> ns = (2^23 * th * 125) + ((tl * 125) >> 9); 148 + * 149 + */ 150 + static inline unsigned long long tod_to_ns(unsigned long long todval) 151 + { 152 + unsigned long long ns; 153 + 154 + ns = ((todval >> 32) << 23) * 125; 155 + ns += ((todval & 0xffffffff) * 125) >> 9; 156 + return ns; 157 + } 158 + 131 159 #endif
+1 -1
arch/s390/kernel/time.c
··· 63 63 */ 64 64 unsigned long long notrace __kprobes sched_clock(void) 65 65 { 66 - return (get_clock_monotonic() * 125) >> 9; 66 + return tod_to_ns(get_clock_monotonic()); 67 67 } 68 68 69 69 /*
+1 -1
arch/s390/kvm/interrupt.c
··· 408 408 return 0; 409 409 } 410 410 411 - sltime = ((vcpu->arch.sie_block->ckc - now)*125)>>9; 411 + sltime = tod_to_ns(vcpu->arch.sie_block->ckc - now); 412 412 413 413 hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL); 414 414 VCPU_EVENT(vcpu, 5, "enabled wait via clock comparator: %llx ns", sltime);
+12 -19
drivers/s390/cio/chsc.c
··· 283 283 u8 ccdf[PAGE_SIZE - 24 - 56]; /* content-code dependent field */ 284 284 } __packed; 285 285 286 - #define CHSC_SEI_NT0 0ULL 286 + #define CHSC_SEI_NT0 (1ULL << 63) 287 287 #define CHSC_SEI_NT2 (1ULL << 61) 288 288 289 289 struct chsc_sei { ··· 291 291 u32 reserved1; 292 292 u64 ntsm; /* notification type mask */ 293 293 struct chsc_header response; 294 - u32 reserved2; 294 + u32 :24; 295 + u8 nt; 295 296 union { 296 297 struct chsc_sei_nt0_area nt0_area; 297 298 struct chsc_sei_nt2_area nt2_area; ··· 497 496 css_schedule_eval_all(); 498 497 } 499 498 500 - switch (sei->ntsm) { 501 - case CHSC_SEI_NT0: 499 + switch (sei->nt) { 500 + case 0: 502 501 chsc_process_sei_nt0(&sei->u.nt0_area); 503 - return 1; 504 - case CHSC_SEI_NT2: 502 + break; 503 + case 2: 505 504 chsc_process_sei_nt2(&sei->u.nt2_area); 506 - return 1; 505 + break; 507 506 default: 508 - CIO_CRW_EVENT(2, "chsc: unhandled nt (nt=%08Lx)\n", 509 - sei->ntsm); 510 - return 0; 507 + CIO_CRW_EVENT(2, "chsc: unhandled nt=%d\n", 508 + sei->nt); 509 + break; 511 510 } 512 511 } else { 513 512 CIO_CRW_EVENT(2, "chsc: sei failed (rc=%04x)\n", ··· 538 537 sei = sei_page; 539 538 540 539 CIO_TRACE_EVENT(2, "prcss"); 541 - 542 - /* 543 - * The ntsm does not allow to select NT0 and NT2 together. We need to 544 - * first check for NT2, than additionally for NT0... 545 - */ 546 - #ifdef CONFIG_PCI 547 - if (!__chsc_process_crw(sei, CHSC_SEI_NT2)) 548 - #endif 549 - __chsc_process_crw(sei, CHSC_SEI_NT0); 540 + __chsc_process_crw(sei, CHSC_SEI_NT0 | CHSC_SEI_NT2); 550 541 } 551 542 552 543 void chsc_chp_online(struct chp_id chpid)