Skip to content

Commit 30d0844

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/mellanox/mlx5/core/en.h drivers/net/ethernet/mellanox/mlx5/core/en_main.c drivers/net/usb/r8152.c All three conflicts were overlapping changes. Signed-off-by: David S. Miller <[email protected]>
2 parents ae3e456 + bc86765 commit 30d0844

File tree

154 files changed

+1455
-618
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+1455
-618
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VERSION = 4
22
PATCHLEVEL = 7
33
SUBLEVEL = 0
4-
EXTRAVERSION = -rc5
4+
EXTRAVERSION = -rc6
55
NAME = Psychotic Stoned Sheep
66

77
# *DOCUMENTATION*

arch/arc/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ endif
6666

6767
endif
6868

69-
cflags-$(CONFIG_ARC_DW2_UNWIND) += -fasynchronous-unwind-tables
70-
7169
# By default gcc 4.8 generates dwarf4 which kernel unwinder can't grok
7270
ifeq ($(atleast_gcc48),y)
7371
cflags-$(CONFIG_ARC_DW2_UNWIND) += -gdwarf-2

arch/arc/kernel/stacktrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs,
142142
* prelogue is setup (callee regs saved and then fp set and not other
143143
* way around
144144
*/
145-
pr_warn("CONFIG_ARC_DW2_UNWIND needs to be enabled\n");
145+
pr_warn_once("CONFIG_ARC_DW2_UNWIND needs to be enabled\n");
146146
return 0;
147147

148148
#endif

arch/arm/kvm/arm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
263263
kvm_timer_vcpu_terminate(vcpu);
264264
kvm_vgic_vcpu_destroy(vcpu);
265265
kvm_pmu_vcpu_destroy(vcpu);
266+
kvm_vcpu_uninit(vcpu);
266267
kmem_cache_free(kvm_vcpu_cache, vcpu);
267268
}
268269

arch/mips/include/asm/pgtable.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct mm_struct;
2424
struct vm_area_struct;
2525

2626
#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_NO_READ | \
27-
_CACHE_CACHABLE_NONCOHERENT)
27+
_page_cachable_default)
2828
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_WRITE | \
2929
_page_cachable_default)
3030
#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_NO_EXEC | \
@@ -476,7 +476,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
476476
pte.pte_low &= (_PAGE_MODIFIED | _PAGE_ACCESSED | _PFNX_MASK);
477477
pte.pte_high &= (_PFN_MASK | _CACHE_MASK);
478478
pte.pte_low |= pgprot_val(newprot) & ~_PFNX_MASK;
479-
pte.pte_high |= pgprot_val(newprot) & ~_PFN_MASK;
479+
pte.pte_high |= pgprot_val(newprot) & ~(_PFN_MASK | _CACHE_MASK);
480480
return pte;
481481
}
482482
#elif defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32)
@@ -491,7 +491,8 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
491491
#else
492492
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
493493
{
494-
return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
494+
return __pte((pte_val(pte) & _PAGE_CHG_MASK) |
495+
(pgprot_val(newprot) & ~_PAGE_CHG_MASK));
495496
}
496497
#endif
497498

@@ -632,7 +633,8 @@ static inline struct page *pmd_page(pmd_t pmd)
632633

633634
static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
634635
{
635-
pmd_val(pmd) = (pmd_val(pmd) & _PAGE_CHG_MASK) | pgprot_val(newprot);
636+
pmd_val(pmd) = (pmd_val(pmd) & _PAGE_CHG_MASK) |
637+
(pgprot_val(newprot) & ~_PAGE_CHG_MASK);
636638
return pmd;
637639
}
638640

arch/powerpc/include/asm/book3s/64/pgtable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ extern unsigned long __kernel_virt_size;
230230
#define KERN_VIRT_SIZE __kernel_virt_size
231231
extern struct page *vmemmap;
232232
extern unsigned long ioremap_bot;
233+
extern unsigned long pci_io_base;
233234
#endif /* __ASSEMBLY__ */
234235

235236
#include <asm/book3s/64/hash.h>

arch/powerpc/kernel/eeh_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
647647
pci_unlock_rescan_remove();
648648
}
649649
} else if (frozen_bus) {
650-
eeh_pe_dev_traverse(pe, eeh_rmv_device, &rmv_data);
650+
eeh_pe_dev_traverse(pe, eeh_rmv_device, rmv_data);
651651
}
652652

