path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2015-06-10score: Fix exception handler labelGuenter Roeck1-1/+1
The latest version of modinfo fails to compile score architecture targets with the following error. FATAL: The relocation at __ex_table+0x634 references section "__ex_table" which is not executable, IOW the kernel will fault if it ever tries to jump to it. Something is seriously wrong and should be fixed. The probem is caused by a bad label in an __ex_table entry. Acked-by: Lennox Wu <> Cc: Quentin Casasnovas <> Signed-off-by: Guenter Roeck <>
2015-06-10blackfin: Fix build errorGuenter Roeck1-0/+1
Fix include/asm-generic/io.h: In function 'readb': include/asm-generic/io.h:113:2: error: implicit declaration of function 'bfin_read8' include/asm-generic/io.h: In function 'readw': include/asm-generic/io.h:121:2: error: implicit declaration of function 'bfin_read16' include/asm-generic/io.h: In function 'readl': include/asm-generic/io.h:129:2: error: implicit declaration of function 'bfin_read32' include/asm-generic/io.h: In function 'writeb': include/asm-generic/io.h:147:2: error: implicit declaration of function 'bfin_write8' include/asm-generic/io.h: In function 'writew': include/asm-generic/io.h:155:2: error: implicit declaration of function 'bfin_write16' include/asm-generic/io.h: In function 'writel': include/asm-generic/io.h:163:2: error: implicit declaration of function 'bfin_write32' Reported-by: Geert Uytterhoeven <> Fixes: 1a3372bc522ef ("blackfin: io: define __raw_readx/writex with bfin_readx/writex") Cc: Steven Miao <> Signed-off-by: Guenter Roeck <>
2015-06-07Merge branch 'upstream' of git:// Torvalds8-13/+8
Pull MIPS updates from Ralf Baechle: "Eight fixes across arch/mips. Nothing stands particuarly out nor is complicated but fixes keep coming in at a higher than comfortable rate" * 'upstream' of git:// MIPS: KVM: Do not sign extend on unsigned MMIO load MIPS: BPF: Fix stack pointer allocation MIPS: Loongson-3: Fix a cpu-hotplug issue in loongson3_ipi_interrupt() MIPS: Fix enabling of DEBUG_STACKOVERFLOW MIPS: c-r4k: Fix typo in probe_scache() MIPS: Avoid an FPE exception in FCSR mask probing MIPS: ath79: Add a missing new line in log message MIPS: ralink: Fix clearing the illegal access interrupt
2015-06-06MIPS: KVM: Do not sign extend on unsigned MMIO loadNicholas Mc Guire1-1/+1
Fix possible unintended sign extension in unsigned MMIO loads by casting to uint16_t in the case of mmio_needed != 2. Signed-off-by: Nicholas Mc Guire <> Reviewed-by: James Hogan <> Tested-by: James Hogan <> Cc: Gleb Natapov <> Cc: Paolo Bonzini <> Cc: Cc: Cc: Patchwork: Signed-off-by: Ralf Baechle <>
2015-06-06MIPS: BPF: Fix stack pointer allocationMarkos Chandras1-5/+1
Fix stack pointer offset which could potentially corrupt argument registers in the previous frame. The calculated offset reflects the size of all the registers we need to preserve so there is no need for this erroneous subtraction. [ Fixed conflict due to only applying this fix part of the entire series as part of 4.1 fixes.] Signed-off-by: Markos Chandras <> Cc: Cc: "David S. Miller" <> Cc: Alexei Starovoitov <> Cc: Daniel Borkmann <> Cc: Hannes Frederic Sowa <> Cc: Cc: Patchwork: Signed-off-by: Ralf Baechle <>
2015-06-06MIPS: Loongson-3: Fix a cpu-hotplug issue in loongson3_ipi_interrupt()Huacai Chen1-1/+1
setup_per_cpu_areas() only setup __per_cpu_offset[] for each possible cpu, but loongson_sysconf.nr_cpus can be greater than possible cpus (due to reserved_cpus_mask). So in loongson3_ipi_interrupt(), percpu access will touch the original varible in .data..percpu section which has been freed. Without this patch, cpu-hotplug will cause memery corruption. Signed-off-by: Huacai Chen <> Cc: John Crispin <> Cc: Steven J. Hill <> Cc: Cc: Fuxin Zhang <> Cc: Zhangjin Wu <> Patchwork: Signed-off-by: Ralf Baechle <>
2015-06-06MIPS: Fix enabling of DEBUG_STACKOVERFLOWJames Hogan1-1/+1
Commit 334c86c494b9 ("MIPS: IRQ: Add stackoverflow detection") added kernel stack overflow detection, however it only enabled it conditional upon the preprocessor definition DEBUG_STACKOVERFLOW, which is never actually defined. The Kconfig option is called DEBUG_STACKOVERFLOW, which manifests to the preprocessor as CONFIG_DEBUG_STACKOVERFLOW, so switch it to using that definition instead. Fixes: 334c86c494b9 ("MIPS: IRQ: Add stackoverflow detection") Signed-off-by: James Hogan <> Cc: Ralf Baechle <> Cc: Adam Jiang <> Cc: Cc: <> # 2.6.37+ Patchwork: Signed-off-by: Ralf Baechle <>
2015-06-06MIPS: c-r4k: Fix typo in probe_scache()Joshua Kinard1-1/+1
Fixes a typo in arch/mips/mm/c-r4k.c's probe_scache(). Signed-off-by: Joshua Kinard <> Signed-off-by: Ralf Baechle <>
2015-06-05Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds6-34/+48
git:// Pull x86 fixes from Ingo Molnar: "Misc fixes: - early_idt_handlers[] fix that fixes the build with bleeding edge tooling - build warning fix on GCC 5.1 - vm86 fix plus self-test to make it harder to break it again" * 'x86-urgent-for-linus' of git:// x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers x86/asm/entry/32, selftests: Add a selftest for kernel entries from VM86 mode x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.h x86/asm/entry/32: Really make user_mode() work correctly for VM86 mode
2015-06-05Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds7-79/+123
git:// Pull perf fixes from Ingo Molnar: "The biggest chunk of the changes are two regression fixes: a HT workaround fix and an event-group scheduling fix. It's been verified with 5 days of fuzzer testing. Other fixes: - eBPF fix - a BIOS breakage detection fix - PMU driver fixes" * 'perf-urgent-for-linus' of git:// perf/x86/intel/pt: Fix a refactoring bug perf/x86: Tweak broken BIOS rules during check_hw_exists() perf/x86/intel/pt: Untangle pt_buffer_reset_markers() perf: Disallow sparse AUX allocations for non-SG PMUs in overwrite mode perf/x86: Improve HT workaround GP counter constraint perf/x86: Fix event/group validation perf: Fix race in BPF program unregister
2015-06-04perf/x86/intel/pt: Fix a refactoring bugAlexander Shishkin1-1/+1
Commit 066450be41 ("perf/x86/intel/pt: Clean up the control flow in pt_pmu_hw_init()") changed attribute initialization so that only the first attribute gets initialized using sysfs_attr_init(), which upsets lockdep. This patch fixes the glitch so that all allocated attributes are properly initialized thus fixing the lockdep warning reported by Tvrtko and Imre. Reported-by: Tvrtko Ursulin <> Reported-by: Imre Deak <> Signed-off-by: Alexander Shishkin <> Cc: <> Cc: Andrew Morton <> Cc: H. Peter Anvin <> Cc: Linus Torvalds <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Signed-off-by: Ingo Molnar <>
2015-06-03MIPS: Avoid an FPE exception in FCSR mask probingMaciej W. Rozycki1-2/+1
Use the default FCSR value in mask probing, avoiding an FPE exception where reset has left any exception enable and their corresponding cause bits set and the register is then rewritten with these bits active. Signed-off-by: Maciej W. Rozycki <> Cc: Joshua Kinard <> Cc: Signed-off-by: Ralf Baechle <>
2015-06-02Merge tag 'please-pull-rusty' of ↵Linus Torvalds1-1/+2
git:// Pull ia64 fix from Tony Luck: "Fix some build warnings for ia64 - cpu_callin_map doesn't need to be volatile" * tag 'please-pull-rusty' of git:// ia64: make cpu_callin_map non-volatile.
2015-06-02ia64: make cpu_callin_map non-volatile.Rusty Russell1-1/+2
cpumask_test_cpu() doesn't take volatile, unlike the obsoleted cpu_isset. The only place ia64 really cares is the spin waiting for a bit; udelay() is probably a barrier but insert barrier() to be sure. Signed-off-by: Rusty Russell <> Signed-off-by: Tony Luck <>
2015-06-02MIPS: ath79: Add a missing new line in log messageAlban Bedel1-1/+1
The memory setup log is missing a new line. Signed-off-by: Alban Bedel <> Cc: Cc: Andrew Bresticker <> Cc: Qais Yousef <> Cc: Wolfram Sang <> Cc: Sergey Ryazanov <> Cc: Gabor Juhos <> Cc: Patchwork: Signed-off-by: Ralf Baechle <>
2015-06-02x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlersAndy Lutomirski4-27/+42
The early_idt_handlers asm code generates an array of entry points spaced nine bytes apart. It's not really clear from that code or from the places that reference it what's going on, and the code only works in the first place because GAS never generates two-byte JMP instructions when jumping to global labels. Clean up the code to generate the correct array stride (member size) explicitly. This should be considerably more robust against screw-ups, as GAS will warn if a .fill directive has a negative count. Using '. =' to advance would have been even more robust (it would generate an actual error if it tried to move backwards), but it would pad with nulls, confusing anyone who tries to disassemble the code. The new scheme should be much clearer to future readers. While we're at it, improve the comments and rename the array and common code. Binutils may start relaxing jumps to non-weak labels. If so, this change will fix our build, and we may need to backport this change. Before, on x86_64: 0000000000000000 <early_idt_handlers>: 0: 6a 00 pushq $0x0 2: 6a 00 pushq $0x0 4: e9 00 00 00 00 jmpq 9 <early_idt_handlers+0x9> 5: R_X86_64_PC32 early_idt_handler-0x4 ... 48: 66 90 xchg %ax,%ax 4a: 6a 08 pushq $0x8 4c: e9 00 00 00 00 jmpq 51 <early_idt_handlers+0x51> 4d: R_X86_64_PC32 early_idt_handler-0x4 ... 117: 6a 00 pushq $0x0 119: 6a 1f pushq $0x1f 11b: e9 00 00 00 00 jmpq 120 <early_idt_handler> 11c: R_X86_64_PC32 early_idt_handler-0x4 After: 0000000000000000 <early_idt_handler_array>: 0: 6a 00 pushq $0x0 2: 6a 00 pushq $0x0 4: e9 14 01 00 00 jmpq 11d <early_idt_handler_common> ... 48: 6a 08 pushq $0x8 4a: e9 d1 00 00 00 jmpq 120 <early_idt_handler_common> 4f: cc int3 50: cc int3 ... 117: 6a 00 pushq $0x0 119: 6a 1f pushq $0x1f 11b: eb 03 jmp 120 <early_idt_handler_common> 11d: cc int3 11e: cc int3 11f: cc int3 Signed-off-by: Andy Lutomirski <> Acked-by: H. Peter Anvin <> Cc: Binutils <> Cc: Borislav Petkov <> Cc: H.J. Lu <> Cc: Jan Beulich <> Cc: Linus Torvalds <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Cc: <> Link: Signed-off-by: Ingo Molnar <>
2015-06-01Merge git:// Torvalds12-59/+282
Pull Sparc fixes from David Miller: 1) Setup the core/threads/sockets bitmaps correctly so that 'lscpus' and friends operate properly. Frtom Chris Hyser. 2) The bit that normally means "Cached Virtually" on sun4v systems, actually changes meaning in M7 and later chips. Fix from Khalid Aziz. 3) One some PCI-E systems we need to probe different OF properties to fill in the PCI slot information properly, from Eric Snowberg. 4) Kill an extraneous memset after kzalloc(), from Christophe Jaillet. * git:// sparc: Resolve conflict between sparc v9 and M7 on usage of bit 9 of TTE sparc64: pci slots information is not populated in sysfs sparc: kernel: GRPCI2: Remove a useless memset sparc64: Setup sysfs to mark LDOM sockets, cores and threads correctly
2015-06-01MIPS: ralink: Fix clearing the illegal access interruptJonas Gorski1-1/+1
Due to a typo the illegal access interrupt is never cleared in by the interupt handler, causing an effective deadlock on the first illegal access. This was broken since the code was introduced in 5433acd81e87 ("MIPS: ralink: add illegal access driver"), but only exposed when the Kconfig symbol was added, thus enabling the code. Cc: <> [3.18+] Fixes: a7b7aad383c ("MIPS: ralink: add missing symbol for RALINK_ILL_ACC") Signed-off-by: Jonas Gorski <> Cc: Cc: John Crispin <> Patchwork: Signed-off-by: Ralf Baechle <>
2015-05-31sparc: Resolve conflict between sparc v9 and M7 on usage of bit 9 of TTEKhalid Aziz6-22/+104
sparc: Resolve conflict between sparc v9 and M7 on usage of bit 9 of TTE Bit 9 of TTE is CV (Cacheable in V-cache) on sparc v9 processor while the same bit 9 is MCDE (Memory Corruption Detection Enable) on M7 processor. This creates a conflicting usage of the same bit. Kernel sets bit on all pages for sun4v architecture which works well for sparc v9 but enables memory corruption detection on M7 processor which is not the intent. This patch adds code to determine if kernel is running on M7 processor and takes steps to not enable memory corruption detection in TTE erroneously. Signed-off-by: Khalid Aziz <> Signed-off-by: David S. Miller <>
2015-05-31sparc64: pci slots information is not populated in sysfsEric Snowberg1-8/+51
Add PCI slot numbers within sysfs for PCIe hardware. Larger PCIe systems with nested PCI bridges and slots further down on these bridges were not being populated within sysfs. This will add ACPI style PCI slot numbers for these systems since the OF 'slot-names' information is not available on all PCIe platforms. Signed-off-by: Eric Snowberg <> Reviewed-by: Bob Picco <> Signed-off-by: David S. Miller <>
2015-05-31sparc: kernel: GRPCI2: Remove a useless memsetChristophe Jaillet1-1/+0
grpci2priv is allocated using kzalloc, so there is no need to memset it. Signed-off-by: Christophe Jaillet <> Signed-off-by: David S. Miller <>
2015-05-31Merge branch 'fixes' of git:// Torvalds3-15/+18
Pull ARM fixes from Russell King: "Three fixes this time around: - fix a memory leak which occurs when probing performance monitoring unit interrupts - fix handling of non-PMD aligned end of RAM causing boot failures - fix missing syscall trace exit path with syscall tracing enabled causing a kernel oops in the audit code" * 'fixes' of git:// ARM: 8357/1: perf: fix memory leak when probing PMU PPIs ARM: fix missing syscall trace exit ARM: 8356/1: mm: handle non-pmd-aligned end of RAM
2015-05-31Merge branch 'upstream' of ↵Linus Torvalds5-5/+19
git:// Pull MIPS fixes from Ralf Baechle: "MIPS fixes for 4.1 all across the tree" * 'upstream' of git:// MIPS: strnlen_user.S: Fix a CPU_DADDI_WORKAROUNDS regression MIPS: BMIPS: Fix bmips_wr_vec() MIPS: ath79: fix build problem if CONFIG_BLK_DEV_INITRD is not set MIPS: Fuloong 2E: Replace CONFIG_USB_ISP1760_HCD by CONFIG_USB_ISP1760 MIPS: irq: Use DECLARE_BITMAP ttyFDC: Fix to use native endian MMIO reads MIPS: Fix CDMM to use native endian MMIO reads
2015-05-31Merge branch 'turbostat' of ↵Linus Torvalds1-0/+1
git:// Pull turbostat tool fixes from Len Brown: "Just one minor kernel dependency in this batch -- added a #define to msr-index.h" * 'turbostat' of git:// tools/power turbostat: update version number to 4.7 tools/power turbostat: allow running without cpu0 tools/power turbostat: correctly decode of ENERGY_PERFORMANCE_BIAS tools/power turbostat: enable turbostat to support Knights Landing (KNL) tools/power turbostat: correctly display more than 2 threads/core
2015-05-29Merge tag 'acpi-pci-4.1-rc6' of ↵Linus Torvalds2-6/+20
git:// Pull PCI / ACPI fix from Rafael Wysocki: "This fixes a bug uncovered by a recent driver core change that modified the implementation of the ACPI_COMPANION_SET() macro to strictly rely on its second argument to be either NULL or a valid pointer to struct acpi_device. As it turns out, pcibios_root_bridge_prepare() on x86 and ia64 works with the assumption that the only code path calling pci_create_root_bus() is pci_acpi_scan_root() and therefore the sysdata argument passed to it will always match the expectations of pcibios_root_bridge_prepare(). That need not be the case, however, and in particular it is not the case for the Xen pcifront driver that passes a pointer to its own private data strcture as sysdata to pci_scan_bus_parented() which then passes it to pci_create_root_bus() and it ends up being used incorrectly by pcibios_root_bridge_prepare()" * tag 'acpi-pci-4.1-rc6' of git:// PCI / ACPI: Do not set ACPI companions for host bridges with parents
2015-05-29Merge tag 'fixes-for-linus' of ↵Linus Torvalds9-13/+21
git:// Pull ARM SoC fixes from Arnd Bergmann: "Two weeks worth of small bug fixes this time, nothing sticking out this time: - one defconfig change to adapt to a modified Kconfig symbol - two fixes for i.MX for backwards compatibility with older DT files that was accidentally broken - one regression fix for irq handling on pxa - three small dt files on omap, and one each for imx and exynos" * tag 'fixes-for-linus' of git:// ARM: multi_v7_defconfig: Replace CONFIG_USB_ISP1760_HCD by CONFIG_USB_ISP1760 ARM: imx6: gpc: don't register power domain if DT data is missing ARM: imx6: allow booting with old DT ARM: dts: set display clock correctly for exynos4412-trats2 ARM: pxa: pxa_cplds: signedness bug in probe ARM: dts: Fix WLAN interrupt line for AM335x EVM-SK ARM: dts: omap3-devkit8000: Fix NAND DT node ARM: dts: am335x-boneblack: disable RTC-only sleep ARM: dts: fix imx27 dtb build rule ARM: dts: imx27: only map 4 Kbyte for fec registers
2015-05-29MIPS: strnlen_user.S: Fix a CPU_DADDI_WORKAROUNDS regressionMaciej W. Rozycki1-2/+13
Correct a regression introduced with 8453eebd [MIPS: Fix strnlen_user() return value in case of overlong strings.] causing assembler warnings and broken code generated in __strnlen_kernel_nocheck_asm: arch/mips/lib/strnlen_user.S: Assembler messages: arch/mips/lib/strnlen_user.S:64: Warning: Macro instruction expanded into multiple instructions in a branch delay slot with the CPU_DADDI_WORKAROUNDS option set, resulting in the function looping indefinitely upon mounting NFS root. Use conditional assembly to avoid a microMIPS code size regression. Using $at unconditionally would cause such a regression as there are no 16-bit instruction encodings available for ALU operations using this register. Using $v1 unconditionally would produce short microMIPS encodings, but would prevent this register from being used across calls to this function. The extra LI operation introduced is free, replacing a NOP originally scheduled into the delay slot of the branch that follows. Signed-off-by: Maciej W. Rozycki <> Cc: Patchwork: Signed-off-by: Ralf Baechle <>
2015-05-29MIPS: BMIPS: Fix bmips_wr_vec()Petri Gynther1-1/+1
bmips_wr_vec() copies exception vector code from start to dst. The call to dma_cache_wback() needs to flush (end-start) bytes, starting at dst, from write-back cache to memory. Signed-off-by: Petri Gynther <> Acked-by: Florian Fainelli <> Reviewed-by: Kevin Cernekee <> Cc: Patchwork: Signed-off-by: Ralf Baechle <>
2015-05-29MIPS: ath79: fix build problem if CONFIG_BLK_DEV_INITRD is not setLaurent Fasnacht1-0/+3
initrd_start is defined in init/do_mounts_initrd.c, which is only included in kernel if CONFIG_BLK_DEV_INITRD=y. Signed-off-by: Laurent Fasnacht <> Cc: Cc: Patchwork: Signed-off-by: Ralf Baechle <>
2015-05-29ARM: multi_v7_defconfig: Replace CONFIG_USB_ISP1760_HCD by CONFIG_USB_ISP1760Geert Uytterhoeven1-1/+1
Since commit 100832abf065bc18 ("usb: isp1760: Make HCD support optional"), CONFIG_USB_ISP1760_HCD is automatically selected when needed. Enabling that option in the defconfig is now a no-op, and no longer enables ISP1760 HCD support. Re-enable the ISP1760 driver in the defconfig by enabling USB_ISP1760_HOST_ROLE instead. Signed-off-by: Geert Uytterhoeven <> Signed-off-by: Arnd Bergmann <>
2015-05-29Merge tag 'imx-fixes-4.1-3' of ↵Arnd Bergmann1-3/+13
git:// into fixes Merge "The i.MX fixes for 4.1, 3rd round" from Shawn Guo: It includes a couple of fixes for i.MX6 GPC code to let the new kernel be able to boot with old DTBs: - Booting v4.1-rc kernel with old DTBs will fail with a fat warning (require low-level debug to be seen), due to the adoption of stacked IRQ domain. The first fix improves the situation by allowing kernel boot up with old DTBs, although suspend/resume still breaks. - Booting new kernel with old DTBs that do not have power-domain info will result in a hang. The second patch fixes the hang by skipping the kernel power-domain registration if DTB has no power-domain info. * tag 'imx-fixes-4.1-3' of git:// ARM: imx6: gpc: don't register power domain if DT data is missing ARM: imx6: allow booting with old DT
2015-05-29Merge tag 'samsung-fixes-3' of ↵Arnd Bergmann1-1/+1
git:// into fixes Merge "Samsung fix for v4.1" from Kukjin Kim: - Set display clock correctly for exynos4412-trats2 : fix the following error exynos-drm: No connectors reported connected with modes [drm] Cannot find any crtc or sizes - going 1024x768 * tag 'samsung-fixes-3' of git:// ARM: dts: set display clock correctly for exynos4412-trats2
2015-05-29x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.hIngo Molnar1-6/+5
Linus reported the following new warning on x86 allmodconfig with GCC 5.1: > ./arch/x86/include/asm/spinlock.h: In function ‘arch_spin_lock’: > ./arch/x86/include/asm/spinlock.h:119:3: warning: implicit declaration > of function ‘__ticket_lock_spinning’ [-Wimplicit-function-declaration] > __ticket_lock_spinning(lock, inc.tail); > ^ This warning triggers because of these hacks in misc.h: /* * we have to be careful, because no indirections are allowed here, and * paravirt_ops is a kind of one. As it will only run in baremetal anyway, * we just keep it from happening */ #undef CONFIG_PARAVIRT #undef CONFIG_KASAN But these hacks were not updated when CONFIG_PARAVIRT_SPINLOCKS was added, and eventually (with the introduction of queued paravirt spinlocks in recent kernels) this created an invalid Kconfig combination and broke the build. So add a CONFIG_PARAVIRT_SPINLOCKS #undef line as well. Also remove the _ASM_X86_DESC_H quirk: that undocumented quirk was originally added ages ago, in: 099e1377269a ("x86: use ELF format in compressed images.") and I went back to that kernel (and fixed up the main Makefile which didn't build anymore) and checked what failure it avoided: it avoided an include file dependencies related build failure related to our old x86-platforms code. That old code is long gone, the header dependencies got cleaned up, and the build does not fail anymore with the totality of asm/desc.h included - so remove the quirk. Reported-by: Linus Torvalds <> Cc: "H. Peter Anvin" <> Cc: Thomas Gleixner <> Cc: Signed-off-by: Ingo Molnar <>
2015-05-29x86/asm/entry/32: Really make user_mode() work correctly for VM86 modeJan Beulich1-1/+1
While commit efa7045103 ("x86/asm/entry: Make user_mode() work correctly if regs came from VM86 mode") claims that "user_mode() is now identical to user_mode_vm()", this wasn't actually the case - no prior commit made it so. Signed-off-by: Jan Beulich <> Acked-by: Andy Lutomirski <> Cc: Andy Lutomirski <> Cc: Borislav Petkov <> Cc: Brian Gerst <> Cc: Denys Vlasenko <> Cc: H. Peter Anvin <> Cc: Linus Torvalds <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Link: Signed-off-by: Ingo Molnar <>
2015-05-28Merge tag 'xtensa-20150526' of git:// Torvalds1-0/+13
Pull Xtensa fix from Chris Zankel: "This fixes allmodconfig, which fails to build due to missing dma_alloc_attrs() and dma_free_attrs() functions" * tag 'xtensa-20150526' of git:// xtensa: Provide dummy dma_alloc_attrs() and dma_free_attrs()
2015-05-28PCI / ACPI: Do not set ACPI companions for host bridges with parentsRafael J. Wysocki2-6/+20
Commit 97badf873ab6 (device property: Make it possible to use secondary firmware nodes) uncovered a bug in the x86 (and ia64) PCI host bridge initialization code that assumes bridge->bus->sysdata to always point to a struct pci_sysdata object which need not be the case (in particular, the Xen PCI frontend driver sets it to point to a different data type). If it is not the case, an incorrect pointer (or a piece of data that is not a pointer at all) will be passed to ACPI_COMPANION_SET() and that may cause interesting breakage to happen going forward. To work around this problem use the observation that the ACPI host bridge initialization always passes NULL as parent to pci_create_root_bus(), so if pcibios_root_bridge_prepare() sees a non-NULL parent of the bridge, it should not attempt to set an ACPI companion for it, because that means that pci_create_root_bus() has been called by someone else. Fixes: 97badf873ab6 (device property: Make it possible to use secondary firmware nodes) Reported-and-tested-by: Sander Eikelenboom <> Signed-off-by: Rafael J. Wysocki <> Acked-by: Bjorn Helgaas <>
2015-05-27tools/power turbostat: enable turbostat to support Knights Landing (KNL)Dasaratharaman Chandramouli1-0/+1
Changes mainly to account for minor differences in Knights Landing(KNL): 1. KNL supports C1 and C6 core states. 2. KNL supports PC2, PC3 and PC6 package states. 3. KNL has a different encoding of the TURBO_RATIO_LIMIT MSR Signed-off-by: Dasaratharaman Chandramouli <> Signed-off-by: Len Brown <>
2015-05-27Merge git:// Torvalds1-1/+6
Pull networking fixes from David Miller: 1) Don't use MMIO on certain iwlwifi devices otherwise we get a firmware crash. 2) Don't corrupt the GRO lists of mac80211 contexts by doing sends via timer interrupt, from Johannes Berg. 3) SKB tailroom is miscalculated in AP_VLAN crypto code, from Michal Kazior. 4) Fix fw_status memory leak in iwlwifi, from Haim Dreyfuss. 5) Fix use after free in iwl_mvm_d0i3_enable_tx(), from Eliad Peller. 6) JIT'ing of large BPF programs is broken on x86, from Alexei Starovoitov. 7) EMAC driver ethtool register dump size is miscalculated, from Ivan Mikhaylov. 8) Fix PHY initial link mode when autonegotiation is disabled in amd-xgbe, from Tom Lendacky. 9) Fix NULL deref on SOCK_DEAD socket in AF_UNIX and CAIF protocols, from Mark Salyzyn. 10) credit_bytes not initialized properly in xen-netback, from Ross Lagerwall. 11) Fallback from MSI-X to INTx interrupts not handled properly in mlx4 driver, fix from Benjamin Poirier. 12) Perform ->attach() after binding dev->qdisc in packet scheduler, otherwise we can crash. From Cong WANG. 13) Don't clobber data in sctp_v4_map_v6(). From Jason Gunthorpe. * git:// (30 commits) sctp: Fix mangled IPv4 addresses on a IPv6 listening socket net_sched: invoke ->attach() after setting dev->qdisc xen-netfront: properly destroy queues when removing device mlx4_core: Fix fallback from MSI-X to INTx xen/netback: Properly initialize credit_bytes net: netxen: correct sysfs bin attribute return code tools: bpf_jit_disasm: fix segfault on disabled debugging log output unix/caif: sk_socket can disappear when state is unlocked amd-xgbe-phy: Fix initial mode when autoneg is disabled net: dp83640: fix improper double spin locking. net: dp83640: reinforce locking rules. net: dp83640: fix broken calibration routine. net: stmmac: create one debugfs dir per net-device net/ibm/emac: fix size of emac dump memory areas x86: bpf_jit: fix compilation of large bpf programs net: phy: bcm7xxx: Fix 7425 PHY ID and flags iwlwifi: mvm: avoid use-after-free on iwl_mvm_d0i3_enable_tx() iwlwifi: mvm: clean net-detect info if device was reset during suspend iwlwifi: mvm: take the UCODE_DOWN reference when resuming iwlwifi: mvm: BT Coex - duplicate the command if sent ASYNC ...
2015-05-27Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds2-2/+20
git:// Pull x86 fixes from Ingo Molnar: "This tree includes: - a fix that disables the compacted FPU XSAVE format by disabling XSAVES support: the fixes are too complex and the breakages ABI-affecting, so we want this to be quirked off in a robust way and backported, to make sure no broken kernel is exposed to the new hardware (which exposure is still very limited). - an MCE printk message fix - a documentation fix" * 'x86-urgent-for-linus' of git:// x86/fpu: Disable XSAVES* support for now x86/Documentation: Update the contact email for L3 cache index disable functionality x86/mce: Fix MCE severity messages
2015-05-27ARM: imx6: gpc: don't register power domain if DT data is missingLucas Stach1-0/+4
If the devicetree is too old and does not provide the regulator and clocks for the power domain, we need to avoid registering the power domain. Otherwise runtime PM will try to control the domain, which will lead to machine hangs without the proper DT configuration data. This restores functionality to the kernel 4.0 level if an old DT is detected, where the power domain is constantly powered on. Signed-off-by: Lucas Stach <> Signed-off-by: Shawn Guo <>
2015-05-27perf/x86: Tweak broken BIOS rules during check_hw_exists()Don Zickus1-1/+15
I stumbled upon an AMD box that had the BIOS using a hardware performance counter. Instead of printing out a warning and continuing, it failed and blocked further perf counter usage. Looking through the history, I found this commit: a5ebe0ba3dff ("perf/x86: Check all MSRs before passing hw check") which tweaked the rules for a Xen guest on an almost identical box and now changed the behaviour. Unfortunately the rules were tweaked incorrectly and will always lead to MSR failures even though the MSRs are completely fine. What happens now is in arch/x86/kernel/cpu/perf_event.c::check_hw_exists(): <snip> for (i = 0; i < x86_pmu.num_counters; i++) { reg = x86_pmu_config_addr(i); ret = rdmsrl_safe(reg, &val); if (ret) goto msr_fail; if (val & ARCH_PERFMON_EVENTSEL_ENABLE) { bios_fail = 1; val_fail = val; reg_fail = reg; } } <snip> /* * Read the current value, change it and read it back to see if it * matches, this is needed to detect certain hardware emulators * (qemu/kvm) that don't trap on the MSR access and always return 0s. */ reg = x86_pmu_event_addr(0); ^^^^ if the first perf counter is enabled, then this routine will always fail because the counter is running. :-( if (rdmsrl_safe(reg, &val)) goto msr_fail; val ^= 0xffffUL; ret = wrmsrl_safe(reg, val); ret |= rdmsrl_safe(reg, &val_new); if (ret || val != val_new) goto msr_fail; The above bios_fail used to be a 'goto' which is why it worked in the past. Further, most vendors have migrated to using fixed counters to hide their evilness hence this problem rarely shows up now days except on a few old boxes. I fixed my problem and kept the spirit of the original Xen fix, by recording a safe non-enable register to be used safely for the reading/writing check. Because it is not enabled, this passes on bare metal boxes (like metal), but should continue to throw an msr_fail on Xen guests because the register isn't emulated yet. Now I get a proper bios_fail error message and Xen should still see their msr_fail message (untested). Signed-off-by: Don Zickus <> Signed-off-by: Peter Zijlstra (Intel) <> Cc: Linus Torvalds <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Cc: Cc: Link: Signed-off-by: Ingo Molnar <>
2015-05-27perf/x86/intel/pt: Untangle pt_buffer_reset_markers()Alexander Shishkin1-12/+22
Currently, pt_buffer_reset_markers() is a difficult to read knot of arithmetics with a redundant check for multiple-entry TOPA capability, a commented out wakeup marker placement and a logical error wrt to stop marker placement. The latter happens when write head is not page aligned and results in stop marker being placed one page earlier than it actually should. All these problems only affect PT implementations that support multiple-entry TOPA tables (read: proper scatter-gather). For single-entry TOPA implementations, there is no functional impact. This patch deals with all of the above. Tested on both single-entry and multiple-entry TOPA PT implementations. Signed-off-by: Alexander Shishkin <> Signed-off-by: Peter Zijlstra (Intel) <> Cc: Linus Torvalds <> Cc: Paul Mackerras <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Cc: Cc: Cc: Link: Signed-off-by: Ingo Molnar <>
2015-05-27perf/x86: Improve HT workaround GP counter constraintPeter Zijlstra4-30/+53
The (SNB/IVB/HSW) HT bug only affects events that can be programmed onto GP counters, therefore we should only limit the number of GP counters that can be used per cpu -- iow we should not constrain the FP counters. Furthermore, we should only enfore such a limit when there are in fact exclusive events being scheduled on either sibling. Reported-by: Vince Weaver <> Signed-off-by: Peter Zijlstra (Intel) <> Cc: Linus Torvalds <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> [ Fixed build fail for the !CONFIG_CPU_SUP_INTEL case. ] Signed-off-by: Ingo Molnar <>
2015-05-27ARM: imx6: allow booting with old DTLucas Stach1-3/+9
The GPC rewrite to IRQ domains has been on the premise that it may break suspend/resume for new kernels on old DT, but otherwise keep things working from a user perspective. This was an accepted compromise to be able to move the GIC cleanup forward. What actually happened was that booting a new kernel on an old DT crashes before even the console is up, so the user does not even see the warning that the DT is too old. The warning message suggests that this has been known before, which is clearly unacceptable. Fix the early crash by mapping the GPC memory space if the IRQ controller doesn't claim it. This keeps at least CPUidle and the needed CPU wakeup workarounds working. With this fixed the system is able to boot up properly minus the expected suspend/resume breakage. Signed-off-by: Lucas Stach <> Signed-off-by: Shawn Guo <>
2015-05-27perf/x86: Fix event/group validationPeter Zijlstra6-36/+33
Commit 43b4578071c0 ("perf/x86: Reduce stack usage of x86_schedule_events()") violated the rule that 'fake' scheduling; as used for event/group validation; should not change the event state. This went mostly un-noticed because repeated calls of x86_pmu::get_event_constraints() would give the same result. And x86_pmu::put_event_constraints() would mostly not do anything. Commit e979121b1b15 ("perf/x86/intel: Implement cross-HT corruption bug workaround") made the situation much worse by actually setting the event->hw.constraint value to NULL, so when validation and actual scheduling interact we get NULL ptr derefs. Fix it by removing the constraint pointer from the event and move it back to an array, this time in cpuc instead of on the stack. validate_group() x86_schedule_events() event->hw.constraint = c; # store <context switch> perf_task_event_sched_in() ... x86_schedule_events(); event->hw.constraint = c2; # store ... put_event_constraints(event); # assume failure to schedule intel_put_event_constraints() event->hw.constraint = NULL; <context switch end> c = event->hw.constraint; # read -> NULL if (!test_bit(hwc->idx, c->idxmsk)) # <- *BOOM* NULL deref This in particular is possible when the event in question is a cpu-wide event and group-leader, where the validate_group() tries to add an event to the group. Reported-by: Vince Weaver <> Signed-off-by: Peter Zijlstra (Intel) <> Cc: Andrew Hunter <> Cc: Linus Torvalds <> Cc: Maria Dimakopoulou <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Fixes: 43b4578071c0 ("perf/x86: Reduce stack usage of x86_schedule_events()") Fixes: e979121b1b15 ("perf/x86/intel: Implement cross-HT corruption bug workaround") Signed-off-by: Ingo Molnar <>
2015-05-26alpha: kernel: osf_sys: Set 'kts.tv_nsec' only when 'tv' has effectChen Gang1-2/+1
The related warning: CC init/do_mounts.o arch/alpha/kernel/osf_sys.c: In function 'SyS_osf_settimeofday': arch/alpha/kernel/osf_sys.c:1028:14: warning: 'kts.tv_nsec' may be used uninitialized in this function [-Wmaybe-uninitialized] kts.tv_nsec *= 1000; ^ arch/alpha/kernel/osf_sys.c:1016:18: note: 'kts' was declared here struct timespec kts; ^ Signed-off-by: Chen Gang <> Signed-off-by: Matt Turner <>
2015-05-26alpha: Wire up all missing implemented syscallsChen Gang3-1/+7
And still left the missing unimplemented syscalls as warnings. The related warnings for missing implemented syscalls: CALL scripts/ <stdin>:1241:2: warning: #warning syscall getrandom not implemented [-Wcpp] <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp] <stdin>:1250:2: warning: #warning syscall execveat not implemented [-Wcpp] Signed-off-by: Chen Gang <> Signed-off-by: Matt Turner <>
2015-05-26alpha: Fix bootpfile and bootpzfile make targetsHelge Deller4-7/+319
Fix the bootpfile and bootpzfile make targets to creat BOOTP images. Both targets were broken due to some missing defines to re-map ELF constants. In addition the old code used the generic vsprintf function of the kernel which we now replace by a simple and much smaller implementation for the bootloader. Signed-off-by: Helge Deller <> Signed-off-by: Matt Turner <>
2015-05-26alpha: copy_thread(): rename 'arg' argument to 'kthread_arg'Alex Dowad1-4/+3
The 'arg' argument to copy_thread() is only ever used when forking a new kernel thread. Hence, rename it to 'kthread_arg' for clarity (and consistency with do_fork() and other arch-specific implementations of copy_thread()). Signed-off-by: Alex Dowad <> Signed-off-by: Matt Turner <>
2015-05-26alpha: delete non-required instances of <linux/init.h>Paul Gortmaker7-7/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Acked-by: Richard Henderson <> Cc: Ivan Kokshaysky <> Cc: Matt Turner <> Cc: Signed-off-by: Paul Gortmaker <> Signed-off-by: Matt Turner <>