aboutsummaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAge
...
| * UBUNTU: SAUCE: xen: Do not use pv spinlocks on HVMStefan Bader2011-09-01
| | | | | | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/838026 This is broken at the moment and causes our 3.0 kernel to hang on boot when started as a HVM guest of a 4.1.1 or newer hypervisor. It should be reverted or dropped as soon as we find a proper solution. Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
| * UBUNTU: SAUCE: x86: reboot: Make Dell Latitude E6520 use reboot=pciLeann Ogasawara2011-08-31
| | | | | | | | | | | | | | | | | | The Dell Latitude E6520 doesn't reboot unless reboot=pci is set. BugLink: http://bugs.launchpad.net/bugs/833705 Cc: <stable@kernel.org> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
| * UBUNTU: SAUCE: seccomp_filter: add HAVE_SECCOMP_FILTER and seccomp_execveWill Drewry2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support to the x86 architecture by providing a compatibility mode wrapper for sys_execve's number and selecting HAVE_SECCOMP_FILTER v9: rebase on to bccaeafd7c117acee36e90d37c7e05c19be9e7bf Signed-off-by: Will Drewry <wad@chromium.org> BUG=chromium-os:14496 TEST=see others ref'd in bug Change-Id: Id0e8440181e98f7edb12ef702f2f6bdca54d15a6 Reviewed-on: http://gerrit.chromium.org/gerrit/3244 Reviewed-by: Sonny Rao <sonnyrao@chromium.org> Tested-by: Will Drewry <wad@chromium.org> Signed-off-by: Kees Cook <kees.cook@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
| * Revert "UBUNTU: SAUCE: ARM: OMAP: Add macros for comparing silicon revision"Leann Ogasawara2011-08-30
| | | | | | | | | | | | This reverts commit eae56558ac6b866a74e6fcc5278a9b20c16d2210. Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
| * KVM: Add instruction fetch checking when walking guest page tableYang, Wei Y2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/796476 This patch adds instruction fetch checking when walking guest page table, to implement SMEP when emulating instead of executing natively. Signed-off-by: Yang, Wei <wei.y.yang@intel.com> Signed-off-by: Shan, Haitao <haitao.shan@intel.com> Signed-off-by: Li, Xin <xin.li@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com> (cherry picked from commit e57d4a356ad3ac46881399c424cc6cf6dd16359d) Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com> Acked-by: Andy Whitcroft <apw@canonical.com>
| * KVM: Mask function7 ebx against host capability word9Yang, Wei Y2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/796476 This patch masks CPUID leaf 7 ebx against host capability word9. Signed-off-by: Yang, Wei <wei.y.yang@intel.com> Signed-off-by: Shan, Haitao <haitao.shan@intel.com> Signed-off-by: Li, Xin <xin.li@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com> (backported from commit 611c120f7486a19e7df2225f875a52ef0b599ae8 upstream) Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com> Acked-by: Andy Whitcroft <apw@canonical.com>
| * KVM: Add SMEP support when setting CR4Yang, Wei Y2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/796476 This patch adds SMEP handling when setting CR4. Signed-off-by: Yang, Wei <wei.y.yang@intel.com> Signed-off-by: Shan, Haitao <haitao.shan@intel.com> Signed-off-by: Li, Xin <xin.li@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com> (cherry picked from commit c68b734fba402b9bfdd49e23b776c42dbeaf1f5b) Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com> Acked-by: Andy Whitcroft <apw@canonical.com>
| * KVM: Remove SMEP bit from CR4_RESERVED_BITSYang, Wei Y2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/796476 This patch removes SMEP bit from CR4_RESERVED_BITS. Signed-off-by: Yang, Wei <wei.y.yang@intel.com> Signed-off-by: Shan, Haitao <haitao.shan@intel.com> Signed-off-by: Li, Xin <xin.li@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com> (cherry picked from commit 8d9c975fc5b825cb76953a1b45a84195ffc6f4ab) Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com> Acked-by: Andy Whitcroft <apw@canonical.com>
| * UBUNTU: SAUCE: omap3: beagle: if rev unknown, assume xM revision CRobert Nelson2011-08-30
| | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/770679 Signed-off-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
| * UBUNTU: SAUCE: omap3: beagle: detect new xM revision CRobert Nelson2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | Beagle xM rev C has nEN_USB_PWR inverted again, so we need proper check for revision C. BugLink: http://bugs.launchpad.net/bugs/770679 Signed-off-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
| * UBUNTU: SAUCE: omap3: beagle: detect new xM revision BRobert Nelson2011-08-30
| | | | | | | | | | | | | | | | | | | | | | The xM B uses a DM3730 ES1.1 over the ES1.0 on xM A's, no other board changes. BugLink: http://bugs.launchpad.net/bugs/770679 Signed-off-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
| * UBUNTU: ubuntu: nx-emu - i386: mmap randomization for executable mappingsIngo Molnar2011-08-30
| | | | | | | | | | | | | | | | | | | | | | This code is originally from Ingo Molnar, with some later rebasing and fixes to respect all the randomization-disabling knobs. It provides address randomization algorithm when NX emulation is in use in 32-bit processes. Kees Cook pushed the brk area further away in the case of PIE binaries landing their brk inside the CS limit. Signed-off-by: Kees Cook <kees.cook@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
| * UBUNTU: ubuntu: nx-emu - i386: NX emulationIngo Molnar2011-08-30
| | | | | | | | | | | | | | | | | | | | | | This is old code with some cruft, all originally by Ingo Molnar with much later rebasing by Fedora folks and at least one arcane fix by Roland McGrath a few years ago. No longer uses exec-shield sysctl, merged with disable_nx. Kees Cook fixed boottime NX reporting for various corner cases. Signed-off-by: Kees Cook <kees.cook@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
| * UBUNTU: SAUCE: S3 early resume debug via keyboard LEDsColin Ian King2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to debug S3 early resume by flashing the keyboard LEDs three times in the realmode path. This is useful to allow one to determine if S3 hangs occur in the BIOS or during the early resume phase. Add kernel parameter acpi_sleep=s3_leds to enable the s3 debugging option. This can also be enabled by writing 8 to /proc/sys/kernel/acpi_video_flags. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
| * UBUNTU: SAUCE: [arm] fixup __aeabi_uldivmod undefined build errorLeann Ogasawara2011-08-30
| | | | | | | | | | | | | | | | | | | | | | When building on arm we run into the following build error due to gcc-4.6 optimizing do_div into a uldivmod call: ERROR: "__aeabi_uldivmod" [drivers/scsi/megaraid/megaraid_sas.ko] undefined! Inline some assembly to prevent the compiler optimization. Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
| * UBUNTU: SAUCE: omap3: beaglexm: fix DVI initializationRicardo Salveti de Araujo2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Function beagle_twl_gpio_setup is called after beagle_display_init, what makes lets reset_gpio with an invalid value at the time it request the gpio. As a side effect the DVI reset GPIO is not properly set. Also removing old code that power down DVI in a hardcoded way, as it's not necessary anymore. Tested with Beagle-xM and C4. Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
| * UBUNTU: SAUCE: ARM: Adding vdd_sdi regulator supply to OMAP3EVMMathieu J. Poirier2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.launchpad.net/bugs/630885 Taken from Maverick and slightly modified to compile in Natty. When booting, the omapdss subsystem is looking for a regulator named "vdds_sdi". When the regulator is not found the initialisation sequence is aborted resulting in omapfb not finding a display to work with. This patch allows the omapfb sub system to complete its initialisation properly and enable LCD display. The problem was fixed by lumping a "vdds_sdi" with the already existing "vdds_dsi" regulator. This fix takes its root from work done on the Beagle board and the Pandora board. More spefically: - 7b097896e4a5b5ea4798db806e63a1138b1b8eb8 - f6873eedd94df20cfb705856a78440a4c176c6b6 Signed-off-by: Mathieu Poirier <mathieu.poirier@canonical.com> Signed-off-by: Andy Whitcroft <apw@canonical.com>
| * UBUNTU: SAUCE: fix pv-ops for legacy XenJohn Johansen2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import fix_xen_guest_on_old_EC2.patch from fedora 14 Legacy hypervisors (RHEL 5.0 and RHEL 5.1) do not handle guest writes to cr4 gracefully. If a guest attempts to write a bit of cr4 that is unsupported, then the HV is so offended it crashes the domain. While later guest kernels (such as RHEL6) don't assume the HV supports all features, they do expect nicer responses. That assumption introduced code that probes whether or not xsave is supported early in the boot. So now when attempting to boot a RHEL6 guest on RHEL5.0 or RHEL5.1 an early crash will occur. This patch is quite obviously an undesirable hack. The real fix for this problem should be in the HV, and is, in later HVs. However, to support running on old HVs, RHEL6 can take this small change. No impact will occur for running on any RHEL HV (not even RHEL 5.5 supports xsave). There is only potential for guest performance loss on upstream Xen. All this by way of explanation for why is this patch not going upstream. Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
| * UBUNTU: SAUCE: ARM: OMAP: Add macros for comparing silicon revisionLee Jones2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/608095 Adapted from arago project patch by Sanjeev Premi <premi@ti.com> This helps provide the required setup to enable USB Ethernet (usb0) and USB host on the XM Beagleboard (A rev). This will be submitted upstream by Steve Sakoman. Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Lee Jones <lee.jones@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
| * UBUNTU: ARM: Adding regulator supply for vdds_sdi.Mathieu J. Poirier2011-08-30
| | | | | | | | | | | | | | | | | | | | | | The omapfb driver couldn't locate its display sink because of an initialisation error in the DSS subsystem. This error was caused by a missing 'sdi' entry in the board power regulator list. BugLink: https://bugs.launchpad.net/bugs/597904 Signed-off-by: Mathieu Poirier <mathieu.poirier@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
| * UBUNTU: SAUCE: (no-up) dma-mapping: Remove WARN_ON in dma_free_coherentStefan Bader2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BugLink: http://bugs.launchpad.net/bugs/458201 Triggered by the following backtrace: WARNING: at /build/buildd/linux-2.6.32/arch/x86/include/asm/dma-mapping.h:154 ___free_dma_mem_cluster+0x102/0x110() [<ffffffff81064f9b>] warn_slowpath_common+0x7b/0xc0 [<ffffffff81064ff4>] warn_slowpath_null+0x14/0x20 [<ffffffff8139a2a2>] ___free_dma_mem_cluster+0x102/0x110 [<ffffffff8139a072>] __sym_mfree+0xd2/0x100 [<ffffffff8139a109>] __sym_mfree_dma+0x69/0x100 [<ffffffff8139245f>] sym_hcb_free+0x8f/0x1f0 This patch never will be accepted upstream because the WARN_ON is supposed to perevent driver development which is only compatible with x86 on x86 (ARM can sleep in that function). The right way to fix it would be to make the offending function use locks in the right way but that requires careful implementation. Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andy Whitcroft <apw@canonical.com>
| * x86, mce: Make xeon75xx memory driver dependent on PCIAndi Kleen2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | commit 757fd770c649b0dfa6eeefc2d5e2ea3119b6be9c upstream (linux-2.6-tip) Found by Ingo Molnar's automated tester. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andi Kleen <ak@linux.intel.com> LKML-Reference: <20100123113359.GA29555@one.firstfloor.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andy Whitcroft <apw@canonical.com>
| * x86, mce: Rename cpu_specific_poll to mce_cpu_specific_pollH. Peter Anvin2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | commit f91c4d2649531cc36e10c6bc0f92d0f99116b209 upstream (linux-2.6-tip) cpu_specific_poll is a global variable, and it should have a global namespace name. Since it is MCE-specific (it takes a struct mce *), rename it mce_cpu_specific_poll. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Andi Kleen <andi@firstfloor.org> LKML-Reference: <20100121221711.GA8242@basil.fritz.box> Signed-off-by: Andy Whitcroft <apw@canonical.com>
| * x86, mce: Xeon75xx specific interface to get corrected memory error informationAndi Kleen2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit c773f70fd6b53ee646727f871833e53649907264 upstream (linux-2.6-tip) Xeon 75xx doesn't log physical addresses on corrected machine check events in the standard architectural MSRs. Instead the address has to be retrieved in a model specific way. This makes it impossible to do predictive failure analysis. Implement cpu model specific code to do this in mce-xeon75xx.c using a new hook that is called from the generic poll code. The code retrieves the physical address/DIMM of the last corrected error from the platform and makes the address look like a standard architectural MCA address for further processing. In addition the DIMM information is retrieved and put into two new aux0/aux1 fields in struct mce. These fields are specific to a given CPU. These fields can then be decoded by mcelog into specific DIMM information. The latest mcelog version has support for this. Longer term this will be likely in a different output format, but short term that seemed like the least intrusive solution. Older mcelog can deal with an extended record. There's no code to print this information on a panic because this only works for corrected errors, and corrected errors do not usually result in panics. The act of retrieving the DIMM/PA information can take some time, so this code has a rate limit to avoid taking too much CPU time on a error flood. The whole thing can be loaded as a module and has suitable PCI-IDs so that it can be auto-loaded by a distribution. The code also checks explicitely for the expected CPU model number to make sure this code doesn't run anywhere else. Signed-off-by: Andi Kleen <ak@linux.intel.com> LKML-Reference: <20100121221711.GA8242@basil.fritz.box> Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andy Whitcroft <apw@canonical.com>
| * UBUNTU: (no-up) arm -- enable ubuntu/ directoryEric Miao2011-08-30
| | | | | | | | | | Signed-off-by: Eric Miao <eric.miao@canonical.com> Signed-off-by: Andy Whitcroft <apw@canonical.com>
| * UBUNTU: (no-up) fold down debian for ubuntu-oneiric 3.0-rc1 rebaseLeann Ogasawara2011-08-30
| | | | | | | | | | | | Ignore: yes Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
| * x86, UV: Remove UV delay in starting slave cpusJack Steiner2011-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 05e33fc20ea5e493a2a1e7f1d04f43cdf89f83ed upstream. Delete the 10 msec delay between the INIT and SIPI when starting slave cpus. I can find no requirement for this delay. BIOS also has similar code sequences without the delay. Removing the delay reduces boot time by 40 sec. Every bit helps. Signed-off-by: Jack Steiner <steiner@sgi.com> Link: http://lkml.kernel.org/r/20110805140900.GA6774@sgi.com Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * x86-32, vdso: On system call restart after SYSENTER, use int $0x80H. Peter Anvin2011-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 7ca0758cdb7c241cb4e0490a8d95f0eb5b861daf upstream. When we enter a 32-bit system call via SYSENTER or SYSCALL, we shuffle the arguments to match the int $0x80 calling convention. This was probably a design mistake, but it's what it is now. This causes errors if the system call as to be restarted. For SYSENTER, we have to invoke the instruction from the vdso as the return address is hardcoded. Accordingly, we can simply replace the jump in the vdso with an int $0x80 instruction and use the slower entry point for a post-restart. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/CA%2B55aFztZ=r5wa0x26KJQxvZOaQq8s2v3u50wCyJcA-Sc4g8gQ@mail.gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * x86, olpc: Wait for last byte of EC command to be acceptedPaul Fox2011-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit a3ea14df0e383f44dcb2e61badb71180dbffe526 upstream. When executing EC commands, only waiting when there are still more bytes to write is usually fine. However, if the system suspends very quickly after a call to olpc_ec_cmd(), the last data byte may not yet be transferred to the EC, and the command will not complete. This solves a bug where the SCI wakeup mask was not correctly written when going into suspend. It means that sometimes, on XO-1.5 (but not XO-1), the devices that were marked as wakeup sources can't wake up the system. e.g. you ask for wifi wakeups, suspend, but then incoming wifi frames don't wake up the system as they should. Signed-off-by: Paul Fox <pgf@laptop.org> Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * xen: Do not enable PV IPIs when vector callback not presentStefano Stabellini2011-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 3c05c4bed4ccce3f22f6d7899b308faae24ad198 upstream. Fix regression for HVM case on older (<4.1.1) hypervisors caused by commit 99bbb3a84a99cd04ab16b998b20f01a72cfa9f4f Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Date: Thu Dec 2 17:55:10 2010 +0000 xen: PV on HVM: support PV spinlocks and IPIs This change replaced the SMP operations with event based handlers without taking into account that this only works when the hypervisor supports callback vectors. This causes unexplainable hangs early on boot for HVM guests with more than one CPU. BugLink: http://bugs.launchpad.net/bugs/791850 Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Tested-and-Reported-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * xen/x86: replace order-based range checking of M2P table by linear oneJan Beulich2011-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit ccbcdf7cf1b5f6c6db30d84095b9c6c53043af55 upstream. The order-based approach is not only less efficient (requiring a shift and a compare, typical generated code looking like this mov eax, [machine_to_phys_order] mov ecx, eax shr ebx, cl test ebx, ebx jnz ... whereas a direct check requires just a compare, like in cmp ebx, [machine_to_phys_nr] jae ... ), but also slightly dangerous in the 32-on-64 case - the element address calculation can wrap if the next power of two boundary is sufficiently far away from the actual upper limit of the table, and hence can result in user space addresses being accessed (with it being unknown what may actually be mapped there). Additionally, the elimination of the mistaken use of fls() here (should have been __fls()) fixes a latent issue on x86-64 that would trigger if the code was run on a system with memory extending beyond the 44-bit boundary. Signed-off-by: Jan Beulich <jbeulich@novell.com> [v1: Based on Jeremy's feedback] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * x86, mtrr: lock stop machine during MTRR rendezvous sequenceSuresh Siddha2011-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 6d3321e8e2b3bf6a5892e2ef673c7bf536e3f904 upstream. MTRR rendezvous sequence using stop_one_cpu_nowait() can potentially happen in parallel with another system wide rendezvous using stop_machine(). This can lead to deadlock (The order in which works are queued can be different on different cpu's. Some cpu's will be running the first rendezvous handler and others will be running the second rendezvous handler. Each set waiting for the other set to join for the system wide rendezvous, leading to a deadlock). MTRR rendezvous sequence is not implemented using stop_machine() as this gets called both from the process context aswell as the cpu online paths (where the cpu has not come online and the interrupts are disabled etc). stop_machine() works with only online cpus. For now, take the stop_machine mutex in the MTRR rendezvous sequence that gets called from an online cpu (here we are in the process context and can potentially sleep while taking the mutex). And the MTRR rendezvous that gets triggered during cpu online doesn't need to take this stop_machine lock (as the stop_machine() already ensures that there is no cpu hotplug going on in parallel by doing get_online_cpus()) TBD: Pursue a cleaner solution of extending the stop_machine() infrastructure to handle the case where the calling cpu is still not online and use this for MTRR rendezvous sequence. fixes: https://bugzilla.novell.com/show_bug.cgi?id=672008 Reported-by: Vadim Kotelnikov <vadimuzzz@inbox.ru> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Link: http://lkml.kernel.org/r/20110623182056.807230326@sbsiddha-MOBL3.sc.intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * x86, intel, power: Correct the MSR_IA32_ENERGY_PERF_BIAS messageLen Brown2011-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 17edf2d79f1ea6dfdb4c444801d928953b9f98d6 upstream. Fix the printk_once() so that it actually prints (didn't print before due to a stray comma.) [ hpa: changed to an incremental patch and adjusted the description accordingly. ] Signed-off-by: Len Brown <len.brown@intel.com> Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1107151732480.18606@x980 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Don't do hypervisor calls on non-sun4v in DS driver.David S. Miller2011-08-15
| | | | | | | | | | | | | | | | | | commit c92761fd9efcbbcb59e7bf4db88e29ce03229889 upstream. Reported-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * powerpc: pseries: Fix kexec on machines with more than 4TB of RAMAnton Blanchard2011-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit bed9a31527af8ff3dfbad62a1a42815cef4baab7 upstream. On a box with 8TB of RAM the MMU hashtable is 64GB in size. That means we have 4G PTEs. pSeries_lpar_hptab_clear was using a signed int to store the index which will overflow at 2G. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * powerpc: Fix device tree claim codeAnton Blanchard2011-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 966728dd88b4026ec58fee169ccceaeaf56ef120 upstream. I have a box that fails in OF during boot with: DEFAULT CATCH!, exception-handler=fff00400 at %SRR0: 49424d2c4c6f6768 %SRR1: 800000004000b002 ie "IBM,Logh". OF got corrupted with a device tree string. Looking at make_room and alloc_up, we claim the first chunk (1 MB) but we never claim any more. mem_end is always set to alloc_top which is the top of our available address space, guaranteeing we will never call alloc_up and claim more memory. Also alloc_up wasn't setting alloc_bottom to the bottom of the available address space. This doesn't help the box to boot, but we at least fail with an obvious error. We could relocate the device tree in a future patch. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * powerpc/pseries: Fix kexec on recent firmware versionsAnton Blanchard2011-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit b1301797f30370c430244979671978fc232f4533 upstream. Recent versions of firmware will fail to unmap the virtual processor area if we have a dispatch trace log registered. This causes kexec to fail. If a trace log is registered this patch unregisters it before the SLB shadow and virtual processor areas, fixing the problem. The address argument is ignored by firmware on unregister so we may as well remove it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Fix build with DEBUG_PAGEALLOC enabled.David S. Miller2011-08-15
| | | | | | | | | | | | | | | | | | | | [ Upstream commit 0785a8e87be0202744d8681363aecbd4ffbb5f5a ] arch/sparc/mm/init_64.c:1622:22: error: unused variable '__swapper_4m_tsb_phys_patch_end' [-Werror=unused-variable] arch/sparc/mm/init_64.c:1621:22: error: unused variable '__swapper_4m_tsb_phys_patch' [-Werror=unused-variable] Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Size mondo queues more sanely.David S. Miller2011-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 961f65fc41cdc1f9099a6075258816c0db98e390 ] There is currently no upper limit on the mondo queue sizes we'll use, which guarentees that we'll eventually his page allocation limits, and thus allocation failures, due to MAX_ORDER. Cap the sizes sanely, current limits are: CPU MONDO 2 * max_possible_cpus DEV MONDO 256 (basically NR_IRQS) RES MONDO 128 NRES MONDO 4 Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Access kernel TSB using physical addressing when possible.David S. Miller2011-08-15
| | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 9076d0e7e02b98f7a65df10d1956326c8d8ba61a ] On sun4v this is basically required since we point the hypervisor and the TSB walking hardware at these tables using physical addressing too. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Use popc when possible for ffs/__ffs/ffz.David S. Miller2011-08-15
| | | | | | | | | | | | | | [ Upstream commit 56d205cc5c0a3032a605121d4253e111193bf923 ] Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Set reboot-cmd using reboot data hypervisor call if available.David S. Miller2011-08-15
| | | | | | | | | | | | | | [ Upstream commit ea5e7447ea9d555558e0f13798f5143dd51a915a ] Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Add some missing hypervisor API groups.David S. Miller2011-08-15
| | | | | | | | | | | | | | [ Upstream commit e2eb9f8158ead43a88c0f0b4d74257b1be938a18 ] Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Use hweight64() in popc emulation.David S. Miller2011-08-15
| | | | | | | | | | | | | | [ Upstream commit d600cbed0fe8fceec04500824f638dfe4996c653 ] Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Use popc if possible for hweight routines.David S. Miller2011-08-15
| | | | | | | | | | | | | | | | | | [ Upstream commit ef7c4d4675d2a9206f913f26ca1a5cd41bff9d41 ] Just like powerpc, we code patch at boot time. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Minor tweaks to Niagara page copy/clear.David S. Miller2011-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit e95ade083939dcb4b0c51c1a2c8504ea9ef3d6ef ] Don't use floating point on Niagara2, use the traditional plain Niagara code instead. Unroll Niagara loops to 128 bytes for copy, and 256 bytes for clear. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Sanitize cpu feature detection and reporting.David S. Miller2011-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit ac85fe8b21248054851e05bfaa352562e5b06dd3 ] Instead of evaluating the cpu features for ELF_HWCAP every exec, calculate it once at boot time. Add AV_SPARC_* capability flag bits, compatible with what Solaris reports to applications. Report these capabilities once in the kernel log, and also via /proc/cpuinfo in a new "cpucaps" entry. If available, fetch the cpu features from the machine description 'hwcap-list' property of the 'cpu' node. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Detect and handle UltraSPARC-T3 cpu types.David S. Miller2011-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 4ba991d3eb379fbaa22049e7002341e97a673685 ] The cpu compatible string we look for is "SPARC-T3". As far as memset/memcpy optimizations go, we treat this chip the same as Niagara-T2/T2+. Use cache initializing stores for memset, and use perfetch, FPU block loads, cache initializing stores, and block stores for copies. We use the Niagara-T2 perf support, since T3 is a close relative in this regard. Later we'll add support for the new events T3 can report, plus enable T3's new "sample" mode. For now I haven't added any new ELF hwcap flags. We probably need to add a couple, for example: T2 and T3 both support the population count instruction in hardware. T3 supports VIS3 instructions, including support (finally) for partitioned shift. One can also now move directly between float and integer registers. T3 supports instructions meant to help with Galois Field and other HPC calculations, such as XOR multiply. Also there are "OP and negate" instructions, for example "fnmul" which is multiply-and-negate. T3 recognizes the transactional memory opcodes, however since transactional memory isn't supported: 1) 'commit' behaves as a NOP and 2) 'chkpt' always branches 3) 'rdcps' returns all zeros and 4) 'wrcps' behaves as a NOP. So we'll need about 3 new elf capability flags in the end to represent all of these things. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Don't do expensive hypervisor PCR write unless necessary.David S. Miller2011-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 314ff52727fe94dfbe07f3a9a489ab3ca8d8df5a ] The hypervisor call is only necessary if hypervisor events are being requested. So if we're not tracking hypervisor events, simply do a direct register write. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * sparc: Add T3 sun4v cpu type and hypervisor group defines.David S. Miller2011-08-15
| | | | | | | | | | | | | | [ Upstream commit 15e3608d7c273947dbf2eadbcaa66e51143928fb ] Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>