summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2009-02-07ring-buffer: allow tracing_off to be used in core kernel codeSteven Rostedt
tracing_off() is the fastest way to stop recording to the ring buffers. This may be used in places like panic and die, just before the ftrace_dump is called. This patch adds the appropriate CPP conditionals to make it a stub function when the ring buffer is not configured it. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2009-02-07ring-buffer: add NMI protection for spinlocksSteven Rostedt
Impact: prevent deadlock in NMI The ring buffers are not yet totally lockless with writing to the buffer. When a writer crosses a page, it grabs a per cpu spinlock to protect against a reader. The spinlocks taken by a writer are not to protect against other writers, since a writer can only write to its own per cpu buffer. The spinlocks protect against readers that can touch any cpu buffer. The writers are made to be reentrant with the spinlocks disabling interrupts. The problem arises when an NMI writes to the buffer, and that write crosses a page boundary. If it grabs a spinlock, it can be racing with another writer (since disabling interrupts does not protect against NMIs) or with a reader on the same CPU. Luckily, most of the users are not reentrant and protects against this issue. But if a user of the ring buffer becomes reentrant (which is what the ring buffers do allow), if the NMI also writes to the ring buffer then we risk the chance of a deadlock. This patch moves the ftrace_nmi_enter called by nmi_enter() to the ring buffer code. It replaces the current ftrace_nmi_enter that is used by arch specific code to arch_ftrace_nmi_enter and updates the Kconfig to handle it. When an NMI is called, it will set a per cpu variable in the ring buffer code and will clear it when the NMI exits. If a write to the ring buffer crosses page boundaries inside an NMI, a trylock is used on the spin lock instead. If the spinlock fails to be acquired, then the entry is discarded. This bug appeared in the ftrace work in the RT tree, where event tracing is reentrant. This workaround solved the deadlocks that appeared there. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2009-02-05Merge branches 'tracing/ftrace' and 'linus' into tracing/coreIngo Molnar
2009-02-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: sunrpc: fix rdma dependencies e1000: Fix PCI enable to honor the need_ioport flag sgi-xp: link XPNET's net_device_ops to its net_device structure pcnet_cs: Fix misuse of the equality operator. hso: add new device id's dca: redesign locks to fix deadlocks cassini/sungem: limit reaches -1, but 0 tested net: variables reach -1, but 0 tested qlge: bugfix: Add missing netif_napi_del call. qlge: bugfix: Add flash offset for second port. qlge: bugfix: Fix endian issue when reading flash. udp: increments sk_drops in __udp_queue_rcv_skb() net: Fix userland breakage wrt. linux/if_tunnel.h net: packet socket packet_lookup_frame fix
2009-02-03Merge branch 'upstream-linus' of ↵Linus Torvalds
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: implement HORKAGE_1_5_GBPS and apply it to WD My Book libata: add no penalty retry request for EH device handling routines libata: improve probe failure handling libata: add @spd_limit to sata_down_spd_limit() libata: clear dev->ering in smarter way libata: check onlineness before using SPD in sata_down_spd_limit() libata: move ata_dev_disable() to libata-eh.c libata: fix EH device failure handling sata_nv: ck804 has borked hardreset too ide/libata: fix ata_id_is_cfa() (take 4) libata: fix kernel-doc warnings ahci: add a module parameter to ignore the SSS flags for async scanning sata_mv: Fix chip type for Hightpoint RocketRaid 1740/1742 [libata] sata_sil: Fix compilation error with libata debugging enabled
2009-02-02Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
2009-02-03Merge branches 'tracing/ftrace', 'tracing/kmemtrace' and 'linus' into ↵Ingo Molnar
tracing/core
2009-02-02libata: implement HORKAGE_1_5_GBPS and apply it to WD My BookTejun Heo
3Gbps is often much more prone to transmission failures. It's usually okay to let EH handle speed down after transmission failures but some WD My Book drives completely shutdown after certain transmission failures and after it only power cycling can revive them. Combined with the fact that external drives often end up with cable assembly which is longer than usual and more likely to have intervening gender, this makes these drives very likely to shutdown under certain configurations virtually rendering them unusable. This patch implements HOARKGE_1_5_GBPS and applies it to WD My Book such that 1.5Gbps is forced once the device is identified. Please take a look at the following bz for related reports. http://bugzilla.kernel.org/show_bug.cgi?id=9913 Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-02-02libata: clear dev->ering in smarter wayTejun Heo
dev->ering used to be cleared together with the rest of ata_device in ata_dev_init() which is called whenever a probing event occurs. dev->ering is about to be used to track probing failures so it needs to remain persistent over multiple porbing events. This patch achieves this by doing the following. * Instead of CLEAR_OFFSET, define CLEAR_BEGIN and CLEAR_END and only clear between BEGIN and END. ering is moved after END. The split of persistent area is to allow hotter items remain at the head. * ering is explicitly cleared on ata_dev_disable() and when device attach succeeds. So, ering is persistent throug a device's life time (unless explicitly cleared of course) and also through periods inbetween disablement of an attached device and successful detection of the next one. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-02-02ide/libata: fix ata_id_is_cfa() (take 4)Sergei Shtylyov
When checking for the CFA feature set support, ata_id_is_cfa() tests bit 2 in word 82 of the identify data instead the word 83; it also checks the ATA/PI version support in the word 80 (which the CompactFlash specifications have as reserved), this having no slightest chance to work on the modern CF cards that don't have 0x848A in the word 0... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-02-02Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI hotplug: Change link order of pciehp & acpiphp PCI hotplug: fakephp: Allocate PCI resources before adding the device PCI MSI: Fix undefined shift by 32 PCI PM: Do not wait for buses in B2 or B3 during resume PCI PM: Power up devices before restoring their state PCI PM: Fix hibernation breakage on EeePC 701 PCI: irq and pci_ids patch for Intel Tigerpoint DeviceIDs PCI PM: Fix suspend error paths and testing facility breakage
2009-02-02Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6: slub: fix per cpu kmem_cache_cpu array memory leak kmalloc: return NULL instead of link failure
2009-02-02Merge branch 'for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (45 commits) V4L/DVB (10411): s5h1409: Perform s5h1409 soft reset after tuning V4L/DVB (10403): saa7134-alsa: saa7130 doesn't support digital audio V4L/DVB (10229): ivtv: fix memory leak V4L/DVB (10385): gspca - main: Fix memory leak when USB disconnection while streaming. V4L/DVB (10325): em28xx: Fix for fail to submit URB with IRQs and Pre-emption Disabled V4L/DVB (10317): radio-mr800: fix radio->muted and radio->stereo V4L/DVB (10314): cx25840: ignore TUNER_SET_CONFIG in the command callback. V4L/DVB (10288): af9015: bug fix: stick does not work always when plugged V4L/DVB (10287): af9015: fix second FE V4L/DVB (10270): saa7146: fix unbalanced mutex_lock/unlock V4L/DVB (10265): budget.c driver: Kernel oops: "BUG: unable to handle kernel paging request at ffffffff V4L/DVB (10261): em28xx: fix kernel panic on audio shutdown V4L/DVB (10257): em28xx: Fix for KWorld 330U Board V4L/DVB (10256): em28xx: Fix for KWorld 330U AC97 V4L/DVB (10254): em28xx: Fix audio URB transfer buffer race condition V4L/DVB (10250): cx25840: fix regression: fw not loaded on first use V4L/DVB (10248): v4l-dvb: fix a bunch of compile warnings. V4L/DVB (10243): em28xx: fix compile warning V4L/DVB (10240): Fix obvious swapped names in v4l2_subdev logic V4L/DVB (10233): [PATCH] Terratec Cinergy DT XS Diversity new USB ID (0ccd:0081) ...
2009-02-02Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: add text file detailing queue/ sysfs files bio.h: If they MUST be inlined, then use __always_inline Fix misleading comment in bio.h block: fix inconsistent parenthesisation of QUEUE_FLAG_DEFAULT block: fix oops in blk_queue_io_stat()
2009-02-02modules: Use a better scheme for refcountingEric Dumazet
Current refcounting for modules (done if CONFIG_MODULE_UNLOAD=y) is using a lot of memory. Each 'struct module' contains an [NR_CPUS] array of full cache lines. This patch uses existing infrastructure (percpu_modalloc() & percpu_modfree()) to allocate percpu space for the refcount storage. Instead of wasting NR_CPUS*128 bytes (on i386), we now use nr_cpu_ids*sizeof(local_t) bytes. On a typical distro, where NR_CPUS=8, shiping 2000 modules, we reduce size of module files by about 2 Mbytes. (1Kb per module) Instead of having all refcounters in the same memory node - with TLB misses because of vmalloc() - this new implementation permits to have better NUMA properties, since each CPU will use storage on its preferred node, thanks to percpu storage. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-02net: Fix userland breakage wrt. linux/if_tunnel.hDavid S. Miller
Reported by Andrew Walrond <andrew@walrond.org> Changeset c19e654ddbe3831252f61e76a74d661e1a755530 ("gre: Add netlink interface") added an include of linux/ip.h to linux/if_tunnel.h We can't really let that get exposed to userspace because this conflicts with types defined in netinet/ip.h which userland is almost certainly going to have included either explicitly or implicitly. So guard this include with a __KERNEL__ ifdef. Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-02bio.h: If they MUST be inlined, then use __always_inlineAlberto Bertogli
bvec_kmap_irq() and bvec_kunmap_irq() comments say they MUST be inlined, so mark them as __always_inline. Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-02-02Fix misleading comment in bio.hAlberto Bertogli
The comment says "remember to add offset!", but the function already adds it. Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-02-02block: fix inconsistent parenthesisation of QUEUE_FLAG_DEFAULTJens Axboe
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-01-31Merge branch 'header-fixes-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (90 commits) headers_check fix: x86, swab.h headers_check fix: x86, sigcontext32.h headers_check fix: x86, sigcontext.h headers_check fix: x86, ptrace-abi.h headers_check fix: x86, mtrr.h headers_check fix: x86, mce.h headers_check fix: x86, kvm.h headers_check fix: x86, e820.h headers_check fix: linux/rtnetlink.h headers_check fix: linux/nubus.h headers_check fix: video/uvesafb.h headers_check fix: video/sisfb.h headers_check fix: sound/hdsp.h headers_check fix: mtd/inftl-user.h headers_check fix: linux/virtio_net.h headers_check fix: linux/virtio_console.h headers_check fix: linux/virtio_blk.h headers_check fix: linux/videodev.h headers_check fix: linux/video_encoder.h headers_check fix: linux/video_decoder.h ...
2009-01-31Merge branch 'timers-fixes-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: hrtimer: prevent negative expiry value after clock_was_set() hrtimers: allow the hot-unplugging of all cpus hrtimers: increase clock min delta threshold while interrupt hanging
2009-01-30hrtimers: allow the hot-unplugging of all cpusSebastien Dugue
Impact: fix CPU hotplug hang on Power6 testbox On architectures that support offlining all cpus (at least powerpc/pseries), hot-unpluging the tick_do_timer_cpu can result in a system hang. This comes from the fact that if the cpu going down happens to be the cpu doing the tick, then as the tick_do_timer_cpu handover happens after the cpu is dead (via the CPU_DEAD notification), we're left without ticks, jiffies are frozen and any task relying on timers (msleep, ...) is stuck. That's particularly the case for the cpu looping in __cpu_die() waiting for the dying cpu to be dead. This patch addresses this by having the tick_do_timer_cpu handover happen earlier during the CPU_DYING notification. For this, a new clockevent notification type is introduced (CLOCK_EVT_NOTIFY_CPU_DYING) which is triggered in hrtimer_cpu_notify(). Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net> Cc: <stable@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-01-31headers_check fix: linux/rtnetlink.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/rtnetlink.h:328: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/nubus.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/nubus.h:232: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: video/uvesafb.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/video/uvesafb.h:5: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: video/sisfb.hJaswinder Singh Rajput
fix the following 'make headers_check' warnings: usr/include/video/sisfb.h:25: include of <linux/types.h> is preferred over <asm/types.h> usr/include/video/sisfb.h:78: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: sound/hdsp.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/sound/hdsp.h:33: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: mtd/inftl-user.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/mtd/inftl-user.h:61: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/virtio_net.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/virtio_net.h:28: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/virtio_console.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/virtio_console.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/virtio_blk.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/virtio_blk.h:21: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/videodev.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/videodev.h:53: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/video_encoder.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/video_encoder.h:5: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/video_decoder.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/video_decoder.h:7: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/taskstats.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/taskstats.h:44: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/synclink.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/synclink.h:209: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/sound.hJaswinder Singh Rajput
fix the following 'make headers_check' warnings: usr/include/linux/sound.h:33: extern's make no sense in userspace usr/include/linux/sound.h:34: extern's make no sense in userspace usr/include/linux/sound.h:35: extern's make no sense in userspace usr/include/linux/sound.h:36: extern's make no sense in userspace usr/include/linux/sound.h:37: extern's make no sense in userspace usr/include/linux/sound.h:39: extern's make no sense in userspace usr/include/linux/sound.h:40: extern's make no sense in userspace usr/include/linux/sound.h:41: extern's make no sense in userspace usr/include/linux/sound.h:42: extern's make no sense in userspace Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/signalfd.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/signalfd.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/random.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/random.h:39: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/ppp_defs.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/ppp_defs.h:50: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/pkt_sched.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/pkt_sched.h:32: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/pkt_cls.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: linux/pkt_cls.h:122: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/phonet.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/phonet.h:50: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/nfs_idmap.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/nfs_idmap.h:55: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/neighbour.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/neighbour.h:8: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/msdos_fs.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/msdos_fs.h:100: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/minix_fs.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/minix_fs.h:34: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-31headers_check fix: linux/irda.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/irda.h:127: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-30headers_check fix: linux/ipx.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/ipx.h:13: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
2009-01-30headers_check fix: linux/ipv6_route.hJaswinder Singh Rajput
fix the following 'make headers_check' warning: usr/include/linux/ipv6_route.h:42: found __[us]{8,16,32,64} type without #include <linux/types.h> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>