26 Aug, 2008

1 commit

  • Have smp_call_function_single() return invalid CPU indicies and return
    -ENXIO. This function is already executed inside a
    get_cpu()..put_cpu() which locks out CPU removal, so rather than
    having the higher layers doing another layer of locking to guard
    against unplugged CPUs do the test here.

    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     

25 Aug, 2008

5 commits

  • Added Intel processor SSE4.2 feature flag.

    No in-tree user at the moment, but makes the tree-merging life easier
    for the crypto tree.

    Signed-off-by: Austin Zhang
    Signed-off-by: Ingo Molnar

    Austin Zhang
     
  • I noticed that my sched_clock() was slow on a number of machine, so I
    started looking at cpufreq.

    The below seems to fix the problem for me.

    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Ingo Molnar
     
  • David Witbrodt tracked down (and bisected) a hpet bootup hang on his
    system to the following problem: a BIOS bug made the hpet device
    visible as a generic PCI device. If e820 reserved entries happen to
    be registered first in the resource tree [which v2.6.26 started doing],
    then the PCI code will reallocate that device's BAR to some other
    address - breaking timer IRQs and hanging the system.

    ( Normally hpet devices are hidden by the BIOS from the OS's PCI
    discovery via chipset magic. Sometimes the hpet is not a PCI device
    at all. )

    Solve this fundamental fragility by making non-PCI platform drivers
    insert resources into the resource tree even if it overlaps the e820
    reserved entry, to keep the resource manager from updating the BAR.

    Also do these checks for the ioapic and mmconfig addresses, and emit
    a warning if this happens.

    Bisected-by: David Witbrodt
    Signed-off-by: Yinghai Lu
    Tested-by: David Witbrodt
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     
  • Impact: crash on non-TSC-equipped CPUs

    Don't enable the TSC notifier if we *either*:

    1. don't have a CPU, or
    2. have a CPU with constant TSC.

    In either of those cases, the notifier is either damaging (1) or useless(2).

    From: Linus Torvalds
    Signed-off-by: H. Peter Anvin

    Linus Torvalds
     

24 Aug, 2008

3 commits

  • The acer_wmi driver does a DMI scan for quirks, and then sets flags into the
    "interface" datastructure for some cases. However, the quirks happen real early
    before "interface" is per se initialized from NULL.

    The patch below 1) adds a NULL pointer check and 2) (re)runs the quirks at the
    end, when "interface" has it's final value.

    Reported-by: kerneloops.org
    Acked-by: Carlos Corbacho
    CC: stable@vger.kernel.org
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    ipv6: protocol for address routes
    icmp: icmp_sk() should not use smp_processor_id() in preemptible code
    pkt_sched: Fix qdisc list locking
    pkt_sched: Fix qdisc_watchdog() vs. dev_deactivate() race
    sctp: fix potential panics in the SCTP-AUTH API.

    Linus Torvalds
     
  • This patch lets the files using linux/version.h match the files that
    #include it.

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

    Adrian Bunk
     

23 Aug, 2008

