Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cleanups from Ingo Molnar:
"Misc small cleanups: removal of superfluous code and coding style
cleanups mostly"

* 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/kexec: Make variable static and config dependent
x86/defconfigs: Remove useless UEVENT_HELPER_PATH
x86/amd_nb: Make hygon_nb_misc_ids static
x86/tsc: Move inline keyword to the beginning of function declarations
x86/io_delay: Define IO_DELAY macros in C instead of Kconfig
x86/io_delay: Break instead of fallthrough in switch statement

+33 -61
-44
arch/x86/Kconfig.debug
··· 179 179 decoder code. 180 180 If unsure, say "N". 181 181 182 - # 183 - # IO delay types: 184 - # 185 - 186 - config IO_DELAY_TYPE_0X80 187 - int 188 - default "0" 189 - 190 - config IO_DELAY_TYPE_0XED 191 - int 192 - default "1" 193 - 194 - config IO_DELAY_TYPE_UDELAY 195 - int 196 - default "2" 197 - 198 - config IO_DELAY_TYPE_NONE 199 - int 200 - default "3" 201 - 202 182 choice 203 183 prompt "IO delay type" 204 184 default IO_DELAY_0X80 ··· 208 228 delay for certain operations. Should work on most new machines. 209 229 210 230 endchoice 211 - 212 - if IO_DELAY_0X80 213 - config DEFAULT_IO_DELAY_TYPE 214 - int 215 - default IO_DELAY_TYPE_0X80 216 - endif 217 - 218 - if IO_DELAY_0XED 219 - config DEFAULT_IO_DELAY_TYPE 220 - int 221 - default IO_DELAY_TYPE_0XED 222 - endif 223 - 224 - if IO_DELAY_UDELAY 225 - config DEFAULT_IO_DELAY_TYPE 226 - int 227 - default IO_DELAY_TYPE_UDELAY 228 - endif 229 - 230 - if IO_DELAY_NONE 231 - config DEFAULT_IO_DELAY_TYPE 232 - int 233 - default IO_DELAY_TYPE_NONE 234 - endif 235 231 236 232 config DEBUG_BOOT_PARAMS 237 233 bool "Debug boot parameters"
-1
arch/x86/configs/i386_defconfig
··· 130 130 CONFIG_MAC80211=y 131 131 CONFIG_MAC80211_LEDS=y 132 132 CONFIG_RFKILL=y 133 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 134 133 CONFIG_DEVTMPFS=y 135 134 CONFIG_DEVTMPFS_MOUNT=y 136 135 CONFIG_DEBUG_DEVRES=y
-1
arch/x86/configs/x86_64_defconfig
··· 129 129 CONFIG_MAC80211=y 130 130 CONFIG_MAC80211_LEDS=y 131 131 CONFIG_RFKILL=y 132 - CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 133 132 CONFIG_DEVTMPFS=y 134 133 CONFIG_DEVTMPFS_MOUNT=y 135 134 CONFIG_DEBUG_DEVRES=y
+1 -1
arch/x86/kernel/amd_nb.c
··· 72 72 {} 73 73 }; 74 74 75 - const struct pci_device_id hygon_nb_misc_ids[] = { 75 + static const struct pci_device_id hygon_nb_misc_ids[] = { 76 76 { PCI_DEVICE(PCI_VENDOR_ID_HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) }, 77 77 {} 78 78 };
+3 -1
arch/x86/kernel/crash.c
··· 56 56 */ 57 57 crash_vmclear_fn __rcu *crash_vmclear_loaded_vmcss = NULL; 58 58 EXPORT_SYMBOL_GPL(crash_vmclear_loaded_vmcss); 59 - unsigned long crash_zero_bytes; 60 59 61 60 static inline void cpu_crash_vmclear_loaded_vmcss(void) 62 61 { ··· 172 173 } 173 174 174 175 #ifdef CONFIG_KEXEC_FILE 176 + 177 + static unsigned long crash_zero_bytes; 178 + 175 179 static int get_nr_ram_ranges_callback(struct resource *res, void *arg) 176 180 { 177 181 unsigned int *nr_ranges = arg;
+27 -11
arch/x86/kernel/io_delay.c
··· 13 13 #include <linux/dmi.h> 14 14 #include <linux/io.h> 15 15 16 - int io_delay_type __read_mostly = CONFIG_DEFAULT_IO_DELAY_TYPE; 16 + #define IO_DELAY_TYPE_0X80 0 17 + #define IO_DELAY_TYPE_0XED 1 18 + #define IO_DELAY_TYPE_UDELAY 2 19 + #define IO_DELAY_TYPE_NONE 3 20 + 21 + #if defined(CONFIG_IO_DELAY_0X80) 22 + #define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_0X80 23 + #elif defined(CONFIG_IO_DELAY_0XED) 24 + #define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_0XED 25 + #elif defined(CONFIG_IO_DELAY_UDELAY) 26 + #define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_UDELAY 27 + #elif defined(CONFIG_IO_DELAY_NONE) 28 + #define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_NONE 29 + #endif 30 + 31 + int io_delay_type __read_mostly = DEFAULT_IO_DELAY_TYPE; 17 32 18 33 static int __initdata io_delay_override; 19 34 ··· 39 24 { 40 25 switch (io_delay_type) { 41 26 default: 42 - case CONFIG_IO_DELAY_TYPE_0X80: 27 + case IO_DELAY_TYPE_0X80: 43 28 asm volatile ("outb %al, $0x80"); 44 29 break; 45 - case CONFIG_IO_DELAY_TYPE_0XED: 30 + case IO_DELAY_TYPE_0XED: 46 31 asm volatile ("outb %al, $0xed"); 47 32 break; 48 - case CONFIG_IO_DELAY_TYPE_UDELAY: 33 + case IO_DELAY_TYPE_UDELAY: 49 34 /* 50 35 * 2 usecs is an upper-bound for the outb delay but 51 36 * note that udelay doesn't have the bus-level ··· 54 39 * are shorter until calibrated): 55 40 */ 56 41 udelay(2); 57 - case CONFIG_IO_DELAY_TYPE_NONE: 42 + break; 43 + case IO_DELAY_TYPE_NONE: 58 44 break; 59 45 } 60 46 } ··· 63 47 64 48 static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id) 65 49 { 66 - if (io_delay_type == CONFIG_IO_DELAY_TYPE_0X80) { 50 + if (io_delay_type == IO_DELAY_TYPE_0X80) { 67 51 pr_notice("%s: using 0xed I/O delay port\n", id->ident); 68 - io_delay_type = CONFIG_IO_DELAY_TYPE_0XED; 52 + io_delay_type = IO_DELAY_TYPE_0XED; 69 53 } 70 54 71 55 return 0; ··· 131 115 return -EINVAL; 132 116 133 117 if (!strcmp(s, "0x80")) 134 - io_delay_type = CONFIG_IO_DELAY_TYPE_0X80; 118 + io_delay_type = IO_DELAY_TYPE_0X80; 135 119 else if (!strcmp(s, "0xed")) 136 - io_delay_type = CONFIG_IO_DELAY_TYPE_0XED; 120 + io_delay_type = IO_DELAY_TYPE_0XED; 137 121 else if (!strcmp(s, "udelay")) 138 - io_delay_type = CONFIG_IO_DELAY_TYPE_UDELAY; 122 + io_delay_type = IO_DELAY_TYPE_UDELAY; 139 123 else if (!strcmp(s, "none")) 140 - io_delay_type = CONFIG_IO_DELAY_TYPE_NONE; 124 + io_delay_type = IO_DELAY_TYPE_NONE; 141 125 else 142 126 return -EINVAL; 143 127
+2 -2
arch/x86/kernel/tsc.c
··· 59 59 60 60 static DEFINE_PER_CPU_ALIGNED(struct cyc2ns, cyc2ns); 61 61 62 - void __always_inline cyc2ns_read_begin(struct cyc2ns_data *data) 62 + __always_inline void cyc2ns_read_begin(struct cyc2ns_data *data) 63 63 { 64 64 int seq, idx; 65 65 ··· 76 76 } while (unlikely(seq != this_cpu_read(cyc2ns.seq.sequence))); 77 77 } 78 78 79 - void __always_inline cyc2ns_read_end(void) 79 + __always_inline void cyc2ns_read_end(void) 80 80 { 81 81 preempt_enable_notrace(); 82 82 }