1. 19 Aug, 2010 1 commit
    • Borislav Petkov's avatar
      x86, hotplug: Serialize CPU hotplug to avoid bringup concurrency issues · d7c53c9e
      Borislav Petkov authored
      When testing cpu hotplug code on 32-bit we kept hitting the "CPU%d:
      Stuck ??" message due to multiple cores concurrently accessing the
      cpu_callin_mask, among others.
      
      Since these codepaths are not protected from concurrent access due to
      the fact that there's no sane reason for making an already complex
      code unnecessarily more complex - we hit the issue only when insanely
      switching cores off- and online - serialize hotplugging cores on the
      sysfs level and be done with it.
      
      [ v2.1: fix !HOTPLUG_CPU build ]
      
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      LKML-Reference: <20100819181029.GC17171@aftab>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      d7c53c9e
  2. 18 Aug, 2010 3 commits
    • H. Peter Anvin's avatar
      x86-32: Fix dummy trampoline-related inline stubs · 8848a910
      H. Peter Anvin authored
      Fix dummy inline stubs for trampoline-related functions when no
      trampolines exist (until we get rid of the no-trampoline case
      entirely.)
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Cc: Joerg Roedel <joerg.roedel@amd.com>
      Cc: Borislav Petkov <borislav.petkov@amd.com>
      LKML-Reference: <4C6C294D.3030404@zytor.com>
      8848a910
    • Joerg Roedel's avatar
      x86-32: Separate 1:1 pagetables from swapper_pg_dir · fd89a137
      Joerg Roedel authored
      This patch fixes machine crashes which occur when heavily exercising the
      CPU hotplug codepaths on a 32-bit kernel. These crashes are caused by
      AMD Erratum 383 and result in a fatal machine check exception. Here's
      the scenario:
      
      1. On 32-bit, the swapper_pg_dir page table is used as the initial page
      table for booting a secondary CPU.
      
      2. To make this work, swapper_pg_dir needs a direct mapping of physical
      memory in it (the low mappings). By adding those low, large page (2M)
      mappings (PAE kernel), we create the necessary conditions for Erratum
      383 to occur.
      
      3. Other CPUs which do not participate in the off- and onlining game may
      use swapper_pg_dir while the low mappings are present (when leave_mm is
      called). For all steps below, the CPU referred to is a CPU that is using
      swapper_pg_dir, and not the CPU which is being onlined.
      
      4. The presence of the low mappings in swapper_pg_dir can result
      in TLB entries for addresses below __PAGE_OFFSET to be established
      speculatively. These TLB entries are marked global and large.
      
      5. When the CPU with such TLB entry switches to another page table, this
      TLB entry remains because it is global.
      
      6. The process then generates an access to an address covered by the
      above TLB entry but there is a permission mismatch - the TLB entry
      covers a large global page not accessible to userspace.
      
      7. Due to this permission mismatch a new 4kb, user TLB entry gets
      established. Further, Erratum 383 provides for a small window of time
      where both TLB entries are present. This results in an uncorrectable
      machine check exception signalling a TLB multimatch which panics the
      machine.
      
      There are two ways to fix this issue:
      
              1. Always do a global TLB flush when a new cr3 is loaded and the
              old page table was swapper_pg_dir. I consider this a hack hard
              to understand and with performance implications
      
              2. Do not use swapper_pg_dir to boot secondary CPUs like 64-bit
              does.
      
      This patch implements solution 2. It introduces a trampoline_pg_dir
      which has the same layout as swapper_pg_dir with low_mappings. This page
      table is used as the initial page table of the booting CPU. Later in the
      bringup process, it switches to swapper_pg_dir and does a global TLB
      flush. This fixes the crashes in our test cases.
      
      -v2: switch to swapper_pg_dir right after entering start_secondary() so
      that we are able to access percpu data which might not be mapped in the
      trampoline page table.
      Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
      LKML-Reference: <20100816123833.GB28147@aftab>
      Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      fd89a137
    • Hans Rosenfeld's avatar
      x86, cpu: Fix regression in AMD errata checking code · 07a7795c
      Hans Rosenfeld authored
      A bug in the family-model-stepping matching code caused the presence of
      errata to go undetected when OSVW was not used. This causes hangs on
      some K8 systems because the E400 workaround is not enabled.
      Signed-off-by: default avatarHans Rosenfeld <hans.rosenfeld@amd.com>
      LKML-Reference: <1282141190-930137-1-git-send-email-hans.rosenfeld@amd.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      07a7795c
  3. 16 Aug, 2010 5 commits
    • Linus Torvalds's avatar
      Linux 2.6.36-rc1 · da5cabf8
      Linus Torvalds authored
      da5cabf8
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 · 2245ba2a
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
        gcc-4.6: ACPI: fix unused but set variables in ACPI
        ACPI thermal: make procfs I/F depend on CONFIG_ACPI_PROCFS
        ACPI video: make procfs I/F depend on CONFIG_ACPI_PROCFS
        ACPI processor: remove deprecated ACPI procfs I/F
        ACPI power_resource: remove unused procfs I/F
        ACPI: remove deprecated ACPI procfs I/F
        ACPI: introduce drivers/acpi/sysfs.c
        ACPI: introduce module parameter acpi.aml_debug_output
        ACPI: introduce drivers/acpi/debugfs.c
        ACPI, APEI, ERST debug support
        ACPI, APEI, Manage GHES as platform devices
        ACPI, APEI, Rename CPER and GHES severity constants
        ACPI, APEI, Fix a typo of error path of apei_resources_request
        ACPI / ACPICA: Fix reference counting problems with GPE handlers
        ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device
        ACPI / Sleep: Drop acpi_suspend_finish()
        ACPI / Sleep: Consolidate suspend and hibernation routines
        ACPI / Wakeup: Simplify enabling of wakeup devices
        ACPI / Sleep: Rework enabling wakeup devices
        ACPI / Sleep: Free NVS copy if suspending of devices fails
      
      Fixed up totally buggered "ACPI: fix unused but set variables in ACPI"
      patch that doesn't even compile in the merge.
      
      Thanks to Sedat Dilek <sedat.dilek@googlemail.com> for noticing the
      breakage before I even pulled.  And a big "Grrr.." at Len for not even
      bothering to compile the tree before asking me to pull.
      2245ba2a
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/iommu-2.6 · e2e96c66
      Linus Torvalds authored
      * git://git.infradead.org/iommu-2.6:
        intel-iommu: Fix 32-bit build warning with __cmpxchg()
        intr-remap: allow disabling source id checking
      e2e96c66
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/mtd-2.6 · 7355a5a6
      Linus Torvalds authored
      * git://git.infradead.org/mtd-2.6:
        mtd/nand_ids: Fix buswidth
        mtd/m25p80: fix test for end of loop
        mtd/m25p80: retlen is never NULL
        MIPS: Fix gen_nand probe structures contents
        gen_nand: Test if nr_chips field is valid
        BFIN: Fix gen_nand probe structures contents
        nand/denali: move all hardware initialization work to denali_hw_init
        nand/denali: Add a page check in denali_read_page & denali_read_page_raw
        nand/denali: use cpu_relax() while waiting for hardware interrupt
        nand/denali: change read_status function method
        nand/denali: Fixed check patch warnings
        ARM: Fix gen_nand probe structures contents
        mtd/nand_base: fix kernel-doc warnings & typos
        nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk
        nand/denali: Fixed handle ECC error bugs
        nand/denali: use iowrite32() to replace denali_write32()
        nand/denali: Fixed probe function bugs
      7355a5a6
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 7a1b29a8
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        arch/tile: don't validate CROSS_COMPILE needlessly
        arch/tile: export only COMMAND_LINE_SIZE to userspace.
        arch/tile: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
        arch/tile: Rename the hweight() implementations to __arch_hweight()
        arch/tile: extend syscall ABI to set r1 on return as well.
        arch/tile: Various cleanups.
        arch/tile: support backtracing on TILE-Gx
        arch/tile: Fix a couple of issues with the COMPAT code for TILE-Gx.
        arch/tile: Use separate, better minsec values for clocksource and sched_clock.
        arch/tile: correct a bug in freeing bootmem by VA for the optional second initrd.
        arch: tile: mm: pgtable.c: Removed duplicated #include
        arch: tile: kernel/proc.c Removed duplicated #include
        Add fanotify syscalls to <asm-generic/unistd.h>.
        arch/tile: support new kunmap_atomic() naming convention.
        tile: remove unused ISA_DMA_THRESHOLD define
      
      Conflicts in arch/tile/configs/tile_defconfig (pick the mainline version
      with the reduced defconfig).
      7a1b29a8
  4. 15 Aug, 2010 26 commits
  5. 14 Aug, 2010 5 commits