1. 13 8月, 2008 8 次提交
    • J
      matroxfb: i2c structure templates clean-up · 73b7d92f
      Jean Delvare 提交于
      Clean up the use of structure templates in i2c-matroxfb. In this case
      it's more efficient to initialize the few fields we need individually.
      This makes i2c-matroxfb.ko 16% smaller on my system.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      73b7d92f
    • J
      matrox maven: fix a broken error path · 5ede40f8
      Jean Delvare 提交于
      I broke an error path with d03c21ec,
      sorry about that.
      
      The machine will crash if the i2c_attach_client() or maven_init_client()
      calls fail, although nobody has yet reported this happening.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Acked-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz>
      Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5ede40f8
    • R
      GRU: fix preprocessor symbol for sparse · 6a4ad39b
      Randy Dunlap 提交于
      Fix preprocessor symbol so that sparse sees it and does not generate
      errors:
      
        drivers/misc/sgi-gru/grutables.h:286:2: error: "Unsupported architecture"
        drivers/misc/sgi-gru/grutables.h:286:2: error: "Unsupported architecture"
        drivers/misc/sgi-gru/grutables.h:286:2: error: "Unsupported architecture"
        drivers/misc/sgi-gru/grutables.h:286:2: error: "Unsupported architecture"
        drivers/misc/sgi-gru/grutlbpurge.c:185:11: error: undefined identifier 'GRUREGION'
        drivers/misc/sgi-gru/grutables.h:286:2: error: "Unsupported architecture"
        drivers/misc/sgi-gru/grutables.h:286:2: error: "Unsupported architecture"
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Jack Steiner <steiner@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6a4ad39b
    • D
      radeonfb: fix accel engine hangs · 969830b2
      David Miller 提交于
      Some chips appear to have the 2D engine hang during screen redraw,
      typically in a sequence of copyarea operations. This appear to be
      solved by adding a flush of the engine destination pixel cache
      and waiting for the engine to be idle before issuing the accel
      operation. The performance impact seems to be fairly small.
      
      Here is a trace on an RV370 (PCI device ID 0x5b64), it records the
      RBBM_STATUS register, then the source x/y, destination x/y, and
      width/height used for the copy:
      
      ----------------------------------------
      radeonfb_prim_copyarea: STATUS[00000140] src[210:70] dst[210:60] wh[a0:10]
      radeonfb_prim_copyarea: STATUS[00000140] src[2b8:70] dst[2b8:60] wh[88:10]
      radeonfb_prim_copyarea: STATUS[00000140] src[348:70] dst[348:60] wh[40:10]
      radeonfb_prim_copyarea: STATUS[80020140] src[390:70] dst[390:60] wh[88:10]
      radeonfb_prim_copyarea: STATUS[8002613f] src[40:80] dst[40:70] wh[28:10]
      radeonfb_prim_copyarea: STATUS[80026139] src[a8:80] dst[a8:70] wh[38:10]
      radeonfb_prim_copyarea: STATUS[80026133] src[e8:80] dst[e8:70] wh[80:10]
      radeonfb_prim_copyarea: STATUS[8002612d] src[170:80] dst[170:70] wh[30:10]
      radeonfb_prim_copyarea: STATUS[80026127] src[1a8:80] dst[1a8:70] wh[8:10]
      radeonfb_prim_copyarea: STATUS[80026121] src[1b8:80] dst[1b8:70] wh[88:10]
      radeonfb_prim_copyarea: STATUS[8002611b] src[248:80] dst[248:70] wh[68:10]
      ----------------------------------------
      
      When things are going fine the copies complete before the next ROP is
      even issued, but all of a sudden the 2D unit becomes active (bit 17 in
      RBBM_STATUS) and the FIFO retry (bit 13) and FIFO pipeline busy (bit
      14) are set as well.  The FIFO begins to backup until it becomes full.
      
      What happens next is the radeon_fifo_wait() times out, and we access
      the chip illegally leading to a bus error which usually wedges the
      box.  None of this makes it to the console screen, of course :-)
      radeon_fifo_wait() should be modified to reset the accelerator when
      this timeout happens instead of programming the chip anyways.
      
      ----------------------------------------
      radeonfb: FIFO Timeout !
      ERROR(0): Cheetah error trap taken afsr[0010080005000000] afar[000007f900800e40] TL1(0)
      ERROR(0): TPC[595114] TNPC[595118] O7[459788] TSTATE[11009601]
      ERROR(0): TPC<radeonfb_copyarea+0xfc/0x248>
      ERROR(0): M_SYND(0),  E_SYND(0), Privileged
      ERROR(0): Highest priority error (0000080000000000) "Bus error response from system bus"
      ERROR(0): D-cache idx[0] tag[0000000000000000] utag[0000000000000000] stag[0000000000000000]
      ERROR(0): D-cache data0[0000000000000000] data1[0000000000000000] data2[0000000000000000] data3[0000000000000000]
      ERROR(0): I-cache idx[0] tag[0000000000000000] utag[0000000000000000] stag[0000000000000000] u[0000000000000000] l[00\
      
      ERROR(0): I-cache INSN0[0000000000000000] INSN1[0000000000000000] INSN2[0000000000000000] INSN3[0000000000000000]
      ERROR(0): I-cache INSN4[0000000000000000] INSN5[0000000000000000] INSN6[0000000000000000] INSN7[0000000000000000]
      ERROR(0): E-cache idx[800e40] tag[000000000e049f4c]
      ERROR(0): E-cache data0[fffff8127d300180] data1[00000000004b5384] data2[0000000000000000] data3[0000000000000000]
      Ker:xnel panic - not syncing: Irrecoverable deferred error trap.
      ----------------------------------------
      
      Another quirk is that these copyarea calls will not happen until the
      first drivers/char/vt.c:redraw_screen() occurs.  This will only happen
      if you 1) VC switch or 2) run "consolechars" or 3) unblank the screen.
      
      This seems to happen because until a redraw_screen() the screen scrolling
      method used by fbcon is not finalized yet.  I've seen this with other fb
      drivers too.
      
      So if all you do is boot straight into X you will never see this bug on
      the relevant chips.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: <stable@kernel.org>		[2.6.25.x, 2.6.26.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      969830b2
    • P
    • R
      cpuidle: make sysfs attributes sysdev class attributes · 66198f36
      Rabin Vincent 提交于
      These attributes are really sysdev class attributes.  The incorrect
      definition leads to an oops because of recent changes which make sysdev
      attributes use a different prototype.
      
      Based on Andi's f718cd4a ("sched: make
      scheduler sysfs attributes sysdev class devices")
      Reported-by: NEric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Acked-by: NAndi Kleen <ak@linux.intel.com>
      Cc: "Li, Shaohua" <shaohua.li@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      66198f36
    • A
      rtc-isl1208: fix double removal of a sysfs entry · 001e979d
      Alessandro Zummo 提交于
      Signed-off-by: NAlessandro Zummo <a.zummo@towertech.it>
      Cc: Herbert Valerio Riedel <hvr@gnu.org>
      Cc: Hartley Sweeten <hartleys@visionengravers.com>
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      001e979d
    • D
      revert "rtc: cdev lock_kernel() pushdown" · b1c3c898
      David Brownell 提交于
      Revert commit 51a776fa ("rtc: cdev
      lock_kernel() pushdown").  The RTC framework does not need BKL
      protection.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Alessandro Zummo <alessandro.zummo@towertech.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b1c3c898
  2. 12 8月, 2008 10 次提交
    • C
      fix spinlock recursion in hvc_console · b1b135c8
      Christian Borntraeger 提交于
      commit 611e097d
      Author: Christian Borntraeger <borntraeger@de.ibm.com>
      hvc_console: rework setup to replace irq functions with callbacks
      introduced a spinlock recursion problem.
      
      request_irq tries to call the handler if the IRQ is shared.
      The irq handler of hvc_console calls hvc_poll and hvc_kill
      which might take the hvc_struct spinlock. Therefore, we have
      to call request_irq outside the spinlock.
      
      We can move the notifier_add safely outside the spinlock as ->data must
      not be changed by the backend. Otherwise, tty_hangup would fail anyway.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      b1b135c8
    • R
      lguest: use get_user_pages_fast() instead of get_user_pages() · 71a3f4ed
      Rusty Russell 提交于
      Using a simple page table thrashing program I measure a slight
      improvement.  The program creates five processes.  Each touches 1000
      pages then schedules the next process.  We repeat this 1000 times.  As
      lguest only caches 4 cr3 values, this rebuilds a lot of shadow page
      tables requiring virt->phys mappings.
      
      	Before: 5.93 seconds
      	After: 5.40 seconds
      
      (Counts of slow vs fastpath in this usage are 6092 and 2852462 respectively.)
      
      And more importantly for lguest, the code is simpler.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      71a3f4ed
    • K
      agp: fix SIS 5591/5592 wrong PCI id · 91397585
      Krzysztof Helt 提交于
      The correct id is the id of the main host (5591) not
      the id of the PCI-to-PCI bridge AGP (0001).
      Output from "lspci -nv" shows that only the former
      has AGP capabilities flag set:
      
      00:00.0 0600: 1039:5591 (rev 02)
              Flags: bus master, medium devsel, latency 64
              Memory at ec000000 (32-bit, non-prefetchable) [size=32M]
              Capabilities: [c0] AGP version 1.0
      
      00:02.0 0604: 1039:0001 (prog-if 00 [Normal decode])
              Flags: bus master, fast devsel, latency 0
              Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
              I/O behind bridge: 0000c000-0000cfff
              Memory behind bridge: eb500000-eb5fffff
              Prefetchable memory behind bridge: eb300000-eb3fffff
      Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      91397585
    • K
      intel/agp: rewrite GTT on resume · a8c84df9
      Keith Packard 提交于
      On my Intel chipset (965GM), the GTT is entirely erased across
      suspend/resume.  This patch simply re-plays the current mapping at resume
      time to restore the table.=20
      
      I noticed this once I started relying on persistent GTT mappings across VT
      switch in our GEM work -- the old X server and DRM code carefully unbind
      all memory from the GTT on VT switch, but GEM does not bother.
      
      I placed the list management and rewrite code in the generic layer on the
      assumption that it will be needed on other hardware, but I did not add the
      rewrite call to anything other than the Intel resume function.
      
      Keep a list of current GATT mappings.  At resume time, rewrite them into
      the GATT.  This is needed on Intel (at least) as the entire GATT is
      cleared across suspend/resume.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NKeith Packard <keithp@keithp.com>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Cc: Andi Kleen <andi@firstfloor.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      a8c84df9
    • B
      agp: use dev_printk when possible · e3cf6951
      Bjorn Helgaas 提交于
      Convert printks to use dev_printk().
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      e3cf6951
    • B
      amd64-agp: run fallback when no bridges found, not when driver registration fails · 55814b74
      Bjorn Helgaas 提交于
      I think the intent was that if no bridges matched agp_amd64_pci_table[],
      we would fall back to checking for any bridge with the AGP capability.
      But in the current code, we execute the fallback path only when
      pci_register_driver() itself fails, which is unrelated to whether any
      matching devices were found.
      
      This patch counts the AGP bridges found in the probe() method and executes
      the fallback path when none is found.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      55814b74
    • Z
      intel_agp: official name for GM45 chipset · 99d32bd5
      Zhenyu Wang 提交于
      Signed-off-by: NZhenyu Wang <zhenyu.z.wang@intel.com>
      Cc: Dave Airlie <airlied@linux.ie>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      99d32bd5
    • A
      make struct scsi_dh_devlist's static · f08c0761
      Adrian Bunk 提交于
      This patch makes several needlessly global struct scsi_dh_devlist's
      static.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f08c0761
    • C
      Fix race/oops in tty layer after BKL pushdown · 000b9151
      Christian Borntraeger 提交于
      While testing our KVM code for s390 (starting and killall kvm in a loop)
      I can reproduce the following oops:
      
        Unable to handle kernel pointer dereference at virtual kernel address 6b6b6b6b6b6b6000 Oops: 0038 [#1] SMP
        Modules linked in: dm_multipath sunrpc qeth_l3 qeth_l2 dm_mod qeth
        ccwgroup CPU: 1 Not tainted 2.6.27-rc1 #54
        Process kuli (pid: 4409, task: 00000000b6aa5940, ksp: 00000000b7343e10)
        Krnl PSW : 0704e00180000000 00000000002e0b8c
        (disassociate_ctty+0x1c0/0x288) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3
        CC:2 PM:0 EA:3 Krnl GPRS: 0000000000000000 6b6b6b6b6b6b6b6b
        0000000000000001 00000000000003a6 00000000002e0a46 00000000004b4160
        0000000000000001 00000000bbd79758 00000000b7343e58 00000000b8854148
        00000000bd34dea0 00000000b7343c20 0000000000000001 00000000004b6d08
        00000000002e0a46 00000000b7343c20 Krnl Code: 00000000002e0b7e:
        eb9fb0a00004	lmg	%r9,%r15,160(%r11) 00000000002e0b84:
        07f4		bcr	15,%r4 00000000002e0b86:
        e31090080004	lg	%r1,8(%r9) >00000000002e0b8c:
        d501109cd000	clc	156(2,%r1),0(%r13) 00000000002e0b92:
        a784ff5d		brc	8,2e0a4c 00000000002e0b96:
        b9040029		lgr	%r2,%r9 00000000002e0b9a:
        c0e5fffff9c3	brasl	%r14,2dff20 00000000002e0ba0:
        a7f4ff56		brc	15,2e0a4c Call Trace:
        ([<00000000002e0a46>] disassociate_ctty+0x7a/0x288)
         [<0000000000141fe6>] do_exit+0x212/0x8d4
         [<0000000000142708>] do_group_exit+0x60/0xcc
         [<0000000000150660>] get_signal_to_deliver+0x270/0x3ac
         [<000000000010bfd6>] do_signal+0x8e/0x8dc
         [<0000000000113772>] sysc_sigpending+0xe/0x22
         [<000001ff0000b134>] 0x1ff0000b134
        INFO: lockdep is turned off.
        Last Breaking-Event-Address:
         [<00000000002e0a48>] disassociate_ctty+0x7c/0x288
        Kernel panic - not syncing: Fatal exception: panic_on_oops
      
      It seems that tty was already free in disassocate_ctty when it tries
      to dereference tty->driver.
      
      After moving the lock_kernel before the mutex_unlock, I can no longer
      reproduce the problem.
      
      [ This is a temporary partial fix for the documented and long standing
        race in disassociate_tty.  This stops most problem cases for now.
      
        For the next release the -next tree has an initial implementation of
        kref counting for tty structures and this quickfix will be dropped.
      
                                                                    - Alan ]
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by; Alan Cox <alan@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      000b9151
    • L
      Revert "fbcon: bgcolor fix" · 3838f59f
      Linus Torvalds 提交于
      This reverts commit 2d04a4a7, which made
      it impossible to make the softcursor use the highlight colors.
      
      Yes, the fourth bit should be "blinking", but since we cannot reasonably
      blink in fbcon, highlighting it with a bright background is preferable.
      Reported-by: NPavel Machek <pavel@suse.cz>
      Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
      Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
      Cc: Antonino A. Daplas <adaplas@pol.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3838f59f
  3. 11 8月, 2008 22 次提交