653653
/*

arch/powerpc/kernel/pci_64.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ static int __init pcibios_init(void)
4747

4848
printk(KERN_INFO "PCI: Probing PCI hardware\n");
4949

50-
pci_io_base = ISA_IO_BASE;
5150
/* For now, override phys_mem_access_prot. If we need it,g
5251
* later, we may move that initialization to each ppc_md
5352
*/

arch/powerpc/kernel/process.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,6 +1505,16 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
15051505
current->thread.regs = regs - 1;
15061506
}
15071507

1508+
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
1509+
/*
1510+
* Clear any transactional state, we're exec()ing. The cause is
1511+
* not important as there will never be a recheckpoint so it's not
1512+
* user visible.
1513+
*/
1514+
if (MSR_TM_SUSPENDED(mfmsr()))
1515+
tm_reclaim_current(0);
1516+
#endif
1517+
15081518
memset(regs->gpr, 0, sizeof(regs->gpr));
15091519
regs->ctr = 0;
15101520
regs->link = 0;

arch/powerpc/kernel/tm.S

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,11 @@ _GLOBAL(tm_reclaim)
110110
std r3, STK_PARAM(R3)(r1)
111111
SAVE_NVGPRS(r1)
112112

113-
/* We need to setup MSR for VSX register save instructions. Here we
114-
* also clear the MSR RI since when we do the treclaim, we won't have a
115-
* valid kernel pointer for a while. We clear RI here as it avoids
116-
* adding another mtmsr closer to the treclaim. This makes the region
117-
* maked as non-recoverable wider than it needs to be but it saves on
118-
* inserting another mtmsrd later.
119-
*/
113+
/* We need to setup MSR for VSX register save instructions. */
120114
mfmsr r14
121115
mr r15, r14
122116
ori r15, r15, MSR_FP
123-
li r16, MSR_RI
117+
li r16, 0
124118
ori r16, r16, MSR_EE /* IRQs hard off */
125119
andc r15, r15, r16
126120
oris r15, r15, MSR_VEC@h
@@ -176,7 +170,17 @@ dont_backup_fp:
176170
1: tdeqi r6, 0
177171
EMIT_BUG_ENTRY 1b,__FILE__,__LINE__,0
178172

179-
/* The moment we treclaim, ALL of our GPRs will switch
173+
/* Clear MSR RI since we are about to change r1, EE is already off. */
174+
li r4, 0
175+
mtmsrd r4, 1
176+
177+
/*
178+
* BE CAREFUL HERE:
179+
* At this point we can't take an SLB miss since we have MSR_RI
180+
* off. Load only to/from the stack/paca which are in SLB bolted regions
181+
* until we turn MSR RI back on.
182+
*
183+
* The moment we treclaim, ALL of our GPRs will switch
180184
* to user register state. (FPRs, CCR etc. also!)
181185
* Use an sprg and a tm_scratch in the PACA to shuffle.
182186
*/
@@ -197,6 +201,11 @@ dont_backup_fp:
197201

198202
/* Store the PPR in r11 and reset to decent value */
199203
std r11, GPR11(r1) /* Temporary stash */
204+
205+
/* Reset MSR RI so we can take SLB faults again */
206+
li r11, MSR_RI
207+
mtmsrd r11, 1
208+
200209
mfspr r11, SPRN_PPR
201210
HMT_MEDIUM
202211

@@ -397,11 +406,6 @@ restore_gprs:
397406
ld r5, THREAD_TM_DSCR(r3)
398407
ld r6, THREAD_TM_PPR(r3)
399408

400-
/* Clear the MSR RI since we are about to change R1. EE is already off
401-
*/
402-
li r4, 0
403-
mtmsrd r4, 1
404-
405409
REST_GPR(0, r7) /* GPR0 */
406410
REST_2GPRS(2, r7) /* GPR2-3 */
407411
REST_GPR(4, r7) /* GPR4 */
@@ -439,10 +443,33 @@ restore_gprs:
439443
ld r6, _CCR(r7)
440444
mtcr r6
441445

