summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
Commit message (Collapse)AuthorAgeFilesLines
* sparc: remove CONFIG_SUN4Adrian Bunk2008-09-0112-379/+27Star
| | | | | | | | | | | | | | While doing some easy cleanups on the sparc code I noticed that the CONFIG_SUN4 code seems to be worse than the rest - there were some "I don't know how it should work, but the current code definitely cannot work." places. And while I have seen people running Linux on machines like a SPARCstation 5 a few years ago I don't recall having seen sun4 machines, even less ones running Linux. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Annotate of_device_id arrays with const or __initdata.David S. Miller2008-08-313-3/+3
| | | | | | As suggested by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Kill ebus_bus_type.David S. Miller2008-08-301-10/+0Star
| | | | | | No longer used. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Kill EBUS driver layer.David S. Miller2008-08-304-404/+1Star
| | | | | | | All that remains is the EBUS DMA programming library for sparc64. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Kill now spurious includes of sbus.hDavid S. Miller2008-08-294-4/+0Star
| | | | | | | | In order to make this week I also had to add an include of linux/dma-mapping.h to asm/pci_32.h because drivers/pci/pci.c really depends upon getting this header somehow. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Kill iounit_map_dma_*().David S. Miller2008-08-291-3/+0Star
| | | | | | Unused. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Kill sbus_bus_type.David S. Miller2008-08-291-9/+0Star
| | | | | | No longer used. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Remove generic SBUS probing layer.David S. Miller2008-08-291-23/+0Star
| | | | | | | The individual SBUS IOMMU arch code now sets the IOMMU information directly into the OF device objects. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Add OF archdata propagation helper.David S. Miller2008-08-291-0/+22
| | | | | | | Add a helper function that, given a bus of_device node, propagates all iommu, stc, and host_controller values down to the child nodes. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Kill sbus_arch_preinit().David S. Miller2008-08-291-9/+3Star
| | | | | | | 32-bit sparc just needed it to register the ioport procfs bits, do this via an arch_initcall() instead. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Kill sbus_ioremap() and sbus_iounmap().David S. Miller2008-08-292-18/+0Star
| | | | | | No more users. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Convert remaining sbus_ioremap() and sbus_iounmap() users.David S. Miller2008-08-295-13/+19
| | | | | | Use of_ioremap() and of_iounmap() instead. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Remove dinky old-style SBUS probing facilities.David S. Miller2008-08-291-1/+0Star
| | | | | | | No drivers or code uses this stuff any more, every driver has been converted over to OF device probing. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Remove SBUS layer resource and irq handling.David S. Miller2008-08-291-27/+0Star
| | | | | | | All the drivers use OF device objects now for this information. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Kill SBUS layer IRQ hooks.David S. Miller2008-08-294-100/+0Star
| | | | | | IRQs are obtained by drivers from the of_device struct. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Convert sun4d IRQ code to use generic device tree probing.David S. Miller2008-08-291-35/+48
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Convert pmc to OF driver.David S. Miller2008-08-291-29/+28Star
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Convert apc to OF driver.David S. Miller2008-08-291-34/+38
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Make mmu_map_dma_area and mmu_unmap_dma_area take a device pointer.David S. Miller2008-08-291-2/+2
| | | | | | | This lets us kill this "map it in every IOMMU" crazy code, and also some of the final references to sbus_root. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Kill mmu_translate_dvma() usage.David S. Miller2008-08-291-35/+1Star
| | | | | | | | 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>
* sparc: Move SBUS DMA attribute interfaces out of asm/sbus.hDavid S. Miller2008-08-291-1/+1
| | | | | | | | | 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>
* sparc: Convert all SBUS drivers to dma_*() interfaces.David S. Miller2008-08-291-8/+0Star
| | | | | | | | | 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>
* sparc32: Implement more generic dma_*() interfaces.David S. Miller2008-08-294-1/+244
| | | | | | | | | 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>
* sparc32: Make mmu_{get,release}_*() take a struct device pointer.David S. Miller2008-08-291-13/+4Star
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Make SBUS DMA interfaces take struct device.David S. Miller2008-08-292-26/+19Star
| | | | | | | This is the first step in converting all the SBUS drivers over to generic dma_*(). Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Make IOMMU and IO-UNIT init work with device nodes.David S. Miller2008-08-291-11/+6Star
| | | | | | | | | | | 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>
* sparc: Kill SBUS DVMA layer.David S. Miller2008-08-291-1/+0Star
| | | | | | | | | | | | | 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>
* sparc: Delete bare sbus char bpp driver, obsoleted by parport_sunbppDavid S. Miller2008-08-291-1/+0Star
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc64: Fix irq_of_parse_and_map() and irq_dispose_mapping().David S. Miller2008-08-261-2/+2
| | | | | | | | | | | | | | | 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>
* sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().David S. Miller2008-08-251-0/+11
| | | | | | | This allows more OF layer code to be shared between powerpc and sparc. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Add mutex for set property calls.David S. Miller2008-08-251-0/+6
| | | | | | | | | | | | | 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>
* sparc: don't use asm/of_device.hStephen Rothwell2008-08-082-2/+2
| | | | | | | 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>
* sparc: Add call to tracehook_signal_handler().David S. Miller2008-07-281-0/+2
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Create and use TIF_NOTIFY_RESUME.David S. Miller2008-07-282-3/+16
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Use tracehook routines in syscall_trace().David S. Miller2008-07-282-17/+21
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Wire up new system calls.David S. Miller2008-07-261-1/+2
| | | | | | | 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>
* flag parameters: pipeUlrich Drepper2008-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* sparc: Remove Sparc's asm-offsets for sclow.SDavid Howells2008-07-191-12/+0Star
| | | | | | | | | 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>
* sparc: Use new '%pS' infrastructure to print symbols.David S. Miller2008-07-182-10/+8Star
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: arch/sparc/kernel/apc.c to unlocked_ioctlStoyan Gaydarov2008-07-181-12/+28
| | | | | | | 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>
* sparc: export openprom.h to userspaceSam Ravnborg2008-07-181-0/+1
| | | | | | | | | | | | 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>
* sparc/kernel/: possible cleanupsAdrian Bunk2008-07-1820-54/+38Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the following possible cleanups: - make the following needlessly global code static: - apc.c: apc_swift_idle() - ebus.c: ebus_blacklist_irq() - ebus.c: fill_ebus_child() - ebus.c: fill_ebus_device() - entry.S: syscall_is_too_hard - etra: tsetup_sun4c_stackchk - head.S: cputyp - head.S: prom_vector_p - idprom.c: Sun_Machines[] - ioport.c: _sparc_find_resource() - ioport.c: create_proc_read_entry() - irq.c: struct sparc_irq[] - rtrap.S: sun4c_rett_stackchk - setup.c: prom_sync_me() - setup.c: boot_flags - sun4c_irq.c: sun4c_sbint_to_irq() - sun4d_irq.c: sbus_tid[] - sun4d_irq.c: struct sbus_actions - sun4d_irq.c: sun4d_sbint_to_irq() - sun4m_irq.c: sun4m_sbint_to_irq() - sun4m_irq.c: sun4m_get_irqmask() - sun4m_irq.c: sun4m_timers - sun4m_smp.c: smp4m_cross_call() - sun4m_smp.c: smp4m_blackbox_id() - sun4m_smp.c: smp4m_blackbox_current() - time.c: sp_clock_typ - time.c: sbus_time_init() - traps.c: instruction_dump() - wof.S: spwin_sun4c_stackchk - wuf.S: sun4c_fwin_stackchk - #if 0 the following unused code: - process.c: sparc_backtrace_lock - process.c: __show_backtrace() - process.c: show_backtrace() - process.c: smp_show_backtrace_all_cpus() - remove the following unused code: - entry.S: __handle_exception - smp.c: smp_num_cpus - smp.c: smp_activated - smp.c: __cpu_number_map[] - smp.c: __cpu_logical_map[] - smp.c: bitops_spinlock - traps.c: trap_curbuf - traps.c: trapbuf[] - traps.c: linux_smp_still_initting - traps.c: thiscpus_tbr - traps.c: thiscpus_mid Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge commit 'v2.6.26' into bkl-removalJonathan Corbet2008-07-1418-30/+37
|\
| * sparc: switch /proc/led to seq_fileAlexey Dobriyan2008-06-041-13/+21
| | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * sparc: remove CVS keywordsAdrian Bunk2008-05-2016-16/+16
| | | | | | | | | | | | | | | | This patch removes the CVS keywords that weren't updated for a long time from comments. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
| * [PATCH] take init_files to fs/file.cAl Viro2008-05-161-1/+0Star
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | sparc-apc: BKL pushdownArnd Bergmann2008-07-021-0/+2
|/ | | | Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* sparc: Fix mremap address range validation.David S. Miller2008-05-131-43/+5Star
| | | | | | | | | | | | Just like mmap, we need to validate address ranges regardless of MAP_FIXED. sparc{,64}_mmap_check()'s flag argument is unused, remove. Based upon a report and preliminary patch by Jan Lieskovsky <jlieskov@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: fix rtrap.S typoRobert Reif2008-05-121-1/+1
| | | | | | | | | | | Fix compile problem in rtrap.S arch/sparc/kernel/built-in.o: In function `ret_trap_userwins_ok': arch/sparc/kernel/rtrap.S:(.text+0x1900): undefined reference to `PSR_SYCALL' Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Fix debugger syscall restart interactions.David S. Miller2008-05-114-41/+40Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So, forever, we've had this ptrace_signal_deliver implementation which tries to handle all of the nasties that can occur when the debugger looks at a process about to take a signal. It's meant to address all of these issues inside of the kernel so that the debugger need not be mindful of such things. Problem is, this doesn't work. The idea was that we should do the syscall restart business first, so that the debugger captures that state. Otherwise, if the debugger for example saves the child's state, makes the child execute something else, then restores the saved state, we won't handle the syscall restart properly because we lose the "we're in a syscall" state. The code here worked for most cases, but if the debugger actually passes the signal through to the child unaltered, it's possible that we would do a syscall restart when we shouldn't have. In particular this breaks the case of debugging a process under a gdb which is being debugged by yet another gdb. gdb uses sigsuspend to wait for SIGCHLD of the inferior, but if gdb itself is being debugged by a top-level gdb we get a ptrace_stop(). The top-level gdb does a PTRACE_CONT with SIGCHLD to let the inferior gdb see the signal. But ptrace_signal_deliver() assumed the debugger would cancel out the signal and therefore did a syscall restart, because the return error was ERESTARTNOHAND. Fix this by simply making ptrace_signal_deliver() a nop, and providing a way for the debugger to control system call restarting properly: 1) Report a "in syscall" software bit in regs->{tstate,psr}. It is set early on in trap entry to a system call and is fully visible to the debugger via ptrace() and regsets. 2) Test this bit right before doing a syscall restart. We have to do a final recheck right after get_signal_to_deliver() in case the debugger cleared the bit during ptrace_stop(). 3) Clear the bit in trap return so we don't accidently try to set that bit in the real register. As a result we also get a ptrace_{is,clear}_syscall() for sparc32 just like sparc64 has. M68K has this same exact bug, and is now the only other user of the ptrace_signal_deliver hook. It needs to be fixed in the same exact way as sparc. Signed-off-by: David S. Miller <davem@davemloft.net>