aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris
Commit message (Collapse)AuthorAgeFilesLines
* cris: types: use <asm-generic/int-*.h> for the cris architectureH. Peter Anvin2008-05-021-31/+2
| | | | | | | | | This modifies <asm-cris/types.h> to use the <asm-generic/int-*.h> generic include files. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com>
* kernel: Move arches to use common unaligned accessHarvey Harrison2008-04-291-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cris: add constfy to pgd_offset()KOSAKI Motohiro2008-04-281-1/+1
| | | | | | | | | | | | | | | | | add constfy to pgd_offset() for avoid following warnings. CC mm/pagewalk.o mm/pagewalk.c: In function 'walk_page_range': mm/pagewalk.c:111: warning: passing argument 1 of 'pgd_offset' discards qualifiers from p\ ointer target type Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Matt Mackall <mpm@selenic.com> Cc: "Vegard Nossum" <vegard.nossum@gmail.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mm: introduce pte_special pte bitNick Piggin2008-04-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ide: add struct ide_io_ports (take 3)Bartlomiej Zolnierkiewicz2008-04-271-7/+4
| | | | | | | | | | | | | | | | | | | | | * Add struct ide_io_ports and use it instead of `unsigned long io_ports[]` in ide_hwif_t. * Rename io_ports[] in hw_regs_t to io_ports_array[]. * Use un-named union for 'unsigned long io_ports_array[]' and 'struct ide_io_ports io_ports' in hw_regs_t. * Remove IDE_*_OFFSET defines. v2: * scc_pata.c build fix from Stephen Rothwell. v3: * Fix ctl_adrr typo in Sparc-specific part of ns87415.c. (Noticed by Andrew Morton) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Generic semaphore implementationMatthew Wilcox2008-04-172-211/+1
| | | | | | | | | | | 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>
* kvm: provide kvm.h for all architecture: fixes headers_installChristian Borntraeger2008-04-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cris: correct syscall numbers in unistd.h for timerfd_settime and ↵Jesper Nilsson2008-03-041-3/+3
| | | | | | | | | | | | | timerfd_gettime Last commit for unistd was not correct, it only had a partial update of syscall numbers for __NR_timerfd_settime and __NR_timerfd_gettime. Also, NR_syscalls was not incremented for the new syscalls. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cris: correct usage of __user for copy to and from user space in ↵Jesper Nilsson2008-03-041-44/+9
| | | | | | | | | | | | | | | | | lib/usercopy and uaccess.h Function __copy_user_zeroing in arch/lib/usercopy.c had the wrong parameter set as __user, and in include/asm-cris/uaccess.h, it was not set at all for some of the calling functions. This will cut the number of warnings quite dramatically when using sparse. While we're here, remove useless CVS log and correct confusing typo. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'cris' of git://www.jni.nu/crisLinus Torvalds2008-02-08100-742/+18506
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'cris' of git://www.jni.nu/cris: (158 commits) CRIS v32: Remove hwregs/timer_defs.h, it is now architecture specific. CRIS v32: Change drivers/i2c.c locking. CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup. CRIS: Add new timerfd syscall entries. MAINTAINERS: Add my information for the CRIS port. CRIS v32: Correct spelling of bandwidth in function name. CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS. CRIS v10: Cleanup of drivers/gpio.c CRIS v10: drivers/net/cris/eth_v10.c rename LED defines to CRIS_LED to avoid name clash. CRIS: Make io_pwm_set_period members unsigned in etraxgpio.h CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file. CRIS: Drop regs parameter from call to profile_tick in kernel/time.c CRIS v32: Fix minor formatting issue in mach-a3/io.c CRIS v32: Initialize GIO even if we're rambooting in kernel/head.S CRIS v32: Remove kernel/arbiter.c, it now exists in machine dependent directory. CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.h CRIS v32: arch-v32/hwregs/intr_vect_defs.h moved to machine dependent directory. CRIS v32: Correct offset for TASK_pid in asm-cris/arch-v32/offset.h CRIS v32: Move register map header to machine dependent directory. CRIS v32: Let compiler know that memory is clobbered after a break op. ...
| * CRIS v32: Remove hwregs/timer_defs.h, it is now architecture specific.Jesper Nilsson2008-02-081-266/+0
| | | | | | | | - File is moved to arch-v32/mach-fs/hwregs/timer_defs.h
| * CRIS: Add new timerfd syscall entries.Jesper Nilsson2008-02-081-1/+3
| |
| * CRIS v32: Correct spelling of bandwidth in function name.Jesper Nilsson2008-02-081-1/+1
| |
| * CRIS: Make io_pwm_set_period members unsigned in etraxgpio.hJesper Nilsson2008-02-081-2/+2
| |
| * CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.hJesper Nilsson2008-02-081-4/+6
| | | | | | | | | | | | - Add ifdef around macros to read and write hardware registers - Add parens around REG_READ expression to avoid possible precedence errors. - Remove useless CVS id tag.
| * CRIS v32: arch-v32/hwregs/intr_vect_defs.h moved to machine dependent directory.Jesper Nilsson2008-02-081-225/+0
| |
| * CRIS v32: Correct offset for TASK_pid in asm-cris/arch-v32/offset.hJesper Nilsson2008-02-081-1/+1
| |
| * CRIS v32: Move register map header to machine dependent directory.Jesper Nilsson2008-02-081-103/+0
| | | | | | | | | | This file is machine dependent, and needs to be in asm-cris/arch-v32/mach-fs/hwregs/reg_map.h instead.
| * CRIS v32: Let compiler know that memory is clobbered after a break op.Jesper Nilsson2008-02-081-7/+14
| |
| * CRIS v32: Remove SMP stub from asm-cris/arch-v32/system.hJesper Nilsson2008-02-081-9/+0
| | | | | | | | CRIS v32 is not SMP.
| * CRIS v32: Completely rework spinlocks for ETRAX FS and ARTPEC-3Jesper Nilsson2008-02-081-105/+67
| |
| * CRIS v32: Change name for simulator config in asm-cris/arch-v32/processor.hJesper Nilsson2008-02-081-1/+1
| |
| * CRIS v32: Add prototype for crisv32_pinmux_dealloc_fixed in ↵Jesper Nilsson2008-02-081-0/+1
| | | | | | | | | | | | asm-cris/arch-v32/pinmux.h Deallocation was not possible before, but is now.
| * CRIS v32: Change name for simulator config in asm-cris/arch-v32/page.hJesper Nilsson2008-02-081-2/+2
| | | | | | | | Also, fix a typo.
| * CRIS v32: Remove juliette.h, it is not supported for CRIS v32.Jesper Nilsson2008-02-081-326/+0
| |
| * CRIS v32: Add support for ETRAX FS and ARTPEC-3 for arch-v32/hwregs/eth_defs.hJesper Nilsson2008-02-081-104/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - A couple of fields have changed name: reg_eth_rw_ga_lo.table -> tbl reg_eth_rw_ga_hi.table -> tbl reg_eth_rw_gen_ctrl.flow_ctrl_dis -> flow_ctrl - Add some new register fields. reg_eth_rw_gen_ctrl.gtxclk_out reg_eth_rw_gen_ctrl.phyrst_n reg_eth_rw_tr_ctrl.carrier_ext - max_size in reg_eth_rw_rec_ctrl had the wrong size. - Registers reg_eth_rw_mgm_ctrl and reg_eth_r_stat was reworked completely.
| * CRIS v32: Rename variable used in macro for arch-v32/hwregs/dma.hJesper Nilsson2008-02-081-7/+6
| | | | | | | | | | | | The old name "r" would quite often produce warnings when other variables with the same name was shadowed. Rename it __x to make it more unlikely to happen.
| * CRIS v32: Remove useless CVS id tag from arch-v32/hwregs/MakefileJesper Nilsson2008-02-081-1/+0
| |
| * CRIS v32: Add defines for udelay and ndelay in arch-v32/delay.hJesper Nilsson2008-02-081-0/+10
| | | | | | | | Both of these are implemented using cris_delay10ns().
| * CRIS v32: Adjust arch-v32/atomic.h for new spinlock/rwlock infrastructureJesper Nilsson2008-02-081-5/+5
| |
| * CRIS v32: Add missing header to include/asm-cris/arch-v32/KbuildJesper Nilsson2008-02-081-0/+1
| |
| * CRIS: Break long comment line in include/asm-cris/arch-v10/page.hJesper Nilsson2008-02-081-2/+2
| |
| * CRIS: Rename LED macros to CRIS_LED to avoid name clash in io.hJesper Nilsson2008-02-082-72/+77
| | | | | | | | This is done to avoid collision with linux/leds.h
| * CRIS: Add missing headers to include/asm-cris Kbuild files.Jesper Nilsson2008-02-082-1/+7
| |
| * CRIS: Add support for ETRAX FS and ARTPEC-3 to etraxgpio.hJesper Nilsson2008-02-081-18/+94
| | | | | | | | The CRIS v32 architectures have more gpio ports and built in PWM.
| * CRIS: Fix bugs in return value of atomic_inc_return and atomic_dec_return.Jesper Nilsson2008-02-081-2/+2
| | | | | | | | Increment and decrement before assigning to return value.
| * CRIS: Allow arch dependent delay to override common version.Jesper Nilsson2008-02-081-0/+3
| |
| * CRIS: Include arch dependent bug.h.Jesper Nilsson2008-02-081-1/+1
| |
| * CRIS: Correct pfn_pte to make it possible to ioremap uncached addresses.Jesper Nilsson2008-02-081-1/+1
| |
| * CRIS: Correct comment in io.h to describe reality of I/O space.Jesper Nilsson2008-02-081-2/+2
| | | | | | | | | | The old comment stated that it was "junk needed for the arch-independent code but which we never use in the CRIS port", but this is no longer true.
| * CRIS: Update cpu_possible_map and raw_smp_processor_id in smp.h header.Jesper Nilsson2008-02-081-2/+2
| | | | | | | | | | | | - Change name of __smp_processor_id to raw_smp_processor_id. - cpu_possible_map is no longer a define for phys_cpu_present_map, it is now a cpumask_t.
| * CRIS v10: Cleanup rtc.hJesper Nilsson2008-02-081-20/+21
| | | | | | | | | | - Change RTC_VLOW_RD -> RTC_VL_READ, RTC_VLOW_SET -> RTC_VL_CLR - Whitespace and formatting.
| * CRIS: Add architecture dependent bug.h for CRIS v10 and CRIS v32Jesper Nilsson2008-02-082-0/+99
| |
| * CRIS v32: Minor fixes for io.hJesper Nilsson2008-02-081-15/+55
| | | | | | | | | | | | | | - Shorten include paths for machine dependent header files. - Add volatile to hardeware register pointers. - Add spinlocks around critical region. - Expand macros for handling of leds.
| * CRIS v32: Include path fix for timex.hJesper Nilsson2008-02-081-4/+4
| | | | | | | | | | - Shorten include path for machine dependent header files. - Correct some formatting issues.
| * CRIS: Remove define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORYJesper Nilsson2008-02-081-11/+0
| |
| * CRIS v32: Add headers for EtraxFS and Artpec-3 chips.Jesper Nilsson2008-02-081-0/+3
| |
| * CRIS v32: Add prototypes for cache flushingJesper Nilsson2008-02-081-0/+11
| | | | | | | | We need these to work around some cache bugs in CRISv32 chips.
| * CRIS v32: Update asm-cris/arch-v32/irq.h for ETRAX FS and ARTPEC-3Jesper Nilsson2008-02-081-5/+10
| | | | | | | | | | | | - Correct include to use <> - Rework calculation of number of IRQs and exceptions we have. - Remove useless "mask" argument to BUILD_IRQ macro
| * CRIS: Merge axisflashmap.h with Axis internal changes.Jesper Nilsson2008-02-081-12/+27
| | | | | | | | | | | | | | - Add partition table struct to be used to parse partition table in flash. - Add JFFS2 as a type, and add readoly flag. - Improve some comments. - Lindent has been run, fixing whitespace and formatting issues.