Skip to content

Commit eaf2a47

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2 parents c829f5f + 6296789 commit eaf2a47

78 files changed

Lines changed: 755 additions & 284 deletions

Some content is hidden

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

‎MAINTAINERS‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16689,6 +16689,24 @@ T: git git://linuxtv.org/media_tree.git
1668916689
S: Maintained
1669016690
F: drivers/media/tuners/tuner-xc2028.*
1669116691

16692+
XDP (eXpress Data Path)
16693+
M: Alexei Starovoitov <ast@kernel.org>
16694+
M: Daniel Borkmann <daniel@iogearbox.net>
16695+
M: David S. Miller <davem@davemloft.net>
16696+
M: Jakub Kicinski <jakub.kicinski@netronome.com>
16697+
M: Jesper Dangaard Brouer <hawk@kernel.org>
16698+
M: John Fastabend <john.fastabend@gmail.com>
16699+
L: netdev@vger.kernel.org
16700+
L: xdp-newbies@vger.kernel.org
16701+
S: Supported
16702+
F: net/core/xdp.c
16703+
F: include/net/xdp.h
16704+
F: kernel/bpf/devmap.c
16705+
F: kernel/bpf/cpumap.c
16706+
F: include/trace/events/xdp.h
16707+
K: xdp
16708+
N: xdp
16709+
1669216710
XDP SOCKETS (AF_XDP)
1669316711
M: Björn Töpel <bjorn.topel@intel.com>
1669416712
M: Magnus Karlsson <magnus.karlsson@intel.com>

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
VERSION = 5
33
PATCHLEVEL = 0
44
SUBLEVEL = 0
5-
EXTRAVERSION = -rc3
5+
EXTRAVERSION = -rc4
66
NAME = Shy Crocodile
77

88
# *DOCUMENTATION*

‎arch/x86/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ config X86
198198
select IRQ_FORCED_THREADING
199199
select NEED_SG_DMA_LENGTH
200200
select PCI_DOMAINS if PCI
201-
select PCI_LOCKLESS_CONFIG
201+
select PCI_LOCKLESS_CONFIG if PCI
202202
select PERF_EVENTS
203203
select RTC_LIB
204204
select RTC_MC146818_LIB

‎arch/x86/entry/entry_64_compat.S‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ ENTRY(entry_INT80_compat)
361361

362362
/* Need to switch before accessing the thread stack. */
363363
SWITCH_TO_KERNEL_CR3 scratch_reg=%rdi
364-
movq %rsp, %rdi
364+
/* In the Xen PV case we already run on the thread stack. */
365+
ALTERNATIVE "movq %rsp, %rdi", "jmp .Lint80_keep_stack", X86_FEATURE_XENPV
365366
movq PER_CPU_VAR(cpu_current_top_of_stack), %rsp
366367

367368
pushq 6*8(%rdi) /* regs->ss */
@@ -370,8 +371,9 @@ ENTRY(entry_INT80_compat)
370371
pushq 3*8(%rdi) /* regs->cs */
371372
pushq 2*8(%rdi) /* regs->ip */
372373
pushq 1*8(%rdi) /* regs->orig_ax */
373-
374374
pushq (%rdi) /* pt_regs->di */
375+
.Lint80_keep_stack:
376+
375377
pushq %rsi /* pt_regs->si */
376378
xorl %esi, %esi /* nospec si */
377379
pushq %rdx /* pt_regs->dx */

‎arch/x86/include/asm/mmu_context.h‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ static inline void switch_ldt(struct mm_struct *prev, struct mm_struct *next)
178178

179179
void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk);
180180

