aboutsummaryrefslogtreecommitdiff
path: root/arch/cris/arch-v10
AgeCommit message (Collapse)Author
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-01Merge branch 'cris_debug_port_fix' into crisJesper Nilsson
2008-07-01Merge branch 'build_fix' into crisJesper Nilsson
2008-06-30[CRISv10] Clean up compressed/misc.cJesper Nilsson
Many minor fixes in whitespace and formatting. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2008-06-30[CRISv10] Correct whitespace damage.Jesper Nilsson
The previous patch was whitespace damaged, correct to indent using tabs. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
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-29Merge branch 'cris_debug_port_fix' 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-29cris: compile fixes for 2.6.26-rc5Hinko Kocevar
Add dummy ops for serial debug port. Add setting of c_ispeed/c_ospeed as suggested by Alan Cox. Signed-off-by: Hinko Kocevar <hinko.kocevar@cetrtapot.si> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.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-03-04CRIS v10: Include mm.h instead of vmstat.h in kernel/time.cJesper Nilsson
Commit 2f569afd9ced9ebec9a6eb3dbf6f83429be0a7b4 (CONFIG_HIGHPTE vs. sub-page page tables) introduced use of inc_zone_page_state and dec_zone_page_state in include/linux/mm.h. Those are defined in include/linux/vmstat.h, but after it includes mm.h, making it impossible to include vmstat.h since inc_zone_page_state and dec_zone_page_state then would be undefined. arch/cris/arch-v10/kernel/time.c does just this, which makes the CRIS v10 build break with the following error: ... CC arch/cris/arch-v10/kernel/time.o In file included from include/linux/vmstat.h:7, from arch/cris/arch-v10/kernel/time.c:17: include/linux/mm.h: In function 'pgtable_page_ctor': include/linux/mm.h:902: error: implicit declaration of function 'inc_zone_page_state' include/linux/mm.h: In function 'pgtable_page_dtor': include/linux/mm.h:908: error: implicit declaration of function 'dec_zone_page_state' make[2]: *** [arch/cris/arch-v10/kernel/time.o] Error 1 make[1]: *** [arch/cris/arch-v10/kernel] Error 2 make: *** [sub-make] Error 2 ... By changing kernel/time.c to include linux/mm.h, the build succeeds. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> 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: Add new timerfd syscall entries.Jesper Nilsson
2008-02-08CRIS v10: Cleanup of drivers/gpio.cJesper Nilsson
- Change parameters of gpio_write (const char * buf -> const char __user *buf) - Don't initialize static variables to zero. - Remove useless casts from void. - Change name of interrupt routine (gpio_pa_interrupt -> gpio_interrupt) - Use kzmalloc instead of allocating memory and zeroing it manually. - Correct casts for copy_to_user and copy_from_user to (void __user *) - Make file_operations gpio_fops static. - Make ioif_watcher static, not used outside this file.
2008-02-08CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file.Jesper Nilsson
2008-02-08CRIS v10: Update drivers/gpio.c, fix locking and general improvements.Jesper Nilsson
- Change all spin_lock/local_irq_save to spin_lock_irqsave. - Change multiple returns in functions where we have a lock to goto out. - Correct number of arguments to gpio_poll_timer_interrupt, gpio_pa_interrupt. - Break out gpio_write logic to smaller functions to make it readable. - In setget_input and setget_output, avoid extra if-indent level. - Change name LED_* -> CRIS_LED_* to avoid name clash. - Don't use braces around single statement ifs. - Fix whitespace errors. - Remove useless CVS id and log.
2008-02-08CRIS v10: Change name of low voltage read and set macros.Jesper Nilsson
2008-02-08CRIS v10: Remove duplicated folding of carry from lib/checksum.S, it is not ↵Jesper Nilsson
needed. Also, remove useless CVS id tag.
2008-02-08CRIS v10: Remove duplicated folding of carry from lib/checksumcopy.S, it is ↵Jesper Nilsson
not needed. Also, remove useless CVS id tag.
2008-02-08CRIS v10: Clear TIF_SYSCALL_TRACE flag in ptrace_disable in kernel/ptrace.cJesper Nilsson
2008-02-08CRIS v10: Update kernel/io_interface_mux.cJesper Nilsson
Fixed a bug where two interfaces using pins in the same pin group could not be allocated at the same time even if there where no pin collisions. Change all restore and returns into goto exit pattern. Also, remove useless CVS id and correct chapter reference for ETRAX100LX Designer's Reference in comment.
2008-02-08CRIS v10: Setup serial port 2 to avoid accidental TXD pulse on startup.Jesper Nilsson
If serial port 2 is used, select it in R_GEN_CONFIG. If serial port 2 is used, setup the control registers for the port. This is done to avoid a pulse on the TXD line during start up, which could disturb some units. Also, remove useless CVS id and log.
2008-02-08CRIS v10: Add synchronous serial port driver for CRIS v10.Jesper Nilsson
2008-02-08CRIS v10: Don't call get_mmu_context when switching between tasks with ↵Jesper Nilsson
shared memory descriptors Also, cleanup formatting and fix whitespace errors.
2008-02-08CRIS v10: Fix bug where error returns didn't restore irqs in mm/fault.cJesper Nilsson
Don't return when we're inside local_irq_disable(), use goto exit instead. Also, cleanup some whitespace errors.
2008-02-08CRIS v10: Remove useless CVS id tag from lib/old_checksum.cJesper Nilsson
2008-02-08CRIS v10: Remove useless CVS id and log from lib/dram_init.SJesper Nilsson
2008-02-08CRIS v10: Remove useless CVS id from kernel/shadows.cJesper Nilsson
2008-02-08CRIS v10: Reformat drivers/makefile using tabs.Jesper Nilsson
2008-02-08CRIS: Move common Kconfig variable ETRAX_RTC to arch independet Kconfig.Jesper Nilsson
2008-02-08CRIS v10: Remove CVS id from kernel/process.cJesper Nilsson
2008-02-08CRIS v10: Remove CVS log and id from kernel/kgdb.cJesper Nilsson
2008-02-08CRIS v10: Cleanup kernel/irq.cJesper Nilsson
- Remove useless CVS id tag. - Remove no longer needed extern declarations for kgdb.
2008-02-08CRIS v10: Cleanup kernel/fasttimer.cJesper Nilsson
- Change C99 comment style to C89. - Remove superfluous SANITYCHECK macro, test FAST_TIMER_SANITY_CHECKS instead.
2008-02-08CRIS v10: Cleanup kernel/entry.S CVS log and id.Jesper Nilsson
2008-02-08CRIS v10: Remove CVS id tag from kernel/dma.cJesper Nilsson
2008-02-08CRIS v10: Break long lines in boot/rescue/head.SJesper Nilsson
2008-02-08CRIS v10: Remove CVS tag from boot/compressed/misc.cJesper Nilsson
2008-02-08CRIS v10: Update and fix bug in kernel/debugport.Jesper Nilsson
- Move local_irq_save to after possible return in console_write_direct. - Remove old raw_printk hack, not needed anymore. - Add watchdog handling. - Make serial_driver use depend on CONFIG_ETRAX_SERIAL. - Remove useless CVS log.
2008-02-08CRIS v10: Update driver for pcf8563Jesper Nilsson
- Use mutex instead of spinlock, fixes kernel bugzilla report 8339. - Make sure that pcf8563_init can be called multiple times but only setup once. - Change RTC_VLOW_RD -> RTC_VL_READ, RTC_VLOW_SET -> RTC_VL_CLR - Cache the voltage low value at driver init so the battery status information does not get 'accidentally' cleared when setting the RTC time. - Add weekday handling. - Correct leapyear handling to include 100 and 400 year exceptions. - Correct whitespace and formatting errors. - Remove useless CVS id tag.
2008-02-08CRIS v10: Fix bugs in i2c_init and i2c_readregJesper Nilsson
- Set the variable first to zero after first setup, so we can stop multiple calls to i2c_init from trying to setup i2c. - The last byte read by the master in an i2c transfer needs to be NACKed, not ACKed. - Also, remove useless CVS log and CVS id tags.