Skip to content

Commit 7be141d

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: "A couple of EFI fixes, plus misc fixes all around the map" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/arm64: Store Runtime Services revision firmware: Do not use WARN_ON(!spin_is_locked()) x86_32, entry: Clean up sysenter_badsys declaration x86/doc: Fix the 'tlb_single_page_flush_ceiling' sysconfig path x86/mm: Fix sparse 'tlb_single_page_flush_ceiling' warning and make the variable read-mostly x86/mm: Fix RCU splat from new TLB tracepoints
2 parents 44744bb + 80b304f commit 7be141d

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

Documentation/x86/tlb.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ invlpg instruction (or instructions _near_ it) show up high in
3535
profiles. If you believe that individual invalidations being
3636
called too often, you can lower the tunable:
3737

38-
/sys/debug/kernel/x86/tlb_single_page_flush_ceiling
38+
/sys/kernel/debug/x86/tlb_single_page_flush_ceiling
3939

4040
This will cause us to do the global flush for more cases.
4141
Lowering it to 0 will disable the use of the individual flushes.

arch/arm64/kernel/efi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,8 @@ static int __init arm64_enter_virtual_mode(void)
465465
efi_native_runtime_setup();
466466
set_bit(EFI_RUNTIME_SERVICES, &efi.flags);
467467

468+
efi.runtime_version = efi.systab->hdr.revision;
469+
468470
return 0;
469471

470472
err_unmap:

arch/x86/kernel/entry_32.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ END(syscall_badsys)
683683
sysenter_badsys:
684684
movl $-ENOSYS,%eax
685685
jmp sysenter_after_call
686-
END(syscall_badsys)
686+
END(sysenter_badsys)
687687
CFI_ENDPROC
688688

689689
.macro FIXUP_ESPFIX_STACK

arch/x86/mm/tlb.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ void leave_mm(int cpu)
4949
if (cpumask_test_cpu(cpu, mm_cpumask(active_mm))) {
5050
cpumask_clear_cpu(cpu, mm_cpumask(active_mm));
5151
load_cr3(swapper_pg_dir);
52-
trace_tlb_flush(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);
52+
/*
53+
* This gets called in the idle path where RCU
54+
* functions differently. Tracing normally
55+
* uses RCU, so we have to call the tracepoint
56+
* specially here.
57+
*/
58+
trace_tlb_flush_rcuidle(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);
5359
}
5460
}
5561
EXPORT_SYMBOL_GPL(leave_mm);
@@ -174,7 +180,7 @@ void flush_tlb_current_task(void)
174180
*
175181
* This is in units of pages.
176182
*/
177-
unsigned long tlb_single_page_flush_ceiling = 33;
183+
static unsigned long tlb_single_page_flush_ceiling __read_mostly = 33;
178184

179185
void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
180186
unsigned long end, unsigned long vmflag)

drivers/firmware/efi/vars.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ EXPORT_SYMBOL_GPL(efivar_entry_remove);
481481
*/
482482
static void efivar_entry_list_del_unlock(struct efivar_entry *entry)
483483
{
484-
WARN_ON(!spin_is_locked(&__efivars->lock));
484+
lockdep_assert_held(&__efivars->lock);
485485

486486
list_del(&entry->list);
487487
spin_unlock_irq(&__efivars->lock);
@@ -507,7 +507,7 @@ int __efivar_entry_delete(struct efivar_entry *entry)
507507
const struct efivar_operations *ops = __efivars->ops;
508508
efi_status_t status;
509509

510-
WARN_ON(!spin_is_locked(&__efivars->lock));
510+
lockdep_assert_held(&__efivars->lock);
511511

512512
status = ops->set_variable(entry->var.VariableName,
513513
&entry->var.VendorGuid,
@@ -667,7 +667,7 @@ struct efivar_entry *efivar_entry_find(efi_char16_t *name, efi_guid_t guid,
667667
int strsize1, strsize2;
668668
bool found = false;
669669

670-
WARN_ON(!spin_is_locked(&__efivars->lock));
670+
lockdep_assert_held(&__efivars->lock);
671671

672672
list_for_each_entry_safe(entry, n, head, list) {
673673
strsize1 = ucs2_strsize(name, 1024);
@@ -739,7 +739,7 @@ int __efivar_entry_get(struct efivar_entry *entry, u32 *attributes,
739739
const struct efivar_operations *ops = __efivars->ops;
740740
efi_status_t status;
741741

742-
WARN_ON(!spin_is_locked(&__efivars->lock));
742+
lockdep_assert_held(&__efivars->lock);
743743

744744
status = ops->get_variable(entry->var.VariableName,
745745
&entry->var.VendorGuid,

0 commit comments

Comments
 (0)