181+
/*
182+
* Init a new mm. Used on mm copies, like at fork()
183+
* and on mm's that are brand-new, like at execve().
184+
*/
181185
static inline int init_new_context(struct task_struct *tsk,
182186
struct mm_struct *mm)
183187
{
@@ -228,8 +232,22 @@ do { \
228232
} while (0)
229233
#endif
230234

235+
static inline void arch_dup_pkeys(struct mm_struct *oldmm,
236+
struct mm_struct *mm)
237+
{
238+
#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
239+
if (!cpu_feature_enabled(X86_FEATURE_OSPKE))
240+
return;
241+
242+
/* Duplicate the oldmm pkey state in mm: */
243+
mm->context.pkey_allocation_map = oldmm->context.pkey_allocation_map;
244+
mm->context.execute_only_pkey = oldmm->context.execute_only_pkey;
245+
#endif
246+
}
247+
231248
static inline int arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm)
232249
{
250+
arch_dup_pkeys(oldmm, mm);
233251
paravirt_arch_dup_mmap(oldmm, mm);
234252
return ldt_dup_context(oldmm, mm);
235253
}

‎arch/x86/kernel/crash.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ int crash_load_segments(struct kimage *image)
470470

471471
kbuf.memsz = kbuf.bufsz;
472472
kbuf.buf_align = ELF_CORE_HEADER_ALIGN;
473+
kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
473474
ret = kexec_add_buffer(&kbuf);
474475
if (ret) {
475476
vfree((void *)image->arch.elf_headers);

‎arch/x86/kernel/hpet.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121

2222
#define HPET_MASK CLOCKSOURCE_MASK(32)
2323

24-
/* FSEC = 10^-15
25-
NSEC = 10^-9 */
26-
#define FSEC_PER_NSEC 1000000L
27-
2824
#define HPET_DEV_USED_BIT 2
2925
#define HPET_DEV_USED (1 << HPET_DEV_USED_BIT)
3026
#define HPET_DEV_VALID 0x8

‎arch/x86/kernel/kexec-bzimage64.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
434434
kbuf.memsz = PAGE_ALIGN(header->init_size);
435435
kbuf.buf_align = header->kernel_alignment;
436436
kbuf.buf_min = MIN_KERNEL_LOAD_ADDR;
437+
kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
437438
ret = kexec_add_buffer(&kbuf);
438439
if (ret)
439440
goto out_free_params;
@@ -448,6 +449,7 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
448449
kbuf.bufsz = kbuf.memsz = initrd_len;
449450
kbuf.buf_align = PAGE_SIZE;
450451
kbuf.buf_min = MIN_INITRD_LOAD_ADDR;
452+
kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
451453
ret = kexec_add_buffer(&kbuf);
452454
if (ret)
453455
goto out_free_params;

‎arch/x86/kernel/tsc.c‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,16 @@ static int __init tsc_setup(char *str)
297297

298298
__setup("tsc=", tsc_setup);
299299

300-
#define MAX_RETRIES 5
301-
#define SMI_TRESHOLD 50000
300+
#define MAX_RETRIES 5
301+
#define TSC_DEFAULT_THRESHOLD 0x20000
302302

303303
/*
304-
* Read TSC and the reference counters. Take care of SMI disturbance
304+
* Read TSC and the reference counters. Take care of any disturbances
305305
*/
306306
static u64 tsc_read_refs(u64 *p, int hpet)
307307
{
308308
u64 t1, t2;
309+
u64 thresh = tsc_khz ? tsc_khz >> 5 : TSC_DEFAULT_THRESHOLD;
309310
int i;
310311

311312
for (i = 0; i < MAX_RETRIES; i++) {
@@ -315,7 +316,7 @@ static u64 tsc_read_refs(u64 *p, int hpet)
315316
else
316317
*p = acpi_pm_read_early();
317318
t2 = get_cycles();
318-
if ((t2 - t1) < SMI_TRESHOLD)
319+
if ((t2 - t1) < thresh)
319320
return t2;
320321
}
321322
return ULLONG_MAX;
@@ -703,15 +704,15 @@ static unsigned long pit_hpet_ptimer_calibrate_cpu(void)
703704
* zero. In each wait loop iteration we read the TSC and check
704705
* the delta to the previous read. We keep track of the min
705706
* and max values of that delta. The delta is mostly defined
706-
* by the IO time of the PIT access, so we can detect when a
707-
* SMI/SMM disturbance happened between the two reads. If the
707+
* by the IO time of the PIT access, so we can detect when
708+
* any disturbance happened between the two reads. If the
708709
* maximum time is significantly larger than the minimum time,
709710
* then we discard the result and have another try.
710711
*
711712
* 2) Reference counter. If available we use the HPET or the
712713
* PMTIMER as a reference to check the sanity of that value.
713714
* We use separate TSC readouts and check inside of the
714-
* reference read for a SMI/SMM disturbance. We dicard
715+
* reference read for any possible disturbance. We dicard
715716
* disturbed values here as well. We do that around the PIT
716717
* calibration delay loop as we have to wait for a certain
717718
* amount of time anyway.
@@ -744,7 +745,7 @@ static unsigned long pit_hpet_ptimer_calibrate_cpu(void)
744745
if (ref1 == ref2)
745746
continue;
746747

747-
/* Check, whether the sampling was disturbed by an SMI */
748+
/* Check, whether the sampling was disturbed */
748749
if (tsc1 == ULLONG_MAX || tsc2 == ULLONG_MAX)
749750
continue;
750751

@@ -1268,7 +1269,7 @@ static DECLARE_DELAYED_WORK(tsc_irqwork, tsc_refine_calibration_work);
12681269
*/
12691270
static void tsc_refine_calibration_work(struct work_struct *work)
12701271
{
1271-
static u64 tsc_start = -1, ref_start;
1272+
static u64 tsc_start = ULLONG_MAX, ref_start;
12721273
static int hpet;
12731274
u64 tsc_stop, ref_stop, delta;
12741275
unsigned long freq;
@@ -1283,14 +1284,15 @@ static void tsc_refine_calibration_work(struct work_struct *work)
12831284
* delayed the first time we expire. So set the workqueue
12841285
* again once we know timers are working.
12851286
*/
1286-
if (tsc_start == -1) {
1287+
if (tsc_start == ULLONG_MAX) {
1288+
restart:
12871289
/*
12881290
* Only set hpet once, to avoid mixing hardware
12891291
* if the hpet becomes enabled later.
12901292
*/
12911293
hpet = is_hpet_enabled();
1292-
schedule_delayed_work(&tsc_irqwork, HZ);
12931294
tsc_start = tsc_read_refs(&ref_start, hpet);
1295+
schedule_delayed_work(&tsc_irqwork, HZ);
12941296
return;
12951297
}
12961298

@@ -1300,9 +1302,9 @@ static void tsc_refine_calibration_work(struct work_struct *work)
13001302
if (ref_start == ref_stop)
13011303
goto out;
13021304

1303-
/* Check, whether the sampling was disturbed by an SMI */
1304-
if (tsc_start == ULLONG_MAX || tsc_stop == ULLONG_MAX)
1305-
goto out;
1305+
/* Check, whether the sampling was disturbed */
1306+
if (tsc_stop == ULLONG_MAX)
1307+
goto restart;
13061308

13071309
delta = tsc_stop - tsc_start;
13081310
delta *= 1000000LL;

‎arch/x86/lib/kaslr.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ static inline u16 i8254(void)
3636
u16 status, timer;
3737

3838
do {
39-
outb(I8254_PORT_CONTROL,
40-
I8254_CMD_READBACK | I8254_SELECT_COUNTER0);
39+
outb(I8254_CMD_READBACK | I8254_SELECT_COUNTER0,
40+
I8254_PORT_CONTROL);
4141
status = inb(I8254_PORT_COUNTER0);
4242
timer = inb(I8254_PORT_COUNTER0);
4343
timer |= inb(I8254_PORT_COUNTER0) << 8;

0 commit comments

Comments
 (0)