1. 02 2月, 2010 1 次提交
    • E
      x86, mtrr: Constify struct mtrr_ops · 3b9cfc0a
      Emese Revfy 提交于
      This is part of the ops structure constification
      effort started by Arjan van de Ven et al.
      
      Benefits of this constification:
      
       * prevents modification of data that is shared
         (referenced) by many other structure instances
         at runtime
      
       * detects/prevents accidental (but not intentional)
         modification attempts on archs that enforce
         read-only kernel data at runtime
      
       * potentially better optimized code as the compiler
         can assume that the const data cannot be changed
      
       * the compiler/linker move const data into .rodata
         and therefore exclude them from false sharing
      Signed-off-by: NEmese Revfy <re.emese@gmail.com>
      LKML-Reference: <4B65D712.3080804@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      3b9cfc0a
  2. 30 1月, 2010 5 次提交
    • J
      perf, hw_breakpoint, kgdb: Do not take mutex for kernel debugger · 5352ae63
      Jason Wessel 提交于
      This patch fixes the regression in functionality where the
      kernel debugger and the perf API do not nicely share hw
      breakpoint reservations.
      
      The kernel debugger cannot use any mutex_lock() calls because it
      can start the kernel running from an invalid context.
      
      A mutex free version of the reservation API needed to get
      created for the kernel debugger to safely update hw breakpoint
      reservations.
      
      The possibility for a breakpoint reservation to be concurrently
      processed at the time that kgdb interrupts the system is
      improbable. Should this corner case occur the end user is
      warned, and the kernel debugger will prohibit updating the
      hardware breakpoint reservations.
      
      Any time the kernel debugger reserves a hardware breakpoint it
      will be a system wide reservation.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: kgdb-bugreport@lists.sourceforge.net
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: torvalds@linux-foundation.org
      LKML-Reference: <1264719883-7285-3-git-send-email-jason.wessel@windriver.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5352ae63
    • J
      x86, hw_breakpoints, kgdb: Fix kgdb to use hw_breakpoint API · cc096749
      Jason Wessel 提交于
      In the 2.6.33 kernel, the hw_breakpoint API is now used for the
      performance event counters.  The hw_breakpoint_handler() now
      consumes the hw breakpoints that were previously set by kgdb
      arch specific code.  In order for kgdb to work in conjunction
      with this core API change, kgdb must use some of the low level
      functions of the hw_breakpoint API to install, uninstall, and
      deal with hw breakpoint reservations.
      
      The kgdb core required a change to call kgdb_disable_hw_debug
      anytime a slave cpu enters kgdb_wait() in order to keep all the
      hw breakpoints in sync as well as to prevent hitting a hw
      breakpoint while kgdb is active.
      
      During the architecture specific initialization of kgdb, it will
      pre-allocate 4 disabled (struct perf event **) structures.  Kgdb
      will use these to manage the capabilities for the 4 hw
      breakpoint registers, per cpu.  Right now the hw_breakpoint API
      does not have a way to ask how many breakpoints are available,
      on each CPU so it is possible that the install of a breakpoint
      might fail when kgdb restores the system to the run state.  The
      intent of this patch is to first get the basic functionality of
      hw breakpoints working and leave it to the person debugging the
      kernel to understand what hw breakpoints are in use and what
      restrictions have been imposed as a result.  Breakpoint
      constraints will be dealt with in a future patch.
      
      While atomic, the x86 specific kgdb code will call
      arch_uninstall_hw_breakpoint() and arch_install_hw_breakpoint()
      to manage the cpu specific hw breakpoints.
      
      The net result of these changes allow kgdb to use the same pool
      of hw_breakpoints that are used by the perf event API, but
      neither knows about future reservations for the available hw
      breakpoint slots.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: kgdb-bugreport@lists.sourceforge.net
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: torvalds@linux-foundation.org
      LKML-Reference: <1264719883-7285-2-git-send-email-jason.wessel@windriver.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cc096749
    • D
      x86: Add quirk for Intel DG45FC board to avoid low memory corruption · 7c099ce1
      David Härdeman 提交于
      Commit 6aa542a6 added a quirk for the
      Intel DG45ID board due to low memory corruption. The Intel DG45FC
      shares the same BIOS (and the same bug) as noted in:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=13736Signed-off-by: NDavid Härdeman <david@hardeman.nu>
      LKML-Reference: <20100128200254.GA9134@hardeman.nu>
      Cc: <stable@kernel.org>
      Cc: Alexey Fisher <bug-track@fisher-privat.net>
      Cc: ykzhao <yakui.zhao@intel.com>
      Cc: Tony Bones <aabonesml@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      7c099ce1
    • H
      x86: get rid of the insane TIF_ABI_PENDING bit · 05d43ed8
      H. Peter Anvin 提交于
      Now that the previous commit made it possible to do the personality
      setting at the point of no return, we do just that for ELF binaries.
      And suddenly all the reasons for that insane TIF_ABI_PENDING bit go
      away, and we can just make SET_PERSONALITY() just do the obvious thing
      for a 32-bit compat process.
      
      Everything becomes much more straightforward this way.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      05d43ed8
    • L
      Split 'flush_old_exec' into two functions · 221af7f8
      Linus Torvalds 提交于
      'flush_old_exec()' is the point of no return when doing an execve(), and
      it is pretty badly misnamed.  It doesn't just flush the old executable
      environment, it also starts up the new one.
      
      Which is very inconvenient for things like setting up the new
      personality, because we want the new personality to affect the starting
      of the new environment, but at the same time we do _not_ want the new
      personality to take effect if flushing the old one fails.
      
      As a result, the x86-64 '32-bit' personality is actually done using this
      insane "I'm going to change the ABI, but I haven't done it yet" bit
      (TIF_ABI_PENDING), with SET_PERSONALITY() not actually setting the
      personality, but just the "pending" bit, so that "flush_thread()" can do
      the actual personality magic.
      
      This patch in no way changes any of that insanity, but it does split the
      'flush_old_exec()' function up into a preparatory part that can fail
      (still called flush_old_exec()), and a new part that will actually set
      up the new exec environment (setup_new_exec()).  All callers are changed
      to trivially comply with the new world order.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      221af7f8
  3. 29 1月, 2010 1 次提交
  4. 28 1月, 2010 1 次提交
  5. 27 1月, 2010 2 次提交
  6. 25 1月, 2010 7 次提交
  7. 24 1月, 2010 1 次提交
    • H
      x86: Remove "x86 CPU features in debugfs" (CONFIG_X86_CPU_DEBUG) · b1600918
      H. Peter Anvin 提交于
      CONFIG_X86_CPU_DEBUG, which provides some parsed versions of the x86
      CPU configuration via debugfs, has caused boot failures on real
      hardware.  The value of this feature has been marginal at best, as all
      this information is already available to userspace via generic
      interfaces.
      
      Causes crashes that have not been fixed + minimal utility -> remove.
      
      See the referenced LKML thread for more information.
      Reported-by: NOzan Çağlayan <ozan@pardus.org.tr>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <alpine.LFD.2.00.1001221755320.13231@localhost.localdomain>
      Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: <stable@kernel.org>
      b1600918
  8. 23 1月, 2010 6 次提交
  9. 22 1月, 2010 1 次提交
  10. 21 1月, 2010 1 次提交
  11. 19 1月, 2010 2 次提交
  12. 17 1月, 2010 1 次提交
  13. 16 1月, 2010 2 次提交
  14. 13 1月, 2010 6 次提交
    • I
      x86: xen: 64-bit kernel RPL should be 0 · e68266b7
      Ian Campbell 提交于
      Under Xen 64 bit guests actually run their kernel in ring 3,
      however the hypervisor takes care of squashing descriptor the
      RPLs transparently (in order to allow them to continue to
      differentiate between user and kernel space CS using the RPL).
      Therefore the Xen paravirt backend should use RPL==0 instead of
      1 (or 3). Using RPL==1 causes generic arch code to take
      incorrect code paths because it uses "testl $3, <CS>, je foo"
      type tests for a userspace CS and this considers 1==userspace.
      
      This issue was previously masked because get_kernel_rpl() was
      omitted when setting CS in kernel_thread(). This was fixed when
      kernel_thread() was unified with 32 bit in
      f443ff42.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Christian Kujau <lists@nerdbynature.de>
      Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
      Cc: Cyrill Gorcunov <gorcunov@gmail.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      LKML-Reference: <1263377768-19600-2-git-send-email-ian.campbell@citrix.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e68266b7
    • C
      x86: kernel_thread() -- initialize SS to a known state · 864a0922
      Cyrill Gorcunov 提交于
      Before the kernel_thread was converted into "C" we had
      pt_regs::ss set to __KERNEL_DS (by SAVE_ALL asm macro).
      
      Though I must admit I didn't find any *explicit* load of
      %ss from this structure the better to be on a safe side
      and set it to a known value.
      Signed-off-by: NCyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Christian Kujau <lists@nerdbynature.de>
      Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      LKML-Reference: <1263377768-19600-1-git-send-email-ian.campbell@citrix.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      864a0922
    • F
      x86/agp: Fix agp_amd64_init and agp_amd64_cleanup · 42590a75
      FUJITA Tomonori 提交于
      This fixes the regression introduced by the commit
      f405d2c0.
      
      The above commit fixes the following issue:
      
        http://marc.info/?l=linux-kernel&m=126192729110083&w=2
      
      However, it doesn't work properly when you remove and insert the
      agp_amd64 module again.
      
      agp_amd64_init() and agp_amd64_cleanup should be called only
      when gart_iommu is not called earlier (that is, the GART IOMMU
      is not enabled). We need to use 'gart_iommu_aperture' to see if
      GART IOMMU is enabled or not.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: mitov@issp.bas.bg
      Cc: davej@redhat.com
      LKML-Reference: <20100104161603L.fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      42590a75
    • M
      x86: SGI UV: Fix mapping of MMIO registers · fcfbb2b5
      Mike Travis 提交于
      This fixes the problem of the initialization code not correctly
      mapping the entire MMIO space on a UV system.  A side effect is
      the map_high() interface needed to be changed to accommodate
      different address and size shifts.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Reviewed-by: NMike Habeck <habeck@sgi.com>
      Cc: <stable@kernel.org>
      Cc: Jack Steiner <steiner@sgi.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <4B479202.7080705@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fcfbb2b5
    • A
      x86: mce.h: Fix warning in header checks · df39a2e4
      Alan Cox 提交于
      Someone isn't reading their build output: Move the definition
      out of the exported header.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Cc: linux-kernel@vger.kernelorg
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      df39a2e4
    • F
      perf: Stop stack frame walking off kernel addresses boundaries · c2c5d45d
      Frederic Weisbecker 提交于
      While processing kernel perf callchains, an bad entry can be
      considered as a valid stack pointer but not as a kernel address.
      
      In this case, we hang in an endless loop. This can happen in an
      x86-32 kernel after processing the last entry in a kernel
      stacktrace.
      
      Just stop the stack frame walking after we encounter an invalid
      kernel address.
      
      This fixes a hard lockup in x86-32.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <1262227945-27014-1-git-send-regression-fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c2c5d45d
  15. 12 1月, 2010 3 次提交