aboutsummaryrefslogtreecommitdiff
path: root/include/asm-sh
AgeCommit message (Collapse)Author
2008-06-02sh: fix miscompilation of ip_fast_csum with gcc >= 4.3Paul Mundt
As noted by Matthew Wilcox: Kyle McMartin just tracked down a bug on parisc to a missing "memory" clobber in the inline assembly implementation of ip_fast_csum. The FRV, SH and Xtensa ports are also missing a memory clobber, so I thought it would be polite to let you know. The bug manifests as dropped network packets (obviously they have the wrong checksum). It started appearing for parisc with GCC 4.3. The GCC manual says: If your assembler instructions access memory in an unpredictable fashion, add `memory' to the list of clobbered registers. This will cause GCC to not keep memory values cached in registers across the assembler instruction and not optimize stores or loads to that memory. I see that FRV has a 400 byte memory output which may prevent this problem from appearing, but SH and Xtensa have nothing to prevent this bug. Hope this saves you a few days of debugging. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-16sh: use the common ascii hex helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-09sh: Fix DMAC base address for SH7709SSteve Glendinning
On SH7709S, DMAC can be found at 0xa4000020 (as with most of the other sh3 cpu subtypes). Split out definition of DMAC base address from definitions of DMTE irqs. Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08sh: Stub in cpu_to_node() and friends for NUMA build.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08sh: add interrupt ack code to sh3Magnus Damm
This patch adds interrupt acknowledge code for external interrupt sources on sh3 processors. Only really required for edge triggered interrupts, but we ack regardless of sense configuration. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08sh: unify external irq pin code for sh3Magnus Damm
This patch unifies the sh3 external irq pin code. It buys us some savings with reduced code redundancy, but the main feature with this change is irq sense selection support for all sh3 processors. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08sh: add memory resources to /proc/iomemMagnus Damm
Add physical memory resources such as System RAM, Kernel code/data/bss and reserved crash dump area to /proc/iomem. Same strategy as on x86. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08sh: r7780rp: Kill off unneded ifdefs for irq setup.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08sh: remove the broken SH_MPC1211 supportAdrian Bunk
SH_MPC1211 has been marked as BROKEN for some time. Unless someone is working on reviving it now, I'd therefore suggest this patch to remove it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-08sh64: Fixup the nommu build.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-05-02sh: types: use <asm-generic/int-*.h> for the sh architectureH. Peter Anvin
This modifies <asm-sh/types.h> to use the <asm-generic/int-*.h> generic include files. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Paul Mundt <lethal@linux-sh.org>
2008-04-30asm-*/futex.h should include linux/uaccess.hJeff Dike
Lots of asm-*/futex.h call pagefault_enable and pagefault_disable, which are declared in linux/uaccess.h, without including linux/uaccess.h. They all include asm/uaccess.h, so this patch replaces asm/uaccess.h with linux/uaccess.h. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "David S. Miller" <davem@davemloft.net> 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>
2008-04-29kernel: Move arches to use common unaligned accessHarvey Harrison
Unaligned access is ok for the following arches: cris, m68k, mn10300, powerpc, s390, x86 Arches that use the memmove implementation for native endian, and the byteshifting for the opposite endianness. h8300, m32r, xtensa Packed struct for native endian, byteshifting for other endian: alpha, blackfin, ia64, parisc, sparc, sparc64, mips, sh m86knommu is generic_be for Coldfire, otherwise unaligned access is ok. frv, arm chooses endianness based on compiler settings, uses the byteshifting versions. Remove the unaligned trap handler from frv as it is now unused. v850 is le, uses the byteshifting versions for both be and le. Remove the now unused asm-generic implementation. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> 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-04-28hugetlbfs: common code update for s390Gerald Schaefer
Huge ptes have a special type on s390 and cannot be handled with the standard pte functions in certain cases, e.g. because of a different location of the invalid bit. This patch adds some new architecture- specific functions to hugetlb common code, as a prerequisite for the s390 large page support. This won't affect other architectures in functionality, but I need to add some new dummy inline functions to the headers. Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> 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-04-28hugetlbfs: add missing TLB flush to hugetlb_cow()Gerald Schaefer
A cow break on a hugetlbfs page with page_count > 1 will set a new pte with set_huge_pte_at(), w/o any tlb flush operation. The old pte will remain in the tlb and subsequent write access to the page will result in a page fault loop, for as long as it may take until the tlb is flushed from somewhere else. This patch introduces an architecture-specific huge_ptep_clear_flush() function, which is called before the the set_huge_pte_at() in hugetlb_cow(). ATTENTION: This is just a nop on all architectures for now, the s390 implementation will come with our large page patch later. Other architectures should define their own huge_ptep_clear_flush() if needed. Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> 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-04-28hugetlbfs: architecture header cleanupGerald Schaefer
This patch moves all architecture functions for hugetlb to architecture header files (include/asm-foo/hugetlb.h) and converts all macros to inline functions. It also removes (!) ARCH_HAS_HUGEPAGE_ONLY_RANGE, ARCH_HAS_HUGETLB_FREE_PGD_RANGE, ARCH_HAS_PREPARE_HUGEPAGE_RANGE, ARCH_HAS_SETCLEAR_HUGE_PTE and ARCH_HAS_HUGETLB_PREFAULT_HOOK. Getting rid of the ARCH_HAS_xxx #ifdef and macro fugliness should increase readability and maintainability, at the price of some code duplication. An asm-generic common part would have reduced the loc, but we would end up with new ARCH_HAS_xxx defines eventually. Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> 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-04-28mm: introduce pte_special pte bitNick Piggin
s390 for one, cannot implement VM_MIXEDMAP with pfn_valid, due to their memory model (which is more dynamic than most). Instead, they had proposed to implement it with an additional path through vm_normal_page(), using a bit in the pte to determine whether or not the page should be refcounted: vm_normal_page() { ... if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) { if (vma->vm_flags & VM_MIXEDMAP) { #ifdef s390 if (!mixedmap_refcount_pte(pte)) return NULL; #else if (!pfn_valid(pfn)) return NULL; #endif goto out; } ... } This is fine, however if we are allowed to use a bit in the pte to determine refcountedness, we can use that to _completely_ replace all the vma based schemes. So instead of adding more cases to the already complex vma-based scheme, we can have a clearly seperate and simple pte-based scheme (and get slightly better code generation in the process): vm_normal_page() { #ifdef s390 if (!mixedmap_refcount_pte(pte)) return NULL; return pte_page(pte); #else ... #endif } And finally, we may rather make this concept usable by any architecture rather than making it s390 only, so implement a new type of pte state for this. Unfortunately the old vma based code must stay, because some architectures may not be able to spare pte bits. This makes vm_normal_page a little bit more ugly than we would like, but the 2 cases are clearly seperate. So introduce a pte_special pte state, and use it in mm/memory.c. It is currently a noop for all architectures, so this doesn't actually result in any compiled code changes to mm/memory.o. BTW: I haven't put vm_normal_page() into arch code as-per an earlier suggestion. The reason is that, regardless of where vm_normal_page is actually implemented, the *abstraction* is still exactly the same. Also, while it depends on whether the architecture has pte_special or not, that is the only two possible cases, and it really isn't an arch specific function -- the role of the arch code should be to provide primitive functions and accessors with which to build the core code; pte_special does that. We do not want architectures to know or care about vm_normal_page itself, and we definitely don't want them being able to invent something new there out of sight of mm/ code. If we made vm_normal_page an arch function, then we have to make vm_insert_mixed (next patch) an arch function too. So I don't think moving it to arch code fundamentally improves any abstractions, while it does practically make the code more difficult to follow, for both mm and arch developers, and easier to misuse. [akpm@linux-foundation.org: build fix] Signed-off-by: Nick Piggin <npiggin@suse.de> Acked-by: Carsten Otte <cotte@de.ibm.com> Cc: Jared Hulbert <jaredeh@gmail.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-26generic: implement __fls on all 64-bit archsAlexander van Heukelum
Implement __fls on all 64-bit archs: alpha has an implementation of fls64. Added __fls(x) = fls64(x) - 1. ia64 has fls, but not __fls. Added __fls based on code of fls. mips and powerpc have __ilog2, which is the same as __fls. Added __fls = __ilog2. parisc, s390, sh and sparc64: Include generic __fls. x86_64 already has __fls. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-22i2c: Renesas SH7760 I2C master driverManuel Lauss
Driver for I2C interfaces in master mode on SH7760. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-04-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (42 commits) PCI: Change PCI subsystem MAINTAINER PCI: pci-iommu-iotlb-flushing-speedup PCI: pci_setup_bridge() mustn't be __devinit PCI: pci_bus_size_cardbus() mustn't be __devinit PCI: pci_scan_device() mustn't be __devinit PCI: pci_alloc_child_bus() mustn't be __devinit PCI: replace remaining __FUNCTION__ occurrences PCI: Hotplug: fakephp: Return success, not ENODEV, when bus rescan is triggered PCI: Hotplug: Fix leaks in IBM Hot Plug Controller Driver - ibmphp_init_devno() PCI: clean up resource alignment management PCI: aerdrv_acpi.c: remove unneeded NULL check PCI: Update VIA CX700 quirk PCI: Expose PCI VPD through sysfs PCI: iommu: iotlb flushing PCI: simplify quirk debug output PCI: iova RB tree setup tweak PCI: parisc: use generic pci_enable_resources() PCI: ppc: use generic pci_enable_resources() PCI: powerpc: use generic pci_enable_resources() PCI: ia64: use generic pci_enable_resources() ...
2008-04-21Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel: (62 commits) sched: build fix sched: better rt-group documentation sched: features fix sched: /debug/sched_features sched: add SCHED_FEAT_DEADLINE sched: debug: show a weight tree sched: fair: weight calculations sched: fair-group: de-couple load-balancing from the rb-trees sched: fair-group scheduling vs latency sched: rt-group: optimize dequeue_rt_stack sched: debug: add some debug code to handle the full hierarchy sched: fair-group: SMP-nice for group scheduling sched, cpuset: customize sched domains, core sched, cpuset: customize sched domains, docs sched: prepatory code movement sched: rt: multi level group constraints sched: task_group hierarchy sched: fix the task_group hierarchy for UID grouping sched: allow the group scheduler to have multiple levels sched: mix tasks and groups ...
2008-04-20PCI: remove initial bios sort of PCI devices on x86Greg Kroah-Hartman
We currently keep 2 lists of PCI devices in the system, one in the driver core, and one all on its own. This second list is sorted at boot time, in "BIOS" order, to try to remain compatible with older kernels (2.2 and earlier days). There was also a "nosort" option to turn this sorting off, to remain compatible with even older kernel versions, but that just ends up being what we have been doing from 2.5 days... Unfortunately, the second list of devices is not really ever used to determine the probing order of PCI devices or drivers[1]. That is done using the driver core list instead. This change happened back in the early 2.5 days. Relying on BIOS ording for the binding of drivers to specific device names is problematic for many reasons, and userspace tools like udev exist to properly name devices in a persistant manner if that is needed, no reliance on the BIOS is needed. Matt Domsch and others at Dell noticed this back in 2006, and added a boot option to sort the PCI device lists (both of them) in a breadth-first manner to help remain compatible with the 2.4 order, if needed for any reason. This option is not going away, as some systems rely on them. This patch removes the sorting of the internal PCI device list in "BIOS" mode, as it's not needed at all anymore, and hasn't for many years. I've also removed the PCI flags for this from some other arches that for some reason defined them, but never used them. This should not change the ordering of any drivers or device probing. [1] The old-style pci_get_device and pci_find_device() still used this sorting order, but there are very few drivers that use these functions, as they are deprecated for use in this manner. If for some reason, a driver rely on the order and uses these functions, the breadth-first boot option will resolve any problem. Cc: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-19sched, cpuset: customize sched domains, coreHidetoshi Seto
[rebased for sched-devel/latest] - Add a new cpuset file, having levels: sched_relax_domain_level - Modify partition_sched_domains() and build_sched_domains() to take attributes parameter passed from cpuset. - Fill newidle_idx for node domains which currently unused but might be required if sched_relax_domain_level become higher. - We can change the default level by boot option 'relax_domain_level='. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-18sh: Add support for SH7723 CPU subtype.Paul Mundt
This adds basic support for the SH7723 MobileR2 CPU. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18sh: Add MigoR header fileMagnus Damm
This patch adds a MigoR specific header file. We may want to use a cpu specific header file instead, but this will do for now. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18sh: Fix up __access_ok() check for nommu.Paul Mundt
Presently this only checks to see if an address is an RAM, but this doesn't work with XIP, so just always return 1. Follows m68knommu. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18sh: Add support for Solution Engine SH7721 boardYoshihiro Shimoda
Add support for Solution Engine SH7721 board(MS7721RP01). Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18sh: Hook up remaining IRQ sources for R7780MP FPGA.Masayuki Hosokawa
Signed-off-by: Masayuki Hosokawa <hosokawa@ace-jp.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18sh: Initial support for the MX-G CPU.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18sh: Create an sh debugfs root.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18sh: SuperH KEYSC keypad data for Solution Engine 7722Magnus Damm
Add KEYSC platform data for the Solution Engine 7722 board. Signed-off-by: Magnus Damm <damm@igel.co.jp> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18sh: SuperH KEYSC platform driverMagnus Damm
Add a platform driver for the SuperH KEYSC block. The driver expects to get mode, timing information and keypad layout from the board code as platform data. The board code is resonsible for pin configuration. Both sh7343 and sh7722 should be supported, but only the sh7722 processor has been tested so far. SH_KEYSC_MODE_3 is yet to be tested. Signed-off-by: Magnus Damm <damm@igel.co.jp> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-04-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (58 commits) ide: remove ide_init_default_irq() macro ide: move default IDE ports setup to ide_generic host driver ide: remove obsoleted "idex=noprobe" kernel parameter (take 2) ide: remove needless hwif->irq check from ide_hwif_configure() ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers ide: limit legacy VLB host drivers to alpha, x86 and mips cmd640: init hwif->{io_ports,irq} explicitly cmd640: cleanup setup_device_ptrs() ide: add ide-4drives host driver (take 3) ide: remove ppc ifdef from init_ide_data() ide: remove ide_default_io_ctl() macro ide: remove CONFIG_IDE_ARCH_OBSOLETE_INIT ide: add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS (take 2) ppc/pmac: remove no longer needed IDE quirk ppc: don't include <linux/ide.h> ppc: remove ppc_ide_md ppc/pplus: remove ppc_ide_md.ide_init_hwif hook ppc/sandpoint: remove ppc_ide_md hooks ppc/lopec: remove ppc_ide_md hooks ppc/mpc8xx: remove ppc_ide_md hooks ...
2008-04-18ide: remove ide_default_io_ctl() macroBartlomiej Zolnierkiewicz
It is always == '((base) + 0x206)' if CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y and it is not needed otherwise (arm, blackfin, parisc, ppc64, sh, sparc[64]). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-17Generic semaphore implementationMatthew Wilcox
Semaphores are no longer performance-critical, so a generic C implementation is better for maintainability, debuggability and extensibility. Thanks to Peter Zijlstra for fixing the lockdep warning. Thanks to Harvey Harrison for pointing out that the unlikely() was unnecessary. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: Ingo Molnar <mingo@elte.hu>
2008-04-02kvm: provide kvm.h for all architecture: fixes headers_installChristian Borntraeger
Currently include/linux/kvm.h is not considered by make headers_install, because Kbuild cannot handle " unifdef-$(CONFIG_FOO) += foo.h. This problem was introduced by commit fb56dbb31c4738a3918db81fd24da732ce3b4ae6 Author: Avi Kivity <avi@qumranet.com> Date: Sun Dec 2 10:50:06 2007 +0200 KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM Currently, make headers_check barfs due to <asm/kvm.h>, which <linux/kvm.h> includes, not existing. Rather than add a zillion <asm/kvm.h>s, export kvm. only if the arch actually supports it. Signed-off-by: Avi Kivity <avi@qumranet.com> which makes this an 2.6.25 regression. One way of solving the issue is to enhance Kbuild, but Avi and David conviced me, that changing headers_install is not the way to go. This patch changes the definition for linux/kvm.h to unifdef-y. If  unifdef-y is used for linux/kvm.h "make headers_check" will fail on all architectures without asm/kvm.h. Therefore, this patch also provides asm/kvm.h on all architectures. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Avi Kivity <avi@qumranet.com> Cc: Sam Ravnborg <sam@ravnborg.org Cc: David Woodhouse <dwmw2@infradead.org> 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-03-31remove include/asm-sh/floppy.hAdrian Bunk
This patch removes the unused include/asm-sh/floppy.h (ARCH_MAY_HAVE_PC_FDC was not enabled). Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-26sh: Fix TIF_USEDFPU clearing under FPU emulation.Paul Mundt
The unlazy_fpu() path calls in to save_fpu() if the task has TIF_USEDFPU set. save_fpu() being the crap API that it is has the side effect of clearing the flag itself, which presently doesn't happen if we're using FPU emulation. Fix this up for now, pending an overhaul in 2.6.26. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-26sh: Fix occasional FPU register corruption under preempt.Paul Mundt
Presently with preempt enabled there's the possibility to be preempted after the TIF_USEDFPU test and the register save, leading to bogus state post-__switch_to(). Use an explicit preempt_disable()/enable() pair around unlazy_fpu()/clear_fpu() to avoid this. Follows the x86 change. Reported-by: Takuo Koguchi <takuo.koguchi.sw@hitachi.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-14sh: Fix more user header breakage from sh64 integration.Paul Mundt
posix_types.h and byteorder.h were sticking purely with the Kconfig symbols, which doesn't work when we scrub the headers for user use. Fixes a very unhelpful build error in current klibc. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-03-06sh: Fix up the sh64 build.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26serial: Move asm-sh/sci.h to linux/serial_sci.h.Paul Mundt
This header is needed on other architectures as well (namely h8300), which currently fails to build without this in place. Rather than duplicating the port definition completely there, just move this to a common location instead. This should get h8300 working again for 2.6.25, in addition to the changes already pushed by Sato-san in -rc2. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-26sh: Fix up HAS_SR_RB typo in entry-macros.Hideo Saito
Signed-off-by: Hideo Saito <saito@densan.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-25sh: Rename SH-3 CCR3 reg to avoid synclink_cs clash.Paul Mundt
drivers/char/pcmcia/synclink_cs.c:284:1: warning: "CCR3" redefined In file included from include/asm/cache.h:13, from include/asm/processor_32.h:15, from include/asm/processor.h:60, from include/linux/prefetch.h:14, from include/linux/list.h:8, from include/linux/module.h:9, from drivers/char/pcmcia/synclink_cs.c:38: include/asm/cpu/cache.h:38:1: warning: this is the location of the previous definition Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14sh: fix ioreadN_rep and iowriteN_repMagnus Damm
This patch is a fix to make sure readsN/writesN are used over insN/outsN for ioreadN_rep/iowriteN_rep. The current state of the sh io code is that mmio operations like readN/writeN and ioreadN/iowriteN are unaffected by the value of generic_io_base. This is different fom port based io like inN/outN which gets adjusted using the value in generic_io_base. Without this patch ioreadN_rep/iowriteN_rep get their addresses adjusted. The address for mmio access is adjusted using generic_io_base. This is wrong. The ata core code currently crashes if generic_io_base is set. This patch changes ioreadN_rep/iowriteN_rep to follow the same rules as the rest of the mmio operations, ie don't adjust using generic_io_base. Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14sh: Kill off more dead symbols.Paul Mundt
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14sh: asm/irq.h needs asm/cpu/irq.h.Paul Mundt
The SH-5 build currently fails when trying to build the i8042 code due to the missing IRQ definitions. These are provided in asm/cpu/irq.h, so just include that there to get it building again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14sh: Get SH-5 caches working again post-unification.Paul Mundt
A number of cleanups to get the SH-5 cache management code in line with the rest of the SH backend. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14sh: asm/tlb.h needs linux/pagemap.h for CONFIG_SWAP=n.Paul Mundt
linux/swap.h really wants to include linux/pagemap.h in order to satisfy the page_cache_release()/release_pages() definition requirements when CONFIG_SWAP=n. Unfortunately the code in question contains: /* only sparc can not include linux/pagemap.h in this file * so leave page_cache_release and release_pages undeclared... */ #define free_page_and_swap_cache(page) \ page_cache_release(page) #define free_pages_and_swap_cache(pages, nr) \ release_pages((pages), (nr), 0); so it looks like we're stuck with doing it in asm/tlb.h instead, as others already do (ARM, CRIS, etc.). Grumble. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-02-14sh: Tidy include/asm-sh/hp6xx.hKristoffer Ericson
This patch removes defunct. led support functions from hp6xx.h since they are now added in a proper driver (see commit below). Also adds tabs instead of spaces before comments. *commit d39a7a63eb3971b1b3cc5c181ed526bf437b1c72 Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>