5 commits

  • During CPU hot-remove the sysfs directory created by
    threshold_create_bank(), defined in
    arch/x86/kernel/cpu/mcheck/mce_amd_64.c, has to be removed before
    its parent directory, created by mce_create_device(), defined in
    arch/x86/kernel/cpu/mcheck/mce_64.c . Moreover, when the CPU in
    question is hotplugged again, obviously the latter has to be created
    before the former. At present, the right ordering is not enforced,
    because all of these operations are carried out by CPU hotplug
    notifiers which are not appropriately ordered with respect to each
    other. This leads to serious problems on systems with two or more
    multicore AMD CPUs, among other things during suspend and hibernation.

    Fix the problem by placing threshold bank CPU hotplug callbacks in
    mce_cpu_callback(), so that they are invoked at the right places,
    if defined. Additionally, use kobject_del() to remove the sysfs
    directory associated with the kobject created by
    kobject_create_and_add() in threshold_create_bank(), to prevent the
    kernel from crashing during CPU hotplug operations on systems with
    two or more multicore AMD CPUs.

    This patch fixes bug #11337.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Andi Kleen
    Tested-by: Mark Langsdorf
    Signed-off-by: Ingo Molnar

    Rafael J. Wysocki
     
  • Until now, PCI ECS setup was performed at boot time only and for cpus
    that are enabled then. This patch fixes this and adds cpu hotplug.

    Tests sequence (check if ECS bit is set when bringing cpu online again):

    # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' ) < /dev/cpu/1/msr
    00000008 00404010
    # ( perl -e 'sysseek(STDOUT, 0xC001001F, 0); print pack "l*", 8, 0x00400010' ) > /dev/cpu/1/msr
    # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' ) < /dev/cpu/1/msr
    00000008 00400010
    # echo 0 > /sys/devices/system/cpu/cpu1/online
    # echo 1 > /sys/devices/system/cpu/cpu1/online
    # ( perl -e 'sysseek(STDIN, 0xC001001F, 0)'; hexdump -n 8 -e '2/4 "%08x " "\n"' ) < /dev/cpu/1/msr
    00000008 00404010

    Reported-by: Yinghai Lu
    Signed-off-by: Robert Richter
    Signed-off-by: Ingo Molnar

    Robert Richter
     
  • Jan Beulich wrote:

    > Even worse - this would even try to access the MSR on non-AMD CPUs
    > (currently probably prevented just by the fact that only AMD ones use
    > family values of 0x10 or higher).

    This patch adds cpu vendor check to the postcore_initcalls.

    Reported-by: Jan Beulich
    Signed-off-by: Robert Richter
    Signed-off-by: Ingo Molnar

    Robert Richter
     
  • This fixes a problem spotted with zebra, but not sure if it is
    necessary a kernel problem. With IPV6 when an address is added to an
    interface, Zebra creates a duplicate RIB entry, one as a connected
    route, and other as a kernel route.

    When an address is added to an interface the RTN_NEWADDR message
    causes Zebra to create a connected route. In IPV4 when an address is
    added to an interface a RTN_NEWROUTE message is set to user space with
    the protocol RTPROT_KERNEL. Zebra ignores these messages, because it
    already has the connected route.

    The problem is that route created in IPV6 has route protocol ==
    RTPROT_BOOT. Was this a design decision or a bug? This fixes it. Same
    patch applies to both net-2.6 and stable.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • Pass namespace into icmp_xmit_lock, obtain socket inside and return
    it as a result for caller.

    Thanks Alexey Dobryan for this report:

    Steps to reproduce:

    CONFIG_PREEMPT=y
    CONFIG_DEBUG_PREEMPT=y
    tracepath

    BUG: using smp_processor_id() in preemptible [00000000] code: tracepath/3205
    caller is icmp_sk+0x15/0x30
    Pid: 3205, comm: tracepath Not tainted 2.6.27-rc4 #1

    Call Trace:
    [] debug_smp_processor_id+0xe4/0xf0
    [] icmp_sk+0x15/0x30
    [] icmp_send+0x4b/0x3f0
    [] ? trace_hardirqs_on_caller+0xd5/0x160
    [] ? trace_hardirqs_on+0xd/0x10
    [] ? local_bh_enable_ip+0x95/0x110
    [] ? _spin_unlock_bh+0x39/0x40
    [] ? mark_held_locks+0x4c/0x90
    [] ? trace_hardirqs_on+0xd/0x10
    [] ? trace_hardirqs_on_caller+0xd5/0x160
    [] ip_fragment+0x8d4/0x900
    [] ? ip_finish_output2+0x0/0x290
    [] ? ip_finish_output+0x0/0x60
    [] ? dst_output+0x0/0x10
    [] ip_finish_output+0x4c/0x60
    [] ip_output+0xa3/0xf0
    [] ip_local_out+0x20/0x30
    [] ip_push_pending_frames+0x27f/0x400
    [] udp_push_pending_frames+0x233/0x3d0
    [] udp_sendmsg+0x321/0x6f0
    [] inet_sendmsg+0x45/0x80
    [] sock_sendmsg+0xdf/0x110
    [] ? autoremove_wake_function+0x0/0x40
    [] ? validate_chain+0x415/0x1010
    [] ? __do_fault+0x140/0x450
    [] ? __lock_acquire+0x260/0x590
    [] ? sockfd_lookup_light+0x45/0x80
    [] sys_sendto+0xea/0x120
    [] ? _spin_unlock_irqrestore+0x42/0x80
    [] ? __up_read+0x4c/0xb0
    [] ? up_read+0x26/0x30
    [] system_call_fastpath+0x16/0x1b

    icmp6_sk() is similar.

    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     

22 Aug, 2008

