05 Dec, 2011

1 commit

  • The previous patch modified the stop cpus path to use NMI
    instead of IRQ as the way to communicate to the other cpus to
    shutdown. There were some concerns that various machines may
    have problems with using an NMI IPI.

    This patch creates a selftest to check if NMI is working at
    boot. The idea is to help catch any issues before the machine
    panics and we learn the hard way.

    Loosely based on the locking-selftest.c file, this separate file
    runs a couple of simple tests and reports the results. The
    output looks like:

    ...
    Brought up 4 CPUs
    ----------------
    | NMI testsuite:
    --------------------
    remote IPI: ok |
    local IPI: ok |
    --------------------
    Good, all 2 testcases passed! |
    ---------------------------------
    Total of 4 processors activated (21330.61 BogoMIPS).
    ...

    Signed-off-by: Don Zickus
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: seiji.aguchi@hds.com
    Cc: vgoyal@redhat.com
    Cc: mjg@redhat.com
    Cc: tony.luck@intel.com
    Cc: gong.chen@intel.com
    Cc: satoru.moriya@hds.com
    Cc: avi@redhat.com
    Cc: Andi Kleen
    Link: http://lkml.kernel.org/r/1318533267-18880-3-git-send-email-dzickus@redhat.com
    Signed-off-by: Ingo Molnar

    Don Zickus
     

10 Oct, 2011

1 commit

  • The nmi stuff is changing a lot and adding more functionality. Split it
    out from the traps.c file so it doesn't continue to pollute that file.

    This makes it easier to find and expand all the future nmi related work.

    No real functional changes here.

    Signed-off-by: Don Zickus
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1317409584-23662-2-git-send-email-dzickus@redhat.com
    Signed-off-by: Ingo Molnar

    Don Zickus
     

13 Aug, 2011

1 commit

  • * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-tip:
    x86-64: Rework vsyscall emulation and add vsyscall= parameter
    x86-64: Wire up getcpu syscall
    x86: Remove unnecessary compile flag tweaks for vsyscall code
    x86-64: Add vsyscall:emulate_vsyscall trace event
    x86-64: Add user_64bit_mode paravirt op
    x86-64, xen: Enable the vvar mapping
    x86-64: Work around gold bug 13023
    x86-64: Move the "user" vsyscall segment out of the data segment.
    x86-64: Pad vDSO to a page boundary

    Linus Torvalds
     

11 Aug, 2011

1 commit

  • As of commit 98d0ac38ca7b1b7a552c9a2359174ff84decb600
    Author: Andy Lutomirski
    Date: Thu Jul 14 06:47:22 2011 -0400

    x86-64: Move vread_tsc and vread_hpet into the vDSO

    user code no longer directly calls into code in arch/x86/kernel/, so
    we don't need compile flag hacks to make it safe. All vdso code is
    in the vdso directory now.

    Signed-off-by: Andy Lutomirski
    Link: http://lkml.kernel.org/r/835cd05a4c7740544d09723d6ba48f4406f9826c.1312988155.git.luto@mit.edu
    Signed-off-by: H. Peter Anvin

    Andy Lutomirski
     

23 Jul, 2011

1 commit

  • * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86-64, vdso: Do not allocate memory for the vDSO
    clocksource: Change __ARCH_HAS_CLOCKSOURCE_DATA to a CONFIG option
    x86, vdso: Drop now wrong comment
    Document the vDSO and add a reference parser
    ia64: Replace clocksource.fsys_mmio with generic arch data
    x86-64: Move vread_tsc and vread_hpet into the vDSO
    clocksource: Replace vread with generic arch data
    x86-64: Add --no-undefined to vDSO build
    x86-64: Allow alternative patching in the vDSO
    x86: Make alternative instruction pointers relative
    x86-64: Improve vsyscall emulation CS and RIP handling
    x86-64: Emulate legacy vsyscalls
    x86-64: Fill unused parts of the vsyscall page with 0xcc
    x86-64: Remove vsyscall number 3 (venosys)
    x86-64: Map the HPET NX
    x86-64: Remove kernel.vsyscall64 sysctl
    x86-64: Give vvars their own page
    x86-64: Document some of entry_64.S
    x86-64: Fix alignment of jiffies variable

    Linus Torvalds
     

15 Jul, 2011

1 commit


21 Jun, 2011

2 commits


07 Jun, 2011

