1. 09 12月, 2006 11 次提交
    • J
      [PATCH] Generic BUG for i386 · 91768d6c
      Jeremy Fitzhardinge 提交于
      This makes i386 use the generic BUG machinery.  There are no functional
      changes from the old i386 implementation.
      
      The main advantage in using the generic BUG machinery for i386 is that the
      inlined overhead of BUG is just the ud2a instruction; the file+line(+function)
      information are no longer inlined into the instruction stream.  This reduces
      cache pollution, and makes disassembly work properly.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Hugh Dickens <hugh@veritas.com>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      91768d6c
    • J
      [PATCH] Generic BUG implementation · 7664c5a1
      Jeremy Fitzhardinge 提交于
      This patch adds common handling for kernel BUGs, for use by architectures as
      they wish.  The code is derived from arch/powerpc.
      
      The advantages of having common BUG handling are:
       - consistent BUG reporting across architectures
       - shared implementation of out-of-line file/line data
       - implement CONFIG_DEBUG_BUGVERBOSE consistently
      
      This means that in inline impact of BUG is just the illegal instruction
      itself, which is an improvement for i386 and x86-64.
      
      A BUG is represented in the instruction stream as an illegal instruction,
      which has file/line information associated with it.  This extra information is
      stored in the __bug_table section in the ELF file.
      
      When the kernel gets an illegal instruction, it first confirms it might
      possibly be from a BUG (ie, in kernel mode, the right illegal instruction).
      It then calls report_bug().  This searches __bug_table for a matching
      instruction pointer, and if found, prints the corresponding file/line
      information.  If report_bug() determines that it wasn't a BUG which caused the
      trap, it returns BUG_TRAP_TYPE_NONE.
      
      Some architectures (powerpc) implement WARN using the same mechanism; if the
      illegal instruction was the result of a WARN, then report_bug(Q) returns
      CONFIG_DEBUG_BUGVERBOSE; otherwise it returns BUG_TRAP_TYPE_BUG.
      
      lib/bug.c keeps a list of loaded modules which can be searched for __bug_table
      entries.  The architecture must call
      module_bug_finalize()/module_bug_cleanup() from its corresponding
      module_finalize/cleanup functions.
      
      Unsetting CONFIG_DEBUG_BUGVERBOSE will reduce the kernel size by some amount.
      At the very least, filename and line information will not be recorded for each
      but, but architectures may decide to store no extra information per BUG at
      all.
      
      Unfortunately, gcc doesn't have a general way to mark an asm() as noreturn, so
      architectures will generally have to include an infinite loop (or similar) in
      the BUG code, so that gcc knows execution won't continue beyond that point.
      gcc does have a __builtin_trap() operator which may be useful to achieve the
      same effect, unfortunately it cannot be used to actually implement the BUG
      itself, because there's no way to get the instruction's address for use in
      generating the __bug_table entry.
      
      [randy.dunlap@oracle.com: Handle BUG=n, GENERIC_BUG=n to prevent build errors]
      [bunk@stusta.de: include/linux/bug.h must always #include <linux/module.h]
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Hugh Dickens <hugh@veritas.com>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7664c5a1
    • N
      [PATCH] lockdep: avoid lockdep warning in md · d63a5a74
      NeilBrown 提交于
      md_open takes ->reconfig_mutex which causes lockdep to complain.  This
      (normally) doesn't have deadlock potential as the possible conflict is with a
      reconfig_mutex in a different device.
      
      I say "normally" because if a loop were created in the array->member hierarchy
      a deadlock could happen.  However that causes bigger problems than a deadlock
      and should be fixed independently.
      
      So we flag the lock in md_open as a nested lock.  This requires defining
      mutex_lock_interruptible_nested.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d63a5a74
    • P
      [PATCH] remove the old bd_mutex lockdep annotation · 2e7b651d
      Peter Zijlstra 提交于
      Remove the old complex and crufty bd_mutex annotation.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2e7b651d
    • T
      [PATCH] pktcdvd: add sysfs and debugfs interface · 32694850
      Thomas Maier 提交于
      Add a sysfs and debugfs interface to the pktcdvd driver.
      
      Look into the Documentation/ABI/testing/* files in the patch for more info.
      Signed-off-by: NThomas Maier <balagi@justmail.de>
      Signed-off-by: NPeter Osterlund <petero2@telia.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      32694850
    • T
      [PATCH] pktcdvd: bio write congestion using congestion_wait() · 0a0fc960
      Thomas Maier 提交于
      This adds a bio write queue congestion control to the pktcdvd driver with
      fixed on/off marks.  It prevents that the driver consumes a unlimited
      amount of write requests.
      
      [akpm@osdl.org: sync with congestion_wait() renaming]
      Signed-off-by: NThomas Maier <balagi@justmail.de>
      Cc: Peter Osterlund <petero2@telia.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0a0fc960
    • O
      [PATCH] make set_special_pids() static · ae424ae4
      Oleg Nesterov 提交于
      Make set_special_pids() static, the only caller is daemonize().
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ae424ae4
    • P
      [PATCH] tty: ->signal->tty locking · 24ec839c
      Peter Zijlstra 提交于
      Fix the locking of signal->tty.
      
      Use ->sighand->siglock to protect ->signal->tty; this lock is already used
      by most other members of ->signal/->sighand.  And unless we are 'current'
      or the tasklist_lock is held we need ->siglock to access ->signal anyway.
      
      (NOTE: sys_unshare() is broken wrt ->sighand locking rules)
      
      Note that tty_mutex is held over tty destruction, so while holding
      tty_mutex any tty pointer remains valid.  Otherwise the lifetime of ttys
      are governed by their open file handles.  This leaves some holes for tty
      access from signal->tty (or any other non file related tty access).
      
      It solves the tty SLAB scribbles we were seeing.
      
      (NOTE: the change from group_send_sig_info to __group_send_sig_info needs to
             be examined by someone familiar with the security framework, I think
             it is safe given the SEND_SIG_PRIV from other __group_send_sig_info
             invocations)
      
      [schwidefsky@de.ibm.com: 3270 fix]
      [akpm@osdl.org: various post-viro fixes]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NAlan Cox <alan@redhat.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: James Morris <jmorris@namei.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Jan Kara <jack@ucw.cz>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      24ec839c
    • H
      [PATCH] m32r: bootloader support for OPSPUT platform · d93f7de8
      Hirokazu Takata 提交于
      This patch supports "m32r-g00ff" bootloader for an OPSPUT platform.
      
      Applying this patch, it is possible to do ATA-boot from an IDE drive or
      HTTP-boot from network by m32r-g00ff.
      
          * arch/m32r/boot/compressed/m32r_sio.c: Fix hangup on OPSPUT at boot.
      
          * arch/m32r/kernel/io_opsput.c: IDE support for OPSPUT.
          * arch/m32r/kernel/setup_opsput.c: ditto.
          * include/asm-m32r/ide.h: ditto.
      Signed-off-by: NKazuhiro Inaoka <inaoka@linux-m32r.org>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d93f7de8
    • H
      [PATCH] m32r: support a synthesizable M32700 core · f894cb5c
      Hirokazu Takata 提交于
      This patch is for supporting a synthesizable M32700 core for the Mappi-II FPGA
      board.
      
      On the core, location of MFT (Multi-Function Timer) registers is slightly
      different from the M32700 chip.
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f894cb5c
    • H
      [PATCH] m32r: make userspace headers platform-independent · 8b03a632
      Hirokazu Takata 提交于
      The m32r kernel 2.6.18-rc1 or after cause build errors of "unknown isa
      configuration" for userspace application programs, such as glibc, gdb, etc.
      
      This is because the recent kernel do not include linux/config.h not to expose
      kernel headers for userspace.
      
      To fix the above compile errors, this patch fixes two headers ptrace.h and
      sigcontext.h for m32r and makes them platform-independent.
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8b03a632
  2. 08 12月, 2006 29 次提交