Skip to content

Commit 1930048

Browse files
committed
Merge tag 'x86_cleanups_for_6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Dave Hansen: "As usual, these are all over the map. The biggest cluster is work from Arnd to eliminate -Wmissing-prototype warnings: - Address -Wmissing-prototype warnings - Remove repeated 'the' in comments - Remove unused current_untag_mask() - Document urgent tip branch timing - Clean up MSR kernel-doc notation - Clean up paravirt_ops doc - Update Srivatsa S. Bhat's maintained areas - Remove unused extern declaration acpi_copy_wakeup_routine()" * tag 'x86_cleanups_for_6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits) x86/acpi: Remove unused extern declaration acpi_copy_wakeup_routine() Documentation: virt: Clean up paravirt_ops doc x86/mm: Remove unused current_untag_mask() x86/mm: Remove repeated word in comments x86/lib/msr: Clean up kernel-doc notation x86/platform: Avoid missing-prototype warnings for OLPC x86/mm: Add early_memremap_pgprot_adjust() prototype x86/usercopy: Include arch_wb_cache_pmem() declaration x86/vdso: Include vdso/processor.h x86/mce: Add copy_mc_fragile_handle_tail() prototype x86/fbdev: Include asm/fb.h as needed x86/hibernate: Declare global functions in suspend.h x86/entry: Add do_SYSENTER_32() prototype x86/quirks: Include linux/pnp.h for arch_pnpbios_disabled() x86/mm: Include asm/numa.h for set_highmem_pages_init() x86: Avoid missing-prototype warnings for doublefault code x86/fpu: Include asm/fpu/regset.h x86: Add dummy prototype for mk_early_pgtbl_32() x86/pci: Mark local functions as 'static' x86/ftrace: Move prepare_ftrace_return prototype to header ...
2 parents 5dfe7a7 + b360cbd commit 1930048

28 files changed

+78
-54
lines changed

CREDITS

+6
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@ E: [email protected]
383383
W: http://tomas.nocrew.org/
384384
D: dsp56k device driver
385385

386+
N: Srivatsa S. Bhat
387+
388+
D: Maintainer of Generic Paravirt-Ops subsystem
389+
D: Maintainer of VMware hypervisor interface
390+
D: Maintainer of VMware virtual PTP clock driver (ptp_vmw)
391+
386392
N: Ross Biro
387393
388394
D: Original author of the Linux networking code

Documentation/process/maintainer-tip.rst

+3
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@ allowing themselves a breath. Please respect that.
421421
The release candidate -rc1 is the starting point for new patches to be
422422
applied which are targeted for the next merge window.
423423

424+
So called _urgent_ branches will be merged into mainline during the
425+
stabilization phase of each release.
426+
424427

425428
Git
426429
^^^

Documentation/virt/paravirt_ops.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ Paravirt_ops
55
============
66

77
Linux provides support for different hypervisor virtualization technologies.
8-
Historically different binary kernels would be required in order to support
9-
different hypervisors, this restriction was removed with pv_ops.
8+
Historically, different binary kernels would be required in order to support
9+
different hypervisors; this restriction was removed with pv_ops.
1010
Linux pv_ops is a virtualization API which enables support for different
1111
hypervisors. It allows each hypervisor to override critical operations and
1212
allows a single kernel binary to run on all supported execution environments
1313
including native machine -- without any hypervisors.
1414

1515
pv_ops provides a set of function pointers which represent operations
16-
corresponding to low level critical instructions and high level
17-
functionalities in various areas. pv-ops allows for optimizations at run
18-
time by enabling binary patching of the low-ops critical operations
16+
corresponding to low-level critical instructions and high-level
17+
functionalities in various areas. pv_ops allows for optimizations at run
18+
time by enabling binary patching of the low-level critical operations
1919
at boot time.
2020

2121
pv_ops operations are classified into three categories:
2222

2323
- simple indirect call
24-
These operations correspond to high level functionality where it is
24+
These operations correspond to high-level functionality where it is
2525
known that the overhead of indirect call isn't very important.
2626

2727
- indirect call which allows optimization with binary patch
28-
Usually these operations correspond to low level critical instructions. They
28+
Usually these operations correspond to low-level critical instructions. They
2929
are called frequently and are performance critical. The overhead is
3030
very important.
3131

3232
- a set of macros for hand written assembly code
3333
Hand written assembly codes (.S files) also need paravirtualization
34-
because they include sensitive instructions or some of code paths in
34+
because they include sensitive instructions or some code paths in
3535
them are very performance critical.

MAINTAINERS

