Commit graph

34042 commits

Author SHA1 Message Date
Dave Airlie 1f27ce6ab7 drm: fixup setversion return codes..
Frederik Deweerdt <deweerdt@free.fr> noticed some badness in setversion
returns, however just making it work, breaks things... this code is hairy
with backwards compat...

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:33 +10:00
Dave Airlie 46acbf13fb drm: fixup i915 error codes
Frederik Deweerdt <deweerdt@free.fr> pointed this out, I fixed a missing
DRM error wrapper also.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:33 +10:00
Dave Airlie b15ec36806 drm: realign sosme radeon code with drm git tree
this applies some minor cleanups for the radeon driver, to use the
3D flush and reset the AGP flags on X recycle

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:33 +10:00
Dave Airlie d40c8533a5 drm: realign via driver with drm git tree
This just realigns some code/whitespace between the kernel and main tree

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:33 +10:00
Thomas Hellstrom 1f4eccfdb2 drm: remove hash tables on drm exit
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:33 +10:00
Adrian Bunk fb41e54be4 drm: cleanups
This patch contains the following cleanups:
- make 3 needlessly global functions static
- sis_mm.c: fix compile warnings with CONFIG_FB_SIS=y

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:33 +10:00
Denis Vlasenko c7aed17902 drm: i810_dma.c: fix pointer arithmetic for 64-bit target
First warning result from open-coded PTR_ERR,
the rest is caused by code like this:

*(u32 *) ((u32) buf_priv->kernel_virtual + used)

I've also fixed a missing PTR_ERR in i830_dma.c

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:33 +10:00
Thomas Hellstrom 0a0c721dc5 drm: avoid kernel oops in some error paths calling drm_lastclose
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:32 +10:00
Chuck Short bd5af0781a drm: allow detection of new VIA chipsets
Update pci ids.

patch location:
http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=c
ommitdiff;h=5195a64a27550a279b2ecaf400066a3823f2d053

Signed-off-by: Chuck Short <zulcss@gmail.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:32 +10:00
Andrew Morton 78eca43d03 drm: fix i965 build bug
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:32 +10:00
Andrew Morton a1d0fcf5a1 drm: remove FALSE/TRUE that snuck in with simple memory manager changes.
Thanks to Andrew Morton for pointing these out, I've fixed a few his patch
missed.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:32 +10:00
Alan Hourihane c29b669caa drm: Add support for Intel i965G chipsets.
This is a patch prepared by Guangdeng Liao based off of Tungsten Graphics's
final code drop.

From: Alan Hourihane <alanh@tungstengraphics.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:32 +10:00
Dave Airlie d000b486ea drm: add better explanation for i830/i915
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:32 +10:00
Dave Airlie c2604ce058 drm: remove a tab that snuck in
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:32 +10:00
Dave Airlie 572225bedf drm: fix return value in auth function
This just fixes up the return value in the drm_auth:remove_magic

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:32 +10:00
Thomas Hellstrom 7981bf7d49 drm: SiS 315 Awareness.
Add support for the SiS 315 to the DRM.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:31 +10:00
Thomas Hellstrom 8d153f7107 drm: update user token hashing and map handles
Keep hashed user tokens, with the following changes:
32-bit physical device addresses are mapped directly to user-tokens. No
    duplicate maps are allowed, and the addresses are assumed to be outside
    of the range 0x10000000 through 0x30000000. The user-token is identical
    to the 32-bit physical start-address of the map.
64-bit physical device addressed are mapped to user-tokens in the range
0x10000000 to 0x30000000 with page-size increments. The user_token should
    not be interpreted as an address.
Other map types, like upcoming TTM maps are mapped to user-tokens in the
    range
0x10000000 to 0x30000000 with page-size increments. The user_token should
    not be interpreted as an address.

Implement hashed map lookups.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:31 +10:00
Thomas Hellstrom 8669cbc5e6 drm: move drm authentication to new generic hash table.
Fix drm_remove_magic potential memory leak / corruption. Move drm
authentication token hashing to new generic hash table implementation.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:31 +10:00
Dave Airlie 3d45dbd611 drm: Add the P4VM800PRO (?) PCI ID.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:31 +10:00
Thomas Hellstrom ce65a44de0 drm: add drm simple memory manager support for SiS and VIA drivers
This add support to the SiS and VIA drivers for the simple memory manager.
This fixes a lot of problems with the current simple code these drivers used,
including locking and SMP issues.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:31 +10:00
Thomas Hellstrom 3a1bd924f3 drm: add simple DRM memory manager, and hash table
This adds the DRM hashtable and simple memory manager implementations from
Tungsten Graphics, this is NOT the new memory manager, this is a replacement
for the SIS and VIA memory managers.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:31 +10:00
Michel Dänzer b9b603dd1c drm: radeon: Use RADEON_RB3D_DSTCACHE_CTLSTAT instead of RADEON_RB2D_DSTCACHE_CTLSTAT.
The latter seems to be a read-only mirror of the former.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:31 +10:00
Michel Dänzer ae1b1a4816 drm: radeon: fix up bus mastering when writeback is disabled
When writeback isn't used, actually disable it in the hardware.

