1. 06 12月, 2010 1 次提交
  2. 24 10月, 2010 1 次提交
  3. 23 10月, 2010 2 次提交
  4. 20 10月, 2010 4 次提交
    • R
      apic, x86: Use BIOS settings for IBS and MCE threshold interrupt LVT offsets · 27afdf20
      Robert Richter 提交于
      We want the BIOS to setup the EILVT APIC registers. The offsets
      were hardcoded and BIOS settings were overwritten by the OS.
      Now, the subsystems for MCE threshold and IBS determine the LVT
      offset from the registers the BIOS has setup. If the BIOS setup
      is buggy on a family 10h system, a workaround enables IBS. If
      the OS determines an invalid register setup, a "[Firmware Bug]:
      " error message is reported.
      
      We need this change also for upcomming cpu families.
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      LKML-Reference: <1286360874-1471-3-git-send-email-robert.richter@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      27afdf20
    • R
      apic, x86: Check if EILVT APIC registers are available (AMD only) · a68c439b
      Robert Richter 提交于
      This patch implements checks for the availability of LVT entries
      (APIC500-530) and reserves it if used. The check becomes
      necessary since we want to let the BIOS provide the LVT offsets.
       The offsets should be determined by the subsystems using it
      like those for MCE threshold or IBS.  On K8 only offset 0
      (APIC500) and MCE interrupts are supported. Beginning with
      family 10h at least 4 offsets are available.
      
      Since offsets must be consistent for all cores, we keep track of
      the LVT offsets in software and reserve the offset for the same
      vector also to be used on other cores. An offset is freed by
      setting the entry to APIC_EILVT_MASKED.
      
      If the BIOS is right, there should be no conflicts. Otherwise a
      "[Firmware Bug]: ..." error message is generated. However, if
      software does not properly determines the offsets, it is not
      necessarily a BIOS bug.
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      LKML-Reference: <1286360874-1471-2-git-send-email-robert.richter@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a68c439b
    • J
      x86, mm: Hold mm->page_table_lock while doing vmalloc_sync · 617d34d9
      Jeremy Fitzhardinge 提交于
      Take mm->page_table_lock while syncing the vmalloc region.  This prevents
      a race with the Xen pagetable pin/unpin code, which expects that the
      page_table_lock is already held.  If this race occurs, then Xen can see
      an inconsistent page type (a page can either be read/write or a pagetable
      page, and pin/unpin converts it between them), which will cause either
      the pin or the set_p[gm]d to fail; either will crash the kernel.
      
      vmalloc_sync_all() should be called rarely, so this extra use of
      page_table_lock should not interfere with its normal users.
      
      The mm pointer is stashed in the pgd page's index field, as that won't
      be otherwise used for pgds.
      Reported-by: NIan Campbell <ian.cambell@eu.citrix.com>
      Originally-by: NJan Beulich <jbeulich@novell.com>
      LKML-Reference: <4CB88A4C.1080305@goop.org>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      617d34d9
    • A
      KVM: Fix fs/gs reload oops with invalid ldt · 9581d442
      Avi Kivity 提交于
      kvm reloads the host's fs and gs blindly, however the underlying segment
      descriptors may be invalid due to the user modifying the ldt after loading
      them.
      
      Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
      of home grown unsafe versions.
      
      This is CVE-2010-3698.
      
      KVM-Stable-Tag.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      9581d442
  5. 19 10月, 2010 1 次提交
    • P
      irq_work: Add generic hardirq context callbacks · e360adbe
      Peter Zijlstra 提交于
      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: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NKyle McMartin <kyle@mcmartin.ca>
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      [ various fixes ]
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      LKML-Reference: <1287036094.7768.291.camel@yhuang-dev>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e360adbe
  6. 14 10月, 2010 2 次提交
    • J
      xen: Cope with unmapped pages when initializing kernel pagetable · fef5ba79
      Jeremy Fitzhardinge 提交于
      Xen requires that all pages containing pagetable entries to be mapped
      read-only.  If pages used for the initial pagetable are already mapped
      then we can change the mapping to RO.  However, if they are initially
      unmapped, we need to make sure that when they are later mapped, they
      are also mapped RO.
      
      We do this by knowing that the kernel pagetable memory is pre-allocated
      in the range e820_table_start - e820_table_end, so any pfn within this
      range should be mapped read-only.  However, the pagetable setup code
      early_ioremaps the pages to write their entries, so we must make sure
      that mappings created in the early_ioremap fixmap area are mapped RW.
      (Those mappings are removed before the pages are presented to Xen
      as pagetable pages.)
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      LKML-Reference: <4CB63A80.8060702@goop.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      fef5ba79
    • H
      x86-64, asm: If the assembler supports fxsave64, use it · d7acb92f
      H. Peter Anvin 提交于
      Kbuild allows for us to probe for the existence of specific constructs
      in the assembler, use them to find out if we can use fxsave64 and
      permit the compiler to generate better code.
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      d7acb92f
  7. 13 10月, 2010 2 次提交
  8. 12 10月, 2010 7 次提交
  9. 09 10月, 2010 1 次提交
  10. 08 10月, 2010 5 次提交
    • F
      x86, earlyprintk: Add hsu early console for Intel Medfield platform · 4d033556
      Feng Tang 提交于
      Intel Medfield platform has a high speed UART device, which
      could act as a early console. To enable early printk of HSU
      console, simply add "earlyprintk=hsu" in kernel command line.
      
      Currently we put the code in the early_printk_mrst.c as it is
      also for Intel MID platforms like the mrst early console
      Signed-off-by: NFeng Tang <feng.tang@intel.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Cc: greg@kroah.com
      LKML-Reference: <1284361736-23011-5-git-send-email-feng.tang@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4d033556
    • F
      x86, earlyprintk: Add earlyprintk for Intel Moorestown platform · c20b5c33
      Feng Tang 提交于
      Intel Moorestown platform has a spi-uart device(Maxim3110),
      which connects to a Designware spi core controller. This patch
      will add early console function based on it.
      
      As it will be used long before Linux spi subsystem get
      initialised, we simply directly manipulate the spi controller's
      register to acheive the early console func. This is safe as it
      will be disabled when devices subsytem get initialised.
      
      To use it, user need enable CONFIG_X86_MRST_EARLY_PRINTK in
      kenrel config and add "earlyprintk=mrst" in kernel command line.
      Signed-off-by: NFeng Tang <feng.tang@intel.com>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Cc: greg@kroah.com
      LKML-Reference: <1284361736-23011-4-git-send-email-feng.tang@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c20b5c33
    • F
      x86: Add two helper macros for fixed address mapping · 5a47c7da
      Feng Tang 提交于
      Sometimes fixmap will be used to map an physical address which
      is not PAGE align, so to use it we need first map it and then
      add the address offset to the mapped fixed address. These 2 new
      helpers are suggested by Ingo Molnar to make the process
      simpler.
      
      For a physicall address like "phys", a directly usable virtual
      address can be get by
      	virt = (void *)set_fixmap_offset(fixed_idx, phys);
      or
      	virt = (void *)set_fixmap_offset_nocache(fixed_idx, phys);
      (depends on whether the physical address is cachable or not).
      Signed-off-by: NFeng Tang <feng.tang@intel.com>
      Cc: alan@linux.intel.com
      Cc: greg@kroah.com
      Cc: x86@kernel.org
      LKML-Reference: <1284361736-23011-3-git-send-email-feng.tang@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5a47c7da
    • H
      x86, mrst: A function in a header file needs to be marked "inline" · 55572b29
      H. Peter Anvin 提交于
      A function in a header file needs to be explicitly marked "inline", or
      gcc will complain if it is not used.
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
      Cc: <stable@kernel.org> v2.6.36
      LKML-Reference: <1274295685-6774-3-git-send-email-jacob.jun.pan@linux.intel.com>
      55572b29
    • N
      x86-32: Fix sparse warning for the __PHYSICAL_MASK calculation · a416e9e1
      Namhyung Kim 提交于
      On 32-bit non-PAE system, cast to 'phys_addr_t' truncates value
      before subtraction. Subtracting before cast produce same result
      but remove following warnings from sparse:
      
       arch/x86/include/asm/pgtable_types.h:255:38: warning: cast truncates bits from constant value (100000000 becomes 0)
       arch/x86/include/asm/pgtable_types.h:270:38: warning: cast truncates bits from constant value (100000000 becomes 0)
       arch/x86/include/asm/pgtable.h:127:32: warning: cast truncates bits from constant value (100000000 becomes 0)
       arch/x86/include/asm/pgtable.h:132:32: warning: cast truncates bits from constant value (100000000 becomes 0)
       arch/x86/include/asm/pgtable.h:344:31: warning: cast truncates bits from constant value (100000000 becomes 0)
      
      64-bit or PAE machines will not be affected by this change.
      Signed-off-by: NNamhyung Kim <namhyung@gmail.com>
      LKML-Reference: <1285770588-14065-1-git-send-email-namhyung@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      a416e9e1
  11. 07 10月, 2010 1 次提交
    • D
      Fix IRQ flag handling naming · df9ee292
      David Howells 提交于
      Fix the IRQ flag handling naming.  In linux/irqflags.h under one configuration,
      it maps:
      
      	local_irq_enable() -> raw_local_irq_enable()
      	local_irq_disable() -> raw_local_irq_disable()
      	local_irq_save() -> raw_local_irq_save()
      	...
      
      and under the other configuration, it maps:
      
      	raw_local_irq_enable() -> local_irq_enable()
      	raw_local_irq_disable() -> local_irq_disable()
      	raw_local_irq_save() -> local_irq_save()
      	...
      
      This is quite confusing.  There should be one set of names expected of the
      arch, and this should be wrapped to give another set of names that are expected
      by users of this facility.
      
      Change this to have the arch provide:
      
      	flags = arch_local_save_flags()
      	flags = arch_local_irq_save()
      	arch_local_irq_restore(flags)
      	arch_local_irq_disable()
      	arch_local_irq_enable()
      	arch_irqs_disabled_flags(flags)
      	arch_irqs_disabled()
      	arch_safe_halt()
      
      Then linux/irqflags.h wraps these to provide:
      
      	raw_local_save_flags(flags)
      	raw_local_irq_save(flags)
      	raw_local_irq_restore(flags)
      	raw_local_irq_disable()
      	raw_local_irq_enable()
      	raw_irqs_disabled_flags(flags)
      	raw_irqs_disabled()
      	raw_safe_halt()
      
      with type checking on the flags 'arguments', and then wraps those to provide:
      
      	local_save_flags(flags)
      	local_irq_save(flags)
      	local_irq_restore(flags)
      	local_irq_disable()
      	local_irq_enable()
      	irqs_disabled_flags(flags)
      	irqs_disabled()
      	safe_halt()
      
      with tracing included if enabled.
      
      The arch functions can now all be inline functions rather than some of them
      having to be macros.
      
      Signed-off-by: David Howells <dhowells@redhat.com> [X86, FRV, MN10300]
      Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> [Tile]
      Signed-off-by: Michal Simek <monstr@monstr.eu> [Microblaze]
      Tested-by: Catalin Marinas <catalin.marinas@arm.com> [ARM]
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [AVR]
      Acked-by: Tony Luck <tony.luck@intel.com> [IA-64]
      Acked-by: Hirokazu Takata <takata@linux-m32r.org> [M32R]
      Acked-by: Greg Ungerer <gerg@uclinux.org> [M68K/M68KNOMMU]
      Acked-by: Ralf Baechle <ralf@linux-mips.org> [MIPS]
      Acked-by: Kyle McMartin <kyle@mcmartin.ca> [PA-RISC]
      Acked-by: Paul Mackerras <paulus@samba.org> [PowerPC]
      Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [S390]
      Acked-by: Chen Liqin <liqin.chen@sunplusct.com> [Score]
      Acked-by: Matt Fleming <matt@console-pimps.org> [SH]
      Acked-by: David S. Miller <davem@davemloft.net> [Sparc]
      Acked-by: Chris Zankel <chris@zankel.net> [Xtensa]
      Reviewed-by: Richard Henderson <rth@twiddle.net> [Alpha]
      Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> [H8300]
      Cc: starvik@axis.com [CRIS]
      Cc: jesper.nilsson@axis.com [CRIS]
      Cc: linux-cris-kernel@axis.com
      df9ee292
  12. 06 10月, 2010 2 次提交
  13. 02 10月, 2010 1 次提交
  14. 27 9月, 2010 1 次提交
  15. 25 9月, 2010 1 次提交
  16. 24 9月, 2010 1 次提交
    • D
      x86, olpc: Rework BIOS signature check · 3e3c4860
      Daniel Drake 提交于
      The XO-1.5 laptop is not currently detected as an OLPC machine because
      it fails this XO-1-centric check.
      
      Now that we have OLPC OFW support in the kernel, a more sensible
      check is to see if we found OFW during boot and check the architecture
      property.
      
      Also remove a now-meaningless codepath, as we're always going to have
      OFW support with OLPC.
      Signed-off-by: NDaniel Drake <dsd@laptop.org>
      LKML-Reference: <20100923162846.D8D409D401B@zog.reactivated.net>
      Cc: Andres Salomon <dilinger@queued.net>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      3e3c4860
  17. 23 9月, 2010 5 次提交
    • J
      x86/amd-iommu: Work around S3 BIOS bug · 4c894f47
      Joerg Roedel 提交于
      This patch adds a workaround for an IOMMU BIOS problem to
      the AMD IOMMU driver. The result of the bug is that the
      IOMMU does not execute commands anymore when the system
      comes out of the S3 state resulting in system failure. The
      bug in the BIOS is that is does not restore certain hardware
      specific registers correctly. This workaround reads out the
      contents of these registers at boot time and restores them
      on resume from S3. The workaround is limited to the specific
      IOMMU chipset where this problem occurs.
      
      Cc: stable@kernel.org
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      4c894f47
    • J
      x86/amd-iommu: Set iommu configuration flags in enable-loop · e9bf5197
      Joerg Roedel 提交于
      This patch moves the setting of the configuration and
      feature flags out out the acpi table parsing path and moves
      it into the iommu-enable path. This is needed to reliably
      fix resume-from-s3.
      
      Cc: stable@kernel.org
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      e9bf5197
    • S
      jump label: Remove duplicate structure for x86 · 95fccd46
      Steven Rostedt 提交于
      The structure in the x86 jump label code uses the typedef jump_label_t,
      which is defined by the #ifdef arch type. The structure does not need
      to be duplicated there.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      95fccd46
    • J
      jump label: x86 support · d9f5ab7b
      Jason Baron 提交于
      add x86 support for jump label. I'm keeping this patch separate so its clear
      to arch maintainers what was required for x86 support this new feature.
      Hopefully, it wouldn't be too painful for other archs.
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      LKML-Reference: <f838f49f40fbea0254036194be66dc48b598dcea.1284733808.git.jbaron@redhat.com>
      
      [ cleaned up some formatting ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      d9f5ab7b
    • J
      jump label: Base patch for jump label · bf5438fc
      Jason Baron 提交于
      base patch to implement 'jump labeling'. Based on a new 'asm goto' inline
      assembly gcc mechanism, we can now branch to labels from an 'asm goto'
      statment. This allows us to create a 'no-op' fastpath, which can subsequently
      be patched with a jump to the slowpath code. This is useful for code which
      might be rarely used, but which we'd like to be able to call, if needed.
      Tracepoints are the current usecase that these are being implemented for.
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      LKML-Reference: <ee8b3595967989fdaf84e698dc7447d315ce972a.1284733808.git.jbaron@redhat.com>
      
      [ cleaned up some formating ]
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      bf5438fc
  18. 21 9月, 2010 2 次提交