diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-11-02 22:11:24 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-11-02 22:16:14 +0100 |
commit | 7fa3c36ea2707c495cf31ccab733ac8bf3f9d0c2 (patch) | |
tree | 4d6e7bafb77ea0e327e588581e22eacfba93a155 /arch/x86/entry/vdso/vma.c | |
parent | vdso: Rename struct arch_vdso_data to arch_vdso_time_data (diff) | |
download | linux-7fa3c36ea2707c495cf31ccab733ac8bf3f9d0c2.tar.xz linux-7fa3c36ea2707c495cf31ccab733ac8bf3f9d0c2.zip |
x86/vdso: Add missing brackets in switch case
0-day reported:
arch/x86/entry/vdso/vma.c:199:3: warning: label followed by a declaration
is a C23 extension [-Wc23-extensions]
Add the missing brackets.
Fixes: e93d2521b27f ("x86/vdso: Split virtual clock pages into dedicated mapping")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Closes: https://lore.kernel.org/oe-kbuild-all/202411022359.fBPFTg2T-lkp@intel.com/
Diffstat (limited to 'arch/x86/entry/vdso/vma.c')
-rw-r--r-- | arch/x86/entry/vdso/vma.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c index 7e5921adeed0..bfc7cabf4017 100644 --- a/arch/x86/entry/vdso/vma.c +++ b/arch/x86/entry/vdso/vma.c @@ -196,21 +196,26 @@ static vm_fault_t vvar_vclock_fault(const struct vm_special_mapping *sm, switch (vmf->pgoff) { #ifdef CONFIG_PARAVIRT_CLOCK case VDSO_PAGE_PVCLOCK_OFFSET: + { struct pvclock_vsyscall_time_info *pvti = pvclock_get_pvti_cpu0_va(); + if (pvti && vclock_was_used(VDSO_CLOCKMODE_PVCLOCK)) return vmf_insert_pfn_prot(vma, vmf->address, __pa(pvti) >> PAGE_SHIFT, pgprot_decrypted(vma->vm_page_prot)); break; + } #endif /* CONFIG_PARAVIRT_CLOCK */ #ifdef CONFIG_HYPERV_TIMER case VDSO_PAGE_HVCLOCK_OFFSET: + { unsigned long pfn = hv_get_tsc_pfn(); if (pfn && vclock_was_used(VDSO_CLOCKMODE_HVCLOCK)) return vmf_insert_pfn(vma, vmf->address, pfn); break; + } #endif /* CONFIG_HYPERV_TIMER */ } |