Not doing this might waste bus bandwidth or even cause memory corruption or
system crashes on systems that check bus transfers. No such incident has been
reported though.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:30 +10:00
Michel Dänzer 8624ecbf68 drm: radeon: implement RADEON_PARAM_SCRATCH_OFFSET getparam
When this succeeds, userspace can read the scratch register contents from th    mapped writeback page directly.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:30 +10:00
Michel Dänzer 9ca941615e drm: radeon: add some debug output when getparam is called with unknown
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:30 +10:00
Thomas Hellstrom 7a3f1f216b drm: missing mutex unlock
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:30 +10:00
Dave Airlie 332296016e drm: remove the DRM pci domain
This patch removes the pci_domain from the DRM device structure, and
gets it via a macro that either asks the platform or does the alpha special
case. jgarzik asked for this to just use the platform magic, but I've no
alpha experience and I'd rather not just break it and wait for someone to
give out.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:30 +10:00
Dave 242ef0e1e7 drm: remove local copies of pci bus/slot/func
The drm keeps a local copy of these for little use.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:30 +10:00
Dave Airlie 3d77461ecd drm: cleanup old compat code and DRM fns from Linux only code
This patch removes some of the old compatibility macros from the DRM,
and removes use of DRM wrappers from Linux specific code.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-09-22 05:32:30 +10:00
Linus Torvalds e478bec0ba Linux v2.6.18. Arrr!
Ahoy, all land-lubbers, test me out right smartly!

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-19 20:42:06 -07:00
Linus Torvalds 3752aee965 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPV4] fib_trie: missing ntohl() when calling fib_semantic_match()
  [NETFILTER]: xt_quota: add missing module aliases
  [ATM]: [he] don't hold the device lock when upcalling
2006-09-19 20:36:22 -07:00
Al Viro 888454c57a [IPV4] fib_trie: missing ntohl() when calling fib_semantic_match()
fib_trie.c::check_leaf() passes host-endian where fib_semantic_match()
expects (and stores into) net-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-09-19 13:42:46 -07:00
Patrick McHardy b22b9004f2 [NETFILTER]: xt_quota: add missing module aliases
Add missing aliases for ipt_quota and ip6t_quota to make autoload
work.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-09-19 13:00:57 -07:00
Chas Williams 7f81dc0097 [ATM]: [he] don't hold the device lock when upcalling
This can create a deadlock/lock ordering problem with other layers
that want to use the transmit (or other) path of the card at that
time.

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-09-19 12:59:11 -07:00
Linus Torvalds 4ed4b54752 Merge branch 'fixes' of git://git.linux-nfs.org/pub/linux/nfs-2.6
* 'fixes' of git://git.linux-nfs.org/pub/linux/nfs-2.6:
  NFS: Fix nfs_page use after free issues in fs/nfs/write.c
  NFSv4: Fix incorrect semaphore release in _nfs4_do_open()
  NFS: Fix Oopsable condition in nfs_readpage_sync()
2006-09-19 09:46:53 -07:00
Trond Myklebust 5c2d97cb31 NFS: Fix nfs_page use after free issues in fs/nfs/write.c
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-09-19 11:59:10 -04:00
Trond Myklebust 76723de0cf NFSv4: Fix incorrect semaphore release in _nfs4_do_open()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-09-19 11:54:53 -04:00
Trond Myklebust 7a52411107 NFS: Fix Oopsable condition in nfs_readpage_sync()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-09-19 11:54:39 -04:00
Linus Torvalds 79e453d49b Revert mmiocfg heuristics and blacklist changes
This reverts commits 11012d419c and
40dd2d20f2, which allowed us to use the
MMIO accesses for PCI config cycles even without the area being marked
reserved in the e820 memory tables.

Those changes were needed for EFI-environment Intel macs, but broke some
newer Intel 965 boards, so for now it's better to revert to our old
2.6.17 behaviour and at least avoid introducing any new breakage.

Andi Kleen has a set of patches that work with both EFI and the broken
Intel 965 boards, which will be applied once they get wider testing.

Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Edgar Hucek <hostmaster@ed-soft.at>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-19 08:15:22 -07:00
Linus Torvalds ab5cfd2aa3 Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
  [MTD] Use SEEK_{SET,CUR,END} instead of hardcoded values in mtdchar lseek()
  MTD: Fix bug in fixup_convert_atmel_pri
  [JFFS2][SUMMARY] Fix a summary collecting bug.
  [PATCH] [MTD] DEVICES: Fill more device IDs in the structure of m25p80
  MTD: Add lock/unlock operations for Atmel AT49BV6416
  MTD: Convert Atmel PRI information to AMD format
  fs/jffs2/xattr.c: remove dead code
  [PATCH] [MTD] Maps: Add dependency on alternate probe methods to physmap
  [PATCH] MTD: Add Macronix MX29F040 to JEDEC
  [MTD] Fixes of performance and stability issues in CFI driver.
  block2mtd.c: Make kernel boot command line arguments work (try 4)
  [MTD NAND] Fix lookup error in nand_get_flash_type()
  remove #error on !PCI from pmc551.c
  MTD: [NAND] Fix the sharpsl driver after breakage from a core conversion
  [MTD] NAND: OOB buffer offset fixups
  make fs/jffs2/nodelist.c:jffs2_obsolete_node_frag() static
  [PATCH] [MTD] NAND: fix dead URL in Kconfig
