aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc
AgeCommit message (Collapse)Author
2008-08-29sparc32: Kill mmu_translate_dvma() usage.David S. Miller
Just simply use virt_to_page() on the provided virtual address pointer. Kill #if 0'd code. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc64: Convert SBUS floppy probing to use OF device objects.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc: Move SBUS DMA attribute interfaces out of asm/sbus.hDavid S. Miller
This is in preparation for the subsequent asm/sbus.h removal. Also, make these routines take a "struct device" or no arguments, as appropriate. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc: Convert all SBUS drivers to dma_*() interfaces.David S. Miller
And all the SBUS dma interfaces are deleted. A private implementation remains inside of the 32-bit sparc port which exists only for the sake of the implementation of dma_*(). Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc32: Implement more generic dma_*() interfaces.David S. Miller
These dispatch to either PCI or SBUS routines based upon the device bus type. This will allow us to let SBUS drivers call these routines. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc32: Make mmu_{get,release}_*() take a struct device pointer.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc: Make SBUS DMA interfaces take struct device.David S. Miller
This is the first step in converting all the SBUS drivers over to generic dma_*(). Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc32: Make IOMMU and IO-UNIT init work with device nodes.David S. Miller
And stick the iommu archdata pointer into the generic OF device tree of_device struct as well. We still have to pass the sbus_bus object down into the routines so that the SBUS bus objects get the iommu cookies set properly. After drivers get converted to being pure OF drivers, that can go away. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc: Kill SBUS DVMA layer.David S. Miller
This thing was completely pointless. Just find the OF device in the parent of drivers that want to program this device, and map the DMA regs inside such drivers too. This also moves the dummy claim_dma_lock() and release_dma_lock() implementation to floppy_32.h, which makes it handle this issue just like floppy_64.h does. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc: Kill videopix SBUS driver.David S. Miller
This has been marked BROKEN for a long time and it's more likely to get rewritten from scratch than to be fixed up and made usable. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29sparc: Delete bare sbus char bpp driver, obsoleted by parport_sunbppDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-28sparc: Fix resource flags for PCI children in OF device tree.David S. Miller
When a device is under an EBUS or ISA bus, the resource flags don't get set properly. Fix this by re-evaluating the resource flags at each level of bus as we apply ranges on the way to the root. And let PCI override any existing flags setting, but don't let the default flags calculator make such overrides. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-27sparc32: Implement smp_call_function_single().David S. Miller
Reported by Stephen Rothwell. Needed to fix the build when CONFIG_RELAY is enabled. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-25sparc64: Fix irq_of_parse_and_map() and irq_dispose_mapping().David S. Miller
Stephen Rothwell noticed that I committed an earlier version of the patch that didn't have two things fixed: 1) irq_of_parse_and_map() should return "unsigned int" not "int" and it should return zero for "no irq" 2) irq_dispose_mapping() should be an inline function, not a macro, for type checking With feedback and suggestions from Anton Vorontsov. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24sparc64: Add generic interface for registering a dimm printing handler.David S. Miller
The way to do this varies by platform type and the exact memory controller the cpu uses. For Spitfire cpus we currently just use prom_getunumber() and hope that works. For Cheetah cpus we have a memory controller driver that can compute this information. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24sparc: Add target for a stripped kernelMartin Habets
Add a target for a stripped kernel. This is used for the various packaging targets (*-pkg). Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24sparc: Add GPIO layer support.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().David S. Miller
This allows more OF layer code to be shared between powerpc and sparc. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-24sparc: Add mutex for set property calls.David S. Miller
On some platforms, the I2C controller is shared between the OS and OBP. OBP uses this I2C controller to access the EEPROM, and thus is programmed when the kernel calls prom_setprop(). Wrap such calls with the new of_set_property_mutex. Relevant I2C bus drivers can grab this mutex around top-level I2C operations to provide the proper protection. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-12sparc64: Implement IRQ stacks.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-12sparc: remove include of linux/of_device.h from asm/of_device.hStephen Rothwell
Now that all the direct includes of asm/of_device.h are gone, this is safe to do. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-07sparc: don't use asm/of_device.hStephen Rothwell
Use linux/of_device.h instead. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-06of/sparc: remove include of linux/of_platform.h from asm/of_platform.hStephen Rothwell
Now that we have removed all inclusions of asm/of_platform.h, this compatability include can be removed. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-31sparc: Add __KERNEL__ ifdef protection to pt_regs helpers.David S. Miller
Some of them use 'bool' and whatnot and therefore are not kosher for userspace, so don't export them there. Reported by Roland McGrath. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-30sparc64: Hook up trigger_all_cpu_backtrace().David S. Miller
We already have code that does this, but it is only currently attached to sysrq-'y'. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-30sparc64: Make global reg dumping even more useful.David S. Miller
Record one more level of stack frame program counter. Particularly when lockdep and all sorts of spinlock debugging is enabled, figuring out the caller of spin_lock() is difficult when the cpu is stuck on the lock. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-30sparc64: FUTEX_OP_ANDN fixMikael Pettersson
Correct sparc64's implementation of FUTEX_OP_ANDN to do a bitwise negate of the oparg parameter before applying the AND operation. All other archs that support FUTEX_OP_ANDN either negate oparg explicitly (frv, ia64, mips, sh, x86), or do so indirectly by using an and-not instruction (powerpc). Since sparc64 has and-not, I chose to use that solution. I've not found any use of FUTEX_OP_ANDN in glibc so the impact of this bug is probably minor. But other user-space components may try to use it so it should still get fixed. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-29sparc: merge of_platform_{32,64}.hStephen Rothwell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-29sparc64: Kill isa_bus_type.David S. Miller
I forgot to delete this when I removed the ISA bus layer from the sparc ports. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27sparc: Set CONFIG_HAVE_ARCH_TRACEHOOKDavid S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27sparc: Add task_pt_regs().David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27sparc: Add call to tracehook_signal_handler().David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27sparc: Create and use TIF_NOTIFY_RESUME.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27sparc: Use tracehook routines in syscall_trace().David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27sparc: Add user_stack_pointer().David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27sparc64: tracehook: TIF_NOTIFY_RESUMERoland McGrath
This adds TIF_NOTIFY_RESUME support for sparc64. When set, we call tracehook_notify_resume() on the way to user mode. Signed-off-by: Roland McGrath <roland@redhat.com>
2008-07-27sparc: Add asm/syscall.hDavid S. Miller
Based upon a patch by Roland McGrath. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-27sparc: enable headers_export againSam Ravnborg
Update include/asm/Kbuild so we export all relvant headers for sparc. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-27sparc, sparc64: use arch/sparc/includeSam Ravnborg
The majority of this patch was created by the following script: *** ASM=arch/sparc/include/asm mkdir -p $ASM git mv include/asm-sparc64/ftrace.h $ASM git rm include/asm-sparc64/* git mv include/asm-sparc/* $ASM sed -ie 's/asm-sparc64/asm/g' $ASM/* sed -ie 's/asm-sparc/asm/g' $ASM/* *** The rest was an update of the top-level Makefile to use sparc for header files when sparc64 is being build. And a small fixlet to pick up the correct unistd.h from sparc64 code. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-07-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc: Wire up new system calls.
2008-07-25sparc: Wire up new system calls.David S. Miller
This wires up the recently added Wire up signalfd4, eventfd2, epoll_create1, dup3, pipe2, and inotify_init1 system calls. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-25pty: remove unused UNIX98_PTY_COUNT optionsAdrian Bunk
The h8300 and sparc options somehow survived when the code stopped using CONFIG_UNIX98_PTY_COUNT. Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24flag parameters: pipeUlrich Drepper
This patch introduces the new syscall pipe2 which is like pipe but it also takes an additional parameter which takes a flag value. This patch implements the handling of O_CLOEXEC for the flag. I did not add support for the new syscall for the architectures which have a special sys_pipe implementation. I think the maintainers of those archs have the chance to go with the unified implementation but that's up to them. The implementation introduces do_pipe_flags. I did that instead of changing all callers of do_pipe because some of the callers are written in assembler. I would probably screw up changing the assembly code. To avoid breaking code do_pipe is now a small wrapper around do_pipe_flags. Once all callers are changed over to do_pipe_flags the old do_pipe function can be removed. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <sys/syscall.h> #ifndef __NR_pipe2 # ifdef __x86_64__ # define __NR_pipe2 293 # elif defined __i386__ # define __NR_pipe2 331 # else # error "need __NR_pipe2" # endif #endif int main (void) { int fd[2]; if (syscall (__NR_pipe2, fd, 0) != 0) { puts ("pipe2(0) failed"); return 1; } for (int i = 0; i < 2; ++i) { int coe = fcntl (fd[i], F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { printf ("pipe2(0) set close-on-exit for fd[%d]\n", i); return 1; } } close (fd[0]); close (fd[1]); if (syscall (__NR_pipe2, fd, O_CLOEXEC) != 0) { puts ("pipe2(O_CLOEXEC) failed"); return 1; } for (int i = 0; i < 2; ++i) { int coe = fcntl (fd[i], F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { printf ("pipe2(O_CLOEXEC) does not set close-on-exit for fd[%d]\n", i); return 1; } } close (fd[0]); close (fd[1]); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper <drepper@redhat.com> Acked-by: Davide Libenzi <davidel@xmailserver.org> Cc: Michael Kerrisk <mtk.manpages@googlemail.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24mm: drop unneeded pgdat argument from free_area_init_node()Johannes Weiner
free_area_init_node() gets passed in the node id as well as the node descriptor. This is redundant as the function can trivially get the node descriptor itself by means of NODE_DATA() and the node's id. I checked all the users and NODE_DATA() seems to be usable everywhere from where this function is called. Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-22sparc32: pass -m32 when building vmlinux.ldsStephen Rothwell
Otherwise it breaks since we merged asm/page.h Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-19sparc: Remove Sparc's asm-offsets for sclow.SDavid Howells
Remove Sparc's asm-offsets for sclow.S as the (E)UID/(E)GID size and offset definitions will cease to be correct if COW credentials are merged. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc: Use new '%pS' infrastructure to print symbols.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc32: fix init.c allnoconfig build errorRobert Reif
Fix allnoconfig build error. Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc: arch/sparc/kernel/apc.c to unlocked_ioctlStoyan Gaydarov
This changes arch/sparc/kernel/apc.c to use unlocked_ioctl Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-17sparc: export openprom.h to userspaceSam Ravnborg
sparc64 exports openprom.h to userspace so let sparc follow the example. As openprom.h pulled in another not-for-export vaddrs.h header file it required a few changes to fix the build. The definition af VMALLOC_* were moved to pgtable as this is where sparc64 has them. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>