]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
13 years agodrm/i915: Avoid allocation for execbuffer object list
Chris Wilson [Thu, 25 Nov 2010 19:32:06 +0000 (19:32 +0000)]
drm/i915: Avoid allocation for execbuffer object list

Besides the minimal improvement in reducing the execbuffer overhead, the
real benefit is clarifying a few routines.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Split i915_gem_execbuffer into its own file.
Chris Wilson [Thu, 25 Nov 2010 18:00:26 +0000 (18:00 +0000)]
drm/i915: Split i915_gem_execbuffer into its own file.

A number of dragons have been seen lurking within the execbuffer code.
The first step is then to isolate them from the rest and begin to
scrutinise them in depth. Suggested by Daniel Vetter.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Defer accounting until read from debugfs
Chris Wilson [Wed, 24 Nov 2010 12:23:44 +0000 (12:23 +0000)]
drm/i915: Defer accounting until read from debugfs

Simply remove our accounting of objects inside the aperture, keeping
only track of what is in the aperture and its current usage. This
removes the over-complication of BUGs that were attempting to keep the
accounting correct and also removes the overhead of the accounting on
the hot-paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Mark a few functions as __must_check
Chris Wilson [Tue, 23 Nov 2010 15:26:33 +0000 (15:26 +0000)]
drm/i915: Mark a few functions as __must_check

... to benefit from the compiler checking that we remember to handle
and propagate errors.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Tweak on-error bbaddr parsing for clarity
Chris Wilson [Mon, 22 Nov 2010 13:24:13 +0000 (13:24 +0000)]
drm/i915: Tweak on-error bbaddr parsing for clarity

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Only save and restore fences for UMS
Chris Wilson [Mon, 22 Nov 2010 11:50:11 +0000 (11:50 +0000)]
drm/i915: Only save and restore fences for UMS

With KMS, we can simply relinquish the fence when we idle the GPU and
reassign it upon first use.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Add a mechanism for pipelining fence register updates
Daniel Vetter [Fri, 12 Nov 2010 13:46:18 +0000 (13:46 +0000)]
drm/i915: Add a mechanism for pipelining fence register updates

Not employed just yet...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: More accurately track last fence usage by the GPU
Chris Wilson [Fri, 12 Nov 2010 13:53:37 +0000 (13:53 +0000)]
drm/i915: More accurately track last fence usage by the GPU

Based on a patch by Daniel Vetter.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Rework execbuffer pinning
Chris Wilson [Fri, 12 Nov 2010 13:49:09 +0000 (13:49 +0000)]
drm/i915: Rework execbuffer pinning

Avoid evicting buffers that will be used later in the batch in order to
make room for the initial buffers by pinning all bound buffers in a
single pass before binding (and evicting for) fresh buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Thread the pipelining ring through the callers.
Chris Wilson [Fri, 12 Nov 2010 13:42:53 +0000 (13:42 +0000)]
drm/i915: Thread the pipelining ring through the callers.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Extend hangcheck timeout
Chris Wilson [Fri, 12 Nov 2010 13:36:26 +0000 (13:36 +0000)]
drm/i915: Extend hangcheck timeout

... reduce the frequency of checking to further reduce the wakeups and
CPU overhead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Remove a defunct BUG_ON
Chris Wilson [Fri, 12 Nov 2010 13:56:11 +0000 (13:56 +0000)]
drm/i915: Remove a defunct BUG_ON

This used to check the precondition that all fences were to be located
in a mappable area, redundant now as those two parameters are combined
into one.

After pinning, we assert that the buffer is bound into the desired
region.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Move the implementation details of PIPE_CONTROL to the ringbuffer
Chris Wilson [Fri, 12 Nov 2010 10:46:37 +0000 (10:46 +0000)]
drm/i915: Move the implementation details of PIPE_CONTROL to the ringbuffer

The pipe control object is allocated by the device for the sole use of the
render ringbuffer. Move this detail from the general code to the render
ring buffer initialisation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Record fence registers on error.
Chris Wilson [Sun, 24 Oct 2010 09:28:47 +0000 (10:28 +0100)]
drm/i915: Record fence registers on error.

Having seen the effects of erroneous fencing on the batchbuffer, a
useful sanity check is to record the fence registers at the time of an
error.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoagp/intel: Remove duplicate const
Chris Wilson [Tue, 9 Nov 2010 17:53:20 +0000 (17:53 +0000)]
agp/intel: Remove duplicate const

drivers/char/agp/intel-gtt.c:340:48: warning: duplicate const

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Not all mappable regions require GTT fence regions
Chris Wilson [Tue, 9 Nov 2010 11:47:32 +0000 (11:47 +0000)]
drm/i915: Not all mappable regions require GTT fence regions

Combining map_and_fenceable revealed a bug in
i915_gem_object_gtt_size() in that it always computed the appropriate
fence size for the object regardless of tiling state which caused us to
over-allocate linear buffers when binding to the GTT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Use drm_i915_gem_object as the preferred type
Chris Wilson [Mon, 8 Nov 2010 19:18:58 +0000 (19:18 +0000)]
drm/i915: Use drm_i915_gem_object as the preferred type

A glorified s/obj_priv/obj/ with a net reduction of over a 100 lines and
many characters!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: no more agp for gem
Daniel Vetter [Sat, 6 Nov 2010 11:12:35 +0000 (12:12 +0100)]
drm/i915: no more agp for gem

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel-gtt: export api for drm/i915
Daniel Vetter [Sat, 6 Nov 2010 10:18:58 +0000 (11:18 +0100)]
intel-gtt: export api for drm/i915