+3-3
Original file line numberDiff line numberDiff line change
@@ -15974,7 +15974,7 @@ F: include/uapi/linux/ppdev.h
1597415974

1597515975
PARAVIRT_OPS INTERFACE
1597615976
M: Juergen Gross <[email protected]>
15977-
M: Srivatsa S. Bhat (VMware) <[email protected]>
15977+
R: Ajay Kaher <[email protected]>
1597815978
R: Alexey Makhalov <[email protected]>
1597915979
R: VMware PV-Drivers Reviewers <[email protected]>
1598015980
@@ -22546,7 +22546,7 @@ S: Supported
2254622546
F: drivers/misc/vmw_balloon.c
2254722547

2254822548
VMWARE HYPERVISOR INTERFACE
22549-
M: Srivatsa S. Bhat (VMware) <[email protected]>
22549+
M: Ajay Kaher <[email protected]>
2255022550
M: Alexey Makhalov <[email protected]>
2255122551
R: VMware PV-Drivers Reviewers <[email protected]>
2255222552
@@ -22573,8 +22573,8 @@ F: drivers/scsi/vmw_pvscsi.c
2257322573
F: drivers/scsi/vmw_pvscsi.h
2257422574

2257522575
VMWARE VIRTUAL PTP CLOCK DRIVER
22576-
M: Srivatsa S. Bhat (VMware) <[email protected]>
2257722576
M: Deep Shah <[email protected]>
22577+
R: Ajay Kaher <[email protected]>
2257822578
R: Alexey Makhalov <[email protected]>
2257922579
R: VMware PV-Drivers Reviewers <[email protected]>
2258022580

arch/x86/entry/vdso/vgetcpu.c

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/kernel.h>
99
#include <linux/getcpu.h>
1010
#include <asm/segment.h>
11+
#include <vdso/processor.h>
1112

1213
notrace long
1314
__vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)

arch/x86/include/asm/doublefault.h

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#ifndef _ASM_X86_DOUBLEFAULT_H
33
#define _ASM_X86_DOUBLEFAULT_H
44

5+
#include <linux/linkage.h>
6+
57
#ifdef CONFIG_X86_32
68
extern void doublefault_init_cpu_tss(void);
79
#else
@@ -10,4 +12,6 @@ static inline void doublefault_init_cpu_tss(void)
1012
}
1113
#endif
1214

15+
asmlinkage void __noreturn doublefault_shim(void);
16+
1317
#endif /* _ASM_X86_DOUBLEFAULT_H */

arch/x86/include/asm/ftrace.h

+3
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ struct dyn_arch_ftrace {
106106

107107
#ifndef __ASSEMBLY__
108108

109+
void prepare_ftrace_return(unsigned long ip, unsigned long *parent,
110+
unsigned long frame_pointer);
111+
109112
#if defined(CONFIG_FUNCTION_TRACER) && defined(CONFIG_DYNAMIC_FTRACE)
110113
extern void set_ftrace_ops_ro(void);
111114
#else

arch/x86/include/asm/mce.h

+3
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,7 @@ static inline void mce_amd_feature_init(struct cpuinfo_x86 *c) { }
350350
#endif
351351

352352
static inline void mce_hygon_feature_init(struct cpuinfo_x86 *c) { return mce_amd_feature_init(c); }
353+
354+
unsigned long copy_mc_fragile_handle_tail(char *to, char *from, unsigned len);
355+
353356
#endif /* _ASM_X86_MCE_H */

arch/x86/include/asm/syscall.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,11 @@ static inline int syscall_get_arch(struct task_struct *task)
127127
}
128128

129129
void do_syscall_64(struct pt_regs *regs, int nr);
130-
void do_int80_syscall_32(struct pt_regs *regs);
131-
long do_fast_syscall_32(struct pt_regs *regs);
132130

133131
#endif /* CONFIG_X86_32 */
134132

133+
void do_int80_syscall_32(struct pt_regs *regs);
134+
long do_fast_syscall_32(struct pt_regs *regs);
135+
long do_SYSENTER_32(struct pt_regs *regs);
136+
135137
#endif /* _ASM_X86_SYSCALL_H */

arch/x86/include/asm/tlbflush.h

+2-9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include <asm/processor-flags.h>
1515
#include <asm/pgtable.h>
1616

17+
DECLARE_PER_CPU(u64, tlbstate_untag_mask);
18+
1719
void __flush_tlb_all(void);
1820

1921
#define TLB_FLUSH_ALL -1UL
@@ -54,15 +56,6 @@ static inline void cr4_clear_bits(unsigned long mask)
5456
local_irq_restore(flags);
5557
}
5658

