aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include
AgeCommit message (Collapse)AuthorFilesLines
2009-01-29sh: Relax inline assembly constraintsMatt Fleming2-55/+55
When dereferencing the memory address contained in a register and modifying the value at that memory address, the register should not be listed in the inline asm outputs. The value at the memory address is an output (which is taken care of with the "memory" clobber), not the register. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-01-29Merge branch 'sh/stable-updates'Paul Mundt3-50/+15
2009-01-29sh: Fix up T-bit error handling in SH-4A mutex fastpath.Takashi Yoshii1-12/+9
This corrects a deadlock encountered on ap325 in the cases where the mutex is contended and the slow-path needs to be fallen back upon. Signed-off-by: Takashi YOSHII <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-01-29sh: Fix up spurious syscall restarting.Paul Mundt2-38/+6
The T-bit manipulation for syscall error checking had the side effect of spuriously returning ERESTART* errno values over EINTR. So, we simplify the error checking a bit and leave the T-bit alone. Reported-by: Kaz Kojima <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-01-27sh: use gpiolibMagnus Damm1-26/+35
This patch updates the SuperH gpio code to make use of gpiolib. The gpiolib callbacks get() and set() are lockless, but we use our own spinlock for the other operations to make sure hardware register bitfield accesses stay atomic. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-01-27sh: lockless gpio_set_value()Magnus Damm1-1/+1
This patch optimizes the gpio data register handling for gpio_set_value(). Instead of using the good old spinlock-plus-read-modify-write strategy we now use a shadow register and atomic operations. This improves the bitbanging mmc performance on Migo-R from 26 Kbytes/s to 40 Kbytes/s. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-01-27sh: make gpio_get/set_value() O(1)Magnus Damm1-1/+6
This patch modifies the table based SuperH gpio implementation to make use of direct table lookups. With this change the functions gpio_get_value() and gpio_set_value() are O(1). Tested on Migo-R using bitbanging mmc. Performance is improved from 11 KBytes/s to 26 Kbytes/s. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-01-21asm-sh/posix_types_{32,64}.h: drop __GLIBC__/__USE_ALL usageMike Frysinger2-12/+4
Bring sh in line with all the other ports. Not sure how sh missed this change as all the other arches were being updated ... Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-01-14Merge branch 'syscalls' of git://git390.osdl.marist.edu/pub/scm/linux-2.6Linus Torvalds1-3/+3
* 'syscalls' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (44 commits) [CVE-2009-0029] s390 specific system call wrappers [CVE-2009-0029] System call wrappers part 33 [CVE-2009-0029] System call wrappers part 32 [CVE-2009-0029] System call wrappers part 31 [CVE-2009-0029] System call wrappers part 30 [CVE-2009-0029] System call wrappers part 29 [CVE-2009-0029] System call wrappers part 28 [CVE-2009-0029] System call wrappers part 27 [CVE-2009-0029] System call wrappers part 26 [CVE-2009-0029] System call wrappers part 25 [CVE-2009-0029] System call wrappers part 24 [CVE-2009-0029] System call wrappers part 23 [CVE-2009-0029] System call wrappers part 22 [CVE-2009-0029] System call wrappers part 21 [CVE-2009-0029] System call wrappers part 20 [CVE-2009-0029] System call wrappers part 19 [CVE-2009-0029] System call wrappers part 18 [CVE-2009-0029] System call wrappers part 17 [CVE-2009-0029] System call wrappers part 16 [CVE-2009-0029] System call wrappers part 15 ...
2009-01-14byteorder: make swab.h include asm/swab.h like a regular headerHarvey Harrison2-3/+0
Add swab.h to kbuild.asm and remove the individual entries from each arch, mark as unifdef as some arches have some kernel-only bits inside. Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-01-14[CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2Heiko Carstens1-3/+3
Remove __attribute__((weak)) from common code sys_pipe implemantation. IA64, ALPHA, SUPERH (32bit) and SPARC (32bit) have own implemantations with the same name. Just rename them. For sys_pipe2 there is no architecture specific implementation. Cc: Richard Henderson <[email protected]> Cc: David S. Miller <[email protected]> Cc: Paul Mundt <[email protected]> Cc: Tony Luck <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
2009-01-08NOMMU: Make VMAs per MM as for MMU-mode linuxDavid Howells1-1/+0
Make VMAs per mm_struct as for MMU-mode linux. This solves two problems: (1) In SYSV SHM where nattch for a segment does not reflect the number of shmat's (and forks) done. (2) In mmap() where the VMA's vm_mm is set to point to the parent mm by an exec'ing process when VM_EXECUTABLE is specified, regardless of the fact that a VMA might be shared and already have its vm_mm assigned to another process or a dead process. A new struct (vm_region) is introduced to track a mapped region and to remember the circumstances under which it may be shared and the vm_list_struct structure is discarded as it's no longer required. This patch makes the following additional changes: (1) Regions are now allocated with alloc_pages() rather than kmalloc() and with no recourse to __GFP_COMP, so the pages are not composite. Instead, each page has a reference on it held by the region. Anything else that is interested in such a page will have to get a reference on it to retain it. When the pages are released due to unmapping, each page is passed to put_page() and will be freed when the page usage count reaches zero. (2) Excess pages are trimmed after an allocation as the allocation must be made as a power-of-2 quantity of pages. (3) VMAs are added to the parent MM's R/B tree and mmap lists. As an MM may end up with overlapping VMAs within the tree, the VMA struct address is appended to the sort key. (4) Non-anonymous VMAs are now added to the backing inode's prio list. (5) Holes may be punched in anonymous VMAs with munmap(), releasing parts of the backing region. The VMA and region structs will be split if necessary. (6) sys_shmdt() only releases one attachment to a SYSV IPC shared memory segment instead of all the attachments at that addresss. Multiple shmat()'s return the same address under NOMMU-mode instead of different virtual addresses as under MMU-mode. (7) Core dumping for ELF-FDPIC requires fewer exceptions for NOMMU-mode. (8) /proc/maps is now the global list of mapped regions, and may list bits that aren't actually mapped anywhere. (9) /proc/meminfo gains a line (tagged "MmapCopy") that indicates the amount of RAM currently allocated by mmap to hold mappable regions that can't be mapped directly. These are copies of the backing device or file if not anonymous. These changes make NOMMU mode more similar to MMU mode. The downside is that NOMMU mode requires some extra memory to track things over NOMMU without this patch (VMAs are no longer shared, and there are now region structs). Signed-off-by: David Howells <[email protected]> Tested-by: Mike Frysinger <[email protected]> Acked-by: Paul Mundt <[email protected]>
2009-01-06sh: introduce asm/swab.hHarvey Harrison3-59/+64
Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-01-06atomic_t: unify all arch definitionsMatthew Wilcox1-4/+3
The atomic_t type cannot currently be used in some header files because it would create an include loop with asm/atomic.h. Move the type definition to linux/types.h to break the loop. Signed-off-by: Matthew Wilcox <[email protected]> Cc: Huang Ying <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-01-03Merge branch 'master' of ↵Mike Travis33-224/+796
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask Conflicts: arch/x86/kernel/io_apic.c kernel/rcuclassic.c kernel/sched.c kernel/time/tick-sched.c Signed-off-by: Mike Travis <[email protected]> [ [email protected]: backmerged typo fix for io_apic.c ] Signed-off-by: Ingo Molnar <[email protected]>
2008-12-30Merge branch 'master' of ↵Rusty Russell32-224/+795
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2008-12-28Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6Linus Torvalds1-1/+1
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (85 commits) [S390] provide documentation for hvc_iucv kernel parameter. [S390] convert ctcm printks to dev_xxx and pr_xxx macros. [S390] convert zfcp printks to pr_xxx macros. [S390] convert vmlogrdr printks to pr_xxx macros. [S390] convert zfcp dumper printks to pr_xxx macros. [S390] convert cpu related printks to pr_xxx macros. [S390] convert qeth printks to dev_xxx and pr_xxx macros. [S390] convert sclp printks to pr_xxx macros. [S390] convert iucv printks to dev_xxx and pr_xxx macros. [S390] convert ap_bus printks to pr_xxx macros. [S390] convert dcssblk and extmem printks messages to pr_xxx macros. [S390] convert monwriter printks to pr_xxx macros. [S390] convert s390 debug feature printks to pr_xxx macros. [S390] convert monreader printks to pr_xxx macros. [S390] convert appldata printks to pr_xxx macros. [S390] convert setup printks to pr_xxx macros. [S390] convert hypfs printks to pr_xxx macros. [S390] convert time printks to pr_xxx macros. [S390] convert cpacf printks to pr_xxx macros. [S390] convert cio printks to pr_xxx macros. ...
2008-12-26cpumask: sh: Introduce cpumask_of_{node,pcibus} to replace ↵Rusty Russell1-0/+1
{node,pcibus}_to_cpumask Impact: New APIs The old node_to_cpumask/node_to_pcibus returned a cpumask_t: these return a pointer to a struct cpumask. Part of removing cpumasks from the stack. Signed-off-by: Rusty Russell <[email protected]> Cc: Paul Mundt <[email protected]>
2008-12-25[S390] arch_setup_additional_pages argumentsMartin Schwidefsky1-1/+1
arch_setup_additional_pages currently gets two arguments, the binary format descripton and an indication if the process uses an executable stack or not. The second argument is not used by anybody, it could be removed without replacement. What actually does make sense is to pass an indication if the process uses the elf interpreter or not. The glibc code will not use anything from the vdso if the process does not use the dynamic linker, so for statically linked binaries the architecture backend can choose not to map the vdso. Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2008-12-22sh: Conditionalize the code dumper on CONFIG_DUMP_CODE.Paul Mundt1-0/+8
We don't really want this enabled by default, but it is still quite useful for debugging. So, make it conditional and leave it off by default. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: mrshpc_setup_windows() needs to be inline.Paul Mundt1-1/+1
While no one should be including this file multiple times, flag it inline anyways just in case. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Kill off cf-enabler with extreme prejudice.Paul Mundt1-0/+52
Now that the rest of the boards that were using cf-enabler "generically" have switched to setting up their mappings on their own, only the mach-se boards were left using it. All of the cf-enabler using mach-se boards use a special initialization of the MRSHPC windows rather than going through the special PTE as other SH-4 platforms do. This consolidates the MRSHPC setup logic, hooks it up on the boards that care, and gets rid of any and all remaining references to cf-enabler. This has been long overdue, as cf-enabler has been the bane of arch/sh/kernel for the last 7 years. Good riddance. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: mach-edosk7705: Fix up edosk7705 so it all builds again.Paul Mundt2-29/+4
Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Kill off dead mv_init_pci() from machvec.Paul Mundt1-1/+0
Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Kill off mv_heartbeat() from the machvec.Paul Mundt1-2/+0
Nothing is using this any more, so get rid of it before anyone gets the bright idea to start using it again. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Kill off sh_bios_in_gdb_mode().Paul Mundt1-1/+0
With the reworked kgdb support, we always detach and reinitialize the stub. This was mostly a feature for handoffs between sh-ipl+g and the kgdb stub, but virtually no sh-ipl+g versions ever had this working right in the first place. Given that the sh-ipl+g stubs in general use today don't even support the GDB stub, and we have already killed off the special casing in the sh-sci serial driver, kill off this now unused symbol too. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Add SH-5 optimized memcpy()/memset()/strcpy()/strlen().Paul Mundt1-9/+12
Adopted from the uClibc optimized string versions. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Generic kgdb stub support.Paul Mundt2-47/+21
This migrates from the old bitrotted kgdb stub implementation and moves to the generic stub. In the process support for SH-2/SH-2A is also added, which the old stub never provided. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Enable HAVE_ARCH_TRACEHOOK for all SH, now that SH-5 supports it too.Paul Mundt2-3/+3
Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Provide linux/regset.h interface for SH-5.Paul Mundt2-3/+1
Plugs in general and FPU regsets. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Provide asm/syscall.h for SH-5.Paul Mundt1-1/+75
This provides the asm/syscall.h implementation for sh64 parts. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Fix up syscall_get_nr() comment in syscall_32.h.Paul Mundt1-1/+1
Residual copy-and-paste damage, fix it up. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Fix up the cpu_asid() return value on nommu.Paul Mundt1-2/+2
This ought to be unsigned long, rather than defaulting to int. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Fix an off-by-1 check in __mutex_fastpath_unlock().Paul Mundt1-1/+1
Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Fix up the SH-4A mutex fastpath semantics.Paul Mundt1-16/+21
This fixes up the __mutex_fastpath_xxx() routines to match the semantics noted in the comment. Previously these were looping rather than doing a single-pass, which is counter-intuitive, as the slow path takes care of the looping for us in the event of contention. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: move the hp6xx pm codeMagnus Damm1-17/+0
Move the not-so-generic pm code from arch/sh/kernel/pm.c to the platform directory together with the rest of the hp6xx pm code. This is done to let non-hp6xx platforms enable CONFIG_PM. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: remove ioport cruft and smc91x from se7343Magnus Damm1-3/+0
Remove out-of-date se7343 ioport code including some old support for unknown-ne2000-pcmcia-card, cf-over-pcmcia and a mysterical smc91x that once must have been on a special daughterboard. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: add st16c2550 devices to se7343Magnus Damm1-1/+5
Add 8250 platform data to setup the ST16C2550C chip on se7343. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Add support for SH7201 CPU subtype.Peter Griffin2-2/+2
This patch adds support for the SH-2A FPU based SH7201 processor subtype. Signed-off-by: Peter Griffin <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Provide a dyn_arch_ftrace struct definition.Paul Mundt1-2/+7
Needed for dynamic ftrace API changes. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Consolidate cpu_relax()/cpu_sleep() definitions across _32/_64.Paul Mundt3-5/+3
Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Add a simple code dumper for SUPERH32 show_regs().Paul Mundt1-0/+1
This implements a simple show_code() that is in turn plugged in to show_regs() to provide minimal code dumping at the end of the trace. Built on top of a simple instruction disassembler derived from the binutils opcode table. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Provide optimized unaligned loads on SH-4A.Paul Mundt2-1/+264
This adds support for unaligned loads on SH-4A, using the SH-4A's neutered movua.l instruction. As movua.l is r0-inspired, stores are still handled through the packed struct. Based on asm-generic/unaligned.h by Harvey Harrison. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: P4 ioremap pass-throughMagnus Damm2-0/+15
This patch adds a pass-through case when ioremapping P4 addresses. Addresses passed to ioremap() should be physical addresses, so the best option is usually to convert the virtual address to a physical address before calling ioremap. This will give you a virtual address in P2 which matches the physical address and this works well for most internal hardware blocks on the SuperH architecture. However, some hardware blocks must be accessed through P4. Converting the P4 address to a physical and then back to a P2 does not work. One example of this is the sh7722 TMU block, it must be accessed through P4. Without this patch P4 addresses will be mapped using PTEs which requires the page allocator to be up and running. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Add SH-4A optimized fastpath mutex implementation.Michael Trimarchi2-1/+111
Add fast mutex path implementation for the SH4A architecture Signed-off-by: Michael Trimarchi <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Add platform-specific constants for SH7709Steve Glendinning2-0/+32
I'm using these constants in support of an in-house development board, and thought they may be useful to other users of SH7709. Signed-off-by: Steve Glendinning <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Provide optimized non-atomic bitops for SH-2A.Paul Mundt2-0/+145
This ties in the new SH-2A 32-bit non-atomic bitops. Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: Convert to generic bitops for IRQ-toggling implementation.Paul Mundt4-95/+7
Signed-off-by: Paul Mundt <[email protected]>
2008-12-22sh: dynamic ftrace support.Matt Fleming1-0/+21
First cut at dynamic ftrace support. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2008-12-13Merge ../linux-2.6-x86Rusty Russell1-1/+0
Conflicts: arch/x86/kernel/io_apic.c kernel/sched.c kernel/sched_stats.h