Just some minor shuffling to get rid of any agp traces in the
exported functions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: move gtt handling to i915_gem_gtt.c
Daniel Vetter [Sat, 6 Nov 2010 09:10:47 +0000 (10:10 +0100)]
drm/i915: move gtt handling to i915_gem_gtt.c

No more drm_*_agp in i915_gem.c!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoagp: kill agp_rebind_memory
Daniel Vetter [Fri, 5 Nov 2010 21:27:10 +0000 (22:27 +0100)]
agp: kill agp_rebind_memory

Its only user, intel-gtt.c is now gone.

Cc: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: restore gtt on resume in the drm instead of in intel-gtt.ko
Daniel Vetter [Fri, 5 Nov 2010 21:23:30 +0000 (22:23 +0100)]
drm/i915: restore gtt on resume in the drm instead of in intel-gtt.ko

This still uses the agp functions to actually reinstate the mappings
(with a gross hack to make agp cooperate), but it wires everything
up correctly for the switchover.

The call to agp_rebind_memory can be dropped because all non-kms drivers
do all their rebinding on EnterVT.

v2: Be more paranoid and flush the chipset cache after restoring gtt
mappings.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: track objects in the gtt
Daniel Vetter [Fri, 5 Nov 2010 19:24:53 +0000 (20:24 +0100)]
drm/i915: track objects in the gtt

This is required to restore gtt mappings on resume when agp is gone.

The right way to do this would be to make sturct drm_mm_node embeddable
and use the allocation list maintained by the drm memory manager. But
that's a bigger project. Getting rid of the per bo agp_mem will save
more memory than this wastes, anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoagp: kill agp_flush_chipset and corresponding ioctl
Daniel Vetter [Fri, 5 Nov 2010 17:40:56 +0000 (18:40 +0100)]
agp: kill agp_flush_chipset and corresponding ioctl

The intel drm calls the chipset functions now directly. Userspace
never called the corresponding ioctl, hence it can be killed, too.

Cc: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm: kill drm_agp_chipset_flush
Daniel Vetter [Fri, 5 Nov 2010 17:13:43 +0000 (18:13 +0100)]
drm: kill drm_agp_chipset_flush

No longer used.

Cc: Dave Airlie <airlied@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/gtt: call chipset flush directly
Daniel Vetter [Fri, 5 Nov 2010 17:12:18 +0000 (18:12 +0100)]
drm/i915/gtt: call chipset flush directly

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915|intel-gtt: consolidate intel-gtt.h headers
Daniel Vetter [Fri, 5 Nov 2010 17:04:52 +0000 (18:04 +0100)]
drm/i915|intel-gtt: consolidate intel-gtt.h headers

... and a few other defines.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel-gtt: fold i81x-only dcache support into the generic driver
Daniel Vetter [Fri, 5 Nov 2010 14:43:35 +0000 (15:43 +0100)]
intel-gtt: fold i81x-only dcache support into the generic driver

Now the intel-gtt.c rewrite is complete!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel-gtt: switch i81x to the common initialization helpers
Daniel Vetter [Fri, 5 Nov 2010 12:30:14 +0000 (13:30 +0100)]
intel-gtt: switch i81x to the common initialization helpers

Still a separate agp_bridge_driver because of the i81x-only
dedicated vram support.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel-gtt: switch i81x to the write_entry helpers
Daniel Vetter [Thu, 4 Nov 2010 19:07:57 +0000 (20:07 +0100)]
intel-gtt: switch i81x to the write_entry helpers

Initialization is still done with the old code with a few
added things sprinkled in to make the intel_fake_agp helper
functions work.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel-gtt: kill unneeded sandybridge memory types
Daniel Vetter [Thu, 4 Nov 2010 19:14:15 +0000 (20:14 +0100)]
intel-gtt: kill unneeded sandybridge memory types

Used for the now dead agp type_to_mask stuff.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agointel-gtt: drop dcache support for i830 and later
Daniel Vetter [Thu, 4 Nov 2010 17:41:50 +0000 (18:41 +0100)]
intel-gtt: drop dcache support for i830 and later

i830_check_flags already disallows it, so no need to implement it
in the write_entry function. Seems to be a remnant from i810 support.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoMerge branch 'drm-intel-fixes' into drm-intel-next
Chris Wilson [Tue, 23 Nov 2010 20:13:13 +0000 (20:13 +0000)]
Merge branch 'drm-intel-fixes' into drm-intel-next

13 years agodrm/i915: Handle pagefaults in execbuffer user relocations
Chris Wilson [Sun, 21 Nov 2010 22:07:12 +0000 (22:07 +0000)]
drm/i915: Handle pagefaults in execbuffer user relocations

Currently if we hit a pagefault when applying a user relocation for the
execbuffer, we bail and return EFAULT to the application. Instead, we
need to unwind, drop the dev->struct_mutex, copy all the relocation
entries to a vmalloc array (to avoid any potential circular deadlocks
when resolving the pagefault), retake the mutex and then apply the
relocations.  Afterwards, we need to again drop the lock and copy the
vmalloc array back to userspace.

v2: Incorporate feedback from Daniel Vetter.

Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agodrm/i915: Contract the magic IPS constants into a direct LUT
Chris Wilson [Tue, 23 Nov 2010 13:50:14 +0000 (13:50 +0000)]
drm/i915: Contract the magic IPS constants into a direct LUT