442-
REST_GPR(1, r7) /* GPR1 */
443-
REST_GPR(5, r7) /* GPR5-7 */
444446
REST_GPR(6, r7)
445-
ld r7, GPR7(r7)
447+
448+
/*
449+
* Store r1 and r5 on the stack so that we can access them
450+
* after we clear MSR RI.
451+
*/
452+
453+
REST_GPR(5, r7)
454+
std r5, -8(r1)
455+
ld r5, GPR1(r7)
456+
std r5, -16(r1)
457+
458+
REST_GPR(7, r7)
459+
460+
/* Clear MSR RI since we are about to change r1. EE is already off */
461+
li r5, 0
462+
mtmsrd r5, 1
463+
464+
/*
465+
* BE CAREFUL HERE:
466+
* At this point we can't take an SLB miss since we have MSR_RI
467+
* off. Load only to/from the stack/paca which are in SLB bolted regions
468+
* until we turn MSR RI back on.
469+
*/
470+
471+
ld r5, -8(r1)
472+
ld r1, -16(r1)
446473

447474
/* Commit register state as checkpointed state: */
448475
TRECHKPT

arch/powerpc/mm/hash_utils_64.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,10 @@ void __init hash__early_init_mmu(void)
922922
vmemmap = (struct page *)H_VMEMMAP_BASE;
923923
ioremap_bot = IOREMAP_BASE;
924924

925+
#ifdef CONFIG_PCI
926+
pci_io_base = ISA_IO_BASE;
927+
#endif
928+
925929
/* Initialize the MMU Hash table and create the linear mapping
926930
* of memory. Has to be done before SLB initialization as this is
927931
* currently where the page size encoding is obtained.

arch/powerpc/mm/pgtable-radix.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ void __init radix__early_init_mmu(void)
328328
__vmalloc_end = RADIX_VMALLOC_END;
329329
vmemmap = (struct page *)RADIX_VMEMMAP_BASE;
330330
ioremap_bot = IOREMAP_BASE;
331+
332+
#ifdef CONFIG_PCI
333+
pci_io_base = ISA_IO_BASE;
334+
#endif
335+
331336
/*
332337
* For now radix also use the same frag size
333338
*/

arch/x86/include/asm/pvclock.h

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,23 @@ static inline u64 pvclock_scale_delta(u64 delta, u32 mul_frac, int shift)
6868
return product;
6969
}
7070

71-
static __always_inline
72-
u64 pvclock_get_nsec_offset(const struct pvclock_vcpu_time_info *src)
73-
{
74-
u64 delta = rdtsc_ordered() - src->tsc_timestamp;
75-
return pvclock_scale_delta(delta, src->tsc_to_system_mul,
76-
src->tsc_shift);
77-
}
78-
7971
static __always_inline
8072
unsigned __pvclock_read_cycles(const struct pvclock_vcpu_time_info *src,
8173
cycle_t *cycles, u8 *flags)
8274
{
8375
unsigned version;
84-
cycle_t ret, offset;
85-
u8 ret_flags;
76+
cycle_t offset;
77+
u64 delta;
8678

8779
version = src->version;
80+
/* Make the latest version visible */
81+
smp_rmb();
8882

89-
offset = pvclock_get_nsec_offset(src);
90-
ret = src->system_time + offset;
91-
ret_flags = src->flags;
92-
93-
*cycles = ret;
94-
*flags = ret_flags;
83+
delta = rdtsc_ordered() - src->tsc_timestamp;
84+
offset = pvclock_scale_delta(delta, src->tsc_to_system_mul,
85+
src->tsc_shift);
86+
*cycles = src->system_time + offset;
87+
*flags = src->flags;
9588
return version;
9689
}
9790

arch/x86/kernel/pvclock.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,16 @@ void pvclock_resume(void)
6161
u8 pvclock_read_flags(struct pvclock_vcpu_time_info *src)
6262
{
6363
unsigned version;
64-
cycle_t ret;
6564
u8 flags;
6665

6766
do {
68-
version = __pvclock_read_cycles(src, &ret, &flags);
67+
version = src->version;
68+
/* Make the latest version visible */
69+
smp_rmb();
70+
71+
flags = src->flags;
72+
/* Make sure that the version double-check is last. */
73+
smp_rmb();
6974
} while ((src->version & 1) || version != src->version);
7075

7176
return flags & valid_flags;
@@ -80,6 +85,8 @@ cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src)
8085

8186
do {
8287
version = __pvclock_read_cycles(src, &ret, &flags);
88+
/* Make sure that the version double-check is last. */
89+
smp_rmb();
8390
} while ((src->version & 1) || version != src->version);
8491

