summaryrefslogtreecommitdiff
path: root/kernel
AgeCommit message (Collapse)Author
2009-12-01slow-work: Fix build bug in the !CONFIG_MODULES caseIngo Molnar
Commit 3bde31a ("SLOW_WORK: Allow a requeueable work item to sleep till the thread is needed") broke the !CONFIG_MODULES build by relying on variables that are only available (and only make sense) with module support enabled. Fix it. Cc: David Howells <dhowells@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-12-01Merge remote branch 'sysctl/master'Stephen Rothwell
Conflicts: net/ipv6/addrconf.c net/sctp/sysctl.c
2009-12-01Merge remote branch 'workqueues/for-next'Stephen Rothwell
Conflicts: init/Kconfig kernel/sched.c
2009-12-01Merge remote branch 'percpu/for-next'Stephen Rothwell
Conflicts: arch/powerpc/platforms/pseries/hvCall.S arch/x86/kvm/svm.c kernel/softlockup.c mm/slab.c
2009-12-01Merge remote branch 'tip/auto-latest'Stephen Rothwell
Conflicts: arch/x86/kernel/kgdb.c kernel/Makefile kernel/irq/chip.c kernel/printk.c scripts/recordmcount.pl
2009-12-01Merge remote branch 'limits/writable_limits'Stephen Rothwell
2009-12-01Merge remote branch 'catalin/for-next'Stephen Rothwell
2009-12-01Merge remote branch 'fsnotify/for-next'Stephen Rothwell
Conflicts: arch/x86/ia32/ia32entry.S arch/x86/include/asm/unistd_32.h arch/x86/include/asm/unistd_64.h arch/x86/kernel/syscall_table_32.S fs/afs/write.c fs/cifs/dir.c fs/ubifs/file.c include/asm-generic/fcntl.h net/socket.c
2009-12-01Merge remote branch 'suspend/linux-next'Stephen Rothwell
2009-12-01Merge remote branch 'trivial/for-next'Stephen Rothwell
Conflicts: Documentation/video4linux/gspca.txt
2009-12-01Merge remote branch 'security-testing/next'Stephen Rothwell
Conflicts: Documentation/dontdiff
2009-12-01Merge remote branch 'kgdb/kgdb-next'Stephen Rothwell
2009-12-01Merge branch 'quilt/rr'Stephen Rothwell
Conflicts: arch/arm/kernel/vmlinux.lds.S
2009-12-01Merge remote branch 'mtd/master'Stephen Rothwell
Conflicts: drivers/mtd/devices/m25p80.c drivers/mtd/nand/pxa3xx_nand.c
2009-12-01Merge remote branch 'net/master'Stephen Rothwell
Conflicts: net/mac80211/ht.c net/wireless/wext.c
2009-12-01Merge remote branch 'kvm/linux-next'Stephen Rothwell
2009-12-01Merge remote branch 'kbuild/for-next'Stephen Rothwell
2009-12-01Merge remote branch 'pci/linux-next'Stephen Rothwell
2009-11-30PM: export the PM runtime workqueueAlan Stern
This patch (as1306) exports the PM runtime workqueue for use by loadable modules. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-11-30tree-wide: fix assorted typos all over the placeAndré Goddard Rosa
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-30core: Add kernel message dumper to call on oopses and panicsSimon Kagstrom
The core functionality is implemented as per Linus suggestion from http://lists.infradead.org/pipermail/linux-mtd/2009-October/027620.html (with the kmsg_dump implementation by Linus). A struct kmsg_dumper has been added which contains a callback to dump the kernel log buffers on crashes. The kmsg_dump function gets called from oops_exit() and panic() and invokes this callbacks with the crash reason. [dwmw2: Fix log_end handling] Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Reviewed-by: Anders Grafstrom <anders.grafstrom@netinsight.net> Reviewed-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2009-11-30cpumask:avoid-deref-in-timer_listRusty Russell
struct cpumask will be undefined soon with CONFIG_CPUMASK_OFFSTACK=y, to avoid them being declared on the stack. cpumask_bits() does what we want here (of course, this code is crap). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> To: Thomas Gleixner <tglx@linutronix.de>
2009-11-30cpumask:kernel_perf_event-deprecated-functionRusty Russell
Also, we want to check against nr_cpu_ids, not num_possible_cpus(). The latter works, but the correct bounds check is < nr_cpu_ids. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> To: Thomas Gleixner <tglx@linutronix.de>
2009-11-30param:kernel_param_lockRusty Russell
There may be cases (most obviously, sysfs-writable charp parameters) where a module needs to prevent sysfs access to parameters. Rather than express this in terms of a big lock, the functions are expressed in terms of what they protect against. This is clearer, esp. if the implementation changes to a module-level or even param-level lock. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de>
2009-11-30param:params-are-constRusty Russell
Since they section can be read-only, they should always have been const. Minor flow-through various functions. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-11-30param:use-free-hook-for-charpRusty Russell
Instead of using a "I kmalloced this" flag, we keep track of the kmalloced strings and use that list to check if we need to kfree (in practice, the list is very short). This means that kparams can be const again. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de>
2009-11-30param:add-free-hookRusty Russell
This allows us to generalize the KPARAM_KMALLOCED flag, by calling a function on every parameter when a module is unloaded. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de>
2009-11-30param:param_opsRusty Russell
This is more kernel-ish, saves some space, and also allows us to expand the ops without breaking all the callers who are happy for the new members to be NULL. The few places which defined their own param types are changed to the new scheme. Since we're touching them anyway, we change get and set to take a const struct kernel_param (which they really are). To reduce churn, module_param_call creates the ops struct so the callers don't have to change (and casts the functions to reduce warnings). The modern version which takes an ops struct is called module_param_cb. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Alessandro Rubini <rubini@ipvvis.unipv.it> Cc: Michal Januszewski <spock@gentoo.org> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Neil Brown <neilb@suse.de> Cc: linux-kernel@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: linux-fbdev-devel@lists.sourceforge.net Cc: linux-nfs@vger.kernel.org Cc: netdev@vger.kernel.org
2009-11-30param:neaten-param.c-exportsRusty Russell
This is modern style, and good to do before we start changing things. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Takashi Iwai <tiwai@suse.de>
2009-11-29PM / Hibernate: Swap, use KERN_CONTJiri Slaby
Use KERN_CONT in save_image() for printks, so that anybody won't try to add a loglevel. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-11-29PM / Hibernate: Shift remaining code from swsusp.c to hibernate.cNigel Cunningham
Shift the remaining declaration of the variable in_suspend and the function swsusp_show_speed from swsusp.c to hibernate.c, and delete swsusp.c. [rjw: Rebased on top of the async PM patchset.] Signed-off-by: Nigel Cunningham <nigel@tuxonice.net> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-11-29PM / Hibernate: Move swap functions to kernel/power/swap.c.Nigel Cunningham
Move hibernation code's functions for allocating and freeing swap from swsusp.c to swap.c, which is where you'd expect to find them. Signed-off-by: Nigel Cunningham <nigel@tuxonice.net> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-11-29PM: Measure suspend and resume times for individual devicesRafael J. Wysocki
If verbose PM debugging is enabled, measure and print the time of suspending and resuming of individual devices. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-11-29PM: Add facility for advanced testing of async suspend/resumeRafael J. Wysocki
Add configuration switch CONFIG_PM_ADVANCED_DEBUG for compiling in extra PM debugging/testing code allowing one to access some PM-related attributes of devices from the user space via sysfs. If CONFIG_PM_ADVANCED_DEBUG is set, add sysfs attribute power/async for every device allowing the user space to access the device's power.async_suspend flag and modify it, if desired. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-11-29PM: Measure device suspend and resume timesRafael J. Wysocki
Measure and print the time of suspending and resuming all devices. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-11-29PM: Add a switch for disabling/enabling asynchronous suspend/resumeRafael J. Wysocki
Add sysfs attribute kernel/power/pm_async allowing the user space to disable and enable async suspend/resume of devices. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz>
2009-11-29PM / freezer: Don't get over-anxious while waitingTejun Heo
Freezing isn't exactly the most latency sensitive operation and there's no reason to burn cpu cycles and power waiting for it to complete. msleep(10) instead of yield(). This should improve reliability of emergency hibernation. [rjw: Modified the comment next to the msleep(10).] Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2009-11-28Merge branches 'core/iommu', 'core/softlockup', 'perf/core', 'timers/hpet', ↵Ingo Molnar
'x86/timers' and 'x86/urgent' into auto-latest
2009-11-27core: rename setrlimit to do_setrlimitJiri Slaby
Rename it so that it makes more sense in the field of syscalls (i.e. do_* is used for functions called by syscall wrappers but also when called from other paths). Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: James Morris <jmorris@namei.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ingo Molnar <mingo@elte.hu>
2009-11-27core: do security check under task_lockJiri Slaby
Do security_task_setrlimit under task_lock. Other tasks may change limits under our hands while we are checking limits inside the function. From now on, they can't. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: James Morris <jmorris@namei.org> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ingo Molnar <mingo@elte.hu>
2009-11-27trace_kprobes: Don't output zero offsetLai Jiangshan
"symbol_name+0" is not so friendly. It makes the output longer. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <4B0CEBCB.7080309@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-27trace_kprobes: Always show group nameLai Jiangshan
Sometimes the group name is not "kprobes", It'll be better if we can read it from tracing/kprobe_events. # echo 'r:laijs/vfs_read vfs_read %ax' > kprobe_events # cat kprobe_events r:laijs/vfs_read vfs_read %ax=%ax Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <4B0CEBAF.6000104@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-27trace_kprobes: Fix memory leakLai Jiangshan
tp->nr_args is not set before we "goto error", it causes memory leak for free_trace_probe() use tp->nr_args to free memory of args. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <4B0CEB95.2060107@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-27trace_syscalls: Add syscall nr fieldLai Jiangshan
Field syscall number is missed in syscall_enter_define_fields()/ syscall_exit_define_fields(). Syscall number is also needed for event filter or other users. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jason Baron <jbaron@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4B0E330D.1070206@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-27hw-breakpoints: Use struct perf_event_attr to define kernel breakpointsFrederic Weisbecker
Kernel breakpoints are created using functions in which we pass breakpoint parameters as individual variables: address, length and type. Although it fits well for x86, this just does not scale across architectures that may support this api later as these may have more or different needs. Pass in a perf_event_attr structure instead because it is meant to evolve as much as possible into a generic hardware breakpoint parameter structure. Reported-by: K.Prasad <prasad@linux.vnet.ibm.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1259294154-5197-2-git-send-regression-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-27hw-breakpoints: Use struct perf_event_attr to define user breakpointsFrederic Weisbecker
In-kernel user breakpoints are created using functions in which we pass breakpoint parameters as individual variables: address, length and type. Although it fits well for x86, this just does not scale across archictectures that may support this api later as these may have more or different needs. Pass in a perf_event_attr structure instead because it is meant to evolve as much as possible into a generic hardware breakpoint parameter structure. Reported-by: K.Prasad <prasad@linux.vnet.ibm.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1259294154-5197-1-git-send-regression-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-27softlockup: Fix hung_task_check_count sysctlAnton Blanchard
I'm seeing spikes of up to 0.5ms in khungtaskd on a large machine. To reduce this source of jitter I tried setting hung_task_check_count to 0: # echo 0 > /proc/sys/kernel/hung_task_check_count which didn't have the intended response. Change to a post increment of max_count, so a value of 0 means check 0 tasks. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: msb@google.com LKML-Reference: <20091127022820.GU32182@kryten> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-26Merge branches 'perf/core', 'perf/mce', 'sched/core', 'timers/core', ↵Ingo Molnar
'tracing/core', 'x86/apic', 'x86/asm', 'x86/debug' and 'x86/mm' into auto-latest
2009-11-26perf_events: Fix read() bogus counts when in error stateStephane Eranian
When a pinned group cannot be scheduled it goes into error state. Normally a group cannot go out of error state without being explicitly re-enabled or disabled. There was a bug in per-thread mode, whereby upon termination of the thread, the group would transition from error to off leading to bogus counts and timing information returned by read(). Fix it by clearing the error state. Signed-off-by: Stephane Eranian <eranian@google.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: perfmon2-devel@lists.sourceforge.net LKML-Reference: <4b0eb9ce.0508d00a.573b.ffffeab6@mx.google.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-26sched, time: Define nsecs_to_jiffies()Hidetoshi Seto
Use of msecs_to_jiffies() for nsecs_to_cputime() have some problems: - The type of msecs_to_jiffies()'s argument is unsigned int, so it cannot convert msecs greater than UINT_MAX = about 49.7 days. - msecs_to_jiffies() returns MAX_JIFFY_OFFSET if MSB of argument is set, assuming that input was negative value. So it cannot convert msecs greater than INT_MAX = about 24.8 days too. This patch defines a new function nsecs_to_jiffies() that can deal greater values, and that can deal all incoming values as unsigned. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Cc: Stanislaw Gruszka <sgruszka@redhat.com> Cc: Spencer Candland <spencer@bluehost.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Amrico Wang <xiyou.wangcong@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Stultz <johnstul@linux.vnet.ibm.com> LKML-Reference: <4B0E16E7.5070307@jp.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>