11 May, 2011
5 commits
-
firewire-sbp2 already takes care for internal serialization where
required (ORB list accesses), and it does not use cmd->serial_number
internally. Hence it is safe to not grab the shost lock around
queuecommand.While we are at housekeeping, drop a redundant struct member:
sbp2_command_orb.done is set once in a hot path and dereferenced once in
a hot path. We can as well dereference sbp2_command_orb.cmd->scsi_done
instead.Signed-off-by: Stefan Richter
-
firewire-core manages the following types of work items:
fw_card.br_work:
- resets the bus on a card and possibly sends a PHY packet before that
- does not sleep for long or not at all
- is scheduled via fw_schedule_bus_reset() by
- firewire-ohci's pci_probe method
- firewire-ohci's set_config_rom method, called by kernelspace
protocol drivers and userspace drivers which add/remove
Configuration ROM descriptors
- userspace drivers which use the bus reset ioctl
- itself if the last reset happened less than 2 seconds agofw_card.bm_work:
- performs bus management duties
- usually does not (but may in corner cases) sleep for long
- is scheduled via fw_schedule_bm_work() by
- firewire-ohci's self-ID-complete IRQ handler tasklet
- firewire-core's fw_device.work instances whenever the root node
device was (successfully or unsuccessfully) discovered,
refreshed, or rediscovered
- itself in case of resource allocation failures or in order to
obey the 125ms bus manager arbitration intervalfw_device.work:
- performs node probe, update, shutdown, revival, removal; including
kernel driver probe, update, shutdown and bus reset notification to
userspace drivers
- usually sleeps moderately long, in corner cases very long
- is scheduled by
- firewire-ohci's self-ID-complete IRQ handler tasklet via the
core's fw_node_event
- firewire-ohci's pci_remove method via core's fw_destroy_nodes/
fw_node_event
- itself during retries, e.g. while a node is powering upiso_resource.work:
- accesses registers at the Isochronous Resource Manager node
- usually does not (but may in corner cases) sleep for long
- is scheduled via schedule_iso_resource() by
- the owning userspace driver at addition and removal of the
resource
- firewire-core's fw_device.work instances after bus reset
- itself in case of resource allocation if necessary to obey the
1000ms reallocation period after bus resetfw_card.br_work instances should not, and instances of the others must
not, be executed in parallel by multiple CPUs -- but were not protected
against that. Hence allocate a non-reentrant workqueue for them.fw_device.work may be used in the memory reclaim path in case of SBP-2
device updates. Hence we need a workqueue with rescuer and cannot use
system_nrt_wq.Signed-off-by: Stefan Richter
Reviewed-by: Tejun Heo -
When queueing iso packets, the run time is dominated by the two
MMIO accesses that set the DMA context's wake bit. Because most
drivers submit packets in batches, we can save much time by
removing all but the last wakeup.The internal kernel API is changed to require a call to
fw_iso_context_queue_flush() after a batch of queued packets.
The user space API does not change, so one call to
FW_CDEV_IOC_QUEUE_ISO must specify multiple packets to take
advantage of this optimization.In my measurements, this patch reduces the time needed to queue
fifty skip packets from userspace to one sixth on a 2.5 GHz CPU,
or to one third at 800 MHz.Signed-off-by: Clemens Ladisch
Signed-off-by: Stefan Richter -
We do not need slab allocations anymore in order to satisfy
streaming DMA mapping constraints, thanks to commit da28947e7e36
"firewire: ohci: avoid separate DMA mapping for small AT payloads".(Besides, the slab-allocated buffers that firewire-core, firewire-sbp2,
and firedtv used to provide for 8-byte write and lock requests were
still not fully portable since they crossed cacheline boundaries or
shared a cacheline with unrelated CPU-accessed data. snd-firewire-lib
got this aspect right by using an extra kmalloc/ kfree just for the
8-byte transaction buffer.)This change replaces kmalloc'ed lock transaction scratch buffers in
firewire-core, firedtv, and snd-firewire-lib by local stack allocations.
Perhaps the most notable result of the change is simpler locking because
there is no need to serialize usages of preallocated per-device buffers
anymore. Also, allocations and deallocations are simpler.Signed-off-by: Stefan Richter
Acked-by: Clemens Ladisch -
in order to pull in changes in drivers/media/dvb/firewire/ and
sound/firewire/.
10 May, 2011
25 commits
-
Commit a626ca6a6564 ("vm: fix vm_pgoff wrap in stack expansion") fixed
the case of an expanding mapping causing vm_pgoff wrapping when you had
downward stack expansion. But there was another case where IA64 and
PA-RISC expand mappings: upward expansion.This fixes that case too.
Signed-off-by: Hugh Dickins
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds -
* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6:
drm/i915/lvds: Only act on lid notify when the device is on
drm/i915: fix intel_crtc_clock_get pipe reads after "cleanup cleanup"
drm/i915: Only enable the plane after setting the fb base (pre-ILK)
drm/i915/dp: Be paranoid in case we disable a DP before it is attached
drm/i915: Release object along create user fb error path -
Linux kernel excludes guard page when performing mlock on a VMA with
down-growing stack. However, some architectures have up-growing stack
and locking the guard page should be excluded in this case too.This patch fixes lvm2 on PA-RISC (and possibly other architectures with
up-growing stack). lvm2 calculates number of used pages when locking and
when unlocking and reports an internal error if the numbers mismatch.[ Patch changed fairly extensively to also fix /proc//maps for the
grows-up case, and to move things around a bit to clean it all up and
share the infrstructure with the /proc bits.Tested on ia64 that has both grow-up and grow-down segments - Linus ]
Signed-off-by: Mikulas Patocka
Tested-by: Tony Luck
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds -
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
eeepc-laptop: Use ACPI handle to identify rfkill port
[PATCH] sony-laptop: limit brightness range to DSDT provided ones
sony-laptop: report failures on setting LCD brightness
thinkpad-acpi: module autoloading for newer Lenovo ThinkPads. -
If we're using vga switcheroo, the device may be turned off
and poking it can return random state. This provokes an OOPS fixed
separately by 8ff887c847 (drm/i915/dp: Be paranoid in case we disable a
DP before it is attached). Trying to use and respond to events on a
device that has been turned off by the user is in principle a silly thing
to do.Signed-off-by: Alex Williamson
Signed-off-by: Chris Wilson
Cc: stable@kernel.org
Signed-off-by: Keith Packard -
Despite the fixes in 548f245ba6a31 (drm/i915: fix per-pipe reads after
"cleanup"), we missed one neighbouring read that was mistakenly replaced
with the reg value in 9db4a9c (drm/i915: cleanup per-pipe reg usage).
This was preventing us from correctly determining the mode the BIOS left
the panel in for machines that neither have an OpRegion nor access to
the VBT, (e.g. the EeePC 700).Signed-off-by: Chris Wilson
Cc: Jesse Barnes
Cc: stable@kernel.org
Reviewed-by: Jesse Barnes
Signed-off-by: Keith Packard -
When enabling the plane, it is helpful to have already pointed that
plane to valid memory or else we may incur the wrath of a PGTBL_ER.
This code preserved the behaviour from the bad old days for unknown
reasons...Found by assert_fb_bound_for_plane().
References: https://bugs.freedesktop.org/show_bug.cgi?id=36246
Signed-off-by: Chris Wilson
Cc: Daniel Vetter
Cc: Jesse Barnes
Signed-off-by: Keith Packard -
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ASoC: Fix CODEC DAI names for Goni
ASoC: Fix CODEC name in Goni
davinci-mcasp: fix _CBM_CFS pin directions
davinci-mcasp: fix _CBM_CFS hw_params
davinci-mcasp: use bitfield definitions for PDIR
ASoC: davinci-mcasp: correct tdm_slots limit -
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/radeon/kms: add pci id to acer travelmate quirk for 5730
drm/radeon: fix order of doing things in radeon_crtc_cursor_set
drm: mm: fix debug output
drm/radeon/kms: ATPX switcheroo fixes
drm/nouveau: Fix a crash at card takedown for NV40 and older cards -
* hpfs:
HPFS: Remove unused variable
HPFS: Move declaration up, so that there are no out-of-scope pointers
HPFS: Fix some unaligned accesses
HPFS: Fix endianity. Make hpfs work on big-endian machines
HPFS: Implement fsync for hpfs
HPFS: Fix a bug that filesystem was not marked dirty when remounting it
HPFS: Restrict uid and gid to 16-bit values
HPFS: When marking or clearing the dirty bit, sync the filesystem
HPFS: Use types with defined width
HPFS: Remove mark_inode_dirty
HPFS: Remove CR/LF conversion option
HPFS: Remove remaining locks
HPFS: Introduce a global mutex and lock it on every callback from VFS.
HPFS: Make HPFS compile on preempt and SMP -
Remove unused variable
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Move declaration up, so that there are no out-of-scope pointers
Reported-by: Jesper Juhl
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Fix some unaligned accesses
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Fix endianity. Make hpfs work on big-endian machines.
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Implement fsync for hpfs.
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Fix a bug that filesystem was not marked dirty when remounting it
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Restrict uid and gid to 16-bit values.
HPFS stores only 2 bytes in the EAs.
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
When marking or clearing the dirty bit, sync the filesystem
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Use types with defined width
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Remove mark_inode_dirty
HPFS doesn't use kernel's dirty inode indicator anyway because
writing an inode requires directory's mutex.Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Remove CR/LF conversion option
It is unused anyway. It was used on 2.2 kernels or so.
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Remove remaining locks
Because of a new global per-fs lock, no other locks are needed
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Introduce a global mutex and lock it on every callback from VFS.
Performance doesn't matter, reviewing the whole code for locking correctness
would be too complicated, so simply lock it all.Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds -
Make HPFS compile on preempt and SMP
Signed-off-by: Mikulas Patocka
Signed-off-by: Linus Torvalds
09 May, 2011
10 commits
-
The ACPI notification we get from rfkill events on these machines gives
us all the information we need to identify the port that's changed. Do
so rather than assuming that it's always bus 1.Signed-off-by: Matthew Garrett
-
The new style brightness control provides an operating range of 9 values
(seems consistent over a large number of models sharing the same
brightness control methods).
Read and use the minimum and maximum values to limit the backlight
interface between those boundaries.Signed-off-by: Mattia Dongili
Signed-off-by: Matthew Garrett -
Check if we were successful in setting the requested brightness and
report failure in that case.Signed-off-by: Mattia Dongili
Signed-off-by: Matthew Garrett -
The newer Lenovo ThinkPads have HKEY HID of LEN0068 instead
of IBM0068. Added new HID so that thinkpad_acpi module will
auto load on these newer Lenovo ThinkPads.Acked-by: Henrique de Moraes Holschuh
Cc: stable@kernel.org
Signed-off-by: Manoj Iyer
Signed-off-by: Andy Lutomirski
Signed-off-by: Matthew Garrett -
Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=34082Reported by: Sampo Laaksonen
Signed-off-by: Alex Deucher
Cc: stable@kernel.org
Signed-off-by: Dave Airlie -
if object pin or object lookup in radeon_cursor_set fail, the function
could leave inconsistent mouse width and hight values in radeon_crtc
fixed by moving cursor width and height assignments after all
checks have passedSigned-off-by: Ilija Hadzic
Reviewed-by: Alex Deucher
Signed-off-by: Dave Airlie -
The looping helper didn't do anything due to a superficial
semicolon. Furthermore one of the two dump functions suffered
from copy&paste fail.While staring at the code I've also noticed that the replace
helper (currently unused) is a bit broken.Signed-off-by: Daniel Vetter
Signed-off-by: Dave Airlie -
* 'nouveau/drm-nouveau-fixes' of /ssd/git/drm-nouveau-next:
drm/nouveau: Fix a crash at card takedown for NV40 and older cards -
When we switch the display mux, also switch
the i2c mux. Also use the start and finish
methods to let the sbios know that the switch
is happening.Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=35398Signed-off-by: Alex Deucher
Signed-off-by: Dave Airlie -
NV40 and older cards (pre NV50) reserve a vram bo for the vga memory at
card init. This bo is then freed at card shutdown. The problem is that
the ttm bo vram manager was already freed. So a crash occurs when the
vga bo is freed. The fix is to free the vga bo prior to freeing the ttm
bo vram manager. There might be other solutions but this seemed the
simplest to me.Signed-off-by: Jimmy Rentz
Signed-off-by: Ben Skeggs