aboutsummaryrefslogtreecommitdiffstats
path: root/arch/nios2/kernel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-07-03Merge tag 'nios2-v4.2' of git://git.rocketboards.org/linux-socfpga-nextLinus Torvalds1-2/+13
Pull nios2 update from Ley Foon Tan: "Check number of timer instances" * tag 'nios2-v4.2' of git://git.rocketboards.org/linux-socfpga-next: nios2: check number of timer instances
2015-06-24nios2: check number of timer instancesLey Foon Tan1-2/+13
Display error message if number of timers is less than 2. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2015-06-19Merge branch 'mvebu/drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socHerbert Xu2-36/+69
Merge the mvebu/drivers branch of the arm-soc tree which contains just a single patch bfa1ce5f38938cc9e6c7f2d1011f88eba2b9e2b2 ("bus: mvebu-mbus: add mv_mbus_dram_info_nooverlap()") that happens to be a prerequisite of the new marvell/cesa crypto driver.
2015-06-09nios2: Export get_cyclesHerbert Xu1-0/+2
nios2 is the only architecture that does not inline get_cycles and does not export it. This breaks crypto as it uses get_cycles in a number of modules. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2015-04-24Merge tag 'nios2-v4.1-rc1' of git://git.rocketboards.org/linux-socfpga-nextLinus Torvalds2-36/+69
Pull arch/nios2 updates from Ley Foon Tan: - update cache management code - rework trap handler with new define trap #. - fix on check header warning. * tag 'nios2-v4.1-rc1' of git://git.rocketboards.org/linux-socfpga-next: nios2: rework cache nios2: Add types.h header required for __u32 type nios2: rework trap handler nios2: remove end address checking for initda
2015-04-20nios2: rework trap handlerLey Foon Tan2-36/+69
Redefine trap handler as below: 0 N/A reserved for system calls 1 SIGUSR1 user-defined signal 1 2 SIGUSR2 user-defined signal 2 3 SIGILL illegal instruction 4..29 reserved (but implemented to raise SIGILL instead of being undefined) 30 SIGTRAP KGDB 31 SIGTRAP trace/breakpoint trap Signed-off-by: Ley Foon Tan <lftan@altera.com>
2015-04-15nios2: cpuinfo: remove use of seq_printf return valueJoe Perches1-39/+38
The seq_printf return value, because it's frequently misused, will eventually be converted to void. See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Signed-off-by: Joe Perches <joe@perches.com> Cc: Ley Foon Tan <lftan@altera.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-14Merge branch 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds1-1/+0
Pull vfs update from Al Viro: "Part one: - struct filename-related cleanups - saner iov_iter_init() replacements (and switching the syscalls to use of those) - ntfs switch to ->write_iter() (Anton) - aio cleanups and splitting iocb into common and async parts (Christoph) - assorted fixes (me, bfields, Andrew Elble) There's a lot more, including the completion of switchover to ->{read,write}_iter(), d_inode/d_backing_inode annotations, f_flags race fixes, etc, but that goes after #for-davem merge. David has pulled it, and once it's in I'll send the next vfs pull request" * 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (35 commits) sg_start_req(): use import_iovec() sg_start_req(): make sure that there's not too many elements in iovec blk_rq_map_user(): use import_single_range() sg_io(): use import_iovec() process_vm_access: switch to {compat_,}import_iovec() switch keyctl_instantiate_key_common() to iov_iter switch {compat_,}do_readv_writev() to {compat_,}import_iovec() aio_setup_vectored_rw(): switch to {compat_,}import_iovec() vmsplice_to_user(): switch to import_iovec() kill aio_setup_single_vector() aio: simplify arguments of aio_setup_..._rw() aio: lift iov_iter_init() into aio_setup_..._rw() lift iov_iter into {compat_,}do_readv_writev() NFS: fix BUG() crash in notify_change() with patch to chown_common() dcache: return -ESTALE not -EBUSY on distributed fs race NTFS: Version 2.1.32 - Update file write from aio_write to write_iter. VFS: Add iov_iter_fault_in_multipages_readable() drop bogus check in file_open_root() switch security_inode_getattr() to struct path * constify tomoyo_realpath_from_path() ...
2015-04-11whack-a-mole: no need to set_fs(USER_DS) in {start,flush}_thread()Al Viro1-1/+0
flush_old_exec() has already done that. Back on 2011 a bunch of instances like that had been kicked out, but that hadn't taken care of then-out-of-tree architectures, obviously, and they served as reinfection vector... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-04-10nios2: fix cache coherency issue when debug with gdbLey Foon Tan1-1/+1
Remove the end address checking for flushda function. We need to flush each address line for flushda instruction, from start to end address. This is because flushda instruction only flush the cache if tag and line fields are matched. Change to use ldwio instruction (bypass cache) to load the instruction that causing trap. Our interest is the actual instruction that executed by the processor, this should be uncached. Note, EA address might be an userspace cached address. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2015-04-08nios2: signal: Move restart_block to struct task_structLey Foon Tan1-1/+1
See https://lkml.org/lkml/2014/10/29/643 and commit f56141e3e2d9 ("all arches, signal: move restart_block to struct task_struct") Signed-off-by: Ley Foon Tan <lftan@altera.com>
2015-03-12nios2: update pt_regsChung-Ling Tang1-2/+2
Remove struct pt_regs from user header and use generic ucontext.h. Signed-off-by: Chung-Ling Tang <cltang@codesourcery.com> Acked-by: Ley Foon Tan <lftan@altera.com>
2015-02-16nios2: add kgdb supportLey Foon Tan3-1/+183
Signed-off-by: Ley Foon Tan <lftan@altera.com>
2015-02-10nios2: add early printk supportLey Foon Tan4-1/+174
Signed-off-by: Ley Foon Tan <lftan@altera.com>
2015-01-23Merge tag 'nios2-fixes-v3.19-rc6' of git://git.rocketboards.org/linux-socfpga-nextLinus Torvalds1-1/+1
Pull one arch/nios2 fix from Ley Foon Tan: "Fix kuser trampoline address" * tag 'nios2-fixes-v3.19-rc6' of git://git.rocketboards.org/linux-socfpga-next: nios2: fix kuser trampoline address
2015-01-23Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linuxLinus Torvalds1-1/+1
Pull module and param fixes from Rusty Russell: "Surprising number of fixes this merge window :( The first two are minor fallout from the param rework which went in this merge window. The next three are a series which fixes a longstanding (but never previously reported and unlikely , so no CC stable) race between kallsyms and freeing the init section. Finally, a minor cleanup as our module refcount will now be -1 during unload" * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: module: make module_refcount() a signed integer. module: fix race in kallsyms resolution during module load success. module: remove mod arg from module_free, rename module_memfree(). module_arch_freeing_init(): new hook for archs before module->module_init freed. param: fix uninitialized read with CONFIG_DEBUG_LOCK_ALLOC param: initialize store function to NULL if not available.
2015-01-22nios2: fix kuser trampoline addressLey Foon Tan1-1/+1
__kuser_sigtramp address should be 0x1044 instead of 0x1040. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2015-01-20module: remove mod arg from module_free, rename module_memfree().Rusty Russell1-1/+1
Nothing needs the module pointer any more, and the next patch will call it from RCU, where the module itself might no longer exist. Removing the arg is the safest approach. This just codifies the use of the module_alloc/module_free pattern which ftrace and bpf use. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Alexei Starovoitov <ast@kernel.org> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Ley Foon Tan <lftan@altera.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Chris Metcalf <cmetcalf@ezchip.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: x86@kernel.org Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: linux-cris-kernel@axis.com Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: nios2-dev@lists.rocketboards.org Cc: linuxppc-dev@lists.ozlabs.org Cc: sparclinux@vger.kernel.org Cc: netdev@vger.kernel.org
2014-12-31nios2: Use preempt_schedule_irqTobias Klauser1-18/+2
Follow aa0d53260596 ("ia64: Use preempt_schedule_irq") and use preempt_schedule_irq instead of enabling/disabling interrupts and messing around with PREEMPT_ACTIVE in the nios2 low-level preemption code ourselves. Also get rid of the now needless re-check for TIF_NEED_RESCHED, preempt_schedule_irq will already take care of rescheduling. This also fixes the following build error when building with CONFIG_PREEMPT: arch/nios2/kernel/built-in.o: In function `need_resched': arch/nios2/kernel/entry.S:374: undefined reference to `PREEMPT_ACTIVE' Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Ley Foon Tan <lftan@altera.com>
2014-12-31nios2: Initialize cpuinfo.mmuWalter Goossens1-0/+1
This patch initializes the mmu field of the cpuinfo structure to the value supplied by the devicetree. Signed-off-by: Walter Goossens <waltergoossens@home.nl> Acked-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: asm-offsets: Remove unused definition TI_TASKTobias Klauser1-1/+0
TI_TASK is not used in nios2 assembly code, so remove it. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Remove write-only struct member from nios2_timerTobias Klauser1-2/+0
The irq member of struct nios2_timer is only written to but never read, thus it can be removed. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: fix error handling of irq_of_parse_and_mapDmitry Torokhov1-1/+1
Return value of irq_of_parse_and_map() is unsigned int, with 0 indicating failure, so testing for negative result never works. Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Use IS_ENABLED instead of #ifdefs to check config symbolsTobias Klauser1-9/+5
Make the checking for div/mul/mulx instruction config symbols easier to read by using IS_ENABLED instead of #ifdefs. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Build infrastructureLey Foon Tan3-0/+132
This patch adds Makefile and Kconfig files required for building a nios2 kernel. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: ptrace supportLey Foon Tan1-0/+166
Add ptrace support for nios2. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Module supportLey Foon Tan1-0/+138
This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Cpuinfo handlingLey Foon Tan1-0/+201
Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Time keepingLey Foon Tan1-0/+310
Add time keeping code for nios2. Signed-off-by: Ley Foon Tan <lftan@altera.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2014-12-08nios2: Device tree supportLey Foon Tan1-0/+65
Add device tree support to arch/nios2. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Signal handling supportLey Foon Tan1-0/+323
This patch adds support for signal handling. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: System calls handlingLey Foon Tan2-0/+82
This patch adds support for system calls from userspaces. It uses the asm-generic/unistd.h definitions with architecture spcific syscall. The sys_call_table is just an array defined in a C file and it contains pointers to the syscall functions. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Interrupt handlingLey Foon Tan1-0/+93
This patch adds the support for IRQ handling. Signed-off-by: Ley Foon Tan <lftan@altera.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2014-12-08nios2: Process managementLey Foon Tan1-0/+258
This patch adds support for thread creation and context switching. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Traps exception handlingLey Foon Tan2-0/+777
This patch contains traps exception handling. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Exception handlingLey Foon Tan2-0/+811
This patch contains the exception entry code (kernel/entry.S) and misaligned exception. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Kernel booting and initializationLey Foon Tan2-0/+393
This patch adds the kernel booting and the initial setup code. Signed-off-by: Ley Foon Tan <lftan@altera.com>
2014-12-08nios2: Assembly macros and definitionsLey Foon Tan1-0/+88
This patch add assembly macros and definitions used in the .S files across arch/nios2/ and together with asm-offsets.c. Signed-off-by: Ley Foon Tan <lftan@altera.com>