... and no need to perform a linear search for the index.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoagp/intel: Remove confusion of stolen entries not stolen memory
Chris Wilson [Tue, 23 Nov 2010 14:24:24 +0000 (14:24 +0000)]
agp/intel: Remove confusion of stolen entries not stolen memory

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoagp/intel: Remove the artificial cap on stolen size
Chris Wilson [Tue, 23 Nov 2010 12:33:54 +0000 (12:33 +0000)]
agp/intel: Remove the artificial cap on stolen size

Now that the stolen memory does not also steal entries from the GTT, we
can use all the memory the BIOS set aside for the GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Compute physical addresses from base of stolen memory
Chris Wilson [Tue, 23 Nov 2010 12:09:30 +0000 (12:09 +0000)]
drm/i915: Compute physical addresses from base of stolen memory

The GATT is a write-only set of registers, reading from them in the
manner of i915_gtt_to_phys() is supposed to be undefined. However a
simple solution exists as we allocate linear memory from the stolen
area, we can simply add the block offset to the base register. As a
side-effect we recover all the unused stolen GTT entries and so enlarge
our aperture.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/panel: Restore saved value of BLC_PWM_CTL
Chris Wilson [Tue, 23 Nov 2010 09:45:50 +0000 (09:45 +0000)]
drm/i915/panel: Restore saved value of BLC_PWM_CTL

After a GPU reset, the backlight controller registers may be also reset
to 0. In that case we should restore those to the original values
programmed by the BIOS. Note that we still lack the code to handle the
case where the BIOS failed to program those registers at all...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Avoid oops when capturing NULL ring for inactive pinned buffers
Chris Wilson [Tue, 23 Nov 2010 08:49:38 +0000 (08:49 +0000)]
drm/i915: Avoid oops when capturing NULL ring for inactive pinned buffers

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/sdvo: Only enable HDMI encodings only if the commandset is supported
Chris Wilson [Mon, 22 Nov 2010 11:12:46 +0000 (11:12 +0000)]
drm/i915/sdvo: Only enable HDMI encodings only if the commandset is supported

As we conflated intel_sdvo->is_hdmi with both having HDMI support on the
ADD along with having HDMI support on the monitor, we would attempt to
use HDMI encodings even if the interface did not support those commands.

Reported-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
13 years agodrm/i915: Fix restore of 965 fence regs since the register tracing change.
Keith Packard [Mon, 22 Nov 2010 09:24:22 +0000 (09:24 +0000)]
drm/i915: Fix restore of 965 fence regs since the register tracing change.

We were reading our 64-bit value in I915_READ64 and returning 32 bits
of it.  The restoration of fence regs at resume then had a zero end
value, and the fence had no effect.

Version 2: Split register access functions into per-size versions

Sharing code between different sizes seemed reasonable when we only
needed a single copy, but as 64-bit access requires its own version,
it makes sense to just split them out for each size.

Reported-by: Peter Clifton <pcjc2@cam.ac.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
[ickle: use a macro to create the various read/write routines]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Add support for GPU reset on gen6.
Eric Anholt [Thu, 18 Nov 2010 01:31:14 +0000 (09:31 +0800)]
drm/i915: Add support for GPU reset on gen6.

This has proven sufficient to recover from a hang of the GPU using the
gem_bad_blit test while at the KMS console then starting X.  When
attempting the same during an X session, the timer doesn't appear to
trigger.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Also reinit the BSD and BLT rings after a GPU reset.
Eric Anholt [Thu, 18 Nov 2010 01:31:13 +0000 (09:31 +0800)]
drm/i915: Also reinit the BSD and BLT rings after a GPU reset.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Correct a comment about the use of the workqueue.
Eric Anholt [Thu, 18 Nov 2010 01:31:12 +0000 (09:31 +0800)]
drm/i915: Correct a comment about the use of the workqueue.

It isn't used for the hangcheck, which does its work right from the
timer trigger, but hangcheck can lead to error state recording, which
is run off of the workqueue.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoMerge branch 'drm-intel-next' of arrandale:git/linux-2.6 into drm-intel-next
Chris Wilson [Mon, 22 Nov 2010 08:56:33 +0000 (08:56 +0000)]
Merge branch 'drm-intel-next' of arrandale:git/linux-2.6 into drm-intel-next

13 years agoMerge branch 'drm-intel-fixes' into drm-intel-next
Chris Wilson [Mon, 22 Nov 2010 08:51:36 +0000 (08:51 +0000)]
Merge branch 'drm-intel-fixes' into drm-intel-next

Conflicts:
drivers/gpu/drm/i915/i915_gem.c

13 years agoMerge remote branch 'linus' into drm-intel-fixes
Chris Wilson [Mon, 22 Nov 2010 08:47:43 +0000 (08:47 +0000)]
Merge remote branch 'linus' into drm-intel-fixes

13 years agodrm/i915: Capture interesting display registers on error
Chris Wilson [Sun, 21 Nov 2010 13:12:35 +0000 (13:12 +0000)]
drm/i915: Capture interesting display registers on error

When trying to diagnose mysterious errors on resume, capture the
display register contents as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Capture pinned buffers on error
Chris Wilson [Mon, 22 Nov 2010 08:07:02 +0000 (08:07 +0000)]
drm/i915: Capture pinned buffers on error

The pinned buffers are useful for diagnosing errors in setting up state
for the chipset, which may not necessarily be 'active' at the time of
the error, e.g. the cursor buffer object.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoLinux 2.6.37-rc3
Linus Torvalds [Sun, 21 Nov 2010 23:18:56 +0000 (15:18 -0800)]
Linux 2.6.37-rc3