1 commit

  • There's a fair amount of code in the vsyscall page. It contains
    a syscall instruction (in the gettimeofday fallback) and who
    knows what will happen if an exploit jumps into the middle of
    some other code.

    Reduce the risk by replacing the vsyscalls with short magic
    incantations that cause the kernel to emulate the real
    vsyscalls. These incantations are useless if entered in the
    middle.

    This causes vsyscalls to be a little more expensive than real
    syscalls. Fortunately sensible programs don't use them.
    The only exception is time() which is still called by glibc
    through the vsyscall - but calling time() millions of times
    per second is not sensible. glibc has this fixed in the
    development tree.

    This patch is not perfect: the vread_tsc and vread_hpet
    functions are still at a fixed address. Fixing that might
    involve making alternative patching work in the vDSO.

    Signed-off-by: Andy Lutomirski
    Acked-by: Linus Torvalds
    Cc: Jesper Juhl
    Cc: Borislav Petkov
    Cc: Arjan van de Ven
    Cc: Jan Beulich
    Cc: richard -rw- weinberger
    Cc: Mikael Pettersson
    Cc: Andi Kleen
    Cc: Brian Gerst
    Cc: Louis Rilling
    Cc: Valdis.Kletnieks@vt.edu
    Cc: pageexec@freemail.hu
    Link: http://lkml.kernel.org/r/e64e1b3c64858820d12c48fa739efbd1485e79d5.1307292171.git.luto@mit.edu
    [ Removed the CONFIG option - it's simpler to just do it unconditionally. Tidied up the code as well. ]
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     

28 May, 2011

1 commit

  • The commit 44259b1abfaa8bb819d25d41d71e8e33e25dd36a
    Author: Andy Lutomirski
    x86-64: Move vread_tsc into a new file with sensible options

    Removed the -pg from tsc.o which caused the function graph tracer
    to go into an infinite function call recursion as it uses the tsc
    internally outside its recursion protection, thus tracing the tsc
    breaks the function graph tracer.

    This commit also added the file vread_tsc_64.c that gets used
    by vdso but failed to prevent GCOV from monkeying with it,
    causing userspace to try to access kernel data when GCOV was
    enabled.

    Thanks to Thomas Gleixner for pointing out GCOV as the likely
    culprit that added strange kernel accesses into the vread_tsc()
    call.

    Cc: Author: Andy Lutomirski
    Cc: Thomas Gleixner
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

24 May, 2011

1 commit

  • vread_tsc is short and hot, and it's userspace code so the usual
    reasons to enable -pg and turn off sibling calls don't apply.

    (OK, turning off sibling calls has no effect. But it might
    someday...)

    As an added benefit, tsc.c is profilable now.

    Signed-off-by: Andy Lutomirski
    Cc: Andi Kleen
    Cc: Linus Torvalds
    Cc: "David S. Miller"
    Cc: Eric Dumazet
    Cc: Peter Zijlstra
    Cc: Borislav Petkov
    Link: http://lkml.kernel.org/r/%3C99c6d7f5efa3ccb65b4ac6eb443e1ab7bad47d7b.1306156808.git.luto%40mit.edu%3E
    Signed-off-by: Thomas Gleixner

    Andy Lutomirski
     

20 May, 2011

1 commit


10 May, 2011

1 commit


23 Mar, 2011

1 commit

  • 8237A utilizes the interface provided by CONFIG_ISA_DMA_API, specifically
    claim_dma_lock() and release_dma_lock(). Thus, there's a strict
    dependency on the config option and the module should only be loaded if
    the kernel supports ISA-style DMA.

    Signed-off-by: David Rientjes
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Cc: Bjorn Helgaas
    Cc: Russell King
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

17 Mar, 2011

1 commit

  • …rnel/git/tip/linux-2.6-tip

    * 'x86-trampoline-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Fix binutils-2.21 symbol related build failures
    x86-64, trampoline: Remove unused variable
    x86, reboot: Fix the use of passed arguments in 32-bit BIOS reboot
    x86, reboot: Move the real-mode reboot code to an assembly file
    x86: Make the GDT_ENTRY() macro in <asm/segment.h> safe for assembly
    x86, trampoline: Use the unified trampoline setup for ACPI wakeup
    x86, trampoline: Common infrastructure for low memory trampolines

    Fix up trivial conflicts in arch/x86/kernel/Makefile

    Linus Torvalds
     

16 Mar, 2011

1 commit

  • The isci driver needs to retrieve its preboot OROM image which contains
    necessary runtime parameters like platform specific sas addresses and
    phy configuration. There is no ROM BAR associated with this area,
    instead we will need to scan legacy expansion ROM space.

    1/ Promote the probe_roms_32 implementation to x86-64
    2/ Add a facility to find and map an adapter rom by pci device (according to
    PCI Firmware Specification Revision 3.0)

    Signed-off-by: Dave Jiang
    LKML-Reference:
    Signed-off-by: Dan Williams
    Signed-off-by: H. Peter Anvin

    Dan Williams
     

11 Mar, 2011

1 commit


24 Feb, 2011

1 commit

  • This patch adds minimal support for device tree on x86. The device
    tree blob is passed to the kernel via setup_data which requires at
    least boot protocol 2.09.

    Memory size, restricted memory regions, boot arguments are gathered
    the traditional way so things like cmd_line are just here to let the
    code compile.

    The current plan is use the device tree as an extension and to gather
    information which can not be enumerated and would have to be hardcoded
    otherwise. This includes things like
    - which devices are on this I2C/SPI bus?
    - how are the interrupts wired to IO APIC?
    - where could my hpet be?

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Dirk Brandewie
    Acked-by: Grant Likely
    Cc: sodaville@linutronix.de
    Cc: devicetree-discuss@lists.ozlabs.org
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     

18 Feb, 2011

2 commits

  • Move the real-mode reboot code out to an assembly file (reboot_32.S)
    which is allocated using the common lowmem trampoline allocator.

    Signed-off-by: H. Peter Anvin
    LKML-Reference:
    Cc: Stephen Rothwell
    Cc: Rafael J. Wysocki
    Cc: Matthieu Castet

    H. Peter Anvin
     
  • Common infrastructure for low memory trampolines. This code installs
    the trampolines permanently in low memory very early. It also permits
    multiple pieces of code to be used for this purpose.

    This code also introduces a standard infrastructure for computing
    symbol addresses in the trampoline code.

    The only change to the actual SMP trampolines themselves is that the
    64-bit trampoline has been made reusable -- the previous version would
    overwrite the code with a status variable; this moves the status
    variable to a separate location.

    Signed-off-by: H. Peter Anvin
    LKML-Reference:
    Cc: Rafael J. Wysocki
    Cc: Matthieu Castet
    Cc: Stephen Rothwell

    H. Peter Anvin
     

07 Jan, 2011

1 commit

  • …el/git/tip/linux-2.6-tip

    * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, earlyprintk: Move mrst early console to platform/ and fix a typo
    x86, apbt: Setup affinity for apb timers acting as per-cpu timer
    ce4100: Add errata fixes for UART on CE4100
    x86: platform: Move iris to x86/platform where it belongs
    x86, mrst: Check platform_device_register() return code
    x86/platform: Add Eurobraille/Iris power off support
    x86, mrst: Add explanation for using 1960 as the year offset for vrtc
    x86, mrst: Fix dependencies of "select INTEL_SCU_IPC"
    x86, mrst: The shutdown for MRST requires the SCU IPC mechanism
    x86: Ce4100: Add reboot_fixup() for CE4100
    ce4100: Add PCI register emulation for CE4100
    x86: Add CE4100 platform support
    x86: mrst: Set vRTC's IRQ to level trigger type
    x86: mrst: Add audio driver bindings
    rtc: Add drivers/rtc/rtc-mrst.c
    x86: mrst: Add vrtc driver which serves as a wall clock device
    x86: mrst: Add Moorestown specific reboot/shutdown support
    x86: mrst: Parse SFI timer table for all timer configs
    x86/mrst: Add SFI platform device parsing code

    Linus Torvalds
     

18 Dec, 2010

1 commit

  • This implements arch_remove_reservations() so allocate_resource() can
    avoid any arch-specific reserved areas. This currently just avoids the
    BIOS area (the first 1MB), but could be used for E820 reserved areas if
    that turns out to be necessary.

    We previously avoided this area in pcibios_align_resource(). This patch
    moves the test from that PCI-specific path to a generic path, so *all*
    resource allocations will avoid this area.

    Acked-by: H. Peter Anvin
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     

07 Dec, 2010

1 commit


20 Nov, 2010

1 commit


18 Nov, 2010

1 commit

  • The Iris machines from Eurobraille do not have APM or ACPI support
    to shut themselves down properly. A special I/O sequence is
    needed to do so. This modle runs this I/O sequence at
    kernel shutdown when its force parameter is set to 1.

    Signed-off-by: Shérab
    Acked-by: "H. Peter Anvin"
    [ did minor coding style edits ]
    Signed-off-by: Ingo Molnar

    Shérab
     

27 Oct, 2010

7 commits


22 Oct, 2010

6 commits

  • …git/tip/linux-2.6-tip

    * 'x86-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, iommu: Update header comments with appropriate naming
    ia64, iommu: Add a dummy iommu_table.h file in IA64.
    x86, iommu: Fix IOMMU_INIT alignment rules
    x86, doc: Adding comments about .iommu_table and its neighbors.
    x86, iommu: Utilize the IOMMU_INIT macros functionality.
    x86, VT-d: Make Intel VT-d IOMMU use IOMMU_INIT_* macros.
    x86, GART/AMD-VI: Make AMD GART and IOMMU use IOMMU_INIT_* macros.
    x86, calgary: Make Calgary IOMMU use IOMMU_INIT_* macros.
    x86, xen-swiotlb: Make Xen-SWIOTLB use IOMMU_INIT_* macros.
    x86, swiotlb: Make SWIOTLB use IOMMU_INIT_* macros.
    x86, swiotlb: Simplify SWIOTLB pci_swiotlb_detect routine.
    x86, iommu: Add proper dependency sort routine (and sanity check).
    x86, iommu: Make all IOMMU's detection routines return a value.
    x86, iommu: Add IOMMU_INIT macros, .iommu_table section, and iommu_table_entry structure

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'x86-vmware-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, paravirt: Remove alloc_pmd_clone hook, only used by VMI
    x86, vmware: Remove deprecated VMI kernel support

    Fix up trivial #include conflict in arch/x86/kernel/smpboot.c

    Linus Torvalds
     
  • * 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, olpc: XO-1 uses/depends on PCI
    x86, olpc: Register XO-1 platform devices
    x86, olpc: Add XO-1 poweroff support
    x86, olpc: Don't retry EC commands forever
    x86, olpc: Rework BIOS signature check
    x86, olpc: Only enable PCI configuration type override on XO-1

    Linus Torvalds
     
  • * 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: sfi: Make local functions static
    x86, earlyprintk: Add hsu early console for Intel Medfield platform
    x86, earlyprintk: Add earlyprintk for Intel Moorestown platform
    x86: Add two helper macros for fixed address mapping
    x86, mrst: A function in a header file needs to be marked "inline"

    Linus Torvalds
     
  • …el/git/tip/linux-2.6-tip

    * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Remove stale pmtimer_64.c
    x86, cleanups: Use clear_page/copy_page rather than memset/memcpy
    x86: Remove unnecessary #ifdef ACPI/X86_IO_ACPI
    x86, cleanup: Remove obsolete boot_cpu_id variable

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'x86-amd-nb-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, amd_nb: Enable GART support for AMD family 0x15 CPUs
    x86, amd: Use compute unit information to determine thread siblings
    x86, amd: Extract compute unit information for AMD CPUs
    x86, amd: Add support for CPUID topology extension of AMD CPUs
    x86, nmi: Support NMI watchdog on newer AMD CPU families
    x86, mtrr: Assume SYS_CFG[Tom2ForceMemTypeWB] exists on all future AMD CPUs
    x86, k8: Rename k8.[ch] to amd_nb.[ch] and CONFIG_K8_NB to CONFIG_AMD_NB
    x86, k8-gart: Decouple handling of garts and northbridges
    x86, cacheinfo: Fix dependency of AMD L3 CID
    x86, kvm: add new AMD SVM feature bits
    x86, cpu: Fix allowed CPUID bits for KVM guests
    x86, cpu: Update AMD CPUID feature bits
    x86, cpu: Fix renamed, not-yet-shipping AMD CPUID feature bit
    x86, AMD: Remove needless CPU family check (for L3 cache info)
    x86, tsc: Remove CPU frequency calibration on AMD

    Linus Torvalds
     

19 Oct, 2010

1 commit

  • Provide a mechanism that allows running code in IRQ context. It is
    most useful for NMI code that needs to interact with the rest of the
    system -- like wakeup a task to drain buffers.

    Perf currently has such a mechanism, so extract that and provide it as
    a generic feature, independent of perf so that others may also
    benefit.

    The IRQ context callback is generated through self-IPIs where
    possible, or on architectures like powerpc the decrementer (the
    built-in timer facility) is set to generate an interrupt immediately.

    Architectures that don't have anything like this get to do with a
    callback from the timer tick. These architectures can call
    irq_work_run() at the tail of any IRQ handlers that might enqueue such
    work (like the perf IRQ handler) to avoid undue latencies in
    processing the work.

    Signed-off-by: Peter Zijlstra
    Acked-by: Kyle McMartin
    Acked-by: Martin Schwidefsky
    [ various fixes ]
    Signed-off-by: Huang Ying
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

16 Oct, 2010

1 commit