20 Mar, 2008

1 commit

  • unsigned long != __le32, TYVM, and unsigned char[4] is not guaranteed
    to be aligned for u32.

    While we are at it, sanitize sOutDW() a bit - have it take Byte_t * and
    handle dereferencing internally.

    NB: sWriteTxPrioByte() is almost certainly buggered on big-endian and is
    missing cpu_to_le16() on assignments to *WordPtr; I've left it alone for now.

    Signed-off-by: Al Viro
    Acked-by: "Theodore Ts'o"
    Signed-off-by: Linus Torvalds

    Al Viro
     

17 Mar, 2008

4 commits

  • This fixes a problem on 64-bit with 4GB with ATI RS690 chipsets. It
    makes sure the pcigart table is allocated in coherent memory for DMA operations.

    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • This fixes up the RV550 chips which are based on RV515, not RV530.
    It also adds another RS690 PCI ID.

    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • It's worth remembering that all new bright ideas on how to make this command reader work properly and according to docs will probably fail :( Bring in some old code.

    Also allow a larger SG-DMA download stride, and remove unnecessary waits for
    command regulators pauses.

    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • The i915_vblank_swap() function schedules an automatic buffer swap
    upon receipt of the vertical sync interrupt. Such an operation is
    lengthy so it can't be allowed to happen in normal interrupt context,
    thus the DRM implements this by scheduling the work in a kernel
    softirq-scheduled tasklet. In order for the buffer swap to work
    safely, the DRM's central lock must be taken, via a call to
    drm_lock_take() located in drivers/char/drm/drm_irq.c within the
    function drm_locked_tasklet_func(). The lock-taking logic uses a
    non-interrupt-blocking spinlock to implement the manipulations needed
    to take the lock. This semantic would be safe if all attempts to use
    the spinlock only happen from process context. However this buffer
    swap happens from softirq context which is really a form of interrupt
    context. Thus we have an unsafe situation, in that
    drm_locked_tasklet_func() can block on a spinlock already taken by a
    thread in process context which will never get scheduled again because
    of the blocked softirq tasklet. This wedges the kernel hard.

    To trigger this bug, run a dual-head cloned mode configuration which
    uses the i915 drm, then execute an opengl application which
    synchronizes buffer swaps against the vertical sync interrupt. In my
    testing, a lockup always results after running anywhere from 5 minutes
    to an hour and a half. I believe dual-head is needed to really
    trigger the problem because then the vertical sync interrupt handling
    is no longer predictable (due to being interrupt-sourced from two
    different heads running at different speeds). This raises the
    probability of the tasklet trying to run while the userspace DRI is
    doing things to the GPU (and manipulating the DRM lock).

    The fix is to change the relevant spinlock semantics to be the
    interrupt-blocking form. After this change I am no longer able to
    trigger the lockup; the longest test run so far was 20 hours (test
    stopped after that point).

    Note: I have examined the places where this spinlock is being
    employed; all are reasonably short bounded sequences and should be
    suitable for interrupts being blocked without impacting overall kernel
    interrupt response latency.

    Signed-off-by: Mike Isely
    Signed-off-by: Dave Airlie

    Mike Isely
     

14 Mar, 2008

1 commit


11 Mar, 2008

2 commits


10 Mar, 2008

1 commit

  • This has been around for a while but nobody reported it until recently.
    Resubmitting the fix as it's appropriate for 2.6.25

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

    Alan Cox
     

08 Mar, 2008

1 commit

  • randconfig testing found a bootup lockup in drivers/char/esp.c because
    of a spinlock that wasn't correctly initialized.

    I'm not sure why it became more prominent in 2.6.25-rc4, the bug seems
    rather old and i've been doing allyesconfig bootups for ages with
    CONFIG_ESP enabled.

    This fixes this bootup lockup:

    PM: Adding info for No Bus:ttyP63
    ttyP32 at 0x0240 (irq = 0) is an ESP primary port
    BUG: spinlock lockup on CPU#0, swapper/1, f56dd004
    Pid: 1, comm: swapper Not tainted 2.6.25-rc4-sched-devel.git-x86-latest.git #402 [] _raw_spin_lock+0x134/0x140
    [] _spin_lock_irqsave+0x5e/0x80
    [] ? espserial_init+0x2be/0x6e0
    [] espserial_init+0x2be/0x6e0
    [] kernel_init+0x83/0x260
    [] ? espserial_init+0x0/0x6e0
    [] ? restore_nocheck_notrace+0x0/0xe
    [] ? kernel_init+0x0/0x260
    [] ? kernel_init+0x0/0x260
    [] kernel_thread_helper+0x7/0x10
    =======================

    kzalloc() is not the way to initialize spinlocks anymore.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

05 Mar, 2008