13 years agodrm/i915: Only save/restore cursor regs if !KMS
Chris Wilson [Sun, 21 Nov 2010 09:56:00 +0000 (09:56 +0000)]
drm/i915: Only save/restore cursor regs if !KMS

Under KMS, restoring the cursor is handled upon modeswitch in order to
avoid enabling an undefined set of registers. At the moment, the cursor
is restored before the aperture and modes are fully setup causing some
invalid access during resume, such as:

  PGTBL_ER: 0x00040000
    Invalid GTT entry during Cursor Fetch

Fix this by only performing cursor register save/restore under UMS where
it is done in the correct sequence.

Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Prevent integer overflow when validating the execbuffer
Chris Wilson [Sun, 21 Nov 2010 09:23:48 +0000 (09:23 +0000)]
drm/i915: Prevent integer overflow when validating the execbuffer

Commit 2549d6c2 removed the vmalloc used for temporary storage of the
relocation lists used during execbuffer. However, our use of vmalloc was
being protected by an integer overflow check which we do want to
preserve!

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Sat, 20 Nov 2010 03:46:45 +0000 (19:46 -0800)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Add EXT4_IOC_TRIM ioctl to handle batched discard
  fs: Do not dispatch FITRIM through separate super_operation
  ext4: ext4_fill_super shouldn't return 0 on corruption
  jbd2: fix /proc/fs/jbd2/<dev> when using an external journal
  ext4: missing unlock in ext4_clear_request_list()
  ext4: fix setting random pages PageUptodate

13 years agoext4: Add EXT4_IOC_TRIM ioctl to handle batched discard
Lukas Czerner [Sat, 20 Nov 2010 02:47:07 +0000 (21:47 -0500)]
ext4: Add EXT4_IOC_TRIM ioctl to handle batched discard

Filesystem independent ioctl was rejected as not common enough to be in
core vfs ioctl. Since we still need to access to this functionality this
commit adds ext4 specific ioctl EXT4_IOC_TRIM to dispatch
ext4_trim_fs().

It takes fstrim_range structure as an argument. fstrim_range is definec in
the include/linux/fs.h and its definition is as follows.

struct fstrim_range {
__u64 start;
__u64 len;
__u64 minlen;
}

start - first Byte to trim
len - number of Bytes to trim from start
minlen - minimum extent length to trim, free extents shorter than this
  number of Bytes will be ignored. This will be rounded up to fs
  block size.

After the FITRIM is done, the number of actually discarded Bytes is stored
in fstrim_range.len to give the user better insight on how much storage
space has been really released for wear-leveling.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agofs: Do not dispatch FITRIM through separate super_operation
Lukas Czerner [Sat, 20 Nov 2010 02:18:35 +0000 (21:18 -0500)]
fs: Do not dispatch FITRIM through separate super_operation

There was concern that FITRIM ioctl is not common enough to be included
in core vfs ioctl, as Christoph Hellwig pointed out there's no real point
in dispatching this out to a separate vector instead of just through
->ioctl.

