aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
Commit message (Collapse)AuthorAge
* [PATCH] take init_files to fs/file.cAl Viro2008-05-16
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* cris: kill sys_pipe implementationChristoph Hellwig2008-05-09
| | | | | | | | | | The cris implementation of sys_pipe only differs from the generic one by taking the BKL before calling do_pipe which isn't not nessecary. Just kill the cris implementation and use the generic one. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sys_pipe(): fix file descriptor leaksUlrich Drepper2008-05-08
| | | | | | | | | | | | Remember to close the files if copy_to_user() failed. Spotted by dm.n9107@gmail.com. Signed-off-by: Ulrich Drepper <drepper@redhat.com> Cc: DM <dm.n9107@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cris: use non-racy method for /proc/system_profile creationDenis V. Lunev2008-04-29
| | | | | | | | | | | | | Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to main tree. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cris: remove redundant display of free swap space in show_mem()Johannes Weiner2008-04-28
| | | | | | | | | | | | | | | show_mem() has no need to print the amount of free swap space manually because show_free_areas() does this already and is called by the former. The two outputs only differ in text formatting: printk("Free swap = %lukB\n", ...); printk("Free swap: %6ldkB\n", ...); Signed-off-by: Johannes Weiner <hannes@saeurebad.de> 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>
* Generic semaphore implementationMatthew Wilcox2008-04-17
| | | | | | | | | | | 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>
* cris: correct usage of __user for copy to and from user space in ↵Jesper Nilsson2008-03-04
| | | | | | | | | | | | | | | | | 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>
* CRIS: Import string.c (memcpy) from newlib: fixes compile error with gcc 4Jesper Nilsson2008-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* CRIS v10: Include mm.h instead of vmstat.h in kernel/time.cJesper Nilsson2008-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cris: import memset.c from newlib: fixes compile error with newer (pre4.3) gccJesper Nilsson2008-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ide: introduce HAVE_IDESam Ravnborg2008-02-09
| | | | | | | | | | | | To allow flexible configuration of IDE introduce HAVE_IDE. All archs except arm, um and s390 unconditionally select it. For arm the actual configuration determine if IDE is supported. This is a step towards introducing drivers/Kconfig for arm. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Russell King - ARM Linux <linux@arm.linux.org.uk> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Merge branch 'cris' of git://www.jni.nu/crisLinus Torvalds2008-02-08
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '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: Change drivers/i2c.c locking.Jesper Nilsson2008-02-08
| | | | | | | | | | | | | | - 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.
| * CRIS v32: Rewrite ARTPEC-3 gpio driver to avoid volatiles and general cleanup.Jesper Nilsson2008-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * CRIS: Add new timerfd syscall entries.Jesper Nilsson2008-02-08
| |
| * CRIS v32: Correct spelling of bandwidth in function name.Jesper Nilsson2008-02-08
| |
| * CRIS v32: Clean up nandflash.c for ARTPEC-3 and ETRAX FS.Jesper Nilsson2008-02-08
| | | | | | | | | | | | | | | | | | | | 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.
| * CRIS v10: Cleanup of drivers/gpio.cJesper Nilsson2008-02-08
| | | | | | | | | | | | | | | | | | | | | | - 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.
| * CRIS: Move ETRAX_AXISFLASHMAP to common Kconfig file.Jesper Nilsson2008-02-08
| |
| * CRIS: Drop regs parameter from call to profile_tick in kernel/time.cJesper Nilsson2008-02-08
| |
| * CRIS v32: Fix minor formatting issue in mach-a3/io.cJesper Nilsson2008-02-08
| |
| * CRIS v32: Initialize GIO even if we're rambooting in kernel/head.SJesper Nilsson2008-02-08
| |
| * CRIS v32: Remove kernel/arbiter.c, it now exists in machine dependent directory.Jesper Nilsson2008-02-08
| |
| * CRIS: Add sched_clock to kernel/time.cJesper Nilsson2008-02-08
| | | | | | | | Also, clean up some whitespace errors.
| * CRIS: Register cpus in kernel/setup.cJesper Nilsson2008-02-08
| | | | | | | | Also, fix some white space errors, and constify cpuinfo_op.
| * CRIS: Remove include of linux/init.h, not needed anymore.Jesper Nilsson2008-02-08
| |
| * CRIS: Remove CONFIG_NO_IOMEM from ARTPEC-3 default config.Jesper Nilsson2008-02-08
| |
| * CRIS: Remove useless CVS log from kernel/ptrace.cJesper Nilsson2008-02-08
| | | | | | | | Also, fix some whitespace errors.
| * CRIS: Remove useless CVS id and log from kernel/process.cJesper Nilsson2008-02-08
| |
| * CRIS: Add configuration possibility for using kmalloc for modules.Jesper Nilsson2008-02-08
| | | | | | | | | | Using kmalloc instead of vmalloc solves the stability problems experienced by some 100 LX products.
| * CRIS: Remove CONFIG_NO_IOMEM from default configs.Jesper Nilsson2008-02-08
| |
| * CRIS v32: Fix startup oops and replace hardcoded pagesize in vmlinux.lds.SJesper Nilsson2008-02-08
| | | | | | | | | | | | | | | | | | - 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.
| * CRIS v32: Avoid work when switching between tasks with shared memory ↵Jesper Nilsson2008-02-08
| | | | | | | | | | | | | | 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.
| * CRIS v32: Add workaround for MMU hardware bug for ETRAX FS in mm/mmu.SJesper Nilsson2008-02-08
| |
| * CRIS v32: Fix bug in internal memory allocator mm/intmem.cJesper Nilsson2008-02-08
| | | | | | | | | | | | - Fix bug where allocated memory didn't account for alignment. - Add support for ARTPEC-3 - Add module_init for crisv32_intmem_init.
| * CRIS v32: Change name of simulator config to CONFIG_ETRAX_VCS_SIM in mm/init.cJesper Nilsson2008-02-08
| | | | | | | | - Remove unneded code for ETRAX FS and ARTPEC-3
| * CRIS v32: Change lib/spinlock.S to use byte operations instead of dwords.Jesper Nilsson2008-02-08
| |
| * CRIS v32: Move hw_settings.S to machine specific directories for ETRAX FS ↵Jesper Nilsson2008-02-08
| | | | | | | | and ARTPEC-3
| * CRIS v32: Update lib/checksum.S and lib/checksumcopy.SJesper Nilsson2008-02-08
| | | | | | | | | | | | - 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.
| * CRIS v32: Add lib/delay to build.Jesper Nilsson2008-02-08
| |
| * CRIS v32: Add precise delay loops for ETRAX FS and ARTPEC-3.Jesper Nilsson2008-02-08
| | | | | | | | Implements cris_delay10ns.
| * CRIS v32: Update vcs_hook.c for ETRAX FS.Jesper Nilsson2008-02-08
| | | | | | | | - Clean up some formatting and whitespace.
| * CRIS v32: Move vcs_hook to machine specific directory.Jesper Nilsson2008-02-08
| | | | | | | | These files are different for ETRAX FS and ARTPEC-3.
| * CRIS v32: Update kernel/smp.c for CRIS v32.Jesper Nilsson2008-02-08
| | | | | | | | | | | | | | - 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
| * CRIS v32: Update signal handling in kernel/signal.cJesper Nilsson2008-02-08
| | | | | | | | | | | | | | | | | | | | | | - 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.
| * CRIS v32: Update boot/rescue/rescue.ldJesper Nilsson2008-02-08
| | | | | | | | - Update to work for ETRAX FS and ARTPEC-3
| * CRIS v10: Update drivers/gpio.c, fix locking and general improvements.Jesper Nilsson2008-02-08
| | | | | | | | | | | | | | | | | | | | | | | | - 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.
| * CRIS v32: Change names of config variable and register field for data available.Jesper Nilsson2008-02-08
| | | | | | | | | | - CONFIG_ETRAXFS_SIM -> CONFIG_ETRAX_VCS_SIM - ser_intr_mask.data_avail -> ser_intr_mask.dav
| * CRIS v32: Change debug and formatting in kernel/fasttimer.cJesper Nilsson2008-02-08
| | | | | | | | | | | | | | - 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.
| * CRIS v32: Update kernel/crisksyms.cJesper Nilsson2008-02-08
| | | | | | | | | | | | - 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