2006-09-19 08:01:58 -07:00
Dave Kleikamp 833f73299f [PATCH] EXT2: Remove superblock lock contention in ext2_statfs
Fix a performance degradation introduced in 2.6.17.  (30% degradation
running dbench with 16 threads)

Commit 21730eed11, which claims to make
EXT2_DEBUG work again, moves the taking of the kernel lock out of
debug-only code in ext2_count_free_inodes and ext2_count_free_blocks and
into ext2_statfs.

The same problem was fixed in ext3 by removing the lock completely (commit
5b11687924)

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-19 07:59:59 -07:00
Matthew Wilcox ac7fb273ca [PATCH] headers_check: Clean up asm-parisc/page.h for user headers
Remove definitions of PAGE_* from the user view
Delete unnecessary comments referring to the size of pages
Only include <asm-generic> if we're in __KERNEL__

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-19 07:59:59 -07:00
Geert Uytterhoeven 020d8c063b [PATCH] Fix 'make headers_check' on ia64
Fix 'make headers_check' on m68k

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-19 07:59:59 -07:00
David Woodhouse 271fc18eea [PATCH] Add headers_check' target to output of 'make help'
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-19 07:59:59 -07:00
Ingo Molnar 86998aa653 [PATCH] genirq core: fix handle_level_irq()
while porting the -rt tree to 2.6.18-rc7 i noticed the following
screaming-IRQ scenario on an SMP system:

 2274  0Dn.:1 0.001ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.010ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.020ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.029ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.039ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.048ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.058ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.068ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.077ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.087ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)
 2274  0Dn.:1 0.097ms: do_IRQ+0xc/0x103  <= (ret_from_intr+0x0/0xf)

as it turns out, the bug is caused by handle_level_irq(), which if it
races with another CPU already handling this IRQ, it _unmasks_ the IRQ
line on the way out. This is not how 2.6.17 works, and we introduced
this bug in one of the early genirq cleanups right before it went into
-mm. (the bug was not in the genirq patchset for a long time, and we
didnt notice the bug due to the lack of -rt rebase to the new genirq
code. -rt, and hardirq-preemption in particular opens up such races much
wider than anything else.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-19 07:57:20 -07:00
Linus Torvalds 47a5c6fa0e x86: save/restore eflags in context switch
(And reset it on new thread creation)

It turns out that eflags is important to save and restore not just
because of iopl, but due to the magic bits like the NT bit, which we
don't want leaking between different threads.

Tested-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-18 16:20:40 -07:00
Linus Torvalds 1d19f176a2 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [ATM] CLIP: Do not refer freed skbuff in clip_mkip().
  [NET]: Drop tx lock in dev_watchdog_up
  [PACKET]: Don't truncate non-linear skbs with mmaped IO
  [NET]: Mark frame diverter for future removal.
  [NETFILTER]: Add secmark headers to header-y
  [ATM]: linux-atm-general mailing list is subscribers only
  [ATM]: [he] when transmit fails, unmap the dma regions
  [TCP] tcp-lp: update information to MAINTAINERS
  [TCP] tcp-lp: bug fix for oops in 2.6.18-rc6
  [BRIDGE]: random extra bytes on STP TCN packet
  [IPV6]: Accept -1 for IPV6_TCLASS
  [IPV6]: Fix tclass setting for raw sockets.
  [IPVS]: remove the debug option go ip_vs_ftp
  [IPVS]: Make sure ip_vs_ftp ports are valid
  [IPVS]: auto-help for ip_vs_ftp
  [IPVS]: Document the ports option to ip_vs_ftp in kernel-parameters.txt
  [TCP]: Turn ABC off.
  [NEIGH]: neigh_table_clear() doesn't free stats
2006-09-18 16:16:05 -07:00
Linus Torvalds 20bf94e266 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Fix regression in sys_getdomainname()
  [OPENPROMIO]: Handle current_node being NULL correctly.
2006-09-18 16:15:40 -07:00
Linus Torvalds 77e2782f9b Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3815/1: headers_install support for ARM
  [ARM] 3794/1: S3C24XX: do not defined set_irq_wake when no CONFIG_PM
  [ARM] 3793/1: S3C2412: fix wrong serial info struct
  [ARM] 3780/1: Fix iop321 cpuid
  [ARM] 3786/1: pnx4008: update defconfig
  [ARM] 3785/1: S3C2412: Fix idle code as default uses wrong clocks
  [ARM] 3784/1: S3C2413: fix config for MACH_S3C2413/MACH_SMDK2413
2006-09-18 16:15:16 -07:00
Ralph Siemsen e40b1074af [ARM] 3815/1: headers_install support for ARM
Move kernel-only #includes into #ifdef __KERNEL__, so that
headers_install target can be used on ARM.

Signed-off-by: Ralph Siemsen <ralphs@netwinder.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-09-18 16:28:50 +01:00