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-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
"EFI fixes, and FPU fix, a ticket spinlock boundary condition fix and
two build fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/fpu: Always restore_xinit_state() when use_eager_cpu()
x86: Make cpu_tss available to external modules
efi: Fix error handling in add_sysfs_runtime_map_entry()
x86/spinlocks: Fix regression in spinlock contention detection
x86/mm: Clean up types in xlate_dev_mem_ptr()
x86/efi: Store upper bits of command line buffer address in ext_cmd_line_ptr
efivarfs: Ensure VariableName is NUL-terminated

+23 -17
+2
arch/x86/boot/compressed/eboot.c
··· 1109 1109 if (!cmdline_ptr) 1110 1110 goto fail; 1111 1111 hdr->cmd_line_ptr = (unsigned long)cmdline_ptr; 1112 + /* Fill in upper bits of command line address, NOP on 32 bit */ 1113 + boot_params->ext_cmd_line_ptr = (u64)(unsigned long)cmdline_ptr >> 32; 1112 1114 1113 1115 hdr->ramdisk_image = 0; 1114 1116 hdr->ramdisk_size = 0;
+1 -1
arch/x86/include/asm/spinlock.h
··· 169 169 struct __raw_tickets tmp = READ_ONCE(lock->tickets); 170 170 171 171 tmp.head &= ~TICKET_SLOWPATH_FLAG; 172 - return (tmp.tail - tmp.head) > TICKET_LOCK_INC; 172 + return (__ticket_t)(tmp.tail - tmp.head) > TICKET_LOCK_INC; 173 173 } 174 174 #define arch_spin_is_contended arch_spin_is_contended 175 175
+8 -6
arch/x86/kernel/process.c
··· 57 57 .io_bitmap = { [0 ... IO_BITMAP_LONGS] = ~0 }, 58 58 #endif 59 59 }; 60 - EXPORT_PER_CPU_SYMBOL_GPL(cpu_tss); 60 + EXPORT_PER_CPU_SYMBOL(cpu_tss); 61 61 62 62 #ifdef CONFIG_X86_64 63 63 static DEFINE_PER_CPU(unsigned char, is_idle); ··· 156 156 /* FPU state will be reallocated lazily at the first use. */ 157 157 drop_fpu(tsk); 158 158 free_thread_xstate(tsk); 159 - } else if (!used_math()) { 160 - /* kthread execs. TODO: cleanup this horror. */ 161 - if (WARN_ON(init_fpu(tsk))) 162 - force_sig(SIGKILL, tsk); 163 - user_fpu_begin(); 159 + } else { 160 + if (!tsk_used_math(tsk)) { 161 + /* kthread execs. TODO: cleanup this horror. */ 162 + if (WARN_ON(init_fpu(tsk))) 163 + force_sig(SIGKILL, tsk); 164 + user_fpu_begin(); 165 + } 164 166 restore_init_xstate(); 165 167 } 166 168 }
+8 -6
arch/x86/mm/ioremap.c
··· 351 351 */ 352 352 void *xlate_dev_mem_ptr(phys_addr_t phys) 353 353 { 354 - void *addr; 355 - unsigned long start = phys & PAGE_MASK; 354 + unsigned long start = phys & PAGE_MASK; 355 + unsigned long offset = phys & ~PAGE_MASK; 356 + unsigned long vaddr; 356 357 357 358 /* If page is RAM, we can use __va. Otherwise ioremap and unmap. */ 358 359 if (page_is_ram(start >> PAGE_SHIFT)) 359 360 return __va(phys); 360 361 361 - addr = (void __force *)ioremap_cache(start, PAGE_SIZE); 362 - if (addr) 363 - addr = (void *)((unsigned long)addr | (phys & ~PAGE_MASK)); 362 + vaddr = (unsigned long)ioremap_cache(start, PAGE_SIZE); 363 + /* Only add the offset on success and return NULL if the ioremap() failed: */ 364 + if (vaddr) 365 + vaddr += offset; 364 366 365 - return addr; 367 + return (void *)vaddr; 366 368 } 367 369 368 370 void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
+3 -3
drivers/firmware/efi/runtime-map.c
··· 120 120 entry = kzalloc(sizeof(*entry), GFP_KERNEL); 121 121 if (!entry) { 122 122 kset_unregister(map_kset); 123 - return entry; 123 + map_kset = NULL; 124 + return ERR_PTR(-ENOMEM); 124 125 } 125 126 126 127 memcpy(&entry->md, efi_runtime_map + nr * efi_memdesc_size, ··· 133 132 if (ret) { 134 133 kobject_put(&entry->kobj); 135 134 kset_unregister(map_kset); 135 + map_kset = NULL; 136 136 return ERR_PTR(ret); 137 137 } 138 138 ··· 197 195 entry = *(map_entries + j); 198 196 kobject_put(&entry->kobj); 199 197 } 200 - if (map_kset) 201 - kset_unregister(map_kset); 202 198 out: 203 199 return ret; 204 200 }
+1 -1
fs/efivarfs/super.c
··· 121 121 int len, i; 122 122 int err = -ENOMEM; 123 123 124 - entry = kmalloc(sizeof(*entry), GFP_KERNEL); 124 + entry = kzalloc(sizeof(*entry), GFP_KERNEL); 125 125 if (!entry) 126 126 return err; 127 127