26 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: authenc - Avoid using clobbered request pointer

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
    ALSA: hda - Fix call of alc888_coef_init()
    ALSA: hda_intel: enable snoop for nvidia HDA controller

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
    ext4: Update documentation to remind users to update mke2fs.conf
    ext4: Fix small file fragmentation
    ext4: Initialize writeback_index to 0 when allocating a new inode
    ext4: make sure ext4_has_free_blocks returns 0 for ENOSPC
    ext4: journal credit fix for the delayed allocation's writepages() function
    ext4: Rework the ext4_da_writepages() function
    ext4: journal credits reservation fixes for DIO, fallocate
    ext4: journal credits reservation fixes for extent file writepage
    ext4: journal credits calulation cleanup and fix for non-extent writepage
    ext4: Fix bug where we return ENOSPC even though we have plenty of inodes
    ext4: don't try to resize if there are no reserved gdt blocks left
    ext4: Use ext4_discard_reservations instead of mballoc-specific call
    ext4: Fix ext4_dx_readdir hash collision handling
    ext4: Fix delalloc release block reservation for truncate
    ext4: Fix potential truncate BUG due to i_prealloc_list being non-empty
    ext4: Handle unwritten extent properly with delayed allocation

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

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: enable LB_BIAS by default

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

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    rcu: fix synchronize_rcu() so that kernel-doc works

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

    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    nohz: fix wrong event handler after online an offlined cpu

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

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: work around MTRR mask setting, v2
    x86: fix section mismatch warning - uv_cpu_init
    x86: fix VMI for early params
    x86: fix two modpost warnings in mm/init_64.c
    x86: fix 1:1 mapping init on 64-bit (memory hotplug case)
    x86: work around MTRR mask setting
    x86: PAT Update validate_pat_support for intel CPUs
    devmem, x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS
    x86: PAT proper tracking of set_memory_uc and friends
    x86: fix BUG: unable to handle kernel paging request (numaq_tsc_disable)
    x86: export pv_lock_ops non-GPL
    x86, mmiotrace: silence section mismatch warning - leave_uniprocessor
    x86: use WARN() in arch/x86/kernel
    x86: use WARN() in arch/x86/mm/ioremap.c
    werror: fix pci calgary
    x86: fix oprofile + hibernation badness
    x86, SGI UV: hardcode the TLB flush interrupt system vector
    x86: fix Xorg startup/shutdown slowdown with PAT
    x86: fix "kernel won't boot on a Cyrix MediaGXm (Geode)"
    x86 iommu: remove unneeded parenthesis

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    [libata] pata_it821x: fix warning
    libata: Fix a large collection of DMA mode mismatches
    ahci: sis controllers actually can do PMP
    pata_via: clean up recent tf_load changes
    libata: restore SControl on detach
    libata: use ata_link_printk() when printing SError
    libata: always do follow-up SRST if hardreset returned -EAGAIN
    libata: fix EH action overwriting in ata_eh_reset()
    sata_mv: add the Gen IIE flag to the SoC devices.
    ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs
    ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs
    sata_mv: don't issue two DMA commands concurrently
    libata: implement no[hs]rst force params

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    IPoIB: Fix deadlock on RTNL in ipoib_stop()
    IB/ipath: Fix incorrect check for max physical address in TID
    IB/ipath: Fix lost UD send work request

    Linus Torvalds
     
  • Authenc works in two stages for encryption, it first encrypts and
    then computes an ICV. The context memory of the request is used
    by both operations. The problem is that when an asynchronous
    encryption completes, we will compute the ICV and then reread the
    context memory of the encryption to get the original request.

    It just happens that we have a buffer of 16 bytes in front of the
    request pointer, so ICVs of 16 bytes (such as SHA1) do not trigger
    the bug. However, any attempt to uses a larger ICV instantly kills
    the machine when the first asynchronous encryption is completed.

    This patch fixes this by saving the request pointer before we start
    the ICV computation.

    Signed-off-by: Herbert Xu

    Herbert Xu
     
  • Using init_hook to call alc888_coef_init() is problematic for configurations
    that already set another init_hook. Better to put it in alc_init() as is
    (although it looks a bit hackish).

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • improve the debug printout:

    - make it actually display something
    - print it only once

    would be nice to have a WARN_ONCE() facility, to feed such things to
    kerneloops.org.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init()
    The function __cpuinit uv_cpu_init() references
    a function __init uv_system_init().
    If uv_system_init is only used by uv_cpu_init then
    annotate uv_system_init with a matching annotation.

    uv_system_init was ment to be called only once, so do it from codepath
    (native_smp_prepare_cpus) which is called once, right before activation
    of other cpus (smp_init).

    Note: old code relied on uv_node_to_blade being initialized to 0,
    but it'a not initialized from anywhere.

    Signed-off-by: Marcin Slusarz
    Acked-by: Jack Steiner
    Signed-off-by: Ingo Molnar

    Marcin Slusarz
     
  • Since some qdiscs call qdisc_tree_decrease_qlen() (so qdisc_lookup())
    without rtnl_lock(), adding and deleting from a qdisc list needs
    additional locking. This patch adds global spinlock qdisc_list_lock
    and wrapper functions for modifying the list. It is considered as a
    temporary solution until hfsc_dequeue(), netem_dequeue() and
    tbf_dequeue() (or qdisc_tree_decrease_qlen()) are redone.

    With feedback from Herbert Xu and David S. Miller.

    Signed-off-by: Jarek Poplawski
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • Reported by Andrew Morton:
    drivers/ata/pata_it821x.c: In function 'it821x_port_start':
    drivers/ata/pata_it821x.c:609: warning: 'mtype' may be used uninitialized in
    this function

    Pretty horrid fix, but so's a warning..

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • Dave Müller sent a diff for the pata_oldpiix that highlighted a problem
    where a lot of the ATA drivers assume dma_mode == 0 means "no DMA" while
    the core code uses 0xFF.

    This turns out to have other consequences such as code doing >= XFER_UDMA_0
    also catching 0xFF as UDMAlots. Fortunately it doesn't generally affect
    set_dma_mode, although some drivers call back into their own set mode code
    from other points.

    Having been through the drivers I've added helpers for using_udma/using_mwdma
    dma_enabled so that people don't open code ranges that may change (eg if UDMA8
    appears somewhere)

    Thanks to David for the initial bits
    [and added fix for pata_oldpiix from and signed-off-by Dave Mueller
    -jg]

    Signed-off-by: Alan Cox
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • SIS controllers were blacklisted for PMP as enabling it made device
    detection fail whether the device was PMP or not - the natural
    conclusion was the controller chokes on SRST w/ pmp==15. However, it
    turned out that the controller just didn't like issuing SRST after
    hardreset w/o clearing SError first. Interestingly, the SRST itself
    succeeds but the following commands fail.

    If SError is cleared between hardreset and SRST, which is the default
    behavior now, everything works fine and SIS controllers work with PMPs
    happily.

    Remove PMP blacklisting for SIS AHCIs.

    Signed-off-by: Tejun Heo
    Cc: Piter PUNK
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Commit bfce5e0179ad059035df28558724ff60af708e09 implemented custom
    tf_load for pata_via. This patch cleans it up a bit.

    * Instead of duplicating whole body, copy tf and set ATA_TFLAG_DEVICE
    when necessary.

    * Rename via_ata_tf_load() to via_tf_load().

    * No need to set .tf_load in via_port_ops_noirq as it inherits from
    via_port_ops.

    * Clean up indentation.

    Signed-off-by: Tejun Heo
    Cc: Joseph Chan
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Save SControl during probing and restore it on detach. This prevents
    adjustments made by libata drivers to seep into the next driver which
    gets attached (be it a libata one or not).

    It's not clear whether SControl also needs to be restored on suspend.
    The next system to have control (ACPI or kexec'd kernel) would
    probably like to see the original SControl value but there's no
    guarantee that a link is gonna keep working after SControl is adjusted
    without a reset and adding a reset and modified recovery cycle soley
    for this is an overkill. For now, do it only for detach.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • SError belongs to link not port. Use ata_link_printk() to print it.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • As an optimization, follow-up SRST used to be skipped if
    classification wasn't requested even when hardreset requested it via
    -EAGAIN. However, some hardresets can't wait for device readiness and
    skipping SRST can cause timeout or other failures during revalidation.
    Always perform follow-up SRST if hardreset returns -EAGAIN. This
    makes reset paths more predictable and thus less error-prone.

    While at it, move hardreset error checking such that it's done right
    after hardreset is finished. This simplifies followup SRST condition
    check a bit and makes the reset path easier to modify.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • ehc->i.action got accidentally overwritten to ATA_EH_HARD/SOFTRESET in
    ata_eh_reset(). The original intention was to clear reset action
    which wasn't selected. This can cause unexpected behavior when other
    EH actions are scheduled together with reset. Fix it.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • The SoC sata port is based on the 7042/6042 devices (Gen IIE). This patch
    will fix various issues when working with PMP and/or NCQ.

    Signed-off-by: Saeed Bishara
    Signed-off-by: Jeff Garzik

    Saeed Bishara
     
  • This patch adds the Intel Ibex Peak (PCH) IDE mode SATA Controller DeviceIDs.

    Signed-off-by: Seth Heasley
    Signed-off-by: Jeff Garzik

    Seth Heasley
     
  • Resend with proper whitespace.

    This patch adds the Intel Ibex Peak (PCH) SATA RAID Controller DeviceIDs.

    Signed-off-by: Seth Heasley
    Signed-off-by: Jeff Garzik

    Seth Heasley
     
  • sata_mv allowed issuing two DMA commands concurrently which the
    hardware allows. Unfortunately, libata core layer isn't ready for
    this yet and spews ugly warning message and malfunctions on this.
    Don't allow concurrent DMA commands for now.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo