aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-10-30tty: Mark generic_serial users as BROKENAlan Cox1-3/+3
There isn't much else I can do with these. I can find no hardware for any of them and no users. The code is broken. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-29agp/amd64: Remove GART dependency on AGP_AMD64Pavel Vasilyev1-2/+1
The GART IOMMU code has no strong dependency to the AMD64 AGP code. So the automatic selection of AGP_AMD64 for GART can be removed. Cc: Dave Jones <davej@redhat.com> Signed-off-by: Pavel Vasilyev <pavel@pavlinux.ru> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-10-22move virtrng_remove to .devexit.textUwe Kleine-König1-1/+1
The function virtrng_remove is used only wrapped by __devexit_p so define it using __devexit. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Michael S. Tsirkin <mst@redhat.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-22virtio: let header files include virtio_ids.hChristian Borntraeger2-2/+0
Rusty, commit 3ca4f5ca73057a617f9444a91022d7127041970a virtio: add virtio IDs file moved all device IDs into a single file. While the change itself is a very good one, it can break userspace applications. For example if a userspace tool wanted to get the ID of virtio_net it used to include virtio_net.h. This does no longer work, since virtio_net.h does not include virtio_ids.h. This patch moves all "#include <linux/virtio_ids.h>" from the C files into the header files, making the header files compatible with the old ones. In addition, this patch exports virtio_ids.h to userspace. CC: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-10-15Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6Linus Torvalds1-1/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: tty: fix vt_compat_ioctl
2009-10-14tty: fix vt_compat_ioctlAndreas Schwab1-1/+1
Call compat_unimap_ioctl, not do_unimap_ioctl. This was broken by commit e9216651. The compat_unimap_ioctl was originally called do_unimap_ioctl in fs/compat_ioctl.h which got moved to drivers/char/vt_ioctl.c. In that patch, the caller was not updated and consequently called the native handler. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-14tty: use the new 'flush_delayed_work()' helper to do ldisc flushLinus Torvalds1-1/+1
This way all flush_to_ldisc work is always done through the workqueues, and we thus have a single point of serialization. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-14Make flush_to_ldisc properly handle parallel callsLinus Torvalds1-16/+13
2009-10-14agp: Remove the BKL from agp_openJohn Kacur1-17/+11
- Remove the BKL from agp_open - Perform a few clean-ups. Analysis: --------- int minor is local to the function. The following are protected by agp_fe.agp_mutex struct agp_file_private *priv; struct agp_client *client; Call-outs: kzalloc should be safe to call under the mutex_lock agp_find_client_by_pid: - agp_mmap calls that under agp_fe.agp_mutex which we hold in agp_open - agpioc_reserve_wrap calls it without any locking what-so-ever. - Is that an error? Or is that okay because it has pid that is a unique handle? agp_insert_file_private: - This function only manipulates struct agp_file_private, once again while agp_fe.agp_mutex is held Signed-off-by: John Kacur <jkacur@redhat.com> Acked-by: David Airlie <airlied@linux.ie> LKML-Reference: <alpine.LFD.2.00.0910112216060.12574@localhost.localdomain> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-10-14mips: Remove BKL from tb0219Thomas Gleixner1-5/+1
cycle_kernel_lock() was added during the big BKL pushdown. It should ensure the serializiation against driver init code. tb0219_base is initialized before the character device is registered, but the spinlock is not initialized. Initialize the spinlock statically and remove cycle_kernel_lock(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20091010153350.222654356@linutronix.de> Cc: Yoichi Yuasa <yuasa@linux-mips.org> Cc: Ralf Baechle <ralf@linux-mips.org>
2009-10-14drivers: Remove BKL from scx200_gpioThomas Gleixner1-2/+0
cycle_kernel_lock() was added during the big BKL pushdown. It should ensure the serializiation against driver init code. In this case there is nothing to serialize. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20091010153350.167321547@linutronix.de> Acked-by: Jim Cromie <jim.cromie@gmail.com>
2009-10-14drivers: Remove BKL from pc8736x_gpioThomas Gleixner1-2/+0
cycle_kernel_lock() was added during the big BKL pushdown. It should ensure the serializiation against driver init code. In this case there is nothing to serialize. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20091010153350.127093710@linutronix.de> Acked-by: Jim Cromie <jim.cromie@gmail.com>
2009-10-14rtc: Remove BKL from efirtcThomas Gleixner1-11/+1
BKL locking came to efirtc via the big BKL push down, but the access to the efi functions is protected by efi_rtc_lock already. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20091010153350.046644063@linutronix.de>
2009-10-14hw_random: Remove BKL from coreThomas Gleixner1-1/+0
hw_random core is completely serialized with rng_mutex. No need for the cycle_kernel_lock() magic. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20091010153349.844488872@linutronix.de> Cc: Herbert Xu <herbert@gondor.apana.org.au>
2009-10-14nvram: Drop the bkl from non-generic nvram_llseek()Frederic Weisbecker1-3/+1
Drop the bkl from nvram_llseek() as it obviously protects nothing. The file offset is safe in essence. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1255116426-7270-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-10-14nvram: Drop the bkl from nvram_llseek()Frederic Weisbecker1-6/+3
There is nothing to protect inside nvram_llseek(), the file offset doesn't need to be protected and nvram_len is only initialized from an __init path. It's safe to remove the big kernel lock there. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1255116030-6929-1-git-send-email-fweisbec@gmail.com> Cc: Greg KH <gregkh@suse.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-10-14mem_class: Drop the bkl from memory_open()Frederic Weisbecker1-12/+5
The generic open callback for the mem class devices is "protected" by the bkl. Let's look at the datas manipulated inside memory_open: - inode and file: safe - the devlist: safe because it is constant - the memdev classes inside this array are safe too (constant) After we find out which memdev file operation we need to use, we call its open callback. Depending on the targeted memdev, we call either open_port() that doesn't manipulate any racy data (just a capable() check), or we call nothing. So it's safe to remove the big kernel lock there. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1255113062-5835-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2009-10-14drivers: Remove BKL from cs5535_gpioThomas Gleixner1-2/+1
The big BKL pushdown added cycle_kernel_lock(). There is nothing to wait for in this driver. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <20091010153349.277882707@linutronix.de>
2009-10-14drivers: Remove BKL from misc_openThomas Gleixner1-4/+1
misc_open() is already serialized with misc_mtx. Remove the BKL locking which got there via the BKL pushdown. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Greg Kroah-Hartman <gregkh@suse.de> LKML-Reference: <20091010153349.237173041@linutronix.de>
2009-10-13headers: Fix build after <linux/sched.h> removalIngo Molnar3-0/+3
Commit d43c36dc6b357fa1806800f18aa30123c747a6d1 ("headers: remove sched.h from interrupt.h") left some build errors in some configurations due to drivers having depended on getting header files "accidentally". Signed-off-by: Ingo Molnar <mingo@elte.hu> [ Combined several one-liners from Ingo into one single patch - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-11headers: remove sched.h from interrupt.hAlexey Dobriyan12-0/+12
After m68k's task_thread_info() doesn't refer to current, it's possible to remove sched.h from interrupt.h and not break m68k! Many thanks to Heiko Carstens for allowing this. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-10-09TPM: fix pcrreadRajiv Andrade1-2/+1
The previously sent patch: http://marc.info/?l=tpmdd-devel&m=125208945007834&w=2 Had its first hunk cropped when merged, submitting only this first hunk again. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Cc: Debora Velarde <debora@linux.vnet.ibm.com> Cc: Marcel Selhorst <m.selhorst@sirrix.com> Cc: James Morris <jmorris@namei.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com> Acked-by: Mimi Zohar <zohar@us.ibm.com> Tested-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
2009-10-08Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6Linus Torvalds1-1/+1
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: agp: parisc-agp.c - use correct page_mask function parisc: Fix linker script breakage. parisc: convert to asm-generic/hardirq.h parisc: Make THREAD_SIZE available to assembly files and linker scripts. parisc: correct use of SHF_ALLOC parisc: rename parisc's vmalloc_start to parisc_vmalloc_start parisc: add me to Maintainers parisc: includecheck fix: signal.c parisc: HAVE_ARCH_TRACEHOOK parisc: add skeleton syscall.h parisc: stop using task->ptrace for {single,block}step flags parisc: split syscall_trace into two halves parisc: add missing TI_TASK macro in syscall.S parisc: tracehook_signal_handler parisc: tracehook_report_syscall
2009-10-04headers: remove sched.h from poll.hAlexey Dobriyan3-0/+3
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-03tty: Avoid dropping ldisc_mutex over hangup tty re-initializationLinus Torvalds1-5/+2
A couple of people have hit the WARN_ON() in drivers/char/tty_io.c, tty_open() that is unhappy about seeing the tty line discipline go away during the tty hangup. See for example http://bugzilla.kernel.org/show_bug.cgi?id=14255 and the reason is that we do the tty_ldisc_halt() outside the ldisc_mutex in order to be able to flush the scheduled work without a deadlock with vhangup_work. However, it turns out that we can solve this particular case by - using "cancel_delayed_work_sync()" in tty_ldisc_halt(), which waits for just the particular work, rather than synchronizing with any random outstanding pending work. This won't deadlock, since the buf.work we synchronize with doesn't care about the ldisc_mutex, it just flushes the tty ldisc buffers. - realize that for this particular case, we don't need to wait for any hangup work, because we are inside the hangup codepaths ourselves. so as a result we can just drop the flush_scheduled_work() entirely, and then move the tty_ldisc_halt() call to inside the mutex. That way we never expose the partially torn down ldisc state to tty_open(), and hold the ldisc_mutex over the whole sequence. Reported-by: Ingo Molnar <mingo@elte.hu> Reported-by: Heinz Diehl <htd@fancy-poultry.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-03agp: parisc-agp.c - use correct page_mask functionHelge Deller1-1/+1
This commit: Commit 2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7 Author: David Woodhouse <David.Woodhouse@intel.com> Date: Mon Jul 27 10:27:29 2009 +0100 agp: Switch mask_memory() method to take address argument again, not page broke the parisc AGP driver (again). This patch fixes it. Signed-off-by: Helge Deller <deller@gmx.de> Acked-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2009-10-01serial167: fix read buffer overflowRoel Kluin1-5/+2
Check whether index is within bounds before grabbing the element. Also, since NR_PORTS is defined ARRAY_SIZE(cy_port), cy_port[NR_PORTS] is out of bounds as well. [akpm@linux-foundation.org: cleanup, remove (long) casts] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01cyclades: fix read buffer overflowRoel Kluin1-1/+1
irq is declared with size NR_CARDS (4), but the loop containing this segment runs up until NR_ISA_ADDRS (16), possibly reading from irq[i] (and trying to use the result) Identified by the Parfait static scanner. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01Char: vt_ioctl, fix BKL imbalanceJiri Slaby1-2/+4
Stanse found (again) a BKL imbalance in vt_ioctl. It's easily triggerable by ioctl(dev_tty_fd, VT_SETACTIVATE, NULL); Introduced by commit d3b5cffcf84a8bdc7073dce4745d67c72629af85 Author: Alan Cox <alan@linux.intel.com> Date: Sat Sep 19 13:13:26 2009 -0700 vt: add an activate and lock Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01const: constify remaining file_operationsAlexey Dobriyan3-3/+3
[akpm@linux-foundation.org: fix KVM] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01TPM: fix pcrreadRajiv Andrade1-2/+1
The previously sent patch: http://marc.info/?l=tpmdd-devel&m=125208945007834&w=2 Had its first hunk cropped when merged, submitting only this first hunk again. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Cc: Debora Velarde <debora@linux.vnet.ibm.com> Cc: Marcel Selhorst <m.selhorst@sirrix.com> Cc: James Morris <jmorris@namei.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com> Acked-by: Mimi Zohar <zohar@us.ibm.com> Tested-by: Mimi Zohar <zohar@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
2009-09-30Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6Linus Torvalds1-2/+2
* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: omap: Fix wrong condition check in while loop for mailbox and iommu2 omap: rng: Use resource_size instead of manual calculation omap: Fix MMC gpio_wp for BeagleBoard C2 and above omap: Fix matrix_keymap_data usage omap: Fix a OMAP_MPUIO_VBASE typo for 850 omap: Fix wrong jtag_id for 850 omap: iovmm: Fix compiler warning omap: mailbox: Flush posted write when acking mailbox irq omap: mailbox: Execute softreset at startup omap: Add missing mux pin for EHCI phy reset line omap: Fix 44xx compile omap: Fix mcspi compile for 2420 omap: Fix compile for arch/arm/mach-omap2
2009-09-30pty: reconnect the BSD TIOCSPTLCK handling to legacy ptysLinus Torvalds1-21/+26
David Howells noticed (due to the compiler warning about an unused 'pty_ops_bsd' variable) that we haven't actually been using the code that implements TIOCSPTLCK for legacy pty handling. It's been that way since 2.6.26, commit 3e8e88ca053150efdbecb45d8f481cf560ec808d to be exact ("pty: prepare for tty->ops changes"). DavidH initially submitted a patch just removing the dead code entirely, and since nobody has apparently ever complained, I'm not entirely sure that wouldn't be the right thing to do. But since the whole and only point of the legacy pty code is to be compatible with legacy distros that don't use the new unix98 pty model, let's just wire it up again. And clean it up a bit while we're at it. Acked-by: David Howells <dhowells@redhat.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-30Merge branch 'master' into nextJames Morris66-2331/+2316
2009-09-27tty: Fix regressions caused by commit b50989dcDave Young1-5/+10
The following commit made console open fails while booting: commit b50989dc444599c8b21edc23536fc305f4e9b7d5 Author: Alan Cox <alan@linux.intel.com> Date: Sat Sep 19 13:13:22 2009 -0700 tty: make the kref destructor occur asynchronously Due to tty release routines run in a workqueue now, error like the following will be reported while booting: INIT open /dev/console Input/output error It also causes hibernation regression to appear as reported at http://bugzilla.kernel.org/show_bug.cgi?id=14229 The reason is that now there's latency issue with closing, but when we open a "closing not finished" tty, -EIO will be returned. Fix it as per the following Alan's suggestion: Fun but it's actually not a bug and the fix is wrong in itself as the port may be closing but not yet being destructed, in which case it seems to do the wrong thing. Opening a tty that is closing (and could be closing for long periods) is supposed to return -EIO. I suspect a better way to deal with this and keep the old console timing is to split tty->shutdown into two functions. tty->shutdown() - called synchronously just before we dump the tty onto the waitqueue for destruction tty->cleanup() - called when the destructor runs. We would then do the shutdown part which can occur in IRQ context fine, before queueing the rest of the release (from tty->magic = 0 ... the end) to occur asynchronously The USB update in -next would then need a call like if (tty->cleanup) tty->cleanup(tty); at the top of the async function and the USB shutdown to be split between shutdown and cleanup as the USB resource cleanup and final tidy cannot occur synchronously as it needs to sleep. In other words the logic becomes final kref put make object unfindable async clean it up Signed-off-by: Dave Young <hidave.darkstar@gmail.com> [ rjw: Rebased on top of 2.6.31-git, reworked the changelog. ] Signed-off-by: "Rafael J. Wysocki" <rjw@sisk.pl> [ Changed serial naming to match new rules, dropped tty_shutdown as per comments from Alan Stern - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-27const: mark struct vm_struct_operationsAlexey Dobriyan4-4/+4
* mark struct vm_area_struct::vm_ops as const * mark vm_ops in AGP code But leave TTM code alone, something is fishy there with global vm_ops being used. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpcLinus Torvalds3-5/+17
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: Fix build of cpm_uart due to core changes powerpc/8xx: Fix regression introduced by cache coherency rewrite powerpc/4xx: Fix erroneous xmon warning on PowerPC 4xx powerpc/mm: Fix 40x and 8xx vs. _PAGE_SPECIAL powerpc: Cleanup linker script using new linker script macros. powerpc: Fix ibm,client-architecture-support printout powerpc: Increase NODES_SHIFT on 64bit from 4 to 8 powerpc/perf_counter: Fix vdso detection powerpc: Move 64bit heap above 1TB on machines with 1TB segments powerpc: Change archdata dma_data to a union powerpc: Rename get_dma_direct_offset get_dma_offset powerpc/mm: Remove duplicated #include powerpc/book3e-64: Remove duplicated #include powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE powerpc/pmc: Don't access lppaca on Book3E powerpc: kmalloc failure ignored in vio_build_iommu_table() hvc_console: Provide (un)locked version for hvc_resize()
2009-09-24omap: rng: Use resource_size instead of manual calculationTobias Klauser1-2/+2
Use the resource_size function instead of manually calculating the resource size. This reduces the chance of introducing off-by-one-errors. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2009-09-24TPM: increase default TPM bufferRajiv Andrade1-1/+1
The TPM Working Group requested this communication buffer increase given that a particular TPM vendor can support a TPM_SHA1Start command input bigger than the current size. Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
2009-09-24Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intelLinus Torvalds1-7/+30
* 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: (57 commits) drm/i915: Handle ERESTARTSYS during page fault drm/i915: Warn before mmaping a purgeable buffer. drm/i915: Track purged state. drm/i915: Remove eviction debug spam drm/i915: Immediately discard any backing storage for uneeded objects drm/i915: Do not mis-classify clean objects as purgeable drm/i915: Whitespace correction for madv drm/i915: BUG_ON page refleak during unbind drm/i915: Search harder for a reusable object drm/i915: Clean up evict from list. drm/i915: Add tracepoints drm/i915: framebuffer compression for GM45+ drm/i915: split display functions by chip type drm/i915: Skip the sanity checks if the current relocation is valid drm/i915: Check that the relocation points to within the target drm/i915: correct FBC update when pipe base update occurs drm/i915: blacklist Acer AspireOne lid status ACPI: make ACPI button funcs no-ops if not built in drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocks drm/i915: intel_display.c handle latency variable efficiently ... Fix up trivial conflicts in drivers/gpu/drm/i915/{i915_dma.c|i915_drv.h}
2009-09-24sysctl: remove "struct file *" argument of ->proc_handlerAlexey Dobriyan1-2/+2
It's unused. It isn't needed -- read or write flag is already passed and sysctl shouldn't care about the rest. It _was_ used in two places at arch/frv for some reason. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: David Howells <dhowells@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: James Morris <jmorris@namei.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24bfin-otp: add writing supportMike Frysinger1-44/+129
The on-chip OTP may be written at runtime, so enable support for it in the driver. However, since writing should really be done only on development systems, don't bend over backwards to make sure the simple software lock is per-fd -- per-device is OK. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24drivers/char/uv_mmtimer.c: add memory mapped RTC driver for UVDimitri Sivanich3-0/+225
This driver memory maps the UV Hub RTC. Signed-off-by: Dimitri Sivanich <sivanich@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24drivers/char/rio/rioctrl.c: off by one error in rioctrl.cDan Carpenter1-1/+1
If DownLoad.ProductCode == MAX_PRODUCT, that would be a problem when we do RIOBootTable[DownLoad.ProductCode] a couple lines down. Found by smatch (http://repo.or.cz/w/smatch.git). Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24hpet: hpet driver periodic timer setup bug fixesNils Carlson1-9/+12
The periodic interrupt from drivers/char/hpet.c does not work correctly, both when using the periodic capability of the hardware and while emulating the periodic interrupt (when hardware does not support periodic mode). With timers capable of periodic interrupts, the comparator field is first set with the period value followed by set of hidden accumulator, which has the side effect of overwriting the comparator value. This results in wrong periodicity for the interrupts. For, periodic interrupts to work, following steps are necessary, in that order. * Set config with Tn_VAL_SET_CNF bit * Write to hidden accumulator, the value written is the time when the first interrupt should be generated * Write compartor with period interval for subsequent interrupts (http://www.intel.com/hardwaredesign/hpetspec_1.pdf ) When emulating periodic timer with timers not capable of periodic interrupt, driver is adding the period to counter value instead of comparator value, which causes slow drift when using this emulation. Also, driver seems to add hpetp->hp_delta both while setting up periodic interrupt and while emulating periodic interrupts with timers not capable of doing periodic interrupts. This hp_delta will result in slower than expected interrupt rate and should not be used while setting the interval. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Nils Carlson <nils.carlson@ericsson.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24mwave: fix read buffer overflowRoel Kluin1-11/+11
Check whether index is within bounds before grabbing the element. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24/dev/zero: avoid repeated access_ok() checksNikanth Karthikesan1-1/+1
In read_zero, we check for access_ok() once for the count bytes. It is unnecessarily checked again in clear_user. Use __clear_user, which does not check for access_ok(). Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-24hvc_console: Provide (un)locked version for hvc_resize()Hendrik Brueckner3-5/+17
Rename the locking free hvc_resize() function to __hvc_resize() and provide an inline function that locks the hvc_struct and calls __hvc_resize(). The rationale for this patch is that virtio_console calls the hvc_resize() function without locking the hvc_struct. So it needs to call the lock itself. According to naming rules, the unlocked version is renamed and prefixed with "__". References to unlocked function calls in hvc back-ends has been updated. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-09-23Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6Linus Torvalds1-3/+2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: SELinux: do not destroy the avc_cache_nodep KEYS: Have the garbage collector set its timer for live expired keys tpm-fixup-pcrs-sysfs-file-update creds_are_invalid() needs to be exported for use by modules: include/linux/cred.h: fix build Fix trivial BUILD_BUG_ON-induced conflicts in drivers/char/tpm/tpm.c
2009-09-23tpm-fixup-pcrs-sysfs-file-updateJason Gunthorpe1-3/+2
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Cc: Debora Velarde <debora@linux.vnet.ibm.com> Cc: Rajiv Andrade <srajiv@linux.vnet.ibm.com> Cc: Marcel Selhorst <m.selhorst@sirrix.com> Cc: James Morris <jmorris@namei.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Morris <jmorris@namei.org>