57-
#ifdef CONFIG_ADDRESS_MASKING
58-
DECLARE_PER_CPU(u64, tlbstate_untag_mask);
59-
60-
static inline u64 current_untag_mask(void)
61-
{
62-
return this_cpu_read(tlbstate_untag_mask);
63-
}
64-
#endif
65-
6659
#ifndef MODULE
6760
/*
6861
* 6 because 6 should be plenty and struct tlb_state will fit in two cache

arch/x86/kernel/acpi/sleep.h

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ extern int wakeup_pmode_return;
1212

1313
extern u8 wake_sleep_flags;
1414

15-
extern unsigned long acpi_copy_wakeup_routine(unsigned long);
1615
extern void wakeup_long64(void);
1716

1817
extern void do_suspend_lowlevel(void);

arch/x86/kernel/doublefault_32.c

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <asm/processor.h>
1010
#include <asm/desc.h>
1111
#include <asm/traps.h>
12+
#include <asm/doublefault.h>
1213

1314
#define ptr_ok(x) ((x) > PAGE_OFFSET && (x) < PAGE_OFFSET + MAXMEM)
1415

arch/x86/kernel/ftrace.c

-3
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,6 @@ static void *addr_from_call(void *ptr)
525525
return ptr + CALL_INSN_SIZE + call.disp;
526526
}
527527

528-
void prepare_ftrace_return(unsigned long ip, unsigned long *parent,
529-
unsigned long frame_pointer);
530-
531528
/*
532529
* If the ops->trampoline was not allocated, then it probably
533530
* has a static trampoline func, or is the ftrace caller itself.

arch/x86/kernel/head32.c

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ asmlinkage __visible void __init __noreturn i386_start_kernel(void)
6969
* to the first kernel PMD. Note the upper half of each PMD or PTE are
7070
* always zero at this stage.
7171
*/
72+
void __init mk_early_pgtbl_32(void);
7273
void __init mk_early_pgtbl_32(void)
7374
{
7475
#ifdef __pa

arch/x86/kernel/platform-quirks.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <linux/kernel.h>
33
#include <linux/init.h>
4+
#include <linux/pnp.h>
45

56
#include <asm/setup.h>
67
#include <asm/bios_ebda.h>

arch/x86/lib/msr.c

+19-13
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ void msrs_free(struct msr *msrs)
2727
EXPORT_SYMBOL(msrs_free);
2828

2929
/**
30-
* Read an MSR with error handling
31-
*
30+
* msr_read - Read an MSR with error handling
3231
* @msr: MSR to read
3332
* @m: value to read into
3433
*
3534
* It returns read data only on success, otherwise it doesn't change the output
3635
* argument @m.
3736
*
37+
* Return: %0 for success, otherwise an error code
3838
*/
3939
static int msr_read(u32 msr, struct msr *m)
4040
{
@@ -49,10 +49,12 @@ static int msr_read(u32 msr, struct msr *m)
4949
}
5050

5151
/**
52-
* Write an MSR with error handling
52+
* msr_write - Write an MSR with error handling
5353
*
5454
* @msr: MSR to write
5555
* @m: value to write
56+
*
57+
* Return: %0 for success, otherwise an error code
5658
*/
5759
static int msr_write(u32 msr, struct msr *m)
5860
{
@@ -88,25 +90,29 @@ static inline int __flip_bit(u32 msr, u8 bit, bool set)
8890
}
8991

9092
/**
91-
* Set @bit in a MSR @msr.
93+
* msr_set_bit - Set @bit in a MSR @msr.
94+
* @msr: MSR to write
95+
* @bit: bit number to set
9296
*
93-
* Retval:
94-
* < 0: An error was encountered.
95-
* = 0: Bit was already set.
96-
* > 0: Hardware accepted the MSR write.
97+
* Return:
98+
* * < 0: An error was encountered.
99+
* * = 0: Bit was already set.
100+
* * > 0: Hardware accepted the MSR write.
97101
*/
98102
int msr_set_bit(u32 msr, u8 bit)
99103
{
100104
return __flip_bit(msr, bit, true);
101105
}
102106

103107
/**
104-
* Clear @bit in a MSR @msr.
108+
* msr_clear_bit - Clear @bit in a MSR @msr.
109+
* @msr: MSR to write
110+
* @bit: bit number to clear
105111
*
106-
* Retval:
107-
* < 0: An error was encountered.
108-
* = 0: Bit was already cleared.
109-
* > 0: Hardware accepted the MSR write.
112+
* Return:
113+
* * < 0: An error was encountered.
114+
* * = 0: Bit was already cleared.
115+
* * > 0: Hardware accepted the MSR write.
110116
*/
111117
int msr_clear_bit(u32 msr, u8 bit)
112118
{

arch/x86/lib/usercopy_64.c

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <linux/export.h>
1010
#include <linux/uaccess.h>
1111
#include <linux/highmem.h>
12+
#include <linux/libnvdimm.h>
1213

1314
/*
1415
* Zero Userspace

arch/x86/math-emu/fpu_entry.c

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <asm/traps.h>
3333
#include <asm/user.h>
3434
#include <asm/fpu/api.h>
35+
#include <asm/fpu/regset.h>
3536

3637
#include "fpu_system.h"
3738
#include "fpu_emu.h"

arch/x86/mm/highmem_32.c

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/export.h>
44
#include <linux/swap.h> /* for totalram_pages */
55
#include <linux/memblock.h>
6+
#include <asm/numa.h>
67

78
void __init set_highmem_pages_init(void)
89
{

arch/x86/mm/pat/set_memory.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ within_inclusive(unsigned long addr, unsigned long start, unsigned long end)
232232
* points to #2, but almost all physical-to-virtual translations point to #1.
233233
*
234234
* This is so that we can have both a directmap of all physical memory *and*
235-
* take full advantage of the the limited (s32) immediate addressing range (2G)
235+
* take full advantage of the limited (s32) immediate addressing range (2G)
236236
* of x86_64.
237237
*
238238
* See Documentation/arch/x86/x86_64/mm.rst for more detail.

arch/x86/pci/ce4100.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static void ehci_reg_read(struct sim_dev_reg *reg, u32 *value)
8383
*value |= 0x100;
8484
}
8585

86-
void sata_revid_init(struct sim_dev_reg *reg)
86+
static void sata_revid_init(struct sim_dev_reg *reg)
8787
{
8888
reg->sim_reg.value = 0x01060100;
8989
reg->sim_reg.mask = 0;
@@ -172,7 +172,7 @@ static inline void extract_bytes(u32 *value, int reg, int len)
172172
*value &= mask;
173173
}
174174

175-
int bridge_read(unsigned int devfn, int reg, int len, u32 *value)
175+
static int bridge_read(unsigned int devfn, int reg, int len, u32 *value)
176176
{
177177
u32 av_bridge_base, av_bridge_limit;
178178
int retval = 0;

arch/x86/platform/olpc/olpc_dt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static int __init olpc_dt_compatible_match(phandle node, const char *compat)
234234
return 0;
235235
}
236236

237-
void __init olpc_dt_fixup(void)
237+
static void __init olpc_dt_fixup(void)
238238
{
239239
phandle node;
240240
u32 board_rev;

arch/x86/video/fbdev.c

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/pci.h>
1111
#include <linux/module.h>
1212
#include <linux/vgaarb.h>
13+
#include <asm/fb.h>
1314

1415
int fb_is_primary_device(struct fb_info *info)
1516
{

include/linux/io.h

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ void *devm_memremap(struct device *dev, resource_size_t offset,
6868
size_t size, unsigned long flags);
6969
void devm_memunmap(struct device *dev, void *addr);
7070

71+
/* architectures can override this */
72+
pgprot_t __init early_memremap_pgprot_adjust(resource_size_t phys_addr,
73+
unsigned long size, pgprot_t prot);
74+
75+
7176
#ifdef CONFIG_PCI
7277
/*
7378
* The PCI specifications (Rev 3.0, 3.2.5 "Transaction Ordering and

include/linux/olpc-ec.h

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ extern int olpc_ec_sci_query(u16 *sci_value);
5656

5757
extern bool olpc_ec_wakeup_available(void);
5858

59+
asmlinkage int xo1_do_sleep(u8 sleep_state);
60+
5961
#else
6062

6163
static inline int olpc_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *outbuf,

include/linux/suspend.h

+4
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ extern struct pbe *restore_pblist;
452452
int pfn_is_nosave(unsigned long pfn);
453453

454454
int hibernate_quiet_exec(int (*func)(void *data), void *data);
455+
int hibernate_resume_nonboot_cpu_disable(void);
456+
int arch_hibernation_header_save(void *addr, unsigned int max_size);
457+
int arch_hibernation_header_restore(void *addr);
458+
455459
#else /* CONFIG_HIBERNATION */
456460
static inline void register_nosave_region(unsigned long b, unsigned long e) {}
457461
static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }

0 commit comments

Comments
 (0)