aboutsummaryrefslogtreecommitdiff
path: root/include/asm-cris
AgeCommit message (Collapse)Author
2008-04-27ide: add struct ide_io_ports (take 3)Bartlomiej Zolnierkiewicz
* 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>
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-04cris: correct syscall numbers in unistd.h for timerfd_settime and ↵Jesper Nilsson
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>
2008-03-04cris: correct usage of __user for copy to and from user space in ↵Jesper Nilsson
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>
2008-02-08Merge branch 'cris' of git://www.jni.nu/crisLinus Torvalds
* '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. ...
2008-02-08CONFIG_HIGHPTE vs. sub-page page tables.Martin Schwidefsky
Background: I've implemented 1K/2K page tables for s390. These sub-page page tables are required to properly support the s390 virtualization instruction with KVM. The SIE instruction requires that the page tables have 256 page table entries (pte) followed by 256 page status table entries (pgste). The pgstes are only required if the process is using the SIE instruction. The pgstes are updated by the hardware and by the hypervisor for a number of reasons, one of them is dirty and reference bit tracking. To avoid wasting memory the standard pte table allocation should return 1K/2K (31/64 bit) and 2K/4K if the process is using SIE. Problem: Page size on s390 is 4K, page table size is 1K or 2K. That means the s390 version for pte_alloc_one cannot return a pointer to a struct page. Trouble is that with the CONFIG_HIGHPTE feature on x86 pte_alloc_one cannot return a pointer to a pte either, since that would require more than 32 bit for the return value of pte_alloc_one (and the pte * would not be accessible since its not kmapped). Solution: The only solution I found to this dilemma is a new typedef: a pgtable_t. For s390 pgtable_t will be a (pte *) - to be introduced with a later patch. For everybody else it will be a (struct page *). The additional problem with the initialization of the ptl lock and the NR_PAGETABLE accounting is solved with a constructor pgtable_page_ctor and a destructor pgtable_page_dtor. The page table allocation and free functions need to call these two whenever a page table page is allocated or freed. pmd_populate will get a pgtable_t instead of a struct page pointer. To get the pgtable_t back from a pmd entry that has been installed with pmd_populate a new function pmd_pgtable is added. It replaces the pmd_page call in free_pte_range and apply_to_pte_range. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.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-02-08avoid overflows in kernel/time.cH. Peter Anvin
When the conversion factor between jiffies and milli- or microseconds is not a single multiply or divide, as for the case of HZ == 300, we currently do a multiply followed by a divide. The intervening result, however, is subject to overflows, especially since the fraction is not simplified (for HZ == 300, we multiply by 300 and divide by 1000). This is exposed to the user when passing a large timeout to poll(), for example. This patch replaces the multiply-divide with a reciprocal multiplication on 32-bit platforms. When the input is an unsigned long, there is no portable way to do this on 64-bit platforms there is no portable way to do this since it requires a 128-bit intermediate result (which gcc does support on 64-bit platforms but may generate libgcc calls, e.g. on 64-bit s390), but since the output is a 32-bit integer in the cases affected, just simplify the multiply-divide (*3/10 instead of *300/1000). The reciprocal multiply used can have off-by-one errors in the upper half of the valid output range. This could be avoided at the expense of having to deal with a potential 65-bit intermediate result. Since the intent is to avoid overflow problems and most of the other time conversions are only semiexact, the off-by-one errors were considered an acceptable tradeoff. At Ralf Baechle's suggestion, this version uses a Perl script to compute the necessary constants. We already have dependencies on Perl for kernel compiles. This does, however, require the Perl module Math::BigInt, which is included in the standard Perl distribution starting with version 5.8.0. In order to support older versions of Perl, include a table of canned constants in the script itself, and structure the script so that Math::BigInt isn't required if pulling values from said table. Running the script requires that the HZ value is available from the Makefile. Thus, this patch also adds the Kconfig variable CONFIG_HZ to the architectures which didn't already have it (alpha, cris, frv, h8300, m32r, m68k, m68knommu, sparc, v850, and xtensa.) It does *not* touch the sh or sh64 architectures, since Paul Mundt has dealt with those separately in the sh tree. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Ralf Baechle <ralf@linux-mips.org>, Cc: Sam Ravnborg <sam@ravnborg.org>, Cc: Paul Mundt <lethal@linux-sh.org>, Cc: Richard Henderson <rth@twiddle.net>, Cc: Michael Starvik <starvik@axis.com>, Cc: David Howells <dhowells@redhat.com>, Cc: Yoshinori Sato <ysato@users.sourceforge.jp>, Cc: Hirokazu Takata <takata@linux-m32r.org>, Cc: Geert Uytterhoeven <geert@linux-m68k.org>, Cc: Roman Zippel <zippel@linux-m68k.org>, Cc: William L. Irwin <sparclinux@vger.kernel.org>, Cc: Chris Zankel <chris@zankel.net>, Cc: H. Peter Anvin <hpa@zytor.com>, Cc: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08asm-*/posix_types.h: scrub __GLIBC__Mike Frysinger
Some arches (like alpha and ia64) already have a clean posix_types.h header. This brings all the others in line by removing all references to __GLIBC__ (and some undocumented __USE_ALL). Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Ulrich Drepper <drepper@redhat.com> Cc: Roland McGrath <roland@redhat.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-02-08aout: move STACK_TOP[_MAX] to asm/processor.hDavid Howells
Move STACK_TOP[_MAX] out of asm/a.out.h and into asm/processor.h as they're required whether or not A.OUT format is available. Signed-off-by: David Howells <dhowells@redhat.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-02-08CRIS v32: Remove hwregs/timer_defs.h, it is now architecture specific.Jesper Nilsson
- File is moved to arch-v32/mach-fs/hwregs/timer_defs.h
2008-02-08CRIS: Add new timerfd syscall entries.Jesper Nilsson
2008-02-08CRIS v32: Correct spelling of bandwidth in function name.Jesper Nilsson
2008-02-08CRIS: Make io_pwm_set_period members unsigned in etraxgpio.hJesper Nilsson
2008-02-08CRIS v32: Minor changes to avoid errors in asm-cris/arch-v32/hwregs/reg_rdwr.hJesper Nilsson
- 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.
2008-02-08CRIS v32: arch-v32/hwregs/intr_vect_defs.h moved to machine dependent directory.Jesper Nilsson
2008-02-08CRIS v32: Correct offset for TASK_pid in asm-cris/arch-v32/offset.hJesper Nilsson
2008-02-08CRIS v32: Move register map header to machine dependent directory.Jesper Nilsson
This file is machine dependent, and needs to be in asm-cris/arch-v32/mach-fs/hwregs/reg_map.h instead.
2008-02-08CRIS v32: Let compiler know that memory is clobbered after a break op.Jesper Nilsson
2008-02-08CRIS v32: Remove SMP stub from asm-cris/arch-v32/system.hJesper Nilsson
CRIS v32 is not SMP.
2008-02-08CRIS v32: Completely rework spinlocks for ETRAX FS and ARTPEC-3Jesper Nilsson
2008-02-08CRIS v32: Change name for simulator config in asm-cris/arch-v32/processor.hJesper Nilsson
2008-02-08CRIS v32: Add prototype for crisv32_pinmux_dealloc_fixed in ↵Jesper Nilsson
asm-cris/arch-v32/pinmux.h Deallocation was not possible before, but is now.
2008-02-08CRIS v32: Change name for simulator config in asm-cris/arch-v32/page.hJesper Nilsson
Also, fix a typo.
2008-02-08CRIS v32: Remove juliette.h, it is not supported for CRIS v32.Jesper Nilsson
2008-02-08CRIS v32: Add support for ETRAX FS and ARTPEC-3 for arch-v32/hwregs/eth_defs.hJesper Nilsson
- 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.
2008-02-08CRIS v32: Rename variable used in macro for arch-v32/hwregs/dma.hJesper Nilsson
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.
2008-02-08CRIS v32: Remove useless CVS id tag from arch-v32/hwregs/MakefileJesper Nilsson
2008-02-08CRIS v32: Add defines for udelay and ndelay in arch-v32/delay.hJesper Nilsson
Both of these are implemented using cris_delay10ns().
2008-02-08CRIS v32: Adjust arch-v32/atomic.h for new spinlock/rwlock infrastructureJesper Nilsson
2008-02-08CRIS v32: Add missing header to include/asm-cris/arch-v32/KbuildJesper Nilsson
2008-02-08CRIS: Break long comment line in include/asm-cris/arch-v10/page.hJesper Nilsson
2008-02-08CRIS: Rename LED macros to CRIS_LED to avoid name clash in io.hJesper Nilsson
This is done to avoid collision with linux/leds.h
2008-02-08CRIS: Add missing headers to include/asm-cris Kbuild files.Jesper Nilsson
2008-02-08CRIS: Add support for ETRAX FS and ARTPEC-3 to etraxgpio.hJesper Nilsson
The CRIS v32 architectures have more gpio ports and built in PWM.
2008-02-08CRIS: Fix bugs in return value of atomic_inc_return and atomic_dec_return.Jesper Nilsson
Increment and decrement before assigning to return value.
2008-02-08CRIS: Allow arch dependent delay to override common version.Jesper Nilsson
2008-02-08CRIS: Include arch dependent bug.h.Jesper Nilsson
2008-02-08CRIS: Correct pfn_pte to make it possible to ioremap uncached addresses.Jesper Nilsson
2008-02-08CRIS: Correct comment in io.h to describe reality of I/O space.Jesper Nilsson
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.
2008-02-08CRIS: Update cpu_possible_map and raw_smp_processor_id in smp.h header.Jesper Nilsson
- 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.
2008-02-08CRIS v10: Cleanup rtc.hJesper Nilsson
- Change RTC_VLOW_RD -> RTC_VL_READ, RTC_VLOW_SET -> RTC_VL_CLR - Whitespace and formatting.
2008-02-08CRIS: Add architecture dependent bug.h for CRIS v10 and CRIS v32Jesper Nilsson
2008-02-08CRIS v32: Minor fixes for io.hJesper Nilsson
- 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.
2008-02-08CRIS v32: Include path fix for timex.hJesper Nilsson
- Shorten include path for machine dependent header files. - Correct some formatting issues.
2008-02-08CRIS: Remove define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORYJesper Nilsson
2008-02-08CRIS v32: Add headers for EtraxFS and Artpec-3 chips.Jesper Nilsson
2008-02-08CRIS v32: Add prototypes for cache flushingJesper Nilsson
We need these to work around some cache bugs in CRISv32 chips.
2008-02-08CRIS v32: Update asm-cris/arch-v32/irq.h for ETRAX FS and ARTPEC-3Jesper Nilsson
- Correct include to use <> - Rework calculation of number of IRQs and exceptions we have. - Remove useless "mask" argument to BUILD_IRQ macro
2008-02-08CRIS: Merge axisflashmap.h with Axis internal changes.Jesper Nilsson
- 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.