diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-23 03:10:25 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-23 03:10:25 -0400 |
| commit | 320437af954cbe66478f1f5e8b34cb5a8d072191 (patch) | |
| tree | 179940f87f305533380abbec5c0c5bd8a6147dbc | |
| parent | 90338325a9cab8ff93359963e3a37be1c8907389 (diff) | |
| parent | 8c071b0f19dfa230335d22ce56a8fab5bd20cedc (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky:
"Several last minute bug fixes.
Two of them are on the larger side for rc7, the dasd format patch for
older storage devices and the store-clock-fast patch where we have
been to optimistic with an optimization"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/time: correct use of store clock fast
s390/vmlogrdr: fix array access in vmlogrdr_open()
s390/compat,signal: fix return value of copy_siginfo_(to|from)_user32()
s390/dasd: check for availability of prefix command during format
s390/mm,kvm: fix software dirty bits vs. kvm for old machines
| -rw-r--r-- | arch/s390/include/asm/pgtable.h | 4 | ||||
| -rw-r--r-- | arch/s390/include/asm/timex.h | 28 | ||||
| -rw-r--r-- | arch/s390/kernel/compat_signal.c | 4 | ||||
| -rw-r--r-- | arch/s390/kernel/debug.c | 2 | ||||
| -rw-r--r-- | arch/s390/kvm/interrupt.c | 6 | ||||
| -rw-r--r-- | arch/s390/lib/delay.c | 14 | ||||
| -rw-r--r-- | drivers/s390/block/dasd_eckd.c | 98 | ||||
| -rw-r--r-- | drivers/s390/char/sclp.c | 4 | ||||
| -rw-r--r-- | drivers/s390/char/vmlogrdr.c | 2 | ||||
| -rw-r--r-- | drivers/s390/cio/cio.c | 4 | ||||
| -rw-r--r-- | drivers/s390/cio/qdio_main.c | 10 |
11 files changed, 111 insertions, 65 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 9b60a36c348d..2204400d0bd5 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
| @@ -748,7 +748,9 @@ static inline void pgste_set_key(pte_t *ptep, pgste_t pgste, pte_t entry) | |||
| 748 | 748 | ||
| 749 | static inline void pgste_set_pte(pte_t *ptep, pte_t entry) | 749 | static inline void pgste_set_pte(pte_t *ptep, pte_t entry) |
| 750 | { | 750 | { |
| 751 | if (!MACHINE_HAS_ESOP && (pte_val(entry) & _PAGE_WRITE)) { | 751 | if (!MACHINE_HAS_ESOP && |
| 752 | (pte_val(entry) & _PAGE_PRESENT) && | ||
| 753 | (pte_val(entry) & _PAGE_WRITE)) { | ||
| 752 | /* | 754 | /* |
| 753 | * Without enhanced suppression-on-protection force | 755 | * Without enhanced suppression-on-protection force |
| 754 | * the dirty bit on for all writable ptes. | 756 | * the dirty bit on for all writable ptes. |
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h index 8ad8af915032..819b94d22720 100644 --- a/arch/s390/include/asm/timex.h +++ b/arch/s390/include/asm/timex.h | |||
| @@ -71,30 +71,30 @@ static inline void local_tick_enable(unsigned long long comp) | |||
| 71 | 71 | ||
| 72 | typedef unsigned long long cycles_t; | 72 | typedef unsigned long long cycles_t; |
| 73 | 73 | ||
| 74 | static inline unsigned long long get_tod_clock(void) | ||
| 75 | { | ||
| 76 | unsigned long long clk; | ||
| 77 | |||
| 78 | #ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES | ||
| 79 | asm volatile(".insn s,0xb27c0000,%0" : "=Q" (clk) : : "cc"); | ||
| 80 | #else | ||
| 81 | asm volatile("stck %0" : "=Q" (clk) : : "cc"); | ||
| 82 | #endif | ||
| 83 | return clk; | ||
| 84 | } | ||
| 85 | |||
| 86 | static inline void get_tod_clock_ext(char *clk) | 74 | static inline void get_tod_clock_ext(char *clk) |
| 87 | { | 75 | { |
| 88 | asm volatile("stcke %0" : "=Q" (*clk) : : "cc"); | 76 | asm volatile("stcke %0" : "=Q" (*clk) : : "cc"); |
| 89 | } | 77 | } |
| 90 | 78 | ||
| 91 | static inline unsigned long long get_tod_clock_xt(void) | 79 | static inline unsigned long long get_tod_clock(void) |
| 92 | { | 80 | { |
| 93 | unsigned char clk[16]; | 81 | unsigned char clk[16]; |
| 94 | get_tod_clock_ext(clk); | 82 | get_tod_clock_ext(clk); |
| 95 | return *((unsigned long long *)&clk[1]); | 83 | return *((unsigned long long *)&clk[1]); |
| 96 | } | 84 | } |
| 97 | 85 | ||
| 86 | static inline unsigned long long get_tod_clock_fast(void) | ||
| 87 | { | ||
| 88 | #ifdef CONFIG_HAVE_MARCH_Z9_109_FEATURES | ||
| 89 | unsigned long long clk; | ||
| 90 | |||
| 91 | asm volatile("stckf %0" : "=Q" (clk) : : "cc"); | ||
| 92 | return clk; | ||
| 93 | #else | ||
| 94 | return get_tod_clock(); | ||
| 95 | #endif | ||
| 96 | } | ||
| 97 | |||
| 98 | static inline cycles_t get_cycles(void) | 98 | static inline cycles_t get_cycles(void) |
| 99 | { | 99 | { |
| 100 | return (cycles_t) get_tod_clock() >> 2; | 100 | return (cycles_t) get_tod_clock() >> 2; |
| @@ -125,7 +125,7 @@ extern u64 sched_clock_base_cc; | |||
| 125 | */ | 125 | */ |
| 126 | static inline unsigned long long get_tod_clock_monotonic(void) | 126 | static inline unsigned long long get_tod_clock_monotonic(void) |
| 127 | { | 127 | { |
| 128 | return get_tod_clock_xt() - sched_clock_base_cc; | 128 | return get_tod_clock() - sched_clock_base_cc; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | /** | 131 | /** |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 1389b637dae5..adaa9e9478d8 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
| @@ -99,7 +99,7 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) | |||
| 99 | break; | 99 | break; |
| 100 | } | 100 | } |
| 101 | } | 101 | } |
| 102 | return err; | 102 | return err ? -EFAULT : 0; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) | 105 | int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) |
| @@ -148,7 +148,7 @@ int copy_siginfo_from_user32(siginfo_t *to, compat_siginfo_t __user *from) | |||
| 148 | break; | 148 | break; |
| 149 | } | 149 | } |
| 150 | } | 150 | } |
| 151 | return err; | 151 | return err ? -EFAULT : 0; |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs) | 154 | static int save_sigregs32(struct pt_regs *regs, _sigregs32 __user *sregs) |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index f1279dc2e1bc..17d62fe5d7b7 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
| @@ -867,7 +867,7 @@ static inline void | |||
| 867 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, | 867 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, |
| 868 | int exception) | 868 | int exception) |
| 869 | { | 869 | { |
| 870 | active->id.stck = get_tod_clock(); | 870 | active->id.stck = get_tod_clock_fast(); |
| 871 | active->id.fields.cpuid = smp_processor_id(); | 871 | active->id.fields.cpuid = smp_processor_id(); |
| 872 | active->caller = __builtin_return_address(0); | 872 | active->caller = __builtin_return_address(0); |
| 873 | active->id.fields.exception = exception; | 873 | active->id.fields.exception = exception; |
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 7f35cb33e510..7f1f7ac5cf7f 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
| @@ -385,7 +385,7 @@ static int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu) | |||
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | if ((!rc) && (vcpu->arch.sie_block->ckc < | 387 | if ((!rc) && (vcpu->arch.sie_block->ckc < |
| 388 | get_tod_clock() + vcpu->arch.sie_block->epoch)) { | 388 | get_tod_clock_fast() + vcpu->arch.sie_block->epoch)) { |
| 389 | if ((!psw_extint_disabled(vcpu)) && | 389 | if ((!psw_extint_disabled(vcpu)) && |
| 390 | (vcpu->arch.sie_block->gcr[0] & 0x800ul)) | 390 | (vcpu->arch.sie_block->gcr[0] & 0x800ul)) |
| 391 | rc = 1; | 391 | rc = 1; |
| @@ -425,7 +425,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu) | |||
| 425 | goto no_timer; | 425 | goto no_timer; |
| 426 | } | 426 | } |
| 427 | 427 | ||
| 428 | now = get_tod_clock() + vcpu->arch.sie_block->epoch; | 428 | now = get_tod_clock_fast() + vcpu->arch.sie_block->epoch; |
| 429 | if (vcpu->arch.sie_block->ckc < now) { | 429 | if (vcpu->arch.sie_block->ckc < now) { |
| 430 | __unset_cpu_idle(vcpu); | 430 | __unset_cpu_idle(vcpu); |
| 431 | return 0; | 431 | return 0; |
| @@ -515,7 +515,7 @@ void kvm_s390_deliver_pending_interrupts(struct kvm_vcpu *vcpu) | |||
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | if ((vcpu->arch.sie_block->ckc < | 517 | if ((vcpu->arch.sie_block->ckc < |
| 518 | get_tod_clock() + vcpu->arch.sie_block->epoch)) | 518 | get_tod_clock_fast() + vcpu->arch.sie_block->epoch)) |
| 519 | __try_deliver_ckc_interrupt(vcpu); | 519 | __try_deliver_ckc_interrupt(vcpu); |
| 520 | 520 | ||
| 521 | if (atomic_read(&fi->active)) { | 521 | if (atomic_read(&fi->active)) { |
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index 57c87d7d7ede..a9f3d0042d58 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c | |||
| @@ -44,7 +44,7 @@ static void __udelay_disabled(unsigned long long usecs) | |||
| 44 | do { | 44 | do { |
| 45 | set_clock_comparator(end); | 45 | set_clock_comparator(end); |
| 46 | vtime_stop_cpu(); | 46 | vtime_stop_cpu(); |
| 47 | } while (get_tod_clock() < end); | 47 | } while (get_tod_clock_fast() < end); |
| 48 | lockdep_on(); | 48 | lockdep_on(); |
| 49 | __ctl_load(cr0, 0, 0); | 49 | __ctl_load(cr0, 0, 0); |
| 50 | __ctl_load(cr6, 6, 6); | 50 | __ctl_load(cr6, 6, 6); |
| @@ -55,7 +55,7 @@ static void __udelay_enabled(unsigned long long usecs) | |||
| 55 | { | 55 | { |
| 56 | u64 clock_saved, end; | 56 | u64 clock_saved, end; |
| 57 | 57 | ||
| 58 | end = get_tod_clock() + (usecs << 12); | 58 | end = get_tod_clock_fast() + (usecs << 12); |
| 59 | do { | 59 | do { |
| 60 | clock_saved = 0; | 60 | clock_saved = 0; |
| 61 | if (end < S390_lowcore.clock_comparator) { | 61 | if (end < S390_lowcore.clock_comparator) { |
| @@ -65,7 +65,7 @@ static void __udelay_enabled(unsigned long long usecs) | |||
| 65 | vtime_stop_cpu(); | 65 | vtime_stop_cpu(); |
| 66 | if (clock_saved) | 66 | if (clock_saved) |
| 67 | local_tick_enable(clock_saved); | 67 | local_tick_enable(clock_saved); |
| 68 | } while (get_tod_clock() < end); | 68 | } while (get_tod_clock_fast() < end); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | /* | 71 | /* |
| @@ -109,8 +109,8 @@ void udelay_simple(unsigned long long usecs) | |||
| 109 | { | 109 | { |
| 110 | u64 end; | 110 | u64 end; |
| 111 | 111 | ||
| 112 | end = get_tod_clock() + (usecs << 12); | 112 | end = get_tod_clock_fast() + (usecs << 12); |
| 113 | while (get_tod_clock() < end) | 113 | while (get_tod_clock_fast() < end) |
| 114 | cpu_relax(); | 114 | cpu_relax(); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| @@ -120,10 +120,10 @@ void __ndelay(unsigned long long nsecs) | |||
| 120 | 120 | ||
| 121 | nsecs <<= 9; | 121 | nsecs <<= 9; |
| 122 | do_div(nsecs, 125); | 122 | do_div(nsecs, 125); |
| 123 | end = get_tod_clock() + nsecs; | 123 | end = get_tod_clock_fast() + nsecs; |
| 124 | if (nsecs & ~0xfffUL) | 124 | if (nsecs & ~0xfffUL) |
| 125 | __udelay(nsecs >> 12); | 125 | __udelay(nsecs >> 12); |
| 126 | while (get_tod_clock() < end) | 126 | while (get_tod_clock_fast() < end) |
| 127 | barrier(); | 127 | barrier(); |
| 128 | } | 128 | } |
| 129 | EXPORT_SYMBOL(__ndelay); | 129 | EXPORT_SYMBOL(__ndelay); |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 5adb2042e824..cee7e2708a1f 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
| @@ -2077,6 +2077,7 @@ dasd_eckd_build_format(struct dasd_device *base, | |||
| 2077 | int intensity = 0; | 2077 | int intensity = 0; |
| 2078 | int r0_perm; | 2078 | int r0_perm; |
| 2079 | int nr_tracks; | 2079 | int nr_tracks; |
| 2080 | int use_prefix; | ||
| 2080 | 2081 | ||
| 2081 | startdev = dasd_alias_get_start_dev(base); | 2082 | startdev = dasd_alias_get_start_dev(base); |
| 2082 | if (!startdev) | 2083 | if (!startdev) |
| @@ -2106,28 +2107,46 @@ dasd_eckd_build_format(struct dasd_device *base, | |||
| 2106 | intensity = fdata->intensity; | 2107 | intensity = fdata->intensity; |
| 2107 | } | 2108 | } |
| 2108 | 2109 | ||
| 2110 | use_prefix = base_priv->features.feature[8] & 0x01; | ||
| 2111 | |||
| 2109 | switch (intensity) { | 2112 | switch (intensity) { |
| 2110 | case 0x00: /* Normal format */ | 2113 | case 0x00: /* Normal format */ |
| 2111 | case 0x08: /* Normal format, use cdl. */ | 2114 | case 0x08: /* Normal format, use cdl. */ |
| 2112 | cplength = 2 + (rpt*nr_tracks); | 2115 | cplength = 2 + (rpt*nr_tracks); |
| 2113 | datasize = sizeof(struct PFX_eckd_data) + | 2116 | if (use_prefix) |
| 2114 | sizeof(struct LO_eckd_data) + | 2117 | datasize = sizeof(struct PFX_eckd_data) + |
| 2115 | rpt * nr_tracks * sizeof(struct eckd_count); | 2118 | sizeof(struct LO_eckd_data) + |
| 2119 | rpt * nr_tracks * sizeof(struct eckd_count); | ||
| 2120 | else | ||
| 2121 | datasize = sizeof(struct DE_eckd_data) + | ||
| 2122 | sizeof(struct LO_eckd_data) + | ||
| 2123 | rpt * nr_tracks * sizeof(struct eckd_count); | ||
| 2116 | break; | 2124 | break; |
| 2117 | case 0x01: /* Write record zero and format track. */ | 2125 | case 0x01: /* Write record zero and format track. */ |
| 2118 | case 0x09: /* Write record zero and format track, use cdl. */ | 2126 | case 0x09: /* Write record zero and format track, use cdl. */ |
| 2119 | cplength = 2 + rpt * nr_tracks; | 2127 | cplength = 2 + rpt * nr_tracks; |
| 2120 | datasize = sizeof(struct PFX_eckd_data) + | 2128 | if (use_prefix) |
| 2121 | sizeof(struct LO_eckd_data) + | 2129 | datasize = sizeof(struct PFX_eckd_data) + |
| 2122 | sizeof(struct eckd_count) + | 2130 | sizeof(struct LO_eckd_data) + |
| 2123 | rpt * nr_tracks * sizeof(struct eckd_count); | 2131 | sizeof(struct eckd_count) + |
| 2132 | rpt * nr_tracks * sizeof(struct eckd_count); | ||
| 2133 | else | ||
| 2134 | datasize = sizeof(struct DE_eckd_data) + | ||
| 2135 | sizeof(struct LO_eckd_data) + | ||
| 2136 | sizeof(struct eckd_count) + | ||
| 2137 | rpt * nr_tracks * sizeof(struct eckd_count); | ||
| 2124 | break; | 2138 | break; |
| 2125 | case 0x04: /* Invalidate track. */ | 2139 | case 0x04: /* Invalidate track. */ |
| 2126 | case 0x0c: /* Invalidate track, use cdl. */ | 2140 | case 0x0c: /* Invalidate track, use cdl. */ |
| 2127 | cplength = 3; | 2141 | cplength = 3; |
| 2128 | datasize = sizeof(struct PFX_eckd_data) + | 2142 | if (use_prefix) |
| 2129 | sizeof(struct LO_eckd_data) + | 2143 | datasize = sizeof(struct PFX_eckd_data) + |
| 2130 | sizeof(struct eckd_count); | 2144 | sizeof(struct LO_eckd_data) + |
| 2145 | sizeof(struct eckd_count); | ||
| 2146 | else | ||
| 2147 | datasize = sizeof(struct DE_eckd_data) + | ||
| 2148 | sizeof(struct LO_eckd_data) + | ||
| 2149 | sizeof(struct eckd_count); | ||
| 2131 | break; | 2150 | break; |
| 2132 | default: | 2151 | default: |
| 2133 | dev_warn(&startdev->cdev->dev, | 2152 | dev_warn(&startdev->cdev->dev, |
| @@ -2147,14 +2166,25 @@ dasd_eckd_build_format(struct dasd_device *base, | |||
| 2147 | 2166 | ||
| 2148 | switch (intensity & ~0x08) { | 2167 | switch (intensity & ~0x08) { |
| 2149 | case 0x00: /* Normal format. */ | 2168 | case 0x00: /* Normal format. */ |
| 2150 | prefix(ccw++, (struct PFX_eckd_data *) data, | 2169 | if (use_prefix) { |
| 2151 | fdata->start_unit, fdata->stop_unit, | 2170 | prefix(ccw++, (struct PFX_eckd_data *) data, |
| 2152 | DASD_ECKD_CCW_WRITE_CKD, base, startdev); | 2171 | fdata->start_unit, fdata->stop_unit, |
| 2153 | /* grant subsystem permission to format R0 */ | 2172 | DASD_ECKD_CCW_WRITE_CKD, base, startdev); |
| 2154 | if (r0_perm) | 2173 | /* grant subsystem permission to format R0 */ |
| 2155 | ((struct PFX_eckd_data *)data) | 2174 | if (r0_perm) |
| 2156 | ->define_extent.ga_extended |= 0x04; | 2175 | ((struct PFX_eckd_data *)data) |
| 2157 | data += sizeof(struct PFX_eckd_data); | 2176 | ->define_extent.ga_extended |= 0x04; |
| 2177 | data += sizeof(struct PFX_eckd_data); | ||
| 2178 | } else { | ||
| 2179 | define_extent(ccw++, (struct DE_eckd_data *) data, | ||
| 2180 | fdata->start_unit, fdata->stop_unit, | ||
| 2181 | DASD_ECKD_CCW_WRITE_CKD, startdev); | ||
| 2182 | /* grant subsystem permission to format R0 */ | ||
| 2183 | if (r0_perm) | ||
| 2184 | ((struct DE_eckd_data *) data) | ||
| 2185 | ->ga_extended |= 0x04; | ||
| 2186 | data += sizeof(struct DE_eckd_data); | ||
| 2187 | } | ||
| 2158 | ccw[-1].flags |= CCW_FLAG_CC; | 2188 | ccw[-1].flags |= CCW_FLAG_CC; |
| 2159 | locate_record(ccw++, (struct LO_eckd_data *) data, | 2189 | locate_record(ccw++, (struct LO_eckd_data *) data, |
| 2160 | fdata->start_unit, 0, rpt*nr_tracks, | 2190 | fdata->start_unit, 0, rpt*nr_tracks, |
| @@ -2163,11 +2193,18 @@ dasd_eckd_build_format(struct dasd_device *base, | |||
| 2163 | data += sizeof(struct LO_eckd_data); | 2193 | data += sizeof(struct LO_eckd_data); |
| 2164 | break; | 2194 | break; |
| 2165 | case 0x01: /* Write record zero + format track. */ | 2195 | case 0x01: /* Write record zero + format track. */ |
| 2166 | prefix(ccw++, (struct PFX_eckd_data *) data, | 2196 | if (use_prefix) { |
| 2167 | fdata->start_unit, fdata->stop_unit, | 2197 | prefix(ccw++, (struct PFX_eckd_data *) data, |
| 2168 | DASD_ECKD_CCW_WRITE_RECORD_ZERO, | 2198 | fdata->start_unit, fdata->stop_unit, |
| 2169 | base, startdev); | 2199 | DASD_ECKD_CCW_WRITE_RECORD_ZERO, |
| 2170 | data += sizeof(struct PFX_eckd_data); | 2200 | base, startdev); |
| 2201 | data += sizeof(struct PFX_eckd_data); | ||
| 2202 | } else { | ||
| 2203 | define_extent(ccw++, (struct DE_eckd_data *) data, | ||
| 2204 | fdata->start_unit, fdata->stop_unit, | ||
| 2205 | DASD_ECKD_CCW_WRITE_RECORD_ZERO, startdev); | ||
| 2206 | data += sizeof(struct DE_eckd_data); | ||
| 2207 | } | ||
| 2171 | ccw[-1].flags |= CCW_FLAG_CC; | 2208 | ccw[-1].flags |= CCW_FLAG_CC; |
| 2172 | locate_record(ccw++, (struct LO_eckd_data *) data, | 2209 | locate_record(ccw++, (struct LO_eckd_data *) data, |
| 2173 | fdata->start_unit, 0, rpt * nr_tracks + 1, | 2210 | fdata->start_unit, 0, rpt * nr_tracks + 1, |
| @@ -2176,10 +2213,17 @@ dasd_eckd_build_format(struct dasd_device *base, | |||
| 2176 | data += sizeof(struct LO_eckd_data); | 2213 | data += sizeof(struct LO_eckd_data); |
| 2177 | break; | 2214 | break; |
| 2178 | case 0x04: /* Invalidate track. */ | 2215 | case 0x04: /* Invalidate track. */ |
| 2179 | prefix(ccw++, (struct PFX_eckd_data *) data, | 2216 | if (use_prefix) { |
| 2180 | fdata->start_unit, fdata->stop_unit, | 2217 | prefix(ccw++, (struct PFX_eckd_data *) data, |
| 2181 | DASD_ECKD_CCW_WRITE_CKD, base, startdev); | 2218 | fdata->start_unit, fdata->stop_unit, |
| 2182 | data += sizeof(struct PFX_eckd_data); | 2219 | DASD_ECKD_CCW_WRITE_CKD, base, startdev); |
| 2220 | data += sizeof(struct PFX_eckd_data); | ||
| 2221 | } else { | ||
| 2222 | define_extent(ccw++, (struct DE_eckd_data *) data, | ||
| 2223 | fdata->start_unit, fdata->stop_unit, | ||
| 2224 | DASD_ECKD_CCW_WRITE_CKD, startdev); | ||
| 2225 | data += sizeof(struct DE_eckd_data); | ||
| 2226 | } | ||
| 2183 | ccw[-1].flags |= CCW_FLAG_CC; | 2227 | ccw[-1].flags |= CCW_FLAG_CC; |
| 2184 | locate_record(ccw++, (struct LO_eckd_data *) data, | 2228 | locate_record(ccw++, (struct LO_eckd_data *) data, |
| 2185 | fdata->start_unit, 0, 1, | 2229 | fdata->start_unit, 0, 1, |
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index a3aa374799dc..1fe264379e0d 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
| @@ -486,7 +486,7 @@ sclp_sync_wait(void) | |||
| 486 | timeout = 0; | 486 | timeout = 0; |
| 487 | if (timer_pending(&sclp_request_timer)) { | 487 | if (timer_pending(&sclp_request_timer)) { |
| 488 | /* Get timeout TOD value */ | 488 | /* Get timeout TOD value */ |
| 489 | timeout = get_tod_clock() + | 489 | timeout = get_tod_clock_fast() + |
| 490 | sclp_tod_from_jiffies(sclp_request_timer.expires - | 490 | sclp_tod_from_jiffies(sclp_request_timer.expires - |
| 491 | jiffies); | 491 | jiffies); |
| 492 | } | 492 | } |
| @@ -508,7 +508,7 @@ sclp_sync_wait(void) | |||
| 508 | while (sclp_running_state != sclp_running_state_idle) { | 508 | while (sclp_running_state != sclp_running_state_idle) { |
| 509 | /* Check for expired request timer */ | 509 | /* Check for expired request timer */ |
| 510 | if (timer_pending(&sclp_request_timer) && | 510 | if (timer_pending(&sclp_request_timer) && |
| 511 | get_tod_clock() > timeout && | 511 | get_tod_clock_fast() > timeout && |
| 512 | del_timer(&sclp_request_timer)) | 512 | del_timer(&sclp_request_timer)) |
| 513 | sclp_request_timer.function(sclp_request_timer.data); | 513 | sclp_request_timer.function(sclp_request_timer.data); |
| 514 | cpu_relax(); | 514 | cpu_relax(); |
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index 9b3a24e8d3a0..cf31d3321dab 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c | |||
| @@ -313,7 +313,7 @@ static int vmlogrdr_open (struct inode *inode, struct file *filp) | |||
| 313 | int ret; | 313 | int ret; |
| 314 | 314 | ||
| 315 | dev_num = iminor(inode); | 315 | dev_num = iminor(inode); |
| 316 | if (dev_num > MAXMINOR) | 316 | if (dev_num >= MAXMINOR) |
| 317 | return -ENODEV; | 317 | return -ENODEV; |
| 318 | logptr = &sys_ser[dev_num]; | 318 | logptr = &sys_ser[dev_num]; |
| 319 | 319 | ||
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index d7da67a31c77..88e35d85d205 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
| @@ -878,9 +878,9 @@ static void css_reset(void) | |||
| 878 | atomic_inc(&chpid_reset_count); | 878 | atomic_inc(&chpid_reset_count); |
| 879 | } | 879 | } |
| 880 | /* Wait for machine check for all channel paths. */ | 880 | /* Wait for machine check for all channel paths. */ |
| 881 | timeout = get_tod_clock() + (RCHP_TIMEOUT << 12); | 881 | timeout = get_tod_clock_fast() + (RCHP_TIMEOUT << 12); |
| 882 | while (atomic_read(&chpid_reset_count) != 0) { | 882 | while (atomic_read(&chpid_reset_count) != 0) { |
| 883 | if (get_tod_clock() > timeout) | 883 | if (get_tod_clock_fast() > timeout) |
| 884 | break; | 884 | break; |
| 885 | cpu_relax(); | 885 | cpu_relax(); |
| 886 | } | 886 | } |
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 8ed52aa49122..bbd3e511c771 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
| @@ -338,10 +338,10 @@ again: | |||
| 338 | retries++; | 338 | retries++; |
| 339 | 339 | ||
| 340 | if (!start_time) { | 340 | if (!start_time) { |
| 341 | start_time = get_tod_clock(); | 341 | start_time = get_tod_clock_fast(); |
| 342 | goto again; | 342 | goto again; |
| 343 | } | 343 | } |
| 344 | if ((get_tod_clock() - start_time) < QDIO_BUSY_BIT_PATIENCE) | 344 | if (get_tod_clock_fast() - start_time < QDIO_BUSY_BIT_PATIENCE) |
| 345 | goto again; | 345 | goto again; |
| 346 | } | 346 | } |
| 347 | if (retries) { | 347 | if (retries) { |
| @@ -504,7 +504,7 @@ static int get_inbound_buffer_frontier(struct qdio_q *q) | |||
| 504 | int count, stop; | 504 | int count, stop; |
| 505 | unsigned char state = 0; | 505 | unsigned char state = 0; |
| 506 | 506 | ||
| 507 | q->timestamp = get_tod_clock(); | 507 | q->timestamp = get_tod_clock_fast(); |
| 508 | 508 | ||
| 509 | /* | 509 | /* |
| 510 | * Don't check 128 buffers, as otherwise qdio_inbound_q_moved | 510 | * Don't check 128 buffers, as otherwise qdio_inbound_q_moved |
| @@ -595,7 +595,7 @@ static inline int qdio_inbound_q_done(struct qdio_q *q) | |||
| 595 | * At this point we know, that inbound first_to_check | 595 | * At this point we know, that inbound first_to_check |
| 596 | * has (probably) not moved (see qdio_inbound_processing). | 596 | * has (probably) not moved (see qdio_inbound_processing). |
| 597 | */ | 597 | */ |
| 598 | if (get_tod_clock() > q->u.in.timestamp + QDIO_INPUT_THRESHOLD) { | 598 | if (get_tod_clock_fast() > q->u.in.timestamp + QDIO_INPUT_THRESHOLD) { |
| 599 | DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in done:%02x", | 599 | DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in done:%02x", |
| 600 | q->first_to_check); | 600 | q->first_to_check); |
| 601 | return 1; | 601 | return 1; |
| @@ -728,7 +728,7 @@ static int get_outbound_buffer_frontier(struct qdio_q *q) | |||
| 728 | int count, stop; | 728 | int count, stop; |
| 729 | unsigned char state = 0; | 729 | unsigned char state = 0; |
| 730 | 730 | ||
| 731 | q->timestamp = get_tod_clock(); | 731 | q->timestamp = get_tod_clock_fast(); |
| 732 | 732 | ||
| 733 | if (need_siga_sync(q)) | 733 | if (need_siga_sync(q)) |
| 734 | if (((queue_type(q) != QDIO_IQDIO_QFMT) && | 734 | if (((queue_type(q) != QDIO_IQDIO_QFMT) && |
