19 Oct, 2010
1 commit
-
lru_add_drain_all() uses schedule_on_each_cpu() which is synchronous.
There is no reason to call flush_scheduled_work() after
lru_add_drain_all(). Drop the spurious calls.This is to prepare for the deprecation and removal of
flush_scheduled_work().Signed-off-by: Tejun Heo
Acked-by: KAMEZAWA Hiroyuki
Reviewed-by: Minchan Kim
Acked-by: Mel Gorman
18 Oct, 2010
2 commits
-
* Rename shpchp_wq to shpchp_ordered_wq and add non-ordered shpchp_wq
which is used instead of the system workqueue. This is to remove
the use of flush_scheduled_work() which is deprecated and scheduled
for removal.* With cmwq in place, there's no point in creating workqueues lazily.
Create both shpchp_wq and shpchp_ordered_wq upfront.* Include workqueue.h from shpchp.h.
Signed-off-by: Tejun Heo
Acked-by: Jesse Barnes -
* Rename pciehp_wq to pciehp_ordered_wq and add non-ordered pciehp_wq
which is used instead of the system workqueue. This is to remove
the use of flush_scheduled_work() which is deprecated and scheduled
for removal.* With cmwq in place, there's no point in creating workqueues lazily.
Create both pciehp_wq and pciehp_ordered_wq upfront.* Include workqueue.h from pciehp.h.
Signed-off-by: Tejun Heo
Acked-by: Jesse Barnes
17 Oct, 2010
1 commit
-
diva doesn't use workqueue and there is no reason to flush the system
workqueue from diva_os_remove_soft_isr(). Remove it.This is to prepare for the deprecation and removal of
flush_scheduled_work().Signed-off-by: Tejun Heo
Acked-by: Armin Schindler
11 Oct, 2010
2 commits
-
Add WQ_MEM_RECLAIM flag which currently maps to WQ_RESCUER, mark
WQ_RESCUER as internal and replace all external WQ_RESCUER usages to
WQ_MEM_RECLAIM.This makes the API users express the intent of the workqueue instead
of indicating the internal mechanism used to guarantee forward
progress. This is also to make it cleaner to add more semantics to
WQ_MEM_RECLAIM. For example, if deemed necessary, memory reclaim
workqueues can be made highpri.This patch doesn't introduce any functional change.
Signed-off-by: Tejun Heo
Cc: Jeff Garzik
Cc: Dave Chinner
Cc: Steven Whitehouse -
The policy function keep_working() didn't check GCWQ_HIGHPRI_PENDING
and could return %false with highpri work pending. This could lead to
late execution of a highpri work which was delayed due to @max_active
throttling if other works are actively consuming CPU cycles.For example, the following could happen.
1. Work W0 which burns CPU cycles.
2. Two works W1 and W2 are queued to a highpri wq w/ @max_active of 1.
3. W1 starts executing and W2 is put to delayed queue. W0 and W1 are
both runnable.4. W1 finishes which puts W2 to pending queue but keep_working()
incorrectly returns %false and the worker goes to sleep.5. W0 finishes and W2 starts execution.
With this patch applied, W2 starts execution as soon as W1 finishes.
Signed-off-by: Tejun Heo
05 Oct, 2010
2 commits
-
These two tracepoints allow tracking when and how a work is queued and
activated. This patch is based on Frederic's patch to add queue_work
trace point.Signed-off-by: Tejun Heo
Cc: Frederic Weisbecker -
Define workqueue_work event class and use it for workqueue_execute_end
trace point. Also, move trace/events/workqueue.h include downwards
such that all struct definitions are visible to it. This is to
prepare for more tracepoints and doesn't cause any functional change.Signed-off-by: Tejun Heo
Cc: Frederic Weisbecker
19 Sep, 2010
4 commits
-
Implement flush[_delayed]_work_sync(). These are flush functions
which also make sure no CPU is still executing the target work from
earlier queueing instances. These are similar to
cancel[_delayed]_work_sync() except that the target work item is
flushed instead of cancelled.Signed-off-by: Tejun Heo
-
Factor out start_flush_work() from flush_work(). start_flush_work()
has @wait_executing argument which controls whether the barrier is
queued only if the work is pending or also if executing. As
flush_work() needs to wait for execution too, it uses %true.This commit doesn't cause any behavior difference. start_flush_work()
will be used to implement flush_work_sync().Signed-off-by: Tejun Heo
-
Make the following cleanup changes.
* Relocate flush/cancel function prototypes and definitions.
* Relocate wait_on_cpu_work() and wait_on_work() before
try_to_grab_pending(). These will be used to implement
flush_work_sync().* Make all flush/cancel functions return bool instead of int.
* Update wait_on_cpu_work() and wait_on_work() to return %true if they
actually waited.* Add / update comments.
This patch doesn't cause any functional changes.
Signed-off-by: Tejun Heo
-
alloc_ordered_workqueue() creates a workqueue which processes each
work itemp one by one in the queued order. This will be used to
replace create_freezeable_workqueue() and
create_singlethread_workqueue().Signed-off-by: Tejun Heo
18 Sep, 2010
6 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: pcm - Fix race with proc files
ALSA: pcm - Fix unbalanced pm_qos_request
ALSA: HDA: Enable internal speaker on Dell M101z
ALSA: patch_nvhdmi.c: Fix supported sample rate list.
sound: Remove pr_ uses of KERN_
ALSA: hda - Add quirk for Toshiba C650D using a Conexant CX20585
ALSA: hda_intel: ALSA HD Audio patch for Intel Patsburg DeviceIDs -
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: (lm95241) Replace rate sysfs attribute with update_interval
hwmon: (adm1031) Replace update_rate sysfs attribute with update_interval
hwmon: (w83627ehf) Use proper exit sequence
hwmon: (emc1403) Remove unnecessary hwmon_device_unregister
hwmon: (f75375s) Do not overwrite values read from registers
hwmon: (f75375s) Shift control mode to the correct bit position
hwmon: New subsystem maintainers
hwmon: (lis3lv02d) Prevent NULL pointer dereference -
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
GFS2: gfs2_logd should be using interruptible waits -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: nosy: fix build when CONFIG_FIREWIRE=N
firewire: ohci: activate cycle timer register quirk on Ricoh chips -
* 'for-linus' of git://neil.brown.name/md:
md: fix v1.x metadata update when a disk is missing.
md: call md_update_sb even for 'external' metadata arrays. -
If a signal hits us outside of a syscall and another gets delivered
when we are in sigreturn (e.g. because it had been in sa_mask for
the first one and got sent to us while we'd been in the first handler),
we have a chance of returning from the second handler to location one
insn prior to where we ought to return. If r0 happens to contain -513
(-ERESTARTNOINTR), sigreturn will get confused into doing restart
syscall song and dance.Incredible joy to debug, since it manifests as random, infrequent and
very hard to reproduce double execution of instructions in userland
code...The fix is simple - mark it "don't bother with restarts" in wrapper,
i.e. set r8 to 0 in sys_sigreturn and sys_rt_sigreturn wrappers,
suppressing the syscall restart handling on return from these guys.
They can't legitimately return a restart-worthy error anyway.Testcase:
#include
#include
#include
#include
#includevoid f(int n)
{
__asm__ __volatile__(
"ldr r0, [%0]\n"
"b 1f\n"
"b 2f\n"
"1:b .\n"
"2:\n" : : "r"(&n));
}void handler1(int sig) { }
void handler2(int sig) { raise(1); }
void handler3(int sig) { exit(0); }main()
{
struct sigaction s = {.sa_handler = handler2};
struct itimerval t1 = { .it_value = {1} };
struct itimerval t2 = { .it_value = {2} };signal(1, handler1);
sigemptyset(&s.sa_mask);
sigaddset(&s.sa_mask, 1);
sigaction(SIGALRM, &s, NULL);signal(SIGVTALRM, handler3);
setitimer(ITIMER_REAL, &t1, NULL);
setitimer(ITIMER_VIRTUAL, &t2, NULL);f(-513); /* -ERESTARTNOINTR */
write(1, "buggered\n", 9);
return 1;
}Signed-off-by: Al Viro
Acked-by: Russell King
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds
17 Sep, 2010
22 commits
-
update_interval is the matching attribute defined in the hwmon sysfs ABI.
Use it.Signed-off-by: Guenter Roeck
Signed-off-by: Jean Delvare -
The attribute reflects an interval, not a rate.
Signed-off-by: Guenter Roeck
Acked-by: Ira W. Snyder
Signed-off-by: Jean Delvare -
According to the datasheet for Winbond W83627DHG the proper way to exit
the Extended Function Mode is to write 0xaa to the EFER(0x2e or 0x4e).Signed-off-by: Jonas Jonsson
Signed-off-by: Jean Delvare -
It is unnecessary and wrong to call hwmon_device_unregister in error
handling before hwmon_device_register is called.Signed-off-by: Yong Wang
Reviewed-by: Guenter Roeck
Cc: stable@kernel.org
Signed-off-by: Jean Delvare -
All bits in the values read from registers to be used for the next
write were getting overwritten, avoid doing so to not mess with the
current configuration.Signed-off-by: Guillem Jover
Cc: Riku Voipio
Cc: stable@kernel.org
Signed-off-by: Jean Delvare -
The spec notes that fan0 and fan1 control mode bits are located in bits
7-6 and 5-4 respectively, but the FAN_CTRL_MODE macro was making the
bits shift by 5 instead of by 4.Signed-off-by: Guillem Jover
Cc: Riku Voipio
Cc: stable@kernel.org
Signed-off-by: Jean Delvare -
Guenter Roeck volunteered to adopt the hwmon subsystem as long as he
wasn't the only maintainer. As this was also my own condition, we can
add the two of us as co-maintainers of the hwmon subsystem.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck -
If CONFIG_PM was selected and lis3lv02d_platform_data was NULL,
the kernel will be panic when halt command run.Reported-by: Yusuke Goda
Signed-off-by: Kuninori Morimoto
Acked-by: Samu Onkalo
Sigend-off-by: Jean Delvare -
Looks like this crept in, in a recent update.
Reported-by: Krzysztof Urbaniak
Signed-off-by: Steven Whitehouse -
If an array with 1.x metadata is assembled with the last disk missing,
md doesn't properly record the fact that the disk was missing.This is unlikely to cause a real problem as the event count will be
different to the count on the missing disk so it won't be included in
the array. However it could still cause confusion.So make sure we clear all the relevant slots, not just the early ones.
Signed-off-by: NeilBrown
-
Now that we depend on md_update_sb to clear variable bits in
mddev->flags (rather than trying not to set them) it is important to
always call md_update_sb when appropriate.md_check_recovery has this job but explicitly avoids it for ->external
metadata arrays. This is not longer appropraite, or needed.However we do want to avoid taking the mddev lock if only
MD_CHANGE_PENDING is set as that is not cleared by md_update_sb for
external-metadata arrays.Reported-by: "Kwolek, Adam"
Signed-off-by: NeilBrown -
…git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: hpet: Work around hardware stupidity
x86, build: Disable -fPIE when compiling with CONFIG_CC_STACKPROTECTOR=y
x86, cpufeature: Suppress compiler warning with gcc 3.x
x86, UV: Fix initialization of max_pnode -
drivers/firewire/nosy* is a stand-alone driver that does not depend on
CONFIG_FIREWIRE. Hence let make descend into drivers/firewire/ also
if that option is off.The stand-alone driver drivers/ieee1394/init_ohci1394_dma* will soon be
moved into drivers/firewire/ too and will require the same makefile fix.Side effect:
As mentioned in https://bugzilla.novell.com/show_bug.cgi?id=586172#c24
this influences the order in which either firewire-ohci or ohci1394 is
going to be bound to an OHCI-1394 controller in case of a modular build
of both drivers if no modprobe blacklist entries are configured.
However, a user of such a setup cannot expect deterministic behavior
anyway. The Kconfig help and the migration guide at
ieee1394.wiki.kernel.org recommend blacklist entries when a dual
IEEE 1394 stack build is being used. (The coexistence period of the two
stacks is planned to end soon.)Cc: Michal Marek
Signed-off-by: Stefan Richter -
The PCM proc files may open a race against substream close, which can
end up with an Oops. Use the open_mutex to protect for it.Signed-off-by: Takashi Iwai
-
The pm_qos_request isn't freed properly when OSS PCM emulation is used
because it skips snd_pcm_hw_free() call but directly releases the
stream. This resulted in Oops later.Tested-by: Simon Kirby
Signed-off-by: Takashi Iwai -
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
cifs: fix potential double put of TCP session reference -
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Optimize ticket spinlocks in fsys_rt_sigprocmask -
* '2.6.36-fixes' of git://github.com/schandinat/linux-2.6:
drivers/video/via/ioctl.c: prevent reading uninitialized stack memory -
* 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
pcmcia pcnet_cs: try setting io_lines to 16 if card setup fails
pcmcia: per-device, not per-socket debug messages
pcmcia serial_cs.c: fix multifunction card handling -
* git://git.infradead.org/users/cbou/battery-2.6.36:
apm_power: Add missing break statement
intel_pmic_battery: Fix battery charging status on mrst -
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
watchdog: Enable NXP LPC32XX support in Kconfig (resend)
watchdog: ts72xx_wdt: disable watchdog at probe
watchdog: sb_wdog: release irq and reboot notifier in error path and module_exit()