4 commits

  • In commit e6bafba5b4765a5a252f1b8d31cbf6d2459da337 ("wmi: (!x & y)
    strikes again"), a bug was fixed that involved converting !x & y to !(x
    & y). The code below shows the same pattern, and thus should perhaps be
    fixed in the same way.

    This is not tested and clearly changes the semantics, so it is only
    something to consider.

    The semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@ expression E1,E2; @@
    (
    !E1 & !E2
    |
    - !E1 & E2
    + !(E1 & E2)
    )
    //

    Signed-off-by: Julia Lawall
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     
  • The Coverity checker spotted the following inconsequent NULL checking in
    drivers/char/pcmcia/ipwireless/network.c:ipwireless_network_packet_received()

    if (tty && channel_idx == IPW_CHANNEL_RAS
    && (network->ras_control_lines &
    IPW_CONTROL_LINE_DCD) != 0
    && ipwireless_tty_is_modem(tty)) {
    ...
    else
    ipwireless_tty_received(tty, data, length);

    Cc: Adrian Bunk
    Signed-off-by: David Sterba
    Signed-off-by: Jiri Kosina
    Cc: "John W. Linville"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Sterba
     
  • VT notifier callbacks need to be aware of console switches. This is already
    partially done from console_callback(), but at that time fg_console, cursor
    positions, etc. are not yet updated and hence screen readers fetch the old
    values.

    This adds an update notify after all of the values are updated in
    redraw_screen(vc, 1).

    Signed-off-by: Samuel Thibault
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samuel Thibault
     
  • Noticed by sparse, trivial to see:
    drivers/char/specialix.c:2112:3: warning: context imbalance in 'sx_throttle' - unexpected unlock

    Signed-off-by: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

04 Mar, 2008

1 commit


03 Mar, 2008

2 commits


01 Mar, 2008

1 commit

  • Fix hpet_(un)register_irq_handler() for when CONFIG_HPET_EMULATE_RTC=n. They
    are provided macros that substitute value 0, but if they are called as
    functions and the return value isn't checked, the following warnings appear:

    drivers/char/rtc.c: In function `rtc_init':
    drivers/char/rtc.c:1063: warning: statement with no effect
    drivers/char/rtc.c: In function `rtc_exit':
    drivers/char/rtc.c:1157: warning: statement with no effect

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     

29 Feb, 2008

1 commit

  • This fixes various items pointed out during a review of the hwicap driver.
    Primarily, reversed memcpy calls, re-entrancy issues, and mutex conversion
    have been addressed. There are also fixes to comments to use the kerneldoc
    format, as well as some sparse annotations.

    Signed-off-by: Stephen Neuendorffer
    Acked-by: Grant Likely
    Signed-off-by: Josh Boyer

    Stephen Neuendorffer
     

23 Feb, 2008

1 commit

  • Make sure the restoration correctly restores the AR registers by
    flipping the ARX register into index mode before doing anything.

    Without this, some people have had the text mode restore all green.

    Signed-off-by: Jesse Barnes
    Signed-off-by: Linus Torvalds

    Jesse Barnes
     

20 Feb, 2008

13 commits


19 Feb, 2008

3 commits

  • Several AGP drivers right now use ioremap_nocache() on kernel ram in order
    to turn a page of regular memory uncached.

    There are two problems with this:

    1) This is a total nightmare for the ioremap() implementation to keep
    various mappings of the same page coherent.

    2) It's a total nightmare for the AGP code since it adds a ton of
    complexity in terms of keeping track of 2 different pointers to
    the same thing, in terms of error handling etc etc.

    This patch fixes this by making the AGP drivers use the new
    set_memory_XX APIs instead.

    Note: amd-k7-agp.c is built on Alpha too, and generic.c is built
    on ia64 as well, which do not yet have the set_memory_*() APIs,
    so for them some we have a few ugly #ifdefs - hopefully they'll
    be fixed soon.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Ingo Molnar
    Signed-off-by: Dave Airlie

    Arjan van dev Ven
     
  • Tested on M650 chipset

    Signed-off-by: Dave Airlie

    Stuart Bennett
     
  • SiS M650 has aperture size byte 0x44

    Signed-off-by: Dave Airlie

    Stuart Bennett
     

14 Feb, 2008

3 commits

  • This fixes the following section mismatch:

    ...
    WARNING: vmlinux.o(.text+0x2fbca8): Section mismatch in reference from the function .hvc_rtas_init() to the function .devinit.text:.hvc_alloc()
    ...

    Signed-off-by: Adrian Bunk
    Signed-off-by: Paul Mackerras

    Adrian Bunk
     
  • ipwireless (added by 099dc4fb62653f6019d78db55fba7a18ef02d65b) is clearly
    a net device:

    drivers/built-in.o: In function `ipwireless_ppp_start_xmit':
    /home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:165: undefined reference to `skb_under_panic'
    /home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:165: undefined reference to `kfree_skb'
    drivers/built-in.o: In function `ipwireless_network_packet_received':
    /home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:377: undefined reference to `__alloc_skb'
    /home/pmundt/devel/git/sh-2.6.25/drivers/char/pcmcia/ipwireless/network.c:377: undefined reference to `skb_over_panic'
    drivers/built-in.o: In function `ppp_shutdown_interface':
    /home/pmundt/devel/git/sh-2.6.25/drivers/net/ppp_generic.c:2517: undefined reference to `unregister_netdev'
    /home/pmundt/devel/git/sh-2.6.25/drivers/net/ppp_generic.c:2517: undefined reference to `free_netdev'
    [ ... and many more ... ]

    select strikes again. ipwireless selects PPP which in turn tries to select
    SLHC, both of which are technically "protected" by an if NETDEVICES
    in drivers/net/Kconfig. This leads to .config hilarity, with net suddenly
    ending up in the SCSI menu:

    #
    # SCSI device support
    #
    # CONFIG_SCSI_DMA is not set
    # CONFIG_SCSI_NETLINK is not set
    CONFIG_PPP=y
    # CONFIG_PHONE is not set

    Curiously the SLHC select from PPP doesn't seem to happen, as there's no
    CONFIG_SLHC=y (only CONFIG_PPP=y gets set) -- Kconfig bug? Caught with a
    randconfig.

    Signed-off-by: Paul Mundt
    Acked-by: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     
  • All users are gone, remove definitions and comments referring
    to them.

    Signed-off-by: Harvey Harrison
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

09 Feb, 2008

1 commit