Skip to content

Commit 3ba1692

Browse files
author
Alex Shi
committed
Merge tag 'v4.4.36' into linux-linaro-lsk-v4.4
This is the 4.4.36 stable release
2 parents 072c0f9 + 87c6c6e commit 3ba1692

32 files changed

Lines changed: 236 additions & 94 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 4
22
PATCHLEVEL = 4
3-
SUBLEVEL = 35
3+
SUBLEVEL = 36
44
EXTRAVERSION =
55
NAME = Blurry Fish Butt
66

arch/parisc/kernel/cache.c

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ void __init parisc_setup_cache_timing(void)
351351
{
352352
unsigned long rangetime, alltime;
353353
unsigned long size, start;
354+
unsigned long threshold;
354355

355356
alltime = mfctl(16);
356357
flush_data_cache();
@@ -364,17 +365,12 @@ void __init parisc_setup_cache_timing(void)
364365
printk(KERN_DEBUG "Whole cache flush %lu cycles, flushing %lu bytes %lu cycles\n",
365366
alltime, size, rangetime);
366367

367-
/* Racy, but if we see an intermediate value, it's ok too... */
368-
parisc_cache_flush_threshold = size * alltime / rangetime;
369-
370-
parisc_cache_flush_threshold = L1_CACHE_ALIGN(parisc_cache_flush_threshold);
371-
if (!parisc_cache_flush_threshold)
372-
parisc_cache_flush_threshold = FLUSH_THRESHOLD;
373-
374-
if (parisc_cache_flush_threshold > cache_info.dc_size)
375-
parisc_cache_flush_threshold = cache_info.dc_size;
376-
377-
printk(KERN_INFO "Setting cache flush threshold to %lu kB\n",
368+
threshold = L1_CACHE_ALIGN(size * alltime / rangetime);
369+
if (threshold > cache_info.dc_size)
370+
threshold = cache_info.dc_size;
371+
if (threshold)
372+
parisc_cache_flush_threshold = threshold;
373+
printk(KERN_INFO "Cache flush threshold set to %lu KiB\n",
378374
parisc_cache_flush_threshold/1024);
379375

380376
/* calculate TLB flush threshold */
@@ -383,7 +379,7 @@ void __init parisc_setup_cache_timing(void)
383379
flush_tlb_all();
384380
alltime = mfctl(16) - alltime;
385381

386-
size = PAGE_SIZE;
382+
size = 0;
387383
start = (unsigned long) _text;
388384
rangetime = mfctl(16);
389385
while (start < (unsigned long) _end) {
@@ -396,13 +392,10 @@ void __init parisc_setup_cache_timing(void)
396392
printk(KERN_DEBUG "Whole TLB flush %lu cycles, flushing %lu bytes %lu cycles\n",
397393
alltime, size, rangetime);
398394

399-
parisc_tlb_flush_threshold = size * alltime / rangetime;
400-
parisc_tlb_flush_threshold *= num_online_cpus();
401-
parisc_tlb_flush_threshold = PAGE_ALIGN(parisc_tlb_flush_threshold);
402-
if (!parisc_tlb_flush_threshold)
403-
parisc_tlb_flush_threshold = FLUSH_TLB_THRESHOLD;
404-
405-
printk(KERN_INFO "Setting TLB flush threshold to %lu kB\n",
395+
threshold = PAGE_ALIGN(num_online_cpus() * size * alltime / rangetime);
396+
if (threshold)
397+
parisc_tlb_flush_threshold = threshold;
398+
printk(KERN_INFO "TLB flush threshold set to %lu KiB\n",
406399
parisc_tlb_flush_threshold/1024);
407400
}
408401

arch/parisc/kernel/pacache.S

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fitmanyloop: /* Loop if LOOP >= 2 */
9696

9797
fitmanymiddle: /* Loop if LOOP >= 2 */
9898
addib,COND(>) -1, %r31, fitmanymiddle /* Adjusted inner loop decr */
99-
pitlbe 0(%sr1, %r28)
99+
pitlbe %r0(%sr1, %r28)
100100
pitlbe,m %arg1(%sr1, %r28) /* Last pitlbe and addr adjust */
101101
addib,COND(>) -1, %r29, fitmanymiddle /* Middle loop decr */
102102
copy %arg3, %r31 /* Re-init inner loop count */
@@ -139,7 +139,7 @@ fdtmanyloop: /* Loop if LOOP >= 2 */
139139

140140
fdtmanymiddle: /* Loop if LOOP >= 2 */
141141
addib,COND(>) -1, %r31, fdtmanymiddle /* Adjusted inner loop decr */
142-
pdtlbe 0(%sr1, %r28)
142+
pdtlbe %r0(%sr1, %r28)
143143
pdtlbe,m %arg1(%sr1, %r28) /* Last pdtlbe and addr adjust */
144144
addib,COND(>) -1, %r29, fdtmanymiddle /* Middle loop decr */
145145
copy %arg3, %r31 /* Re-init inner loop count */
@@ -620,12 +620,12 @@ ENTRY(copy_user_page_asm)
620620
/* Purge any old translations */
621621

622622
#ifdef CONFIG_PA20
623-
pdtlb,l 0(%r28)
624-
pdtlb,l 0(%r29)
623+
pdtlb,l %r0(%r28)
624+
pdtlb,l %r0(%r29)
625625
#else
626626
tlb_lock %r20,%r21,%r22
627-
pdtlb 0(%r28)
628-
pdtlb 0(%r29)
627+
pdtlb %r0(%r28)
628+
pdtlb %r0(%r29)
629629
tlb_unlock %r20,%r21,%r22
630630
#endif
631631

@@ -768,10 +768,10 @@ ENTRY(clear_user_page_asm)
768768
/* Purge any old translation */
769769

770770
#ifdef CONFIG_PA20
771-
pdtlb,l 0(%r28)
771+
pdtlb,l %r0(%r28)
772772
#else
773773
tlb_lock %r20,%r21,%r22
774-
pdtlb 0(%r28)
774+
pdtlb %r0(%r28)
775775
tlb_unlock %r20,%r21,%r22
776776
#endif
777777

@@ -852,10 +852,10 @@ ENTRY(flush_dcache_page_asm)
852852
/* Purge any old translation */
853853

854854
#ifdef CONFIG_PA20
855-
pdtlb,l 0(%r28)
855+
pdtlb,l %r0(%r28)
856856
#else
857857
tlb_lock %r20,%r21,%r22
858-
pdtlb 0(%r28)
858+
pdtlb %r0(%r28)
859859
tlb_unlock %r20,%r21,%r22
860860
#endif
861861

@@ -892,10 +892,10 @@ ENTRY(flush_dcache_page_asm)
892892
sync
893893

894894
#ifdef CONFIG_PA20
895-
pdtlb,l 0(%r25)
895+
pdtlb,l %r0(%r25)
896896
#else
897897
tlb_lock %r20,%r21,%r22
898-
pdtlb 0(%r25)
898+
pdtlb %r0(%r25)
899899
tlb_unlock %r20,%r21,%r22
900900
#endif
901901

@@ -925,13 +925,18 @@ ENTRY(flush_icache_page_asm)
925925
depwi 0, 31,PAGE_SHIFT, %r28 /* Clear any offset bits */
926926
#endif
927927

928-
/* Purge any old translation */
928+
/* Purge any old translation. Note that the FIC instruction
929+
* may use either the instruction or data TLB. Given that we
930+
* have a flat address space, it's not clear which TLB will be
931+
* used. So, we purge both entries. */
929932

930933
#ifdef CONFIG_PA20
934+
pdtlb,l %r0(%r28)
931935
pitlb,l %r0(%sr4,%r28)
932936
#else
933937
tlb_lock %r20,%r21,%r22
934-
pitlb (%sr4,%r28)
938+
pdtlb %r0(%r28)
939+
pitlb %r0(%sr4,%r28)
935940
tlb_unlock %r20,%r21,%r22
936941
#endif
937942

@@ -970,10 +975,12 @@ ENTRY(flush_icache_page_asm)
970975
sync
971976

972977
#ifdef CONFIG_PA20
978+
pdtlb,l %r0(%r28)
973979
pitlb,l %r0(%sr4,%r25)
974980
#else
975981
tlb_lock %r20,%r21,%r22
976-
pitlb (%sr4,%r25)
982+
pdtlb %r0(%r28)
983+
pitlb %r0(%sr4,%r25)
977984
tlb_unlock %r20,%r21,%r22
978985
#endif
979986

arch/parisc/kernel/pci-dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ static inline int map_pte_uncached(pte_t * pte,
9595

9696
if (!pte_none(*pte))
9797
printk(KERN_ERR "map_pte_uncached: page already exists\n");
98-
set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC));
9998
purge_tlb_start(flags);
99+
set_pte(pte, __mk_pte(*paddr_ptr, PAGE_KERNEL_UNC));
100100
pdtlb_kernel(orig_vaddr);
101101
purge_tlb_end(flags);
102102
vaddr += PAGE_SIZE;

arch/parisc/kernel/setup.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,10 @@ static int __init parisc_init(void)
334334
/* tell PDC we're Linux. Nevermind failure. */
335335
pdc_stable_write(0x40, &osid, sizeof(osid));
336336

337+
/* start with known state */
338+
flush_cache_all_local();
339+
flush_tlb_all_local(NULL);
340+
337341
processor_init();
338342
#ifdef CONFIG_SMP
339343
pr_info("CPU(s): %d out of %d %s at %d.%06d MHz online\n",

arch/tile/kernel/time.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ void do_timer_interrupt(struct pt_regs *regs, int fault_num)
218218
*/
219219
unsigned long long sched_clock(void)
220220
{
221-
return clocksource_cyc2ns(get_cycles(),
222-
sched_clock_mult, SCHED_CLOCK_SHIFT);
221+
return mult_frac(get_cycles(),
222+
sched_clock_mult, 1ULL << SCHED_CLOCK_SHIFT);
223223
}
224224

225225
int setup_profiling_timer(unsigned int multiplier)

arch/x86/kvm/emulate.c

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2093,16 +2093,10 @@ static int em_iret(struct x86_emulate_ctxt *ctxt)
20932093
static int em_jmp_far(struct x86_emulate_ctxt *ctxt)
20942094
{
20952095
int rc;
2096-
unsigned short sel, old_sel;
2097-
struct desc_struct old_desc, new_desc;
2098-
const struct x86_emulate_ops *ops = ctxt->ops;
2096+
unsigned short sel;
2097+
struct desc_struct new_desc;
20992098
u8 cpl = ctxt->ops->cpl(ctxt);
21002099

2101-
/* Assignment of RIP may only fail in 64-bit mode */
2102-
if (ctxt->mode == X86EMUL_MODE_PROT64)
2103-
ops->get_segment(ctxt, &old_sel, &old_desc, NULL,
2104-
VCPU_SREG_CS);
2105-
21062100
memcpy(&sel, ctxt->src.valptr + ctxt->op_bytes, 2);
21072101

21082102
rc = __load_segment_descriptor(ctxt, sel, VCPU_SREG_CS, cpl,
@@ -2112,12 +2106,10 @@ static int em_jmp_far(struct x86_emulate_ctxt *ctxt)
21122106
return rc;
21132107

21142108
rc = assign_eip_far(ctxt, ctxt->src.val, &new_desc);
2115-
if (rc != X86EMUL_CONTINUE) {
2116-
WARN_ON(ctxt->mode != X86EMUL_MODE_PROT64);
2117-
/* assigning eip failed; restore the old cs */
2118-
ops->set_segment(ctxt, old_sel, &old_desc, 0, VCPU_SREG_CS);
2119-
return rc;
2120-
}
2109+
/* Error handling is not implemented. */
2110+
if (rc != X86EMUL_CONTINUE)
2111+
return X86EMUL_UNHANDLEABLE;
2112+
21212113
return rc;
21222114
}
21232115

@@ -2177,14 +2169,8 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt)
21772169
{
21782170
int rc;
21792171
unsigned long eip, cs;
2180-
u16 old_cs;
21812172
int cpl = ctxt->ops->cpl(ctxt);
2182-
struct desc_struct old_desc, new_desc;
2183-
const struct x86_emulate_ops *ops = ctxt->ops;
2184-
2185-
if (ctxt->mode == X86EMUL_MODE_PROT64)
2186-
ops->get_segment(ctxt, &old_cs, &old_desc, NULL,
2187-
VCPU_SREG_CS);
2173+
struct desc_struct new_desc;
21882174

21892175
rc = emulate_pop(ctxt, &eip, ctxt->op_bytes);
21902176
if (rc != X86EMUL_CONTINUE)
@@ -2201,10 +2187,10 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt)
22012187
if (rc != X86EMUL_CONTINUE)
22022188
return rc;
22032189
rc = assign_eip_far(ctxt, eip, &new_desc);
2204-
if (rc != X86EMUL_CONTINUE) {
2205-
WARN_ON(ctxt->mode != X86EMUL_MODE_PROT64);
2206-
ops->set_segment(ctxt, old_cs, &old_desc, 0, VCPU_SREG_CS);
2207-
}
2190+
/* Error handling is not implemented. */
2191+
if (rc != X86EMUL_CONTINUE)
2192+
return X86EMUL_UNHANDLEABLE;
2193+
22082194
return rc;
22092195
}
22102196

arch/x86/kvm/irq_comm.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ static int kvm_set_pic_irq(struct kvm_kernel_irq_routing_entry *e,
3838
bool line_status)
3939
{
4040
struct kvm_pic *pic = pic_irqchip(kvm);
41+
42+
/*
43+
* XXX: rejecting pic routes when pic isn't in use would be better,
44+
* but the default routing table is installed while kvm->arch.vpic is
45+
* NULL and KVM_CREATE_IRQCHIP can race with KVM_IRQ_LINE.
46+
*/
47+
if (!pic)
48+
return -1;
49+
4150
return kvm_pic_set_irq(pic, e->irqchip.pin, irq_source_id, level);
4251
}
4352

@@ -46,6 +55,10 @@ static int kvm_set_ioapic_irq(struct kvm_kernel_irq_routing_entry *e,
4655
bool line_status)
4756
{
4857
struct kvm_ioapic *ioapic = kvm->arch.vioapic;
58+
59+
if (!ioapic)
60+
return -1;
61+
4962
return kvm_ioapic_set_irq(ioapic, e->irqchip.pin, irq_source_id, level,
5063
line_status);
5164
}

drivers/gpu/drm/radeon/atombios_crtc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
275275
atombios_enable_crtc_memreq(crtc, ATOM_ENABLE);
276276
atombios_blank_crtc(crtc, ATOM_DISABLE);
277277
drm_vblank_post_modeset(dev, radeon_crtc->crtc_id);
278+
/* Make sure vblank interrupt is still enabled if needed */
279+
radeon_irq_set(rdev);
278280
radeon_crtc_load_lut(crtc);
279281
break;
280282
case DRM_MODE_DPMS_STANDBY:

drivers/gpu/drm/radeon/radeon_legacy_crtc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,8 @@ static void radeon_crtc_dpms(struct drm_crtc *crtc, int mode)
331331
WREG32_P(RADEON_CRTC_EXT_CNTL, crtc_ext_cntl, ~(mask | crtc_ext_cntl));
332332
}
333333
drm_vblank_post_modeset(dev, radeon_crtc->crtc_id);
334+
/* Make sure vblank interrupt is still enabled if needed */
335+
radeon_irq_set(rdev);
334336
radeon_crtc_load_lut(crtc);
335337
break;
336338
case DRM_MODE_DPMS_STANDBY:

0 commit comments

Comments
 (0)