x86 fixes
Subsystems (4)
Linus,
Please pull the latest x86-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus
I wanted to wait one more day with the PAT bits ... but tomorrow might be too close to the next -rc? All PAT commits but the last one are old. This should also fix those memtype warnings on your box that you reported during the merge window.
The PAT changes are still larger than what we'd like - we originally had them queued up for the next merge window but then decided that these are fixes and cleanups are good and necessary for current mainline.
out-of-topic modifications in x86-fixes-for-linus:
--------------------------------------------------drivers/char/mem.c # 0c3c8a1: x86, PAT: Remove duplicate memtyp
Thanks,
Ingo
------------------>
Dmitry Adamushko (1):
x86: fix microcode driver newly spewing warnings
Ingo Molnar (1):
x86: disable X86_PTRACE_BTS for now
Jaswinder Singh Rajput (2):
x86: pci-swiotlb.c swiotlb_dma_ops should be static
x86, documentation: kernel-parameters replace X86-32,X86-64 with X86
Pallipadi, Venkatesh (1):
x86, PAT: Remove page granularity tracking for vm_insert_pfn maps
Suresh Siddha (3):
x86, CPA: Change idmap attribute before ioremap attribute setup x86, PAT: Consolidate code in pat_x_mtrr_type() and reserve_memtype() x86, PAT: Remove duplicate memtype reserve in devmem mmap
[email protected] (3):
x86, PAT: Change order of cpa and free in set_memory_wb x86, PAT: Handle faults cleanly in set_memory_ APIs x86, PAT: Changing memtype to WC ensuring no WB alias
Documentation/kernel-parameters.txt | 40 ++++---- arch/x86/Kconfig.cpu | 1 + arch/x86/include/asm/pat.h | 4 - arch/x86/kernel/microcode_core.c | 2 - arch/x86/kernel/pci-swiotlb.c | 2 +- arch/x86/mm/ioremap.c | 10 +- arch/x86/mm/pageattr.c | 127 ++++++++++++++--------- arch/x86/mm/pat.c | 189 ++++++----------------------------- drivers/char/mem.c | 27 ----- 9 files changed, 137 insertions(+), 265 deletions(-)
Documentation/kernel-parameters.txt +20 -20
@@ -134,7 +134,7 @@ and is between 256 and 4096 characters. It is defined in the file ./include/asm/setup.h as COMMAND_LINE_SIZE. - acpi= [HW,ACPI,X86-64,i386] + acpi= [HW,ACPI,X86] Advanced Configuration and Power Interface Format: { force | off | ht | strict | noirq | rsdt } force -- enable ACPI if default was off
@@ -218,7 +218,7 @@ and is between 256 and 4096 characters. It is defined in the file acpi_osi="!string2" # remove built-in string2 acpi_osi= # disable all strings - acpi_pm_good [X86-32,X86-64] + acpi_pm_good [X86] Override the pmtimer bug detection: force the kernel to assume that this machine's pmtimer latches its value and always returns good values.
@@ -459,7 +459,7 @@ and is between 256 and 4096 characters. It is defined in the file Also note the kernel might malfunction if you disable some critical bits. - code_bytes [IA32/X86_64] How many bytes of object code to print + code_bytes [X86] How many bytes of object code to print in an oops report. Range: 0 - 8192 Default: 64
@@ -592,7 +592,7 @@ and is between 256 and 4096 characters. It is defined in the file MTRR settings. This parameter disables that behavior, possibly causing your machine to run very slowly. - disable_timer_pin_1 [i386,x86-64] + disable_timer_pin_1 [X86] Disable PIN 1 of APIC timer Can be useful to work around chipset bugs.
@@ -624,7 +624,7 @@ and is between 256 and 4096 characters. It is defined in the file UART at the specified I/O port or MMIO address. The options are the same as for ttyS, above. - earlyprintk= [X86-32,X86-64,SH,BLACKFIN] + earlyprintk= [X86,SH,BLACKFIN] earlyprintk=vga earlyprintk=serial[,ttySn[,baudrate]] earlyprintk=dbgp
@@ -659,7 +659,7 @@ and is between 256 and 4096 characters. It is defined in the file See Documentation/block/as-iosched.txt and Documentation/block/deadline-iosched.txt for details. - elfcorehdr= [IA64,PPC,SH,X86-32,X86_64] + elfcorehdr= [IA64,PPC,SH,X86] Specifies physical address of start of kernel core image elf header. Generally kexec loader will pass this option to capture kernel.
@@ -938,7 +938,7 @@ and is between 256 and 4096 characters. It is defined in the file See comment before marvel_specify_io7 in arch/alpha/kernel/core_marvel.c. - io_delay= [X86-32,X86-64] I/O delay method + io_delay= [X86] I/O delay method 0x80 Standard port 0x80 based delay 0xed
@@ -1000,7 +1000,7 @@ and is between 256 and 4096 characters. It is defined in the file keepinitrd [HW,ARM] - kernelcore=nn[KMG] [KNL,X86-32,IA-64,PPC,X86-64] This parameter + kernelcore=nn[KMG] [KNL,X86,IA-64,PPC] This parameter specifies the amount of memory usable by the kernel for non-movable allocations. The requested amount is spread evenly throughout all nodes in the system. The
@@ -1034,7 +1034,7 @@ and is between 256 and 4096 characters. It is defined in the file Configure the RouterBoard 532 series on-chip Ethernet adapter MAC address. - kstack=N [X86-32,X86-64] Print N words from the kernel stack + kstack=N [X86] Print N words from the kernel stack in oops dumps. l2cr= [PPC]
@@ -1044,7 +1044,7 @@ and is between 256 and 4096 characters. It is defined in the file lapic [X86-32,APIC] Enable the local APIC even if BIOS disabled it. - lapic_timer_c2_ok [X86-32,x86-64,APIC] trust the local apic timer + lapic_timer_c2_ok [X86,APIC] trust the local apic timer in C2 power state. libata.dma= [LIBATA] DMA control
@@ -1229,7 +1229,7 @@ and is between 256 and 4096 characters. It is defined in the file [KNL,SH] Allow user to override the default size for per-device physically contiguous DMA buffers. - memmap=exactmap [KNL,X86-32,X86_64] Enable setting of an exact + memmap=exactmap [KNL,X86] Enable setting of an exact E820 memory map, as specified by the user. Such memmap=exactmap lines can be constructed based on BIOS output or other requirements. See the memmap=nn@ss
@@ -1320,7 +1320,7 @@ and is between 256 and 4096 characters. It is defined in the file mousedev.yres= [MOUSE] Vertical screen resolution, used for devices reporting absolute coordinates, such as tablets - movablecore=nn[KMG] [KNL,X86-32,IA-64,PPC,X86-64] This parameter + movablecore=nn[KMG] [KNL,X86,IA-64,PPC] This parameter is similar to kernelcore except it specifies the amount of memory used for migratable allocations. If both kernelcore and movablecore is specified,
@@ -1422,7 +1422,7 @@ and is between 256 and 4096 characters. It is defined in the file when a NMI is triggered. Format: [state][,regs][,debounce][,die] - nmi_watchdog= [KNL,BUGS=X86-32,X86-64] Debugging features for SMP kernels + nmi_watchdog= [KNL,BUGS=X86] Debugging features for SMP kernels Format: [panic,][num] Valid num: 0,1,2 0 - turn nmi_watchdog off
@@ -1475,11 +1475,11 @@ and is between 256 and 4096 characters. It is defined in the file nodsp [SH] Disable hardware DSP at boot time. - noefi [X86-32,X86-64] Disable EFI runtime services support. + noefi [X86] Disable EFI runtime services support. noexec [IA-64] - noexec [X86-32,X86-64] + noexec [X86] On X86-32 available only on PAE configured kernels. noexec=on: enable non-executable mappings (default) noexec=off: disable non-executable mappings
@@ -1525,7 +1525,7 @@ and is between 256 and 4096 characters. It is defined in the file noirqdebug [X86-32] Disables the code which attempts to detect and disable unhandled interrupt sources. - no_timer_check [X86-32,X86_64,APIC] Disables the code which tests for + no_timer_check [X86,APIC] Disables the code which tests for broken timer IRQ sources. noisapnp [ISAPNP] Disables ISA PnP code.
@@ -1689,7 +1689,7 @@ and is between 256 and 4096 characters. It is defined in the file disable the use of PCIE advanced error reporting. nodomains [PCI] Disable support for multiple PCI root domains (aka PCI segments, in ACPI-speak). - nommconf [X86-32,X86_64] Disable use of MMCONFIG for PCI + nommconf [X86] Disable use of MMCONFIG for PCI Configuration nomsi [MSI] If the PCI_MSI kernel config parameter is enabled, this kernel boot option can be used to
@@ -2380,7 +2380,7 @@ and is between 256 and 4096 characters. It is defined in the file reported either. unknown_nmi_panic - [X86-32,X86-64] + [X86] Set unknown_nmi_panic=1 early on boot. usbcore.autosuspend=
@@ -2447,12 +2447,12 @@ and is between 256 and 4096 characters. It is defined in the file medium is write-protected). Example: quirks=0419:aaf5:rl,0421:0433:rc - vdso= [X86-32,SH,x86-64] + vdso= [X86,SH] vdso=2: enable compat VDSO (default with COMPAT_VDSO) vdso=1: enable VDSO (default) vdso=0: disable VDSO mapping - vdso32= [X86-32,X86-64] + vdso32= [X86] vdso32=2: enable compat VDSO (default with COMPAT_VDSO) vdso32=1: enable 32-bit VDSO (default) vdso32=0: disable 32-bit VDSO mapping
arch/x86/Kconfig.cpu +1 -0
@@ -506,6 +506,7 @@ config X86_PTRACE_BTS bool "Branch Trace Store" default y depends on X86_DEBUGCTLMSR + depends on BROKEN ---help--- This adds a ptrace interface to the hardware's branch trace store.
arch/x86/include/asm/pat.h +0 -4
@@ -18,9 +18,5 @@ extern int free_memtype(u64 start, u64 end);extern int kernel_map_sync_memtype (u64 base,unsigned long size,unsigned long flag); -extern void map_devmem (unsigned long pfn,unsigned long size, -struct pgprot vma_prot); -extern void unmap_devmem (unsigned long pfn,unsigned long size, -struct pgprot vma_prot);#endif /* _ASM_X86_PAT_H */
arch/x86/kernel/microcode_core.c +0 -2
@@ -391,8 +391,6 @@ static int mc_sysdev_add(struct sys_device *sys_dev)return err; err =microcode_init_cpu (cpu); -if (err) -sysfs_remove_group (&sys_dev->kobj, &mc_attr_group);return err; }
arch/x86/kernel/pci-swiotlb.c +1 -1
@@ -50,7 +50,7 @@ static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,return swiotlb_alloc_coherent (hwdev, size, dma_handle, flags); } -struct dma_map_ops swiotlb_dma_ops = { +static struct dma_map_ops swiotlb_dma_ops = { .mapping_error = swiotlb_dma_mapping_error, .alloc_coherent = x86_swiotlb_alloc_coherent, .free_coherent = swiotlb_free_coherent,
arch/x86/mm/ioremap.c +6 -4
@@ -280,15 +280,16 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,return NULL ; area->phys_addr = phys_addr; vaddr = (unsigned long ) area->addr; -if (ioremap_page_range (vaddr, vaddr + size, phys_addr, prot)) { + +if (kernel_map_sync_memtype (phys_addr, size, prot_val)) {free_memtype (phys_addr, phys_addr + size);free_vm_area (area);return NULL ; } -if (ioremap_change_attr (vaddr, size, prot_val) <0 ) { +if (ioremap_page_range (vaddr, vaddr + size, phys_addr, prot)) {free_memtype (phys_addr, phys_addr + size); -vunmap (area->addr); +free_vm_area (area);return NULL ; }
@@ -374,7 +375,8 @@ static void __iomem *ioremap_default(resource_size_t phys_addr,* - UC_MINUS for non-WB-able memory with no other conflicting mappings * - Inherit from confliting mappings otherwise */ - err =reserve_memtype (phys_addr, phys_addr + size,-1 , &flags); + err =reserve_memtype (phys_addr, phys_addr + size, + _PAGE_CACHE_WB, &flags);if (err <0 )return NULL ;
arch/x86/mm/pageattr.c +77 -50
190 lines not on this page · raw message
arch/x86/mm/pat.c +32 -157
292 lines not on this page · raw message
drivers/char/mem.c +0 -27
@@ -301,33 +301,7 @@ static inline int private_mapping_ok(struct vm_area_struct *vma) }#endif -void __attribute__((weak)) -map_devmem (unsigned long pfn,unsigned long len,pgprot_t prot) -{ -/* nothing. architectures can override. */ -} - -void __attribute__((weak)) -unmap_devmem (unsigned long pfn,unsigned long len,pgprot_t prot) -{ -/* nothing. architectures can override. */ -} - -static void mmap_mem_open (struct vm_area_struct *vma) -{ -map_devmem (vma->vm_pgoff, vma->vm_end - vma->vm_start, - vma->vm_page_prot); -} - -static void mmap_mem_close (struct vm_area_struct *vma) -{ -unmap_devmem (vma->vm_pgoff, vma->vm_end - vma->vm_start, - vma->vm_page_prot); -} -static struct vm_operations_struct mmap_mem_ops = { - .open = mmap_mem_open, - .close = mmap_mem_close, #ifdef CONFIG_HAVE_IOREMAP_PROT .access = generic_access_phys #endif
@@ -362,7 +336,6 @@ static int mmap_mem(struct file * file, struct vm_area_struct * vma) vma->vm_pgoff, size, vma->vm_page_prot)) { -unmap_devmem (vma->vm_pgoff, size, vma->vm_page_prot);return -EAGAIN ; }return 0 ;