aboutsummaryrefslogtreecommitdiff
path: root/arch/cris/arch-v32
AgeCommit message (Collapse)Author
2008-07-29Merge branch 'linus' into core/generic-dma-coherentIngo Molnar
Conflicts: arch/x86/Kconfig Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-26cris: use the common ascii hex helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-25inflate: refactor inflate malloc codeThomas Petazzoni
Inflate requires some dynamic memory allocation very early in the boot process and this is provided with a set of four functions: malloc/free/gzip_mark/gzip_release. The old inflate code used a mark/release strategy rather than implement free. This new version instead keeps a count on the number of outstanding allocations and when it hits zero, it resets the malloc arena. This allows removing all the mark and release implementations and unifying all the malloc/free implementations. The architecture-dependent code must define two addresses: - free_mem_ptr, the address of the beginning of the area in which allocations should be made - free_mem_end_ptr, the address of the end of the area in which allocations should be made. If set to 0, then no check is made on the number of allocations, it just grows as much as needed The architecture-dependent code can also provide an arch_decomp_wdog() function call. This function will be called several times during the decompression process, and allow to notify the watchdog that the system is still running. If an architecture provides such a call, then it must define ARCH_HAS_DECOMP_WDOG so that the generic inflate code calls arch_decomp_wdog(). Work initially done by Matt Mackall, updated to a recent version of the kernel and improved by me. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Matt Mackall <mpm@selenic.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Mikael Starvik <mikael.starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: David Howells <dhowells@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <andi@firstfloor.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24mm: drop unneeded pgdat argument from free_area_init_node()Johannes Weiner
free_area_init_node() gets passed in the node id as well as the node descriptor. This is redundant as the function can trivially get the node descriptor itself by means of NODE_DATA() and the node's id. I checked all the users and NODE_DATA() seems to be usable everywhere from where this function is called. Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20Merge branch 'for-linus' of git://www.jni.nu/crisLinus Torvalds
* 'for-linus' of git://www.jni.nu/cris: [CRISv10] Clean up compressed/misc.c [CRISv10] Correct whitespace damage. [CRIS] Correct definition of subdirs for install_headers. [CRIS] Correct image makefiles to allow using a separate OBJ-directory. [CRIS] Build fixes for compressed and rescue images for v10 and v32: It looks at least odd to apply spin_unlock to a mutex. cris: compile fixes for 2.6.26-rc5
2008-07-20Cris: convert to using generic dma-coherent mem allocatorDmitry Baryshkov
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-15Merge branch 'generic-ipi' into generic-ipi-for-linusIngo Molnar
Conflicts: arch/powerpc/Kconfig arch/s390/kernel/time.c arch/x86/kernel/apic_32.c arch/x86/kernel/cpu/perfctr-watchdog.c arch/x86/kernel/i8259_64.c arch/x86/kernel/ldt.c arch/x86/kernel/nmi_64.c arch/x86/kernel/smpboot.c arch/x86/xen/smp.c include/asm-x86/hw_irq_32.h include/asm-x86/hw_irq_64.h include/asm-x86/mach-default/irq_vectors.h include/asm-x86/mach-voyager/irq_vectors.h include/asm-x86/smp.h kernel/Makefile Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-01Merge branch 'build_fix' into crisJesper Nilsson
2008-06-30[CRIS] Correct image makefiles to allow using a separate OBJ-directory.Jesper Nilsson
Make compile succeed when building with O= (srctree != objtree). Signed-off-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-29Merge branch 'pcf8563_mutex_spinlock' into crisJesper Nilsson
2008-06-29[CRIS] Build fixes for compressed and rescue images for v10 and v32:Jesper Nilsson
- Use the normal cross gcc instead of using an elf specific cris toolchain. This removes the dependency of this second toolchain. - Use the normal cross objcopy instead of overriding it to use elf-toolchain. This allows compiling using "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu-" instead of just "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu/bin/" - Remove redundant rules for compiling, the implicit rules are sufficient. - Convert the arch/cris/arch-v10/boot/compressed/head.S to format accepted by the cris-axis-linux-gnu-gcc (registers must be prefixed with '$', remove explicit underscore on exported symbols) - Remove a number of unused (and duplicated) prototypes from arch/cris/arch-v10/boot/compressed/misc.c. - Correct memcpy and memset return values (actually return them!) Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-29It looks at least odd to apply spin_unlock to a mutex.Julia Lawall
The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @def@ declarer DEFINE_MUTEX; identifier m; @@ DEFINE_MUTEX(m); @@ identifier def.m; @@ ( - spin_lock(&m) + mutex_lock(&m) | - spin_unlock(&m) + mutex_unlock(&m) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-26smp_call_function: get rid of the unused nonatomic/retry argumentJens Axboe
It's never used and the comments refer to nonatomic and retry interchangably. So get rid of it. Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-06-20Add a bunch of cycle_kernel_lock() callsJonathan Corbet
All of the open() functions which don't need the BKL on their face may still depend on its acquisition to serialize opens against driver initialization. So make those functions acquire then release the BKL to be on the safe side. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-06-20Add "no BKL needed" comments to several driversJonathan Corbet
This documents the fact that somebody looked at the relevant open() functions and concluded that, due to their trivial nature, no locking was needed. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-05-18cris: cdev lock_kernel() pushdownJonathan Corbet
Push the cdev lock_kernel() call into cris drivers. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
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-03-04CRIS: Import string.c (memcpy) from newlib: fixes compile error with gcc 4Jesper Nilsson
Adrian Bunk reported another compile error with a SVN head GCC: ... CC arch/cris/arch-v10/lib/string.o /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138: error: lvalue required as increment operand /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138: error: lvalue required as increment operand /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:139: error: lvalue required as increment operand ... This is due to the use of the construct: *((long*)dst)++ = lc; Which isn't legal since casts don't return an lvalue. The solution is to import the implementation from newlib, which is continually autotested together with GCC mainline, and uses the construct: *(long *) dst = lc; dst += 4; Since this is an import of a file from newlib, I'm not touching the formatting or correcting any checkpatch errors. As for the earlier fix for memset.c, even if the two files for CRIS v10 and CRIS v32 are identical at the moment, it might be possible to tweak the CRIS v32 version. Thus, I'm not yet folding them into the same file, at least not until we've done some research on it. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-14cris: import memset.c from newlib: fixes compile error with newer (pre4.3) gccJesper Nilsson
Adrian Bunk reported the following compile error with a SVN head GCC: ... CC arch/cris/arch-v10/lib/memset.o /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c: In function 'memset': /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:164: error: lvalue required as increment operand /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:165: error: lvalue required as increment operand /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:166: error: lvalue required as increment operand /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:167: error: lvalue required as increment operand /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:185: error: lvalue required as increment operand /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:189: error: lvalue required as increment operand /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/memset.c:192: error: lvalue required as increment operand ... etc ... This is due to the use of the construct: *((long*)dst)++ = lc; Which is no longer legal since casts don't return an lvalue. The solution is to import the implementation from newlib, which is continually autotested together with GCC mainline, and uses the construct: *(long *) dst = lc; dst += 4; With this change, the generated code actually shrinks 76 bytes since gcc notices that it can use autoincrement for the move instruction in CRIS. text data bss dec hex filename 304 0 0 304 130 memset.old.o text data bss dec hex filename 228 0 0 228 e4 memset.o Since this is an import of a file from newlib, I'm not touching the formatting or correcting any checkpatch errors. Note also that even if the two files for the CRIS v10 and CRIS v32 are identical at the moment, it might be possible to tweak the CRIS v32 version. Thus, I'm not yet folding them into the same file, at least not until we've done some research on it. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-08CRIS v32: Change drivers/i2c.c locking.Jesper Nilsson
- Change spin_lock + local_irq_save into spin_lock_irqsave - Change spin_unlock + local_irq_restore into spin_unlock_irqrestore - Return ENOTTY if ioctl is not recognized as a cris ioctl. - Make init functions static.
2008-02-08CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.Jesper Nilsson
Changes as suggested by Andrew Morton, plus general cleanup to ease later consolidation of driver into machine common driver. - Correct parameter type of gpio_write to const char __user * - Remove volatile from the arrays of machine dependent registers, use readl and writel to access them instead. - Remove useless casts of void. - Use spin_lock_irqsave for locking. - Break gpio_write into smaller sub-functions. - Remove useless breaks after returns. - Don't perform any change in IO_CFG_WRITE_MODE if values are invalid. (previously values were set and then set to zero) - Change cast for copy_to_user to (void __user *) - Make file_operations gpio_fops static and const. - Make setget_output static. (However, it's still inline since the CRIS architecture is still not SMP, which makes the function small enough to inline)
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 v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS.Jesper Nilsson
Clean up issues noticed by Andrew Morton: - Use a combined struct for allocating the mtd_info and nand_chip structs instead of using anonymous memory as the example in Documentation/DocBook/mtdnand.tmpl - Use kzalloc instead of using kmalloc/memset(0) - Make crisv32_device_ready static.
2008-02-08CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file.Jesper Nilsson
2008-02-08CRIS v32: Fix minor formatting issue in mach-a3/io.cJesper Nilsson
2008-02-08CRIS v32: Initialize GIO even if we're rambooting in kernel/head.SJesper Nilsson
2008-02-08CRIS v32: Remove kernel/arbiter.c, it now exists in machine dependent directory.Jesper Nilsson
2008-02-08CRIS v32: Fix startup oops and replace hardcoded pagesize in vmlinux.lds.SJesper Nilsson
- Move alignment of init data to page size outside define CONFIG_BLK_DEV_INITRD This avoids oops due to memory on the same page as init data being freed. - Change hardcoded page size to use macro from asm/page.h - Add reserved memory via CONFIG_ETRAX_VMEM_SIZE. - Use available defines for TEXT_TEXT and INITCALLS. - Cleanup whitespace.
2008-02-08CRIS v32: Avoid work when switching between tasks with shared memory ↵Jesper Nilsson
descriptors in mm/tlb.c There is no need to do all this work if they share memory descriptors. Also, fix some minor whitespace and long lines.
2008-02-08CRIS v32: Add workaround for MMU hardware bug for ETRAX FS in mm/mmu.SJesper Nilsson
2008-02-08CRIS v32: Fix bug in internal memory allocator mm/intmem.cJesper Nilsson
- Fix bug where allocated memory didn't account for alignment. - Add support for ARTPEC-3 - Add module_init for crisv32_intmem_init.
2008-02-08CRIS v32: Change name of simulator config to CONFIG_ETRAX_VCS_SIM in mm/init.cJesper Nilsson
- Remove unneded code for ETRAX FS and ARTPEC-3
2008-02-08CRIS v32: Change lib/spinlock.S to use byte operations instead of dwords.Jesper Nilsson
2008-02-08CRIS v32: Move hw_settings.S to machine specific directories for ETRAX FS ↵Jesper Nilsson
and ARTPEC-3
2008-02-08CRIS v32: Update lib/checksum.S and lib/checksumcopy.SJesper Nilsson
- Slight tweaks, use $acr + addoq to propagate carry across the loop boundary. - Better use of latency cycles. - Remove duplicate folding of carry, it is not needed.
2008-02-08CRIS v32: Add lib/delay to build.Jesper Nilsson
2008-02-08CRIS v32: Add precise delay loops for ETRAX FS and ARTPEC-3.Jesper Nilsson
Implements cris_delay10ns.
2008-02-08CRIS v32: Update vcs_hook.c for ETRAX FS.Jesper Nilsson
- Clean up some formatting and whitespace.
2008-02-08CRIS v32: Move vcs_hook to machine specific directory.Jesper Nilsson
These files are different for ETRAX FS and ARTPEC-3.
2008-02-08CRIS v32: Update kernel/smp.c for CRIS v32.Jesper Nilsson
- Change include paths to machine specific headers (asm/arch/hwregs -> hwregs) - Add cpu_possible_map as cpumask_t and export it. - Drop struct pt_regs parameter from crisv32_ipi_interrupt. - timer -> timer0
2008-02-08CRIS v32: Update signal handling in kernel/signal.cJesper Nilsson
- do_signal now returns void, and does not have the previous signal set as a parameter. - Remove sys_rt_sigsuspend, we can use the common one instead. - Change sys_sigsuspend to be more like x86, don't call do_signal here. - handle_signal, setup_frame and setup_rt_frame now return -EFAULT if we've delivered a segfault, which is used by callers to perform necessary cleanup. - Break long lines, correct whitespace and formatting errors.
2008-02-08CRIS v32: Update boot/rescue/rescue.ldJesper Nilsson
- Update to work for ETRAX FS and ARTPEC-3
2008-02-08CRIS v32: Change names of config variable and register field for data available.Jesper Nilsson
- CONFIG_ETRAXFS_SIM -> CONFIG_ETRAX_VCS_SIM - ser_intr_mask.data_avail -> ser_intr_mask.dav
2008-02-08CRIS v32: Change debug and formatting in kernel/fasttimer.cJesper Nilsson
- Don't use SANITYCHECK(x) as a macro, test FAST_TIMER_SANITY_CHECKS with ifdef. This makes it possible for automatic indent etc to work. - Correct some whitespace errors. - Don't initialize static variable.
2008-02-08CRIS v32: Update kernel/crisksyms.cJesper Nilsson
- Include pinmux.h from machine specific directory. - Add some more symbols: crisv32_pinmux_alloc, crisv32_pinmux_dealloc_fixed, crisv32_io_get_name and crisv32_io_get
2008-02-08CRIS v32: Remove config ifdef around init function for drivers/sync_serial.cJesper Nilsson
The init function should be defined always.
2008-02-08CRIS v32: Remove drivers/gpio.c, now exists as machine specific file.Jesper Nilsson
2008-02-08CRIS v32: Update driver for RTC chip pcf8563.Jesper Nilsson
- Moved all calls to register_chrdev to a function called by module_init. - Added mutex locking. - Added better error handling at start up. - Added BIN_TO_BCD of the month value before it is saved to the RTC. - Corrected the month value returned by pcf8563_readreg. - Cache the voltage low value at driver init so the battery status information does not get 'accidentally' cleared when setting the RTC time. - Removed obsolete CONFIG_ETRAX_RTC_READONLY - Voltage low ioctl():s RTC_VLOW_RD -> RTC_VL_READ, RTC_VLOW_SET -> RTC_VL_CLR
2008-02-08CRIS v32: Remove drivers/nandflash.h, now exists as machine specific file.Jesper Nilsson