So this commit removes ioctl_fstrim() from vfs ioctl and trim_fs
from super_operation structure.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Fri, 19 Nov 2010 23:32:22 +0000 (15:32 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: fix readdir EOVERFLOW on 32-bit archs
  ceph: fix frag offset for non-leftmost frags
  ceph: fix dangling pointer
  ceph: explicitly specify page alignment in network messages
  ceph: make page alignment explicit in osd interface
  ceph: fix comment, remove extraneous args
  ceph: fix update of ctime from MDS
  ceph: fix version check on racing inode updates
  ceph: fix uid/gid on resent mds requests
  ceph: fix rdcache_gen usage and invalidate
  ceph: re-request max_size if cap auth changes
  ceph: only let auth caps update max_size
  ceph: fix open for write on clustered mds
  ceph: fix bad pointer dereference in ceph_fill_trace
  ceph: fix small seq message skipping
  Revert "ceph: update issue_seq on cap grant"

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 19 Nov 2010 23:25:59 +0000 (15:25 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (31 commits)
  net: fix kernel-doc for sk_filter_rcu_release
  be2net: Fix to avoid firmware update when interface is not open.
  netfilter: fix IP_VS dependencies
  net: irda: irttp: sync error paths of data- and udata-requests
  ipv6: Expose reachable and retrans timer values as msecs
  ipv6: Expose IFLA_PROTINFO timer values in msecs instead of jiffies
  3c59x: fix build failure on !CONFIG_PCI
  ipg.c: remove id [SUNDANCE, 0x1021]
  net: caif: spi: fix potential NULL dereference
  ath9k_htc: Avoid setting QoS control for non-QoS frames
  net: zero kobject in rx_queue_release
  net: Fix duplicate volatile warning.
  MAINTAINERS: Add stmmac maintainer
  bonding: fix a race in IGMP handling
  cfg80211: fix can_beacon_sec_chan, reenable HT40
  gianfar: fix signedness issue
  net: bnx2x: fix error value sign
  8139cp: fix checksum broken
  r8169: fix checksum broken
  rds: Integer overflow in RDS cmsg handling
  ...

13 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 19 Nov 2010 19:59:49 +0000 (11:59 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_via: apply magic FIFO fix to vt6420 too

13 years agoRevert "kernel: make /proc/kallsyms mode 400 to reduce ease of attacking"
Linus Torvalds [Fri, 19 Nov 2010 19:54:40 +0000 (11:54 -0800)]
Revert "kernel: make /proc/kallsyms mode 400 to reduce ease of attacking"

This reverts commit 59365d136d205cc20fe666ca7f89b1c5001b0d5a.

It turns out that this can break certain existing user land setups.
Quoth Sarah Sharp:

 "On Wednesday, I updated my branch to commit 460781b from linus' tree,
  and my box would not boot.  klogd segfaulted, which stalled the whole
  system.

  At first I thought it actually hung the box, but it continued booting
  after 5 minutes, and I was able to log in.  It dropped back to the
  text console instead of the graphical bootup display for that period
  of time.  dmesg surprisingly still works.  I've bisected the problem
  down to this commit (commit 59365d136d205cc20fe666ca7f89b1c5001b0d5a)

  The box is running klogd 1.5.5ubuntu3 (from Jaunty).  Yes, I know
  that's old.  I read the bit in the commit about changing the
  permissions of kallsyms after boot, but if I can't boot that doesn't
  help."

So let's just keep the old default, and encourage distributions to do
the "chmod -r /proc/kallsyms" in their bootup scripts.  This is not
worth a kernel option to change default behavior, since it's so easily
done in user space.

Reported-and-bisected-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Marcus Meissner <meissner@suse.de>
Cc: Tejun Heo <tj@kernel.org>
Cc: Eugene Teo <eugeneteo@kernel.org>
Cc: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 19 Nov 2010 18:31:04 +0000 (10:31 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: fix typo in keycode validation supporting large scancodes
  Input: aiptek - tighten up permissions on sysfs attributes
  Input: sysrq - pass along lone Alt + SysRq

13 years agoMerge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle...
Linus Torvalds [Fri, 19 Nov 2010 18:28:13 +0000 (10:28 -0800)]
Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel

* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel:
  drm/i915: Disable FBC on Ironlake to save 1W
  drm/i915: Take advantage of auto-polling CRT hotplug detection on PCH hardware
  drm/i915/crt: Introduce struct intel_crt
  drm/i915: Do not hold mutex when faulting in user addresses
  drm: radeon: fix error value sign
  drm/radeon/kms: fix and unify tiled buffer alignment checking for r6xx/7xx
  drm/i915: Retire any pending operations on the old scanout when switching
  drm/i915: Fix I2C adapter registration

13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Fri, 19 Nov 2010 18:27:57 +0000 (10:27 -0800)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (40 commits)
  drm/radeon/kms: i2c s/sprintf/snprintf/g for safety
  drm/radeon/kms: fix i2c pad masks on rs4xx
  drm/ttm: Fix up a theoretical deadlock
  drm/radeon/kms: fix tiling info on evergreen
  drm/radeon/kms: fix alignment when allocating buffers
  drm/vmwgfx: Fix up an error path during bo creation
  drm/radeon/kms: register an i2c adapter name for the dp aux bus
  drm/radeon/kms/atom: add proper external encoders support
  drm/radeon/kms/atom: cleanup and unify DVO handling
  drm/radeon/kms: properly power up/down the eDP panel as needed (v4)
  drm/radeon/kms/atom: set sane defaults in atombios_get_encoder_mode()
  drm/radeon/kms: turn the backlight off explicitly for dpms
  drm/radeon/kms: fix typo in r600 cs checker
  drm: radeon: fix error value sign
  drm/radeon/kms: fix and unify tiled buffer alignment checking for r6xx/7xx
  nouveau: Acknowledge HPD irq in handler, not bottom half
  drm/nouveau: Fix a few confusions between "chipset" and "card_type".
  drm/nouveau: don't expose backlight control when available through ACPI
  drm/nouveau/pm: improve memtiming mappings
  drm/nouveau: Make PCIE GART size depend on the available RAMIN space.
  ...

13 years agosata_via: apply magic FIFO fix to vt6420 too
Tejun Heo [Fri, 19 Nov 2010 14:29:19 +0000 (15:29 +0100)]
sata_via: apply magic FIFO fix to vt6420 too

vt6420 has the same FIFO overflow problem as vt6421 when combined with
certain devices.  This patch applies the magic fix to vt6420 too.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Martin Qvist <q@maq.dk>
Reported-by: Peter Zijlstra <peterz@infradead.org>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
13 years agonet: fix kernel-doc for sk_filter_rcu_release
Randy Dunlap [Thu, 18 Nov 2010 13:02:37 +0000 (13:02 +0000)]
net: fix kernel-doc for sk_filter_rcu_release

Fix kernel-doc warning for sk_filter_rcu_release():

Warning(net/core/filter.c:586): missing initial short description on line:
 *  sk_filter_rcu_release: Release a socket filter by rcu_head

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix to avoid firmware update when interface is not open.
Sarveshwar Bandi [Thu, 18 Nov 2010 23:44:45 +0000 (23:44 +0000)]
be2net: Fix to avoid firmware update when interface is not open.

Since interrupts are enabled only when open is called on the interface,
Attempting a firmware update operation when interface is down could lead to
partial success or failure of operation. This fix fails the request if
netif_running is false.

Signed-off-by: Sarveshwar Bandi <Sarveshwar.Bandi@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoext4: ext4_fill_super shouldn't return 0 on corruption
Darrick J. Wong [Fri, 19 Nov 2010 14:56:44 +0000 (09:56 -0500)]
ext4: ext4_fill_super shouldn't return 0 on corruption

At the start of ext4_fill_super, ret is set to -EINVAL, and any failure path
out of that function returns ret.  However, the generic_check_addressable
clause sets ret = 0 (if it passes), which means that a subsequent failure (e.g.
a group checksum error) returns 0 even though the mount should fail.  This
causes vfs_kern_mount in turn to think that the mount succeeded, leading to an
oops.

A simple fix is to avoid using ret for the generic_check_addressable check,
which was last changed in commit 30ca22c70e3ef0a96ff84de69cd7e8561b416cb2.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 years agodrm/i915: Disable FBC on Ironlake to save 1W
Alex Shi [Fri, 19 Nov 2010 09:33:55 +0000 (09:33 +0000)]
drm/i915: Disable FBC on Ironlake to save 1W

Frame buffer compression is broken on Ironlake due to buggy hardware.
Currently it is disabled through chicken bits, but it still consumes
over 1W more than if we simply never attempt to enable the FBC code
paths.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agodrm/i915: Take advantage of auto-polling CRT hotplug detection on PCH hardware
Keith Packard [Tue, 16 Nov 2010 08:03:53 +0000 (16:03 +0800)]
drm/i915: Take advantage of auto-polling CRT hotplug detection on PCH hardware

Both IBX and CPT have an automatic hotplug detection mode which appears to work reliably enough
that we can dispense with the manual force hotplug trigger stuff. This means that
hotplug detection is as simple as reading the current hotplug register values.

The first time the hotplug detection is activated, the code synchronously waits for a hotplug
sequence in case the hardware hasn't bothered to do a detection cycle since being initialized.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/crt: Introduce struct intel_crt
Chris Wilson [Tue, 16 Nov 2010 10:58:37 +0000 (10:58 +0000)]
drm/i915/crt: Introduce struct intel_crt

We will use this structure in future patches to store CRT specific
information on the encoder.

Split out and tweaked from a patch by Keith Packard.

Signed-off-by: Keith Packard <keithp@kithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Do not hold mutex when faulting in user addresses
Chris Wilson [Wed, 17 Nov 2010 09:10:42 +0000 (09:10 +0000)]
drm/i915: Do not hold mutex when faulting in user addresses

Linus Torvalds found that it was rather trivial to trigger a system
freeze:

  In fact, with lockdep, I don't even need to do the sysrq-d thing: it
  shows the bug as it happens. It's the X server taking the same lock
  recursively.

  Here's the problem:

    =============================================
    [ INFO: possible recursive locking detected ]
    2.6.37-rc2-00012-gbdbd01a #7
    ---------------------------------------------
    Xorg/2816 is trying to acquire lock:
     (&dev->struct_mutex){+.+.+.}, at: [<ffffffff812c626c>] i915_gem_fault+0x50/0x17e

    but task is already holding lock:
     (&dev->struct_mutex){+.+.+.}, at: [<ffffffff812c403b>] i915_mutex_lock_interruptible+0x28/0x4a

    other info that might help us debug this:
    2 locks held by Xorg/2816:
     #0:  (&dev->struct_mutex){+.+.+.}, at: [<ffffffff812c403b>] i915_mutex_lock_interruptible+0x28/0x4a
     #1:  (&mm->mmap_sem){++++++}, at: [<ffffffff81022d4f>] page_fault+0x156/0x37b

This recursion was introduced by rearranging the locking to avoid the
double locking on the fast path (4f27b5d and fbd5a26d) and the
introduction of the prefault to encourage the fast paths (b5e4f2b). In
order to undo the problem, we rearrange the code to perform the access
validation upfront, attempt to prefault and then fight for control of the
mutex.  the best case scenario where the mutex is uncontended the
prefaulting is not wasted.

Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Take advantage of auto-polling CRT hotplug detection on PCH hardware
Keith Packard [Tue, 16 Nov 2010 08:03:53 +0000 (16:03 +0800)]
drm/i915: Take advantage of auto-polling CRT hotplug detection on PCH hardware

Both IBX and CPT have an automatic hotplug detection mode which appears to work reliably enough
that we can dispense with the manual force hotplug trigger stuff. This means that
hotplug detection is as simple as reading the current hotplug register values.

The first time the hotplug detection is activated, the code synchronously waits for a hotplug
sequence in case the hardware hasn't bothered to do a detection cycle since being initialized.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/crt: Introduce struct intel_crt
Chris Wilson [Tue, 16 Nov 2010 10:58:37 +0000 (10:58 +0000)]
drm/i915/crt: Introduce struct intel_crt

We will use this structure in future patches to store CRT specific
information on the encoder.

Split out and tweaked from a patch by Keith Packard.

Signed-off-by: Keith Packard <keithp@kithp.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/radeon/kms: i2c s/sprintf/snprintf/g for safety
Alex Deucher [Thu, 18 Nov 2010 16:37:18 +0000 (11:37 -0500)]
drm/radeon/kms: i2c s/sprintf/snprintf/g for safety

As per advice from Jean Delvare.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: fix i2c pad masks on rs4xx
Alex Deucher [Thu, 18 Nov 2010 22:18:08 +0000 (17:18 -0500)]
drm/radeon/kms: fix i2c pad masks on rs4xx

These got lost in the last i2c cleanup.  Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=23222

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Thu, 18 Nov 2010 23:01:43 +0000 (15:01 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] remove SCSI host lock and serial number usage from ata_scsi_queuecmd

13 years agoMAINTAINERS: update documentation entries
Randy Dunlap [Thu, 18 Nov 2010 20:27:37 +0000 (12:27 -0800)]
MAINTAINERS: update documentation entries

Update kernel-doc and Documentation maintainers info.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/development-process: more staging info
Andres Salomon [Thu, 18 Nov 2010 20:27:36 +0000 (12:27 -0800)]
Documentation/development-process: more staging info

Document things that I would've liked to have known when submitting a driver
to gregkh for staging.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/development-process: use -next trees instead of staging
Andres Salomon [Thu, 18 Nov 2010 20:27:35 +0000 (12:27 -0800)]
Documentation/development-process: use -next trees instead of staging

This is confusing, as we have "staging" trees for drivers/staging.  Call
them -next trees.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: change email address for Hans Koch
Hans J. Koch [Thu, 18 Nov 2010 20:27:34 +0000 (12:27 -0800)]
Documentation: change email address for Hans Koch

My old mail address doesn't exist anymore. This changes all occurrences
to my new address.

Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/gpio.txt: explain poll/select usage
Bernhard Walle [Thu, 18 Nov 2010 20:27:33 +0000 (12:27 -0800)]
Documentation/gpio.txt: explain poll/select usage

Add a bit more information how to use poll(2) on GPIO value files
correctly. For me it was not clear that I need to poll(2) for
POLLPRI|POLLERR or select(2) for exceptfds.

Signed-off-by: Bernhard Walle <walle@corscience.de>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: make configfs example code simpler, clearer
Dan Carpenter [Thu, 18 Nov 2010 20:27:32 +0000 (12:27 -0800)]
Documentation: make configfs example code simpler, clearer

If "p" is NULL then it will cause an oops when we pass it to
simple_strtoul().  In this case "p" can not be NULL so I removed the
check.  I also changed the check a little to make it more explicit that
we are testing whether p points to the NUL char.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokernel-doc: escape xml for structs
Randy Dunlap [Thu, 18 Nov 2010 20:27:31 +0000 (12:27 -0800)]
kernel-doc: escape xml for structs

scripts/kernel-doc was leaving unescaped '<', '>', and '&' in
generated xml output for structs.  This causes xml parser errors.
Convert these characters to "&lt;", "&gt;", and "&amp;" as needed
to prevent errors.

Most of the conversion was already done; complete it just before
output.

Documentation/DocBook/device-drivers.xml:41883: parser error : StartTag: invalid element name
#define INPUT_KEYMAP_BY_INDEX (1 << 0)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agonetfilter: fix IP_VS dependencies
Patrick McHardy [Thu, 18 Nov 2010 08:20:57 +0000 (08:20 +0000)]
netfilter: fix IP_VS dependencies

When NF_CONNTRACK is enabled, IP_VS uses conntrack symbols.
Therefore IP_VS can't be linked statically when conntrack
is built modular.

Reported-by: Justin P. Mattock <justinmattock@gmail.com>
Tested-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: irda: irttp: sync error paths of data- and udata-requests
Wolfram Sang [Tue, 16 Nov 2010 09:40:02 +0000 (09:40 +0000)]
net: irda: irttp: sync error paths of data- and udata-requests

irttp_data_request() returns meaningful errorcodes, while irttp_udata_request()
just returns -1 in similar situations. Sync the two and the loglevels of the
accompanying output.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Expose reachable and retrans timer values as msecs
Thomas Graf [Wed, 17 Nov 2010 04:12:02 +0000 (04:12 +0000)]
ipv6: Expose reachable and retrans timer values as msecs

Expose reachable and retrans timer values in msecs instead of jiffies.
Both timer values are already exposed as msecs in the neighbour table
netlink interface.

The creation timestamp format with increased precision is kept but
cleaned up.

Signed-off-by: Thomas Graf <tgraf@infradead.org>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 18 Nov 2010 19:56:09 +0000 (11:56 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

13 years agoFix build failure at cx25821-video driver
Youquan Song [Thu, 18 Nov 2010 23:28:20 +0000 (18:28 -0500)]
Fix build failure at cx25821-video driver

Kernel build fail for cx25821-video has depends on smp_lock.h header
file, but the dependency is removed in recent commit 451a3c24b013.

Signed-off-by: Youquan Song <youquan.song@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoipv6: Expose IFLA_PROTINFO timer values in msecs instead of jiffies
Thomas Graf [Wed, 17 Nov 2010 01:44:24 +0000 (01:44 +0000)]
ipv6: Expose IFLA_PROTINFO timer values in msecs instead of jiffies

IFLA_PROTINFO exposes timer related per device settings in jiffies.
Change it to expose these values in msecs like the sysctl interface
does.

I did not find any users of IFLA_PROTINFO which rely on any of these
values and even if there are, they are likely already broken because
there is no way for them to reliably convert such a value to another
time format.

Signed-off-by: Thomas Graf <tgraf@infradead.org>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agohardirq.h: needs sched.h if using BKL
Linus Torvalds [Thu, 18 Nov 2010 18:56:29 +0000 (10:56 -0800)]
hardirq.h: needs sched.h if using BKL

This really isn't the right thing to do, and strictly speaking we should
have the BKL depth count in the thread info right next to the preempt
count.  The two really do go together.

However, since that would involve a patch to all architectures, and the
BKL is finally going away, it's simply not worth the effort to do the
RightThing(tm).  Just re-instate the <linux/sched.h> include that we
used to get accidentally from the smp_lock.h one.

This is all fallout from the same old "BKL: remove extraneous #include
<smp_lock.h>" commit.

Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years ago3c59x: fix build failure on !CONFIG_PCI
Namhyung Kim [Tue, 16 Nov 2010 05:27:51 +0000 (05:27 +0000)]
3c59x: fix build failure on !CONFIG_PCI

VORTEX_PCI() could return NULL so it needs to be casted before
accessing any member of struct pci_dev. This fixes following
build failure. Likewise VORTEX_EISA() was changed also.

  CC [M]  drivers/net/3c59x.o
drivers/net/3c59x.c: In function 'acpi_set_WOL':
drivers/net/3c59x.c:3211:39: warning: dereferencing 'void *' pointer
drivers/net/3c59x.c:3211:39: error: request for member 'current_state' in something not a structure or union
make[3]: *** [drivers/net/3c59x.o] Error 1
make[2]: *** [drivers/net/3c59x.o] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipg.c: remove id [SUNDANCE, 0x1021]
Ken Kawasaki [Sat, 13 Nov 2010 13:42:08 +0000 (13:42 +0000)]
ipg.c: remove id [SUNDANCE, 0x1021]

ipg.c:
  The id [SUNDANCE, 0x1021] (=[0x13f0, 0x1021]) is defined
  at dl2k.h and ipg.c.
  But this device works better with dl2k driver.

  This problem is similar with the commit
  [25cca5352712561fba97bd37c495593d641c1d39
  ipg: Remove device claimed by dl2k from pci id table]
  at 11 Feb 2010.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: caif: spi: fix potential NULL dereference
Vasiliy Kulikov [Thu, 18 Nov 2010 18:35:58 +0000 (10:35 -0800)]
net: caif: spi: fix potential NULL dereference

alloc_netdev() is not checked here for NULL return value.  dev is
check instead.  It might lead to NULL dereference of ndev.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoath9k_htc: Avoid setting QoS control for non-QoS frames
Rajkumar Manoharan [Thu, 18 Nov 2010 06:49:52 +0000 (12:19 +0530)]
ath9k_htc: Avoid setting QoS control for non-QoS frames

Setting tid information in the TX header is required only for QoS
frames. Not handling this case causes severe data loss with some APs.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Thu, 18 Nov 2010 17:45:47 +0000 (09:45 -0800)]
Merge branch 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm

* 'kvm-updates/2.6.37' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: VMX: Fix host userspace gsbase corruption
  KVM: Correct ordering of ldt reload wrt fs/gs reload

13 years agonet: zero kobject in rx_queue_release
John Fastabend [Tue, 16 Nov 2010 19:42:53 +0000 (19:42 +0000)]
net: zero kobject in rx_queue_release

netif_set_real_num_rx_queues() can decrement and increment
the number of rx queues. For example ixgbe does this as
features and offloads are toggled. Presumably this could
also happen across down/up on most devices if the available
resources changed (cpu offlined).

The kobject needs to be zero'd in this case so that the
state is not preserved across kobject_put()/kobject_init_and_add().

This resolves the following error report.

ixgbe 0000:03:00.0: eth2: NIC Link is Up 10 Gbps, Flow Control: RX/TX
kobject (ffff880324b83210): tried to init an initialized object, something is seriously wrong.
Pid: 1972, comm: lldpad Not tainted 2.6.37-rc18021qaz+ #169
Call Trace:
 [<ffffffff8121c940>] kobject_init+0x3a/0x83
 [<ffffffff8121cf77>] kobject_init_and_add+0x23/0x57
 [<ffffffff8107b800>] ? mark_lock+0x21/0x267
 [<ffffffff813c6d11>] net_rx_queue_update_kobjects+0x63/0xc6
 [<ffffffff813b5e0e>] netif_set_real_num_rx_queues+0x5f/0x78
 [<ffffffffa0261d49>] ixgbe_set_num_queues+0x1c6/0x1ca [ixgbe]
 [<ffffffffa0262509>] ixgbe_init_interrupt_scheme+0x1e/0x79c [ixgbe]
 [<ffffffffa0274596>] ixgbe_dcbnl_set_state+0x167/0x189 [ixgbe]

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Fix duplicate volatile warning.
Tetsuo Handa [Thu, 18 Nov 2010 17:40:04 +0000 (09:40 -0800)]
net: Fix duplicate volatile warning.

jiffies is defined as "volatile".

  extern unsigned long volatile __jiffy_data jiffies;

ACCESS_ONCE() uses "volatile".
As a result, some compilers warn duplicate `volatile' for ACCESS_ONCE(jiffies).

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMAINTAINERS: Add stmmac maintainer
Giuseppe Cavallaro [Thu, 18 Nov 2010 17:32:02 +0000 (09:32 -0800)]
MAINTAINERS: Add stmmac maintainer

Add STMMAC to the list of supported Ethernet drivers
and myself as maintainer.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: fix a race in IGMP handling
Eric Dumazet [Thu, 18 Nov 2010 17:30:42 +0000 (09:30 -0800)]
bonding: fix a race in IGMP handling

RCU conversion in IGMP code done in net-next-2.6 raised a race in
__bond_resend_igmp_join_requests().

It iterates in_dev->mc_list without appropriate protection (RTNL, or
read_lock on in_dev->mc_list_lock).

Another cpu might delete an entry while we use it and trigger a fault.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoInput: fix typo in keycode validation supporting large scancodes
Mattia Dongili [Thu, 18 Nov 2010 17:06:43 +0000 (09:06 -0800)]
Input: fix typo in keycode validation supporting large scancodes

Check the input_keymap_entry keycode size (u32) instead of the device's
(void*) when validating that keycode value can be stored in the keymap.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=22722
Signed-off-by: Mattia Dongili <malattia@linux.it>
Tested-by: Norbert Preining <preining@logic.at>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>