8592
if (unlikely((flags & PVCLOCK_GUEST_STOPPED) != 0)) {

arch/x86/kvm/lapic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,8 @@ void wait_lapic_expire(struct kvm_vcpu *vcpu)
13101310

13111311
/* __delay is delay_tsc whenever the hardware has TSC, thus always. */
13121312
if (guest_tsc < tsc_deadline)
1313-
__delay(tsc_deadline - guest_tsc);
1313+
__delay(min(tsc_deadline - guest_tsc,
1314+
nsec_to_cycles(vcpu, lapic_timer_advance_ns)));
13141315
}
13151316

13161317
static void start_apic_timer(struct kvm_lapic *apic)

arch/x86/kvm/vmx.c

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6671,7 +6671,13 @@ static int get_vmx_mem_address(struct kvm_vcpu *vcpu,
66716671

66726672
/* Checks for #GP/#SS exceptions. */
66736673
exn = false;
6674-
if (is_protmode(vcpu)) {
6674+
if (is_long_mode(vcpu)) {
6675+
/* Long mode: #GP(0)/#SS(0) if the memory address is in a
6676+
* non-canonical form. This is the only check on the memory
6677+
* destination for long mode!
6678+
*/
6679+
exn = is_noncanonical_address(*ret);
6680+
} else if (is_protmode(vcpu)) {
66756681
/* Protected mode: apply checks for segment validity in the
66766682
* following order:
66776683
* - segment type check (#GP(0) may be thrown)
@@ -6688,17 +6694,10 @@ static int get_vmx_mem_address(struct kvm_vcpu *vcpu,
66886694
* execute-only code segment
66896695
*/
66906696
exn = ((s.type & 0xa) == 8);
6691-
}
6692-
if (exn) {
6693-
kvm_queue_exception_e(vcpu, GP_VECTOR, 0);
6694-
return 1;
6695-
}
6696-
if (is_long_mode(vcpu)) {
6697-
/* Long mode: #GP(0)/#SS(0) if the memory address is in a
6698-
* non-canonical form. This is an only check for long mode.
6699-
*/
6700-
exn = is_noncanonical_address(*ret);
6701-
} else if (is_protmode(vcpu)) {
6697+
if (exn) {
6698+
kvm_queue_exception_e(vcpu, GP_VECTOR, 0);
6699+
return 1;
6700+
}
67026701
/* Protected mode: #GP(0)/#SS(0) if the segment is unusable.
67036702
*/
67046703
exn = (s.unusable != 0);

arch/x86/kvm/x86.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,12 +1244,6 @@ static atomic_t kvm_guest_has_master_clock = ATOMIC_INIT(0);
12441244
static DEFINE_PER_CPU(unsigned long, cpu_tsc_khz);
12451245
static unsigned long max_tsc_khz;
12461246

1247-
static inline u64 nsec_to_cycles(struct kvm_vcpu *vcpu, u64 nsec)
1248-
{
1249-
return pvclock_scale_delta(nsec, vcpu->arch.virtual_tsc_mult,
1250-
vcpu->arch.virtual_tsc_shift);
1251-
}
1252-
12531247
static u32 adjust_tsc_khz(u32 khz, s32 ppm)
12541248
{
12551249
u64 v = (u64)khz * (1000000 + ppm);

arch/x86/kvm/x86.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define ARCH_X86_KVM_X86_H
33

44
#include <linux/kvm_host.h>
5+
#include <asm/pvclock.h>
56
#include "kvm_cache_regs.h"
67

78
#define MSR_IA32_CR_PAT_DEFAULT 0x0007040600070406ULL
@@ -195,6 +196,12 @@ extern unsigned int lapic_timer_advance_ns;
195196

196197
extern struct static_key kvm_no_apic_vcpu;
197198

199+
static inline u64 nsec_to_cycles(struct kvm_vcpu *vcpu, u64 nsec)
200+
{
201+
return pvclock_scale_delta(nsec, vcpu->arch.virtual_tsc_mult,
202+
vcpu->arch.virtual_tsc_shift);
203+
}
204+
198205
/* Same "calling convention" as do_div:
199206
* - divide (n << 32) by base
200207
* - put result in n

0 commit comments

Comments
 (0)