30 Jan, 2008

15 commits

  • The ACPI code currently disables TSC use in any C2 and C3
    states. But the AMD Fam10h BKDG documents that the TSC
    will never stop in any C states when the CONSTANT_TSC bit is
    set. Make this disabling conditional on CONSTANT_TSC
    not set on AMD.

    I actually think this is true on Intel too for C2 states
    on CPUs with p-state invariant TSC, but this needs
    further discussions with Len to really confirm :-)

    So far it is only enabled on AMD.

    Cc: lenb@kernel.org

    Signed-off-by: Andi Kleen
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Andi Kleen
     
  • drivers/pnp/pnpbios/bioscalls.c:64: warning: (near initialization for 'bad_bios_desc.')

    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Andrew Morton
     
  • Aviod TLB flush IPIs during C3 states by voluntary leave_mm()
    before entering C3.

    The performance impact of TLB flush on C3 should not be significant with
    respect to C3 wakeup latency. Also, CPUs tend to flush TLB in hardware while in
    C3 anyways.

    On a 8 logical CPU system, running make -j2, the number of tlbflush IPIs goes
    down from 40 per second to ~ 0. Total number of interrupts during the run
    of this workload was ~1200 per second, which makes it ~3% savings in wakeups.

    There was no measurable performance or power impact however.

    [ akpm@linux-foundation.org: symbol export fixes. ]

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Venki Pallipadi
     
  • People with HP Desktops (including me) encounter couple of DMI errors
    during boot - dmi_save_oem_strings_devices: out of memory and
    dmi_string: out of memory.

    On some HP desktops the DMI data include OEM strings (type 11) out of
    which only few are meaningful and most other are empty. DMI code
    religiously creates copies of these 27 strings (65 bytes each in my
    case) and goes OOM in dmi_string().

    If DMI_MAX_DATA is bumped up a little then it goes and fails in
    dmi_save_oem_strings while allocating dmi_devices of sizeof(struct
    dmi_device) corresponding to these strings.

    On x86_64 since we cannot use alloc_bootmem this early, the code uses a
    static array of 2048 bytes (DMI_MAX_DATA) for allocating the memory DMI
    needs. It does not survive the creation of empty strings and devices.

    Fix this by detecting and not newly allocating empty strings and instead
    using a one statically defined dmi_empty_string.

    Also do not create a new struct dmi_device for each empty string - use
    one statically define dmi_device with .name=dmi_empty_string and add
    that to the dmi_devices list.

    On x64 this should stop the OOM with same current size of DMI_MAX_DATA
    and on x86 this should save a good amount of (27*65 bytes +
    27*sizeof(struct dmi_device) bootmem.

    Compile and boot tested on both 32-bit and 64-bit x86.

    Signed-off-by: Parag Warudkar
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Parag Warudkar
     
  • There's no need for the *_MASK flags (TF_MASK, IF_MASK, etc), found in
    processor.h (both _32 and _64). They have a one-to-one mapping with the
    EFLAGS value. This patch removes the definitions, and use the already
    existent X86_EFLAGS_ version when applicable.

    [ roland@redhat.com: KVM build fixes. ]

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • replace outb_p() with udelay(2). This is a real ISA device so it likely
    needs this particular delay.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     
  • This patch unifies struct desc_ptr between i386 and x86_64.
    They can be expressed in the exact same way in C code, only
    having to change the name of one of them. As Xgt_desc_struct
    is ugly and big, this is the one that goes away.

    There's also a padding field in i386, but it is not really
    needed in the C structure definition.

    Signed-off-by: Glauber de Oliveira Costa
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Glauber de Oliveira Costa
     
  • tons of style cleanup in drivers/char/rtc.c - no code changed:

    text data bss dec hex filename
    6400 384 32 6816 1aa0 rtc.o.before
    6400 384 32 6816 1aa0 rtc.o.after

    since we seem to have a number of open breakages in this code we might
    as well start with making the code more readable and maintainable.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Ingo Molnar
     
  • This changes size-specific register names (eip/rip, esp/rsp, etc.) to
    generic names in the thread and tss structures.

    Signed-off-by: H. Peter Anvin
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    H. Peter Anvin
     
  • No users, just ballast

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Looks like IRQ 31 is assigned to timer 3, even without the patch!
    I wonder who wrote the number 31. But the manual says that it is
    zero by default.

    I think we should check whether the timer has been allocated an IRQ before
    proceeding to assign one to it. Here is a patch that does this.

    Signed-off-by: Balaji Rao
    Tested-by: Yinghai Lu
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Balaji Rao
     
  • The userspace API for the HPET (see Documentation/hpet.txt) did not work. The
    HPET_IE_ON ioctl was failing as there was no IRQ assigned to the timer
    device. This patch fixes it by allocating IRQs to timer blocks in the HPET.

    arch/x86/kernel/hpet.c | 13 +++++--------
    drivers/char/hpet.c | 45 ++++++++++++++++++++++++++++++++++++++-------
    include/linux/hpet.h | 2 +-
    3 files changed, 44 insertions(+), 16 deletions(-)

    Signed-off-by: Balaji Rao
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Balaji Rao
     
  • The new e1000e driver is apparently not yet suitable for general use, so
    mark it experimental, and re-instate all the PCI-Express device IDs in
    the old and stable e1000 driver so that people (namely me) can continue
    to use a driver that actually works.

    Auke & co have been appraised of the situation.

    Cc: Auke Kok
    Cc: Jeff Garzik
    Cc: David Miller
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • For BLOCK_PC requests, we need that length for completing the request.
    Andrew Vasquez reported the following
    oops

    Hitting a consistent BUG() with recent Linus' linux-2.6.git:

    [ 12.941428] ------------[ cut here ]------------
    [ 12.944874] kernel BUG at drivers/block/cciss.c:1260!
    [ 12.944874] invalid opcode: 0000 [1] SMP
    [ 12.944874] CPU 0
    [ 12.944874] Modules linked in:
    [ 12.944874] Pid: 0, comm: swapper Not tainted 2.6.24 #43
    [ 12.944874] RIP: 0010:[] [] cciss_softirq_done+0xbc/0x1bf
    [ 12.944874] RSP: 0018:ffffffff8063aed0 EFLAGS: 00010202
    [ 12.944874] RAX: 0000000000000001 RBX: ffff8100cf800010 RCX: ffff81042f1253b0
    [ 12.944874] RDX: ffff81042de398f0 RSI: ffff81042de398f0 RDI: 0000000000000001
    [ 12.944874] RBP: ffff81042daa0000 R08: ffff81042f1253b0 R09: 0000000000000001
    [ 12.944874] R10: 00000000000000fe R11: 0000000000000000 R12: 0000000000000002
    [ 12.944874] R13: 0000000000000001 R14: ffff8100cf800000 R15: ffff81042de398f0
    [ 12.944874] FS: 0000000000000000(0000) GS:ffffffff805bb000(0000) knlGS:0000000000000000
    [ 12.944874] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
    [ 12.944874] CR2: 00002afed7eea340 CR3: 000000042dbba000 CR4: 00000000000006e0
    [ 12.944874] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [ 12.944874] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    [ 12.944874] Process swapper (pid: 0, threadinfo ffffffff805f4000, task ffffffff805624a0)
    [ 12.944874] Stack: 0000000000000000 ffffffff8063af10 0000000000000001 ffffffff80632d60
    [ 12.944874] 0000000000000000 000000000000000a ffffffff805bb900 ffffffff8032038f
    [ 12.944874] ffffffff8063af10 ffffffff8063af10 ffffffff805bb940 ffffffff802346b4
    [ 12.944874] Call Trace:
    [ 12.944874] [] blk_done_softirq+0x69/0x78
    [ 12.944874] [] __do_softirq+0x6f/0xd8
    [ 12.944874] [] call_softirq+0x1c/0x30
    [ 12.944874] [] do_softirq+0x30/0x80
    [ 12.944874] [] do_IRQ+0x72/0xd9
    [ 12.944874] [] mwait_idle+0x0/0x46
    [ 12.944874] [] default_idle+0x0/0x3d
    [ 12.944874] [] ret_from_intr+0x0/0xa
    [ 12.944874] [] mwait_idle+0x42/0x46
    [ 12.944874] [] cpu_idle+0x6a/0xae
    [ 12.944874]
    [ 12.944874]
    [ 12.944874] Code: 0f 0b eb fe 48 8d 85 d8 c0 00 00 48 89 04 24 48 89 c7 e8 e5
    [ 12.944874] RIP [] cciss_softirq_done+0xbc/0x1bf
    [ 12.944874] RSP
    [ 12.944903] ---[ end trace e9c631603f90d22f ]---

    which is caused by blk_end_request() returning 'not done' for a request,
    since it gets asked to complete zero bytes.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • In ace_fsm_dostate(), the variable 'i' was used only for passing
    sector size of the request to end_that_request_first().
    So I removed it and changed the code to pass the size in bytes
    directly to __blk_end_request()

    Signed-off-by: Jens Axboe

    Jens Axboe
     

29 Jan, 2008

25 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.25: (1470 commits)
    [IPV6] ADDRLABEL: Fix double free on label deletion.
    [PPP]: Sparse warning fixes.
    [IPV4] fib_trie: remove unneeded NULL check
    [IPV4] fib_trie: More whitespace cleanup.
    [NET_SCHED]: Use nla_policy for attribute validation in ematches
    [NET_SCHED]: Use nla_policy for attribute validation in actions
    [NET_SCHED]: Use nla_policy for attribute validation in classifiers
    [NET_SCHED]: Use nla_policy for attribute validation in packet schedulers
    [NET_SCHED]: sch_api: introduce constant for rate table size
    [NET_SCHED]: Use typeful attribute parsing helpers
    [NET_SCHED]: Use typeful attribute construction helpers
    [NET_SCHED]: Use NLA_PUT_STRING for string dumping
    [NET_SCHED]: Use nla_nest_start/nla_nest_end
    [NET_SCHED]: Propagate nla_parse return value
    [NET_SCHED]: act_api: use PTR_ERR in tcf_action_init/tcf_action_get
    [NET_SCHED]: act_api: use nlmsg_parse
    [NET_SCHED]: act_api: fix netlink API conversion bug
    [NET_SCHED]: sch_netem: use nla_parse_nested_compat
    [NET_SCHED]: sch_atm: fix format string warning
    [NETNS]: Add namespace for ICMP replying code.
    ...

    Linus Torvalds
     
  • Fix a bunch of warnings in PPP and related drivers. Mostly because
    sparse doesn't like it when the the function is only marked private in
    the forward declaration.

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

    Stephen Hemminger
     
  • Needed to propagate it down to the ip_route_output_flow.

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

    Denis V. Lunev
     
  • Needed to propagate it down to the __ip_route_output_key.

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

    Denis V. Lunev
     
  • in_dev_find() need a namespace to pass it to fib_get_table(), so add
    an argument.

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

    Denis V. Lunev
     
  • always extend the rx timestamp with the local TSF, since this information is
    also needed for proper IBSS merging. this is done in the tasklet for now, maybe
    has to be moved to the interrupt handler like in madwifi.

    drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     
  • in "11.1.2.2 Beacon generation in an IBSS" the IEEE802.11 standard says, each
    STA should... "b) Calculate a random delay uniformly distributed in the range
    between zero and twice aCWmin × aSlotTime,".

    configure cwmin and cwmax of the beacon queue in IBSS mode according to this.
    unfortunately beacon backoff does not work reliably yet, so i suspect we have a
    problem somewhere else, since the same settings (and similar beacon timer
    configuration) work for madwifi.

    drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     
  • use SWBA (software beacon alert) interrupts to keep track of the next beacon
    time und check if a HW merge (automatic TSF update) has happened on every
    received beacon with the same BSSID.

    this is necessary because the atheros hardware will silently update the local
    TSF in IBSS mode, but not its beacon timers. if the TSF is ahead of the beacon
    timers no beacons are sent until the timers wrap around (typically after about
    1 minute).

    this solution is not very nice, since we have to look into every beacon, but
    there is apparently no other way to detect HW merges.

    drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD
    drivers/net/wireless/ath5k/base.h: Changes-licensed-under: 3-Clause-BSD

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     
  • update ath5k_beacon_update_timers() for better beacon timer calculation in a
    variety of situations. most important is the possibility to call it with the
    timestamp of a received beacon, when we detected that a HW merge has happened
    and we need to reconfigure the beacon timers based on that.

    we call this from the mac80211 callback reset_tsf now instead of beacon_update,
    and there will be more use of it in the next patch.

    drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     
  • the beacon interval is passed by mac80211 in TU already, so we can directly use
    it without conversion. also update the comments about TU (1 TU is defined by
    802.11 as 1024usec).

    drivers/net/wireless/ath5k/ath5k.h: Changes-licensed-under: ISC
    drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD
    drivers/net/wireless/ath5k/base.h: Changes-licensed-under: 3-Clause-BSD

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     
  • reviewed beacon timer initialization with register traces from madwifi: what we
    are doing is correct :). one minor fix: use 3 instead of 0x00000003 - it's more
    readable.

    drivers/net/wireless/ath5k/hw.c: Changes-licensed-under: ISC

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     
  • This zeros out all microcode related memory before loading
    the microcode.

    This also fixes initialization of the MAC control register.
    The _only_ place where we overwrite the contents of the MAC control
    register is at the beginning of b43_chip_init().
    All other places must do read() -> mask/set -> write() to not
    overwrite existing bits.

    This also adds a longer delay for waiting for the microcode
    to initialize itself. It seems that the current timeout is sufficient
    on all available devices, but there's no real reason why we shouldn't
    wait for up to one second. Slow embedded devices might exist.
    Better safe than sorry.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • Otherwise it may be impossible to connected to an open network after a
    resume.

    This is a modified version of an original patch by
    Alex Eskin :

    https://bugzilla.redhat.com/show_bug.cgi?id=425950#c8

    Signed-off-by: John W. Linville

    John W. Linville
     
  • ...instead of using AR5K_KEYCACHE_SIZE, which would seem to be a
    typo/thinko...

    Signed-off-by: John W. Linville

    John W. Linville
     
  • We must also store the ID string (filename) for the cached firmware blobs
    and verify that we really have the right firmware cached before using it.
    If we don't have the right fw cached, we must free it and request the
    correct blobs.

    This fixes bandswitch on A/B/G multi-PHY devices.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • This also adds lots of TODOs. Oh well. Lots of work. :)

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • This fixes a sparse warning about weird locking.
    The spinlock is not needed, so simply remove it.
    This also adds some sanity checks to the PHY and radio locking
    to protect against recursive locking.

    Signed-off-by: Michael Buesch
    Signed-off-by: John W. Linville

    Michael Buesch
     
  • We are pleased to announce a new Gigabit Ethernet product and its
    driver to the linux community. This product is the Intel(R) 82575
    Gigabit Ethernet adapter family. Physical adapters will be available
    to the public soon. These adapters come in 2- and 4-port versions
    (copper PHY) currently. Other variants will be available later.

    The 82575 chipset supports significantly different features that
    warrant a new driver. The descriptor format is (just like the
    ixgbe driver) different. The device can use multiple MSI-X vectors
    and multiple queues for both send and receive. This allows us to
    optimize some of the driver code specifically as well compared to
    the e1000-supported devices.

    This version of the igb driver no lnger uses fake netdevices and
    incorporates napi_struct members for each ring to do the multi-
    queue polling. multi-queue is enabled by default and the driver
    supports NAPI mode only.

    All the namespace collisions should be gone in this version too. The
    register macro's have been condensed to improve readability.

    Signed-off-by: Auke Kok
    Signed-off-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Auke Kok
     
  • Signed-off-by: Al Viro
    Signed-off-by: Jeff Garzik

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Jeff Garzik

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Jeff Garzik

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Jeff Garzik

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Jeff Garzik

    Al Viro
     
  • Prefix "bp->phy_flags" names with BNX2_PHY_FLAG_* for consistency.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Prefix "bnx2->flags" names with BNX2_* for consistency.

    Signed-off-by: David S. Miller

    David S. Miller