aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/include/arch-v32
Commit message (Collapse)AuthorAge
* CRIS: use generic atomic.hRabin Vincent2015-03-25
| | | | | | | CRIS can use asm-generic's atomic.h. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Jesper Nilsson <jespern@axis.com>
* CRIS: remove SMP codeRabin Vincent2015-03-25
| | | | | | | | The CRIS SMP code cannot be built since there is no (and appears to never have been) a CONFIG_SMP Kconfig option in arch/cris/. Remove it. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Jesper Nilsson <jespern@axis.com>
* CRISv32: don't enable irqs in INIT_THREADRabin Vincent2015-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INIT_THREAD enables interrupts in the thread_struct's saved flags. This means that interrupts get enabled in the middle of context_switch() while switching to new tasks that get forked off the init task during boot. Don't do this. Fixes the following splat on boot with spinlock debugging on: BUG: spinlock cpu recursion on CPU#0, swapper/2 lock: runqueues+0x0/0x47c, .magic: dead4ead, .owner: swapper/0, .owner_cpu: 0 CPU: 0 PID: 2 Comm: swapper Not tainted 3.19.0-08796-ga747b55 #285 Call Trace: [<c0032b80>] spin_bug+0x2a/0x36 [<c0032c98>] do_raw_spin_lock+0xa2/0x126 [<c01964b0>] _raw_spin_lock+0x20/0x2a [<c00286c8>] scheduler_tick+0x22/0x76 [<c003db2c>] update_process_times+0x5e/0x72 [<c0007a94>] timer_interrupt+0x4e/0x6a [<c00378d6>] handle_irq_event_percpu+0x54/0xf2 [<c00379c4>] handle_irq_event+0x50/0x74 [<c003988e>] handle_simple_irq+0x6c/0xbe [<c0037270>] generic_handle_irq+0x2a/0x36 [<c0004c40>] do_IRQ+0x38/0x84 [<c000662e>] crisv32_do_IRQ+0x54/0x60 [<c0006204>] IRQ0x4b_interrupt+0x34/0x3c [<c0192baa>] __schedule+0x24a/0x532 [<c00056b4>] ret_from_kernel_thread+0x0/0x14 Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Jesper Nilsson <jespern@axis.com>
* cris: drop _PAGE_FILE and pte_file()-related helpersKirill A. Shutemov2015-02-10
| | | | | | | | | | | We've replaced remap_file_pages(2) implementation with emulation. Nobody creates non-linear mapping anymore. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.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>
* CRISv32: ETRAXFS: Fix recursive spinlockJesper Nilsson2014-12-19
| | | | | | | | | | Move pinmux alloc/dealloc code into functions that don't take the spinlock so we can use from code that has the spinlock already. CRISv32 has no working SMP, so spinlocks becomes a NOP, so deadlock was never seen. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* cris: remove deprecated IRQF_DISABLEDMichael Opdenacker2014-01-08
| | | | | | | | | | | | | | | | | | This patch proposes to remove the IRQF_DISABLED flag from CRIS architecture code. It's a NOOP since 2.6.35 and it will be removed one day. Comments mentioning IRQF_DISABLED are also updated, knowing that all interrupts are now "fast interrupts", their handlers running with interrupts disabled. Don't hesitate to let me know if you have other ways of rephrasing the comments! This is an update for 3.11 of a patch already sent for 3.10 Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Jesper Nilsson <jespern@axis.com>
* UAPI: Fix up empty files in arch/cris/David Howells2012-12-20
| | | | | | | | | | | | | | | | | | Fix up three empty files in arch/cris/ by sticking placeholder comments in there to prevent the patch program from deleting them. I decided not to delete the arch-v*/Kbuild files as it's possibly someone might want to use them for genhdr-y lines in the future, but they could be deleted and the pointer lines removed from asm/Kbuild. The uapi/arch-v*/Kbuild files ought to be uneffected by such a change. asm/swab.h didn't have anything outside of __KERNEL__ so nothing appeared in uapi/asm/swab.h. The latter, however, is exported by Kbuild.asm. This needs to be applied after the CRIS UAPI disintegration patch. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: locking: fix the return value of arch_read_trylock()Wei Yongjun2012-12-20
| | | | | | | | | | | arch_write_trylock() should return 'ret' instead of always return 1. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* Merge tag 'disintegrate-cris-20121009' of ↵Jesper Nilsson2012-12-20
|\ | | | | | | | | | | | | | | | | | | | | git://git.infradead.org/users/dhowells/linux-headers into for-linus2 UAPI Disintegration 2012-10-09 * tag 'disintegrate-cris-20121009' of git://git.infradead.org/users/dhowells/linux-headers: UAPI: (Scripted) Disintegrate arch/cris/include/asm UAPI: (Scripted) Disintegrate arch/cris/include/arch-v32/arch UAPI: (Scripted) Disintegrate arch/cris/include/arch-v10/arch
| * UAPI: (Scripted) Disintegrate arch/cris/include/arch-v32/archDavid Howells2012-10-09
| | | | | | | | | | | | | | | | | | Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
* | various: Fix spelling of "registered" in comments.Adam Buchbinder2012-11-19
|/ | | | | | | Some comments misspell "registered"; this fixes them. No code changes. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge tag 'uapi-prep-20121002' of ↵Linus Torvalds2012-10-03
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.infradead.org/users/dhowells/linux-headers Pull preparatory patches for user API disintegration from David Howells: "The patches herein prepare for the extraction of the Userspace API bits from the various header files named in the Kbuild files. New subdirectories are created under either include/uapi/ or arch/x/include/uapi/ that correspond to the subdirectory containing that file under include/ or arch/x/include/. The new subdirs under the uapi/ directory are populated with Kbuild files that mostly do nothing at this time. Further patches will disintegrate the headers in each original directory and fill in the Kbuild files as they do it. These patches also: (1) fix up #inclusions of "foo.h" rather than <foo.h>. (2) Remove some redundant #includes from the DRM code. (3) Make the kernel build infrastructure handle Kbuild files both in the old places and the new UAPI place that both specify headers to be exported. (4) Fix some kernel tools that #include kernel headers during their build. I have compile tested this with allyesconfig against x86_64, allmodconfig against i386 and a scattering of additional defconfigs of other arches. Prepared for main script Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com> Acked-by: H. Peter Anvin <hpa@zytor.com>" * tag 'uapi-prep-20121002' of git://git.infradead.org/users/dhowells/linux-headers: UAPI: Plumb the UAPI Kbuilds into the user header installation and checking UAPI: x86: Differentiate the generated UAPI and internal headers UAPI: Remove the objhdr-y export list UAPI: Move linux/version.h UAPI: Set up uapi/asm/Kbuild.asm UAPI: x86: Fix insn_sanity build failure after UAPI split UAPI: x86: Fix the test_get_len tool UAPI: (Scripted) Set up UAPI Kbuild files UAPI: Partition the header include path sets and add uapi/ header directories UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ UAPI: (Scripted) Remove redundant DRM UAPI header #inclusions from drivers/gpu/. UAPI: Refer to the DRM UAPI headers with <...> and from certain headers only
| * UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel ↵David Howells2012-10-02
| | | | | | | | | | | | | | | | | | | | | | | | system headers Convert #include "..." to #include <path/...> in kernel system headers. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
* | CRIS: Remove VCS simulator specific codeJesper Nilsson2012-10-03
|/ | | | | | | The VCS simulator was a tool used in the development of the chip and is no longer used or necessary. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRISv32: Correct name of read_mostly section.Jesper Nilsson2012-04-03
| | | | | | | | 54cb27a71f51d304342c79e62fd7667f2171062b renamed .data.read_mostly to .data..read_mostly for all architectures for 2.6.33. Reported-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* Disintegrate asm/system.h for CRISDavid Howells2012-03-28
| | | | | | | | Disintegrate asm/system.h for CRIS. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> cc: linux-cris-kernel@axis.com
* ptrace: unify show_regs() prototypeMike Frysinger2011-07-26
| | | | | | | | | [ poleg@redhat.com: no need to declare show_regs() in ptrace.h, sched.h does this ] Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cris, exec: remove redundant set_fs(USER_DS)Mathias Krause2011-07-25
| | | | | | | | | | The address limit is already set in flush_old_exec() so those calls to set_fs(USER_DS) are redundant. Signed-off-by: Mathias Krause <minipli@googlemail.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>
* Fix common misspellingsLucas De Marchi2011-03-31
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* Fix IRQ flag handling namingDavid Howells2010-10-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the IRQ flag handling naming. In linux/irqflags.h under one configuration, it maps: local_irq_enable() -> raw_local_irq_enable() local_irq_disable() -> raw_local_irq_disable() local_irq_save() -> raw_local_irq_save() ... and under the other configuration, it maps: raw_local_irq_enable() -> local_irq_enable() raw_local_irq_disable() -> local_irq_disable() raw_local_irq_save() -> local_irq_save() ... This is quite confusing. There should be one set of names expected of the arch, and this should be wrapped to give another set of names that are expected by users of this facility. Change this to have the arch provide: flags = arch_local_save_flags() flags = arch_local_irq_save() arch_local_irq_restore(flags) arch_local_irq_disable() arch_local_irq_enable() arch_irqs_disabled_flags(flags) arch_irqs_disabled() arch_safe_halt() Then linux/irqflags.h wraps these to provide: raw_local_save_flags(flags) raw_local_irq_save(flags) raw_local_irq_restore(flags) raw_local_irq_disable() raw_local_irq_enable() raw_irqs_disabled_flags(flags) raw_irqs_disabled() raw_safe_halt() with type checking on the flags 'arguments', and then wraps those to provide: local_save_flags(flags) local_irq_save(flags) local_irq_restore(flags) local_irq_disable() local_irq_enable() irqs_disabled_flags(flags) irqs_disabled() safe_halt() with tracing included if enabled. The arch functions can now all be inline functions rather than some of them having to be macros. Signed-off-by: David Howells <dhowells@redhat.com> [X86, FRV, MN10300] Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> [Tile] Signed-off-by: Michal Simek <monstr@monstr.eu> [Microblaze] Tested-by: Catalin Marinas <catalin.marinas@arm.com> [ARM] Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [AVR] Acked-by: Tony Luck <tony.luck@intel.com> [IA-64] Acked-by: Hirokazu Takata <takata@linux-m32r.org> [M32R] Acked-by: Greg Ungerer <gerg@uclinux.org> [M68K/M68KNOMMU] Acked-by: Ralf Baechle <ralf@linux-mips.org> [MIPS] Acked-by: Kyle McMartin <kyle@mcmartin.ca> [PA-RISC] Acked-by: Paul Mackerras <paulus@samba.org> [PowerPC] Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [S390] Acked-by: Chen Liqin <liqin.chen@sunplusct.com> [Score] Acked-by: Matt Fleming <matt@console-pimps.org> [SH] Acked-by: David S. Miller <davem@davemloft.net> [Sparc] Acked-by: Chris Zankel <chris@zankel.net> [Xtensa] Reviewed-by: Richard Henderson <rth@twiddle.net> [Alpha] Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> [H8300] Cc: starvik@axis.com [CRIS] Cc: jesper.nilsson@axis.com [CRIS] Cc: linux-cris-kernel@axis.com
* CRIS: Add include guardJesper Nilsson2010-08-04
| | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: Better handling of pinmux settingsJesper Nilsson2010-08-04
| | | | | | | | Depending on eth, eth_mido and geth fields in wr_hwprot, don't set corresponding pins on gpio port b to gpio mode. This avoids re-resetting the ethernet PHY should this already have been done. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: New DMA defines for ARTPEC-3Jesper Nilsson2010-08-04
| | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: __do_strncpy_from_user: Don't read the byte beyond the nilJesper Nilsson2010-08-04
| | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: Pagetable for ARTPEC-3Jesper Nilsson2010-08-04
| | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: Machine dependent memmap.hJesper Nilsson2010-08-04
| | | | | | | Move the old one to mach-fs and replace with a new one that only include the correct one for the machine architecture. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: Check if pointer is set before using itJesper Nilsson2010-08-04
| | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: Machine dependent dma.hJesper Nilsson2010-08-04
| | | | | | | Move the old one to mach-fs and replace with a new one that only include the correct one for the machine architecture. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: Define __read_mostly for CRISv32Jesper Nilsson2010-08-04
| | | | Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: Don't use mask_irq as symbol nameJesper Nilsson2010-05-25
| | | | | | | kernel/irq/chip.c now uses these, which lead to compile error for CRISv32. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
* cris arch-v32: use generic ptrace_resume codeChristoph Hellwig2010-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cleared on fork, which could be considered a bug fix. Also the TIF_SYSCALL_TRACE thread flag is now cleared on PTRACE_KILL which it previously wasn't which is consistent with all architectures using the modern ptrace code. The way breakpoints are disabled is entirely inconsistent currently, I tried to make some sense of it, but I suspect all of the content of ptrace_disable should be moved into user_disable_single_step, this defintively needs some revisting as the current patch changes behaviour in not quite designed ways. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Roland McGrath <roland@redhat.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>
* locking: Convert raw_rwlock functions to arch_rwlockThomas Gleixner2009-12-14
| | | | | | | | | | Name space cleanup for rwlock functions. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: linux-arch@vger.kernel.org
* locking: Convert raw_rwlock to arch_rwlockThomas Gleixner2009-12-14
| | | | | | | | | | | | | | Not strictly necessary for -rt as -rt does not have non sleeping rwlocks, but it's odd to not have a consistent naming convention. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: linux-arch@vger.kernel.org
* locking: Convert __raw_spin* functions to arch_spin*Thomas Gleixner2009-12-14
| | | | | | | | | | Name space cleanup. No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: linux-arch@vger.kernel.org
* locking: Convert raw_spinlock to arch_spinlockThomas Gleixner2009-12-14
| | | | | | | | | | | | | | | | | | | The raw_spin* namespace was taken by lockdep for the architecture specific implementations. raw_spin_* would be the ideal name space for the spinlocks which are not converted to sleeping locks in preempt-rt. Linus suggested to convert the raw_ to arch_ locks and cleanup the name space instead of using an artifical name like core_spin, atomic_spin or whatever No functional change. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: linux-arch@vger.kernel.org
* CRIS: add pgprot_noncachedArnd Bergmann2009-08-31
| | | | | | | | | On CRIS, the high address bit controls caching, which means that we can add a pgprot_noncached() macro that sets this bit in the address. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
* CRIS: assignment/is equal confusionRoel Kluin2009-06-08
| | | | | | | | | | Somehow, the assignments of rw->lock got written as comparisons. The effect probably was that the read-write spinlocks never locked. However, since the locks are only used in CONFIG_SMP and SMP CRIS is experimental, it has never been identified as a problem. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
* Allow rwlocks to re-enable interruptsRobin Holt2009-04-02
| | | | | | | | | | | | | | | | | Pass the original flags to rwlock arch-code, so that it can re-enable interrupts if implemented for that architecture. Initially, make __raw_read_lock_flags and __raw_write_lock_flags stubs which just do the same thing as non-flags variants. Signed-off-by: Petr Tesarik <ptesarik@suse.cz> Signed-off-by: Robin Holt <holt@sgi.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: <linux-arch@vger.kernel.org> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* cris: introduce asm/swab.hHarvey Harrison2009-01-14
| | | | | | | Adjust the arch overrides to the new names as well. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [CRIS] Move header files from include to arch/cris/include.Jesper Nilsson2008-10-29
Change all users of header files to correct path. Remove some unneeded headers for arch-v32. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>