summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* kmap_atomic: make kunmap_atomic() harder to misuseCesar Eduardo Barros2010-08-0914-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kunmap_atomic() is currently at level -4 on Rusty's "Hard To Misuse" list[1] ("Follow common convention and you'll get it wrong"), except in some architectures when CONFIG_DEBUG_HIGHMEM is set[2][3]. kunmap() takes a pointer to a struct page; kunmap_atomic(), however, takes takes a pointer to within the page itself. This seems to once in a while trip people up (the convention they are following is the one from kunmap()). Make it much harder to misuse, by moving it to level 9 on Rusty's list[4] ("The compiler/linker won't let you get it wrong"). This is done by refusing to build if the type of its first argument is a pointer to a struct page. The real kunmap_atomic() is renamed to kunmap_atomic_notypecheck() (which is what you would call in case for some strange reason calling it with a pointer to a struct page is not incorrect in your code). The previous version of this patch was compile tested on x86-64. [1] http://ozlabs.org/~rusty/index.cgi/tech/2008-04-01.html [2] In these cases, it is at level 5, "Do it right or it will always break at runtime." [3] At least mips and powerpc look very similar, and sparc also seems to share a common ancestor with both; there seems to be quite some degree of copy-and-paste coding here. The include/asm/highmem.h file for these three archs mention x86 CPUs at its top. [4] http://ozlabs.org/~rusty/index.cgi/tech/2008-03-30.html [5] As an aside, could someone tell me why mn10300 uses unsigned long as the first parameter of kunmap_atomic() instead of void *? Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net> Cc: Russell King <linux@arm.linux.org.uk> (arch/arm) Cc: Ralf Baechle <ralf@linux-mips.org> (arch/mips) Cc: David Howells <dhowells@redhat.com> (arch/frv, arch/mn10300) Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> (arch/mn10300) Cc: Kyle McMartin <kyle@mcmartin.ca> (arch/parisc) Cc: Helge Deller <deller@gmx.de> (arch/parisc) Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> (arch/parisc) Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> (arch/powerpc) Cc: Paul Mackerras <paulus@samba.org> (arch/powerpc) Cc: "David S. Miller" <davem@davemloft.net> (arch/sparc) Cc: Thomas Gleixner <tglx@linutronix.de> (arch/x86) Cc: Ingo Molnar <mingo@redhat.com> (arch/x86) Cc: "H. Peter Anvin" <hpa@zytor.com> (arch/x86) Cc: Arnd Bergmann <arnd@arndb.de> (include/asm-generic) Cc: Rusty Russell <rusty@rustcorp.com.au> ("Hard To Misuse" list) Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* hugetlb: call mmu notifiers on hugepage cowDoug Doan2010-08-091-0/+6
| | | | | | | | | | | | | | | | When a copy-on-write occurs, we take one of two paths in handle_mm_fault: through handle_pte_fault for normal pages, or through hugetlb_fault for huge pages. In the normal page case, we eventually get to do_wp_page and call mmu notifiers via ptep_clear_flush_notify. There is no callout to the mmmu notifiers in the huge page case. This patch fixes that. Signed-off-by: Doug Doan <dougd@cray.com> Acked-by: Mel Gorman <mel@csn.ul.ie> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mm: provide init_mm mm_context initializerHeiko Carstens2010-08-093-4/+11
| | | | | | | | | | | | | | | | | | | Provide an INIT_MM_CONTEXT intializer macro which can be used to statically initialize mm_struct:mm_context of init_mm. This way we can get rid of code which will do the initialization at run time (on s390). In addition the current code can be found at a place where it is not expected. So let's have a common initializer which architectures can use if needed. This is based on a patch from Suzuki Poulose. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Suzuki Poulose <suzuki@in.ibm.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mm: use ERR_CASTJulia Lawall2010-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ERR_CAST(x) rather than ERR_PTR(PTR_ERR(x)). The former makes more clear what is the purpose of the operation, which otherwise looks like a no-op. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; T x; identifier f; @@ T f (...) { <+... - ERR_PTR(PTR_ERR(x)) + x ...+> } @@ expression x; @@ - ERR_PTR(PTR_ERR(x)) + ERR_CAST(x) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mm: use memdup_userJulia Lawall2010-08-091-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use memdup_user when user data is immediately copied into the allocated region. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; position p; identifier l1,l2; @@ - to = \(kmalloc@p\|kzalloc@p\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* asm-generic: use raw_local_irq_save/restore instead local_irq_save/restoreMichal Simek2010-08-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | The start/stop_critical_timing functions for preemptirqsoff, preemptoff and irqsoff tracers contain atomic_inc() and atomic_dec() operations. Atomic operations use local_irq_save/restore macros to ensure atomic access but they are traced by the same function which is causing recursion problem. The reason is when these tracers are turn ON then the local_irq_save/restore macros are changed in include/linux/irqflags.h to call trace_hardirqs_on/off which call start/stop_critical_timing. Microblaze was affected because it uses generic atomic implementation. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drivers/video/w100fb.c: ignore void return value / fix build failurePeter Huewe2010-08-091-2/+2
| | | | | | | | | | | | Fix a build failure "error: void value not ignored as it ought to be" by removing an assignment of a void return value. The functionality of the code is not changed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Henrik Kretzschmar <henne@nachtwindheim.de> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ipmi: fix ACPI detection with regspacingYinghai Lu2010-08-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the commit that changed ipmi_si detecting sequence from SMBIOS/ACPI to ACPI/SMBIOS, | commit 754d453185275951d39792865927ec494fa1ebd8 | Author: Matthew Garrett <mjg@redhat.com> | Date: Wed May 26 14:43:47 2010 -0700 | | ipmi: change device discovery order | | The ipmi spec provides an ordering for si discovery. Change the driver to | match, with the exception of preferring smbios to SPMI as HPs (at least) | contain accurate information in the former but not the latter. ipmi_si can not be initialized. [ 138.799739] calling init_ipmi_devintf+0x0/0x109 @ 1 [ 138.805050] ipmi device interface [ 138.818131] initcall init_ipmi_devintf+0x0/0x109 returned 0 after 12797 usecs [ 138.822998] calling init_ipmi_si+0x0/0xa90 @ 1 [ 138.840276] IPMI System Interface driver. [ 138.846137] ipmi_si: probing via ACPI [ 138.849225] ipmi_si 00:09: [io 0x0ca2] regsize 1 spacing 1 irq 0 [ 138.864438] ipmi_si: Adding ACPI-specified kcs state machine [ 138.870893] ipmi_si: probing via SMBIOS [ 138.880945] ipmi_si: Adding SMBIOS-specified kcs state machineipmi_si: duplicate interface [ 138.896511] ipmi_si: probing via SPMI [ 138.899861] ipmi_si: Adding SPMI-specified kcs state machineipmi_si: duplicate interface [ 138.917095] ipmi_si: Trying ACPI-specified kcs state machine at i/o address 0xca2, slave address 0x0, irq 0 [ 138.928658] ipmi_si: Interface detection failed [ 138.953411] initcall init_ipmi_si+0x0/0xa90 returned 0 after 110847 usecs in smbios has DMI/SMBIOS Handle 0x00C5, DMI type 38, 18 bytes IPMI Device Information Interface Type: KCS (Keyboard Control Style) Specification Version: 2.0 I2C Slave Address: 0x00 NV Storage Device: Not Present Base Address: 0x0000000000000CA2 (I/O) Register Spacing: 32-bit Boundaries in DSDT has Device (BMC) { Name (_HID, EisaId ("IPI0001")) Method (_STA, 0, NotSerialized) { If (LEqual (OSN, Zero)) { Return (Zero) } Return (0x0F) } Name (_STR, Unicode ("IPMI_KCS")) Name (_UID, Zero) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0CA2, // Range Minimum 0x0CA2, // Range Maximum 0x00, // Alignment 0x01, // Length ) IO (Decode16, 0x0CA6, // Range Minimum 0x0CA6, // Range Maximum 0x00, // Alignment 0x01, // Length ) }) Method (_IFT, 0, NotSerialized) { Return (One) } Method (_SRV, 0, NotSerialized) { Return (0x0200) } } so the reg spacing should be 4 instead of 1. Try to calculate regspacing for this kind of system. Observed on a Sun Fire X4800. Other OSes work and pass certification. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Acked-by: Matthew Garrett <mjg@redhat.com> Cc: Len Brown <len.brown@intel.com> Cc: Myron Stowe <myron.stowe@hp.com> Cc: Corey Minyard <minyard@acm.org> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wqLinus Torvalds2010-08-092-14/+6
|\ | | | | | | | | | | | | * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: drm: fix fallouts from slow-work -> wq conversion workqueue: workqueue_cpu_callback() should be cpu_notifier instead of hotcpu_notifier workqueue: add missing __percpu markup in kernel/workqueue.c
| * drm: fix fallouts from slow-work -> wq conversionTejun Heo2010-08-091-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 991ea75c (drm: use workqueue instead of slow-work), which made drm to use wq instead of slow-work, didn't account for the return value difference between delayed_slow_work_enqueue() and queue_delayed_work(). The former returns 0 on success and -errno on failures while the latter never fails and only uses the return value to indicate whether the work was already pending or not. This misconversion triggered spurious error messages. Remove the now unnecessary return value check and error message. Markus: caught another incorrect conversion in drm_kms_helper_poll_enable() Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de> Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org
| * workqueue: workqueue_cpu_callback() should be cpu_notifier instead of ↵Tejun Heo2010-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hotcpu_notifier Commit 6ee0578b (workqueue: mark init_workqueues as early_initcall) made workqueue SMP initialization depend on workqueue_cpu_callback(), which however was registered as hotcpu_notifier() and didn't get called if CONFIG_HOTPLUG_CPU is not set. This made gcwqs on non-boot CPUs not create their initial workers leading to boot failures. Fix it by making it a cpu_notifier. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-and-bisected-by: walt <w41ter@gmail.com> Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
| * workqueue: add missing __percpu markup in kernel/workqueue.cNamhyung Kim2010-08-081-1/+1
| | | | | | | | | | | | | | | | works in schecule_on_each_cpu() is a percpu pointer but was missing __percpu markup. Add it. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tileLinus Torvalds2010-08-08210-21/+39334
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch/tile: check kmalloc() result arch/tile: catch up on various minor cleanups. arch/tile: avoid erroneous error return for PTRACE_POKEUSR. tile: set ARCH_KMALLOC_MINALIGN tile: remove homegrown L1_CACHE_ALIGN macro arch/tile: Miscellaneous cleanup changes. arch/tile: Split the icache flush code off to a generic <arch> header. arch/tile: Fix bug in support for atomic64_xx() ops. arch/tile: Shrink the tile-opcode files considerably. arch/tile: Add driver to enable access to the user dynamic network. arch/tile: Enable more sophisticated IRQ model for 32-bit chips. Move list types from <linux/list.h> to <linux/types.h>. Add wait4() back to the set of <asm-generic/unistd.h> syscalls. Revert adding some arch-specific signal syscalls to <linux/syscalls.h>. arch/tile: Do not use GFP_KERNEL for dma_alloc_coherent(). Feedback from fujita.tomonori@lab.ntt.co.jp. arch/tile: core support for Tilera 32-bit chips. Fix up the "generic" unistd.h ABI to be more useful.
| * \ Merge branch 'master' into for-linusChris Metcalf2010-08-064568-333402/+225114
| |\ \
| * | | arch/tile: check kmalloc() resultKulikov Vasiliy2010-07-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If kmalloc() fails exit with -ENOMEM. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Acked-by: Chris Metcalf <cmetcalf@tilera.com>
| * | | Merge branch 'master' into for-linusChris Metcalf2010-07-06441-3143/+3920
| |\ \ \
| * | | | arch/tile: catch up on various minor cleanups.Chris Metcalf2010-07-067-41/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of these changes fix any actual bugs, but are just various cleanups that fell out along the way. In particular, some unused #defines and includes are removed, PREFETCH_STRIDE is added (the default is right for our shipping chips, but wrong for our next generation), our tile-specific prefetching code is removed so the (identical) generic prefetching code can be used instead, a comment is fixed to be proper GPL and not just a "paste GPL here" token, a "//" comment is converted to "/* */", etc. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | | | arch/tile: avoid erroneous error return for PTRACE_POKEUSR.Chris Metcalf2010-07-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | | | tile: set ARCH_KMALLOC_MINALIGNFUJITA Tomonori2010-07-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Architectures that handle DMA-non-coherent memory need to set ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe: the buffer doesn't share a cache with the others. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Chris Metcalf <cmetcalf@tilera.com>
| * | | | tile: remove homegrown L1_CACHE_ALIGN macroFUJITA Tomonori2010-07-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's use the standard L1_CACHE_ALIGN macro instead. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Chris Metcalf <cmetcalf@tilera.com>
| * | | | arch/tile: Miscellaneous cleanup changes.Chris Metcalf2010-07-0656-679/+798
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is primarily changes caused by reviewing "sparse" and "checkpatch" output on our sources, so is somewhat noisy, since things like "printk() -> pr_err()" (or whatever) throughout the codebase tend to get tedious to read. Rather than trying to tease apart precisely which things changed due to which type of code review, this commit includes various cleanups in the code: - sparse: Add declarations in headers for globals. - sparse: Fix __user annotations. - sparse: Using gfp_t consistently instead of int. - sparse: removing functions not actually used. - checkpatch: Clean up printk() warnings by using pr_info(), etc.; also avoid partial-line printks except in bootup code. - checkpatch: Use exposed structs rather than typedefs. - checkpatch: Change some C99 comments to C89 comments. In addition, a couple of minor other changes are rolled in to this commit: - Add support for a "raise" instruction to cause SIGFPE, etc., to be raised. - Remove some compat code that is unnecessary when we fully eliminate some of the deprecated syscalls from the generic syscall ABI. - Update the tile_defconfig to reflect current config contents. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | | | arch/tile: Split the icache flush code off to a generic <arch> header.Chris Metcalf2010-07-065-114/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code is used in other places in our system than in Linux, so to share it we now implement it as an inline function in our low-level <arch> headers, and instantiate it in one file in Linux's arch/tile/lib. The file is now cacheflush.c and is C code rather than the strangely-named and assembler-implemented __invalidate_icache.S. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | | | arch/tile: Fix bug in support for atomic64_xx() ops.Chris Metcalf2010-07-061-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This wasn't properly tested until the perf-event subsystem started to get brought up under the tile architecture. The bug caused bogus atomic64_cmpxchg() values to be returned, among other things. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | | | arch/tile: Shrink the tile-opcode files considerably.Chris Metcalf2010-07-063-12527/+1017
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The C file (tile-desc_{32,64}.c) was about 300KB before this change, and is now shrunk down to 100K. The original file included support for BFD in the binutils toolchain, which is not necessary in the kernel; the kernel version only needs to include enough support to enable the single-stepper and backtracer. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | | | arch/tile: Add driver to enable access to the user dynamic network.Chris Metcalf2010-07-067-6/+874
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This network (the "UDN") connects all the cpus on the chip in a wormhole-routed dynamic network. Subrectangles of the chip can be allocated by a "create" ioctl on /dev/hardwall, and then to access the UDN in that rectangle, tasks must perform an "activate" ioctl on that same file object after affinitizing themselves to a single cpu in the region. Sending a wormhole-routed message that tries to leave that subrectangle causes all activated tasks to receive a SIGILL (just as they would if they tried to access the UDN without first activating themselves to a hardwall rectangle). The original submission of this code to LKML had the driver instantiated under /proc/tile/hardwall. Now we just use a character device for this, conventionally /dev/hardwall. Some futures planning for the TILE-Gx chip suggests that we may want to have other types of devices that share the general model of "bind a task to a cpu, then 'activate' a file descriptor on a pseudo-device that gives access to some hardware resource". As such, we are using a device rather than, for example, a syscall, to set up and activate this code. As part of this change, the compat_ptr() declaration was fixed and used to pass the compat_ioctl argument to the normal ioctl. So far we limit compat code to 2GB, so the difference between zero-extend and sign-extend (the latter being correct, eventually) had been overlooked. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | | | arch/tile: Enable more sophisticated IRQ model for 32-bit chips.Chris Metcalf2010-07-069-154/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This model is based on the on-chip interrupt model used by the TILE-Gx next-generation hardware, and interacts much more cleanly with the Linux generic IRQ layer. The change includes modifications to the Tilera hypervisor, which are reflected in the hypervisor headers in arch/tile/include/arch/. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Thomas Gleixner <tglx@linutronix.de>
| * | | | Move list types from <linux/list.h> to <linux/types.h>.Chris Metcalf2010-07-062-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows a list_head (or hlist_head, etc.) to be used from places that used to be impractical, in particular <asm/processor.h>, which used to cause include file recursion: <linux/list.h> includes <linux/prefetch.h>, which always includes <asm/processor.h> for the prefetch macros, as well as <asm/system.h>, which often includes <asm/processor.h> directly or indirectly. This avoids a lot of painful workaround hackery on the tile architecture, where we use a list_head in the thread_struct to chain together tasks that are activated on a particular hardwall. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
| * | | | Add wait4() back to the set of <asm-generic/unistd.h> syscalls.Chris Metcalf2010-06-252-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial pass at the generic ABI assumed that wait4() could be easily expressed using waitid(). Although it's true that wait4() can be built on waitid(), it's awkward enough that it makes more sense to continue to include wait4 in the generic syscall ABI. Since there is already a deprecated wait4 in the ABI, this change converts that wait4 into old_wait, and puts wait4 in the next available slot for new supported syscalls, after the platform-specific syscalls at number 260. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
| * | | | Merge branch 'master' into for-linusChris Metcalf2010-06-25216-1890/+2656
| |\ \ \ \
| * | | | | Revert adding some arch-specific signal syscalls to <linux/syscalls.h>.Chris Metcalf2010-06-075-29/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out there is some variance on the calling conventions for these syscalls, and <asm-generic/syscalls.h> is already the mechanism used to handle this. Switch arch/tile over to using that mechanism and tweak the calling conventions for a couple of tile syscalls to match <asm-generic/syscalls.h>. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
| * | | | | Merge branch 'master' into for-linusChris Metcalf2010-06-05411-2599/+66263
| |\ \ \ \ \
| * | | | | | arch/tile: Do not use GFP_KERNEL for dma_alloc_coherent().Chris Metcalf2010-06-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feedback from fujita.tomonori@lab.ntt.co.jp. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
| * | | | | | arch/tile: core support for Tilera 32-bit chips.Chris Metcalf2010-06-04202-0/+49569
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is the core kernel support for TILEPro and TILE64 chips. No driver support (except the console driver) is included yet. This includes the relevant Linux headers in asm/; the low-level low-level "Tile architecture" headers in arch/, which are shared with the hypervisor, etc., and are build-system agnostic; and the relevant hypervisor headers in hv/. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Paul Mundt <lethal@linux-sh.org>
| * | | | | | Fix up the "generic" unistd.h ABI to be more useful.Chris Metcalf2010-06-042-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reserve 16 "architecture-specific" syscall numbers starting at 244. Allow use of the sys_sync_file_range2() API with the generic unistd.h by specifying __ARCH_WANT_SYNC_FILE_RANGE2 before including it. Allow using the generic unistd.h to create the "compat" syscall table by specifying __SYSCALL_COMPAT before including it. Use sys_fadvise64_64 for __NR3264_fadvise64 in both 32- and 64-bit mode. Request the appropriate __ARCH_WANT_COMPAT_SYS_xxx values when some deprecated syscall modes are selected. As part of this change to fix up the syscalls, also provide a couple of missing signal-related syscall prototypes in <linux/syscalls.h>. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
* | | | | | | Merge branch 'for-linus' of git://www.jni.nu/crisLinus Torvalds2010-08-0854-742/+857
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://www.jni.nu/cris: (51 commits) CRIS: Fix alignment problem for older ld CRIS: Always dump registers for segfaulting process. CRIS: Add config for pausing a seg-faulting process CRIS: Don't take faults while in_atomic CRIS: Fixup lookup for delay slot faults CRIS: Discard exit.text and .data at runtime CRIS: Add cache aligned and read mostly data sections CRIS: Return something from profile write CRIS: Add ARTPEC-3 and timestamps for sync-serial CRIS: Better ARTPEC-3 support for gpio CRIS: Add include guard CRIS: Better handling of pinmux settings CRIS: New DMA defines for ARTPEC-3 CRIS: __do_strncpy_from_user: Don't read the byte beyond the nil CRIS: Pagetable for ARTPEC-3 CRIS: Machine dependent memmap.h CRIS: Check if pointer is set before using it CRIS: Machine dependent dma.h CRIS: Define __read_mostly for CRISv32 CRIS: Discard .note.gnu.build-id section ...
| * | | | | | | CRIS: Fix alignment problem for older ldJesper Nilsson2010-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CRISv10 uses a pretty old ld, which does not allow ALIGN(0), (It becomes . = 0;) so instead we align to 1 byte. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Always dump registers for segfaulting process.Jesper Nilsson2010-08-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Add config for pausing a seg-faulting processJesper Nilsson2010-08-042-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put it on a wait queue, so we can attach gdb to the process to debug it instead of just killing it. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Don't take faults while in_atomicJesper Nilsson2010-08-041-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Fixup lookup for delay slot faultsJesper Nilsson2010-08-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Discard exit.text and .data at runtimeJesper Nilsson2010-08-041-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to handle references from __bug_table. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Add cache aligned and read mostly data sectionsJesper Nilsson2010-08-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Return something from profile writeJesper Nilsson2010-08-041-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even if it doesn't matter, we should return something. Also, clean up some formatting. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Add ARTPEC-3 and timestamps for sync-serialJesper Nilsson2010-08-041-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Better ARTPEC-3 support for gpioJesper Nilsson2010-08-041-18/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add PWM support, correct comment for ARTPEC-3. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Add include guardJesper Nilsson2010-08-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Better handling of pinmux settingsJesper Nilsson2010-08-041-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on eth, eth_mido and geth fields in wr_hwprot, don't set corresponding pins on gpio port b to gpio mode. This avoids re-resetting the ethernet PHY should this already have been done. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: New DMA defines for ARTPEC-3Jesper Nilsson2010-08-041-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: __do_strncpy_from_user: Don't read the byte beyond the nilJesper Nilsson2010-08-041-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
| * | | | | | | CRIS: Pagetable for ARTPEC-3Jesper Nilsson2010-08-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
OpenPOWER on IntegriCloud