12 Apr, 2009

2 commits

  • Impact: broaden lockdep checks

    Lockdep is disabled after any kernel taints. This might be convenient
    to ignore bad locking issues which sources come from outside the kernel
    tree. Nevertheless, it might be a frustrating experience for the
    staging developers or those who experience a warning but are focused
    on another things that require lockdep.

    The v2 of this patch simply don't disable anymore lockdep in case
    of TAINT_CRAP and TAINT_WARN events.

    Signed-off-by: Frederic Weisbecker
    Cc: LTP
    Cc: Peter Zijlstra
    Cc: Greg KH
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • Impact: provide useful missing info for developers

    Kernel taint can occur in several situations such as warnings,
    load of prorietary or staging modules, bad page, etc...

    But when such taint happens, a developer might still be working on
    the kernel, expecting that lockdep is still enabled. But a taint
    disables lockdep without ever warning about it.
    Such a kernel behaviour doesn't really help for kernel development.

    This patch adds this missing warning.

    Since the taint is done most of the time after the main message that
    explain the real source issue, it seems safe to warn about it inside
    add_taint() so that it appears at last, without hurting the main
    information.

    v2: Use a generic helper to disable lockdep instead of an
    open coded xchg().

    Signed-off-by: Frederic Weisbecker
    Cc: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

11 Apr, 2009

1 commit

  • For the time being, move the generic percpu_*() accessors to
    linux/percpu.h.

    asm-generic/percpu.h is meant to carry generic stuff for low level
    stuff - declarations, definitions and pointer offset calculation
    and so on but not for generic interface.

    Signed-off-by: Ingo Molnar

    Tejun Heo
     

10 Apr, 2009

1 commit

  • Impact: performance regression fix for s390

    The adaptive spinning mutexes will not always do what one would expect on
    virtualized architectures like s390. Especially the cpu_relax() loop in
    mutex_spin_on_owner might hurt if the mutex holding cpu has been scheduled
    away by the hypervisor.

    We would end up in a cpu_relax() loop when there is no chance that the
    state of the mutex changes until the target cpu has been scheduled again by
    the hypervisor.

    For that reason we should change the default behaviour to no-spin on s390.

    We do have an instruction which allows to yield the current cpu in favour of
    a different target cpu. Also we have an instruction which allows us to figure
    out if the target cpu is physically backed.

    However we need to do some performance tests until we can come up with
    a solution that will do the right thing on s390.

    Signed-off-by: Heiko Carstens
    Acked-by: Peter Zijlstra
    Cc: Martin Schwidefsky
    Cc: Christian Borntraeger
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Heiko Carstens
     

08 Apr, 2009

10 commits

  • printk("%Q");

    Output before patch: %QQ
    Output after patch: %Q

    Signed-off-by: Zhao Lei
    Acked-by: Lai Jiangshan
    Acked-by: Frederic Weisbecker
    Cc: torvalds@linux-foundation.org
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Zhaolei
     
  • Merge reason: need latest upstream to queue up dependent fix

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Linus Torvalds
     
  • * 'core/softlockup' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    softlockup: make DETECT_HUNG_TASK default depend on DETECT_SOFTLOCKUP
    softlockup: move 'one' to the softlockup section in sysctl.c
    softlockup: ensure the task has been switched out once
    softlockup: remove timestamp checking from hung_task
    softlockup: convert read_lock in hung_task to rcu_read_lock
    softlockup: check all tasks in hung_task
    softlockup: remove unused definition for spawn_softlockup_task
    softlockup: fix potential race in hung_task when resetting timeout
    softlockup: fix to allow compiling with !DETECT_HUNG_TASK
    softlockup: decouple hung tasks check from softlockup detection

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

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    branch tracer, intel-iommu: fix build with CONFIG_BRANCH_TRACER=y
    branch tracer: Fix for enabling branch profiling makes sparse unusable
    ftrace: Correct a text align for event format output
    Update /debug/tracing/README
    tracing/ftrace: alloc the started cpumask for the trace file
    tracing, x86: remove duplicated #include
    ftrace: Add check of sched_stopped for probe_sched_wakeup
    function-graph: add proper initialization for init task
    tracing/ftrace: fix missing include string.h
    tracing: fix incorrect return type of ns2usecs()
    tracing: remove CALLER_ADDR2 from wakeup tracer
    blktrace: fix pdu_len when tracing packet command requests
    blktrace: small cleanup in blk_msg_write()
    blktrace: NUL-terminate user space messages
    tracing: move scripts/trace/power.pl to scripts/tracing/power.pl

    Linus Torvalds
     
  • * 'irq/threaded' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    genirq: fix devres.o build for GENERIC_HARDIRQS=n
    genirq: provide old request_irq() for CONFIG_GENERIC_HARDIRQ=n
    genirq: threaded irq handlers review fixups
    genirq: add support for threaded interrupts to devres
    genirq: add threaded interrupt handler support

    Linus Torvalds
     
  • Commit c2ec175c39f62949438354f603f4aa170846aabb ("mm: page_mkwrite
    change prototype to match fault") exposed a bug in the NFS
    implementation of page_mkwrite. We should be returning 0 on success...

    Signed-off-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: pci_slot: grab refcount on slot's bus
    PCI Hotplug: acpiphp: grab refcount on p2p subordinate bus
    PCI: allow PCI core hotplug to remove PCI root bus
    PCI: Fix oops in pci_vpd_truncate
    PCI: don't corrupt enable_cnt when doing manual resource alignment
    PCI: annotate pci_rescan_bus as __ref, not __devinit
    PCI-IOV: fix missing kernel-doc
    PCI: Setup disabled bridges even if buses are added
    PCI: SR-IOV quirk for Intel 82576 NIC

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    loop: mutex already unlocked in loop_clr_fd()
    cfq-iosched: don't let idling interfere with plugging
    block: remove unused REQ_UNPLUG
    cfq-iosched: kill two unused cfqq flags
    cfq-iosched: change dispatch logic to deal with single requests at the time
    mflash: initial support
    cciss: change to discover first memory BAR
    cciss: kernel scan thread for MSA2012
    cciss: fix residual count for block pc requests
    block: fix inconsistency in I/O stat accounting code
    block: elevator quiescing helpers

    Linus Torvalds
     
  • The code that enables branch tracing for all (non-constant) branches
    plays games with the preprocessor and #define's the C 'if ()' construct
    to do tracing.

    That's all fine, but it fails for some unusual but valid C code that is
    sometimes used in macros, notably by the intel-iommu code:

    if (i=drhd->iommu, drhd->ignored) ..

    because now the preprocessor complains about multiple arguments to the
    'if' macro.

    So make the macro expansion of this particularly horrid trick use
    varargs, and handle the case of comma-expressions in if-statements. Use
    another macro to do it cleanly in just one place.

    This replaces a patch by David (and acked by Steven) that did this all
    inside that one already-too-horrid macro.

    Tested-by: Ingo Molnar
    Cc: David Woodhouse
    Cc: Steven Rostedt
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

07 Apr, 2009

26 commits

  • * 'for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6:
    ASoC: TWL4030: Compillation error fix

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (36 commits)
    ALSA: hda - Add VREF powerdown sequence for another board
    ALSA: oss - volume control for CSWITCH and CROUTE
    ALSA: hda - add missing comma in ad1884_slave_vols
    sound: usb-audio: allow period sizes less than 1 ms
    sound: usb-audio: save data packet interval in audioformat structure
    sound: usb-audio: remove check_hw_params_convention()
    sound: usb-audio: show sample format width in proc file
    ASoC: fsl_dma: Pass the proper device for dma mapping routines
    ASoC: Fix null dereference in ak4535_remove()
    ALSA: hda - enable SPDIF output for Intel DX58SO board
    ALSA: snd-atmel-abdac: increase periods_min to 6 instead of 4
    ALSA: snd-atmel-abdac: replace bus_id with dev_name()
    ALSA: snd-atmel-ac97c: replace bus_id with dev_name()
    ALSA: snd-atmel-ac97c: cleanup registers when removing driver
    ALSA: snd-atmel-ac97c: do a proper reset of the external codec
    ALSA: snd-atmel-ac97c: enable interrupts to catch events for error reporting
    ALSA: snd-atmel-ac97c: set correct size for buffer hardware parameter
    ALSA: snd-atmel-ac97c: do not overwrite OCA and ICA when assigning channels
    ALSA: snd-atmel-ac97c: remove dead break statements after return in switch case
    ALSA: snd-atmel-ac97c: cleanup register definitions
    ...

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    sata_mv: shorten register names
    sata_mv: workaround errata SATA#13
    sata_mv: cosmetic renames
    sata_mv: workaround errata SATA#26
    sata_mv: workaround errata PCI#7
    sata_mv: replace 0x1f with ATA_PIO4 (v2)
    sata_mv: fix irq mask races
    sata_mv: revert SoC irq breakage
    libata: ahci enclosure management bios workaround
    ata: Add TRIM infrastructure
    ata_piix: VGN-BX297XP wants the controller power up on suspend
    libata: Remove some redundant casts from pata_octeon_cf.c
    pata_artop: typo

    Linus Torvalds
     
  • * 'i2c-for-2630-v2' of git://aeryn.fluff.org.uk/bjdooks/linux:
    i2c: imx: Make disable_delay a per-device variable
    i2c: xtensa s6000 i2c driver
    powerpc/85xx: i2c-mpc: use new I2C bindings for the Socates board
    i2c: i2c-mpc: make I2C bus speed configurable
    i2c: i2c-mpc: use dev based printout function
    i2c: i2c-mpc: various coding style fixes
    i2c: imx: Add missing request_mem_region in probe()
    i2c: i2c-s3c2410: Initialise Samsung I2C controller early
    i2c-s3c2410: Simplify bus frequency calculation
    i2c-s3c2410: sda_delay should be in ns, not clock ticks
    i2c: iMX/MXC support

    Linus Torvalds
     
  • * 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
    hwmon: Add Asus ATK0110 support
    hwmon: (lm95241) Convert to new-style i2c driver

    Linus Torvalds
     
  • PCI parallel port devices can IRQ share so we should stop them hogging
    the line and making a mess on modern PC systems. We know the sharing
    side works as the PCMCIA driver has shared the parallel port IRQ for
    some time.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Here are some cleanups, mainly removing unused variables and silly
    declarations.

    Signed-off-by: Breno Leitao
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Breno Leitao
     
  • Signed-off-by: Mike Frysinger
    Signed-off-by: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • Depend on KGDB_SERIAL_CONSOLE being set to N rather than !Y, since it can
    be built as a module.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • Signed-off-by: Mike Frysinger
    Signed-off-by: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • Both software emulated and hardware based CTS and RTS are enabled in
    serial driver.

    The CTS RTS PIN connection on BF548 UART port is defined as a modem
    device not as a host device. In order to test it under Linux, please
    nake a cross UART cable to exchange CTS and RTS signal.

    Signed-off-by: Sonic Zhang
    Signed-off-by: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Sonic Zhang
     
  • Only the CTS bit is affected.

    Signed-off-by: Sonic Zhang
    Signed-off-by: Bryan Wu
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Sonic Zhang
     
  • (akpm: queued pending confirmation of the new major number)

    [randy.dunlap@oracle.com: select SERIAL_CORE]
    Signed-off-by: Christian Pellegrin
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Christian Pellegrin
     
  • This is a low density serial port so needs a real major/minor

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Avoid using port->tty where possible (makes refcount fixing easier
    later).

    Remove unused code (the ioctl path is not used if the device has
    mget/mset functions)

    Remove various un-needed typecasts and long names so it could read it to
    do the changes.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Use the new general RS485 Linux data structure (introduced by Alan with
    commit number c26c56c0f40e200e61d1390629c806f6adaffbcc) in the Cris
    architecture too (currently, Cris still uses the old private data
    structure instead of the new one).

    Signed-off-by: Claudio Scordino
    Tested-by: Hinko Kocevar
    Tested-by: Janez Cufer
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Claudio Scordino
     
  • tty_driver_kref_get() should be static inline and not extern inline
    (the latter even changed it's semantics in gcc >= 4.3).

    Signed-off-by: Adrian Bunk
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • There's a possible deadlock in generic_file_splice_write(),
    splice_from_pipe() and ocfs2_file_splice_write():

    - task A calls generic_file_splice_write()
    - this calls inode_double_lock(), which locks i_mutex on both
    pipe->inode and target inode
    - ordering depends on inode pointers, can happen that pipe->inode is
    locked first
    - __splice_from_pipe() needs more data, calls pipe_wait()
    - this releases lock on pipe->inode, goes to interruptible sleep
    - task B calls generic_file_splice_write(), similarly to the first
    - this locks pipe->inode, then tries to lock inode, but that is
    already held by task A
    - task A is interrupted, it tries to lock pipe->inode, but fails, as
    it is already held by task B
    - ABBA deadlock

    Fix this by explicitly ordering locks: the outer lock must be on
    target inode and the inner lock (which is later unlocked and relocked)
    must be on pipe->inode. This is OK, pipe inodes and target inodes
    form two nonoverlapping sets, generic_file_splice_write() and friends
    are not called with a target which is a pipe.

    Signed-off-by: Miklos Szeredi
    Acked-by: Mark Fasheh
    Acked-by: Jens Axboe
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • After a review of user's feedback for finding out other compatibility
    issues, I found nilfs improperly initializes timestamps in inode;
    CURRENT_TIME was used there instead of CURRENT_TIME_SEC even though nilfs
    didn't have nanosecond timestamps on disk. A few users gave us the report
    that the tar program sometimes failed to expand symbolic links on nilfs,
    and it turned out to be the cause.

    Instead of applying the above displacement, I've decided to support
    nanosecond timestamps on this occation. Fortunetaly, a needless 64-bit
    field was in the nilfs_inode struct, and I found it's available for this
    purpose without impact for the users.

    So, this will do the enhancement and resolve the tar problem.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • The former versions didn't have extra super blocks. This improves the
    weak point by introducing another super block at unused region in tail of
    the partition.

    This doesn't break disk format compatibility; older versions just ingore
    the secondary super block, and new versions just recover it if it doesn't
    exist. The partition created by an old mkfs may not have unused region,
    but in that case, the secondary super block will not be added.

    This doesn't make more redundant copies of the super block; it is a future
    work.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • will reduce some lines of segment constructor. Previously, the state was
    complexly controlled through a list of segments in order to keep
    consistency in meta data of usage state of segments. Instead, this
    presents ``calculated'' active flags to userland cleaner program and stop
    maintaining its real flag on disk.

    Only by this fake flag, the cleaner cannot exactly know if each segment is
    reclaimable or not. However, the recent extension of nilfs_sustat ioctl
    struct (nilfs2-extend-nilfs_sustat-ioctl-struct.patch) can prevent the
    cleaner from reclaiming in-use segment wrongly.

    So, now I can apply this for simplification.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • Nilfs creates checkpoints even for garbage collection or metadata updates
    such as checkpoint mode change. So, user often sees checkpoints created
    only by such internal operations.

    This is inconvenient in some situations. For example, application that
    monitors checkpoints and changes them to snapshots, will fall into an
    infinite loop because it cannot distinguish internally created
    checkpoints.

    This patch solves this sort of problem by adding a flag to checkpoint for
    identification.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • The sketch file is a file to mark checkpoints with user data. It was
    experimentally introduced in the original implementation, and now
    obsolete. The file was handled differently with regular files; the file
    size got truncated when a checkpoint was created.

    This stops the special treatment and will treat it as a regular file.
    Most users are not affected because mkfs.nilfs2 no longer makes this file.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • This adds a missing endian conversion of checksum field in the super
    block. This fixes compatibility issue on big endian machines which will
    come to surface after supporting recovery of super block.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • Pekka Enberg advised me:
    > It would be nice if BUG(), BUG_ON(), and panic() calls would be
    > converted to proper error handling using WARN_ON() calls. The BUG()
    > call in nilfs_cpfile_delete_checkpoints(), for example, looks to be
    > triggerable from user-space via the ioctl() system call.

    This will follow the comment and keep them to a minimum.

    Acked-by: Pekka Enberg
    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • This adds a new argument to the nilfs_sustat structure.

    The extended field allows to delete volatile active state of segments,
    which was needed to protect freshly-created segments from garbage
    collection but has confused code dealing with segments. This
    extension alleviates the mess and gives room for further
    simplifications.

    The volatile active flag is not persistent, so it's eliminable on this
    occasion without affecting compatibility other than the ioctl change.

    Signed-off-by: Ryusuke Konishi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi