Re: [PATCH v2 12/29] nios2: Interrupt handling

2014-07-18 Thread Ley Foon Tan
On Thu, Jul 17, 2014 at 9:58 PM, Thomas Gleixner t...@linutronix.de wrote: On Thu, 17 Jul 2014, Ley Foon Tan wrote: On Tue, Jul 15, 2014 at 5:51 PM, Thomas Gleixner t...@linutronix.de wrote: On Tue, 15 Jul 2014, Ley Foon Tan wrote: +static void chip_unmask(struct irq_data *d

Re: [PATCH v2 20/29] nios2: Cpuinfo handling

2014-07-17 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:47 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:47 Ley Foon Tan wrote: >> +static void *cpuinfo_start(struct seq_file *m, loff_t *pos) >> +{ >> + unsigned long i = *pos; >> + >> + return i < num_possi

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-17 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:03 PM, Thomas Gleixner wrote: > On Tue, 15 Jul 2014, Ley Foon Tan wrote: > +static inline int atomic_futex_op_xchg_set(int oparg, u32 __user *uaddr, >> +int *oldval) >> +{ >> + unsigned long

Re: [PATCH v2 12/29] nios2: Interrupt handling

2014-07-17 Thread Ley Foon Tan
On Thu, Jul 17, 2014 at 5:24 PM, Arnd Bergmann wrote: > On Thursday 17 July 2014 14:15:44 Ley Foon Tan wrote: >> On Tue, Jul 15, 2014 at 5:27 PM, Arnd Bergmann wrote: >> > On Tuesday 15 July 2014 16:45:39 Ley Foon Tan wrote: >> >> +#ifndef _ASM_NIOS2_IRQ_H &

Re: [PATCH v2 12/29] nios2: Interrupt handling

2014-07-17 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:51 PM, Thomas Gleixner wrote: > On Tue, 15 Jul 2014, Ley Foon Tan wrote: >> +#ifndef _ASM_NIOS2_IRQ_H >> +#define _ASM_NIOS2_IRQ_H >> + >> +#define NIOS2_CPU_NR_IRQS32 >> +/* Reserve 32 additional interrupts for

Re: [PATCH v2 12/29] nios2: Interrupt handling

2014-07-17 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:27 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:39 Ley Foon Tan wrote: >> +#ifndef _ASM_NIOS2_IRQ_H >> +#define _ASM_NIOS2_IRQ_H >> + >> +#define NIOS2_CPU_NR_IRQS32 >> +/* Reserve 32 additional interrupts for

Re: [PATCH v2 12/29] nios2: Interrupt handling

2014-07-17 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:27 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:39 Ley Foon Tan wrote: +#ifndef _ASM_NIOS2_IRQ_H +#define _ASM_NIOS2_IRQ_H + +#define NIOS2_CPU_NR_IRQS32 +/* Reserve 32 additional interrupts for GPIO IRQs */ +#define NR_IRQS

Re: [PATCH v2 12/29] nios2: Interrupt handling

2014-07-17 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:51 PM, Thomas Gleixner t...@linutronix.de wrote: On Tue, 15 Jul 2014, Ley Foon Tan wrote: +#ifndef _ASM_NIOS2_IRQ_H +#define _ASM_NIOS2_IRQ_H + +#define NIOS2_CPU_NR_IRQS32 +/* Reserve 32 additional interrupts for GPIO IRQs */ +#define NR_IRQS

Re: [PATCH v2 12/29] nios2: Interrupt handling

2014-07-17 Thread Ley Foon Tan
On Thu, Jul 17, 2014 at 5:24 PM, Arnd Bergmann a...@arndb.de wrote: On Thursday 17 July 2014 14:15:44 Ley Foon Tan wrote: On Tue, Jul 15, 2014 at 5:27 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:39 Ley Foon Tan wrote: +#ifndef _ASM_NIOS2_IRQ_H +#define

Re: [PATCH v2 21/29] nios2: Futex operations

2014-07-17 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:03 PM, Thomas Gleixner t...@linutronix.de wrote: On Tue, 15 Jul 2014, Ley Foon Tan wrote: +static inline int atomic_futex_op_xchg_set(int oparg, u32 __user *uaddr, +int *oldval) +{ + unsigned long flags; + int ret

Re: [PATCH v2 20/29] nios2: Cpuinfo handling

2014-07-17 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:47 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:47 Ley Foon Tan wrote: +static void *cpuinfo_start(struct seq_file *m, loff_t *pos) +{ + unsigned long i = *pos; + + return i num_possible_cpus() ? (void *) (i + 1) : NULL

Re: [PATCH v2 22/29] nios2: Miscellaneous header files

2014-07-16 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:22 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:49 Ley Foon Tan wrote: >> diff --git a/arch/nios2/include/asm/gpio.h b/arch/nios2/include/asm/gpio.h >> new file mode 100644 >> index 000..e726bfc >> --- /dev/null >> ++

Re: [PATCH v2 22/29] nios2: Miscellaneous header files

2014-07-16 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:22 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:49 Ley Foon Tan wrote: diff --git a/arch/nios2/include/asm/gpio.h b/arch/nios2/include/asm/gpio.h new file mode 100644 index 000..e726bfc --- /dev/null +++ b/arch/nios2/include/asm/gpio.h

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:24 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: > >> +void module_arch_cleanup(struct module *mod) >> +{ >> +} > > This is not needed at all. > Okay, will remove this. -- To unsubscribe from this list:

Re: [PATCH v2 00/29] nios2 Linux kernel port

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 7:15 PM, Tobias Klauser wrote: > Hi Ley Foon > > Ah, thanks for the notice. Is it still possible to use the old syscall > ABI as a replacement on top of this series and use the current toolchain > from Mentor Graphics? Hi Tobias There are other changes in the nios2

Re: [PATCH v2 27/29] MAINTAINERS: Add nios2 maintainer

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 7:10 PM, Joe Perches wrote: > On Tue, 2014-07-15 at 16:45 +0800, Ley Foon Tan wrote: >> Signed-off-by: Ley Foon Tan > > trivia: > >> diff --git a/MAINTAINERS b/MAINTAINERS > [] >> @@ -6350,6 +6350,13 @@ S: Maintained > [] >>

Re: [PATCH v2 06/29] nios2: I/O Mapping

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:22 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:33 Ley Foon Tan wrote: >> +#ifdef __IO_USE_DUFFS >> + >> +/* Use "Duff's Device" to unroll the loops. */ >> +#define __IO_OUT_LOOP(a, b, l)

Re: [PATCH v2 18/29] nios2: Device tree support

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:41 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:45 Ley Foon Tan wrote: >> +static struct of_device_id altera_of_bus_ids[] __initdata = { >> + { .compatible = "simple-bus", }, >> + { .compatible = "altr,avalon&q

Re: [PATCH v2 26/29] Add ELF machine define for Nios2

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:04 PM, Tobias Klauser wrote: > > On 2014-07-15 at 10:45:53 +0200, Ley Foon Tan wrote: > > Signed-off-by: Ley Foon Tan > > This should probably be sent/applied before "[PATCH v2 14/29] nios2: ELF > definitions", since there EM_ALTERA_NIO

Re: [PATCH v2 00/29] nios2 Linux kernel port

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:08 PM, Tobias Klauser wrote: > > On 2014-07-15 at 10:45:27 +0200, Ley Foon Tan wrote: > > Very nice work Ley Foon! It's great to see the Nios II port finally > making it upstream. > > I'll test the series on the NEEK and my custom board some

[PATCH v2 02/29] nios2: Kernel booting and initialization

2014-07-15 Thread Ley Foon Tan
This patch adds the kernel booting and the initial setup code. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/entry.h | 152 arch/nios2/include/asm/setup.h | 38 +++ arch/nios2/kernel/head.S | 175 arch/nios2

[PATCH v2 04/29] nios2: Traps exception handling

2014-07-15 Thread Ley Foon Tan
This patch contains traps exception handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/traps.h | 19 ++ arch/nios2/kernel/insnemu.S| 592 + arch/nios2/kernel/traps.c | 185 + 3 files changed, 796 insertions(+) create

[PATCH v2 28/29] Documentation: Add documentation for Nios2 architecture

2014-07-15 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- Documentation/nios2/README | 23 +++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/nios2/README diff --git a/Documentation/nios2/README b/Documentation/nios2/README new file mode 100644 index 000..054a67d --- /dev/null

[PATCH v2 11/29] nios2: TLB handling

2014-07-15 Thread Ley Foon Tan
This patch adds the TLB maintenance functions. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/tlb.h | 34 + arch/nios2/include/asm/tlbflush.h | 46 +++ arch/nios2/mm/tlb.c | 274 ++ 3 files changed, 354 insertions

[PATCH v2 10/29] nios2: Cache handling

2014-07-15 Thread Ley Foon Tan
This patch adds functionality required for cache maintenance. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cache.h | 36 + arch/nios2/include/asm/cacheflush.h | 54 arch/nios2/mm/cacheflush.c | 270 3 files changed, 360

[PATCH v2 09/29] nios2: Process management

2014-07-15 Thread Ley Foon Tan
This patch adds support for thread creation and context switching. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/mmu_context.h | 66 + arch/nios2/include/asm/processor.h | 102 ++ arch/nios2/include/asm/switch_to.h | 31 + arch/nios2/include/asm

[PATCH v2 19/29] nios2: Time keeping

2014-07-15 Thread Ley Foon Tan
Add time keeping code for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/delay.h | 92 + arch/nios2/include/asm/timex.h | 27 arch/nios2/kernel/time.c | 150 + 3 files changed, 269 insertions

[PATCH v2 18/29] nios2: Device tree support

2014-07-15 Thread Ley Foon Tan
Add device tree support to arch/nios2. Signed-off-by: Ley Foon Tan --- Documentation/devicetree/bindings/nios2/nios2.txt | 62 + Documentation/devicetree/bindings/nios2/timer.txt | 19 +++ arch/nios2/boot/dts/3c120_devboard.dts| 155 ++ arch/nios2/boot

[PATCH v2 12/29] nios2: Interrupt handling

2014-07-15 Thread Ley Foon Tan
This patch adds the support for IRQ handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/irq.h | 34 +++ arch/nios2/include/asm/irqflags.h | 69 ++ arch/nios2/kernel/irq.c | 90 +++ 3 files

[PATCH v2 20/29] nios2: Cpuinfo handling

2014-07-15 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cpuinfo.h | 57 +++ arch/nios2/kernel/cpuinfo.c | 201 +++ 2 files changed, 258 insertions(+) create mode 100644 arch/nios2/include/asm/cpuinfo.h create mode 100644 arch/nios2/kernel

[PATCH v2 25/29] nios2: ptrace support

2014-07-15 Thread Ley Foon Tan
Add ptrace support for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/ptrace.h | 33 +++ arch/nios2/include/uapi/asm/ptrace.h | 120 +++ arch/nios2/kernel/ptrace.c | 180 +++ 3 files changed, 333 insertions

[PATCH v2 13/29] nios2: DMA mapping API

2014-07-15 Thread Ley Foon Tan
This patch adds support for the DMA mapping API. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/dma-mapping.h | 106 arch/nios2/mm/dma-mapping.c | 186 +++ 2 files changed, 292 insertions(+) create mode 100644 arch/nios2

[PATCH v2 15/29] nios2: System calls handling

2014-07-15 Thread Ley Foon Tan
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 --- arch/nios2

[PATCH v2 16/29] nios2: Signal handling support

2014-07-15 Thread Ley Foon Tan
This patch adds support for signal handling. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/signal.h | 22 +++ arch/nios2/include/asm/ucontext.h| 34 arch/nios2/include/uapi/asm/sigcontext.h | 30 +++ arch/nios2/include/uapi/asm/signal.h | 23 +++ arch

[PATCH v2 26/29] Add ELF machine define for Nios2

2014-07-15 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- include/uapi/linux/elf-em.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index 01529bd..7f06c0d 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h @@ -33,6 +33,7 @@ #define

[PATCH v2 22/29] nios2: Miscellaneous header files

2014-07-15 Thread Ley Foon Tan
This patch introduces a few nios2-specific header files. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/cmpxchg.h| 61 + arch/nios2/include/asm/gpio.h | 23 + arch/nios2/include/asm/linkage.h| 25 ++ arch

[PATCH v2 23/29] nios2: Nios2 registers

2014-07-15 Thread Ley Foon Tan
This file contains constants for the instruction macros, cpu registers, fields and bits. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/registers.h | 71 ++ 1 file changed, 71 insertions(+) create mode 100644 arch/nios2/include/asm/registers.h diff

[PATCH v2 27/29] MAINTAINERS: Add nios2 maintainer

2014-07-15 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e31c874..db2bdf1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6350,6 +6350,13 @@ S: Maintained F: Documentation/scsi/NinjaSCSI.txt F: drivers

[PATCH v2 29/29] nios2: Build infrastructure

2014-07-15 Thread Ley Foon Tan
This patch adds Makefile and Kconfig files required for building a nios2 kernel. Signed-off-by: Ley Foon Tan --- arch/nios2/Kconfig | 199 +++ arch/nios2/Kconfig.debug | 17 +++ arch/nios2/Makefile | 78

[PATCH v2 21/29] nios2: Futex operations

2014-07-15 Thread Ley Foon Tan
This patch introduces the futex operation. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/futex-irq.h | 130 + arch/nios2/include/asm/futex.h | 110 +++ 2 files changed, 240 insertions(+) create mode 100644 arch/nios2

[PATCH v2 14/29] nios2: ELF definitions

2014-07-15 Thread Ley Foon Tan
This patch adds definitions for the ELF format Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/elf.h | 101 ++ arch/nios2/include/uapi/asm/elf.h | 67 + 2 files changed, 168 insertions(+) create mode 100644 arch/nios2

[PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Ley Foon Tan
This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan --- arch/nios2/kernel/module.c | 135 + 1 file changed, 135 insertions(+) create mode 100644 arch/nios2/kernel/module.c diff --git a/arch/nios2/kernel/module.c b/arch/nios2

[PATCH v2 17/29] nios2: Library functions

2014-07-15 Thread Ley Foon Tan
Add optimised library functions for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/checksum.h | 78 +++ arch/nios2/include/asm/string.h | 24 + arch/nios2/lib/memcpy.c | 199 ++ arch/nios2/lib/memmove.c

[PATCH v2 08/29] nios2: Page table management

2014-07-15 Thread Ley Foon Tan
This patch adds support for page table management. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/pgalloc.h | 86 ++ arch/nios2/include/asm/pgtable-bits.h | 35 arch/nios2/include/asm/pgtable.h | 305 ++ arch/nios2/mm/pgtable.c

[PATCH v2 07/29] nios2: MMU Fault handling

2014-07-15 Thread Ley Foon Tan
This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch, kernel/entry.S). Signed-off-by: Ley Foon Tan --- arch/nios2/mm/extable.c | 25 + arch/nios2/mm/fault.c | 245 2 files changed

[PATCH v2 05/29] nios2: Memory management

2014-07-15 Thread Ley Foon Tan
This patch contains the initialisation of the memory blocks, MMU attributes and the memory map. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/mmu.h | 18 +++ arch/nios2/include/asm/page.h| 113 +++ arch/nios2/include/asm/uaccess.h | 233

[PATCH v2 06/29] nios2: I/O Mapping

2014-07-15 Thread Ley Foon Tan
This patch adds several definitions for I/O accessors and ioremap(). Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/io.h | 174 arch/nios2/lib/io.c | 59 ++ arch/nios2/mm/ioremap.c | 188

[PATCH v2 00/29] nios2 Linux kernel port

2014-07-15 Thread Ley Foon Tan
rt * update io.h * update nios2 documentation * add futex support * bug fixes patchset history - [v1] : https://lkml.org/lkml/2014/4/18/216 Ley Foon Tan (29): nios2: Assembly macros and definitions nios2: Kernel booting and initialization nios2: Exception handling nios2:

[PATCH v2 01/29] nios2: Assembly macros and definitions

2014-07-15 Thread Ley Foon Tan
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 --- arch/nios2/include/asm/asm-macros.h | 309 +++ arch/nios2/include/asm/asm-offsets.h | 20 +++ arch/nios2

[PATCH v2 03/29] nios2: Exception handling

2014-07-15 Thread Ley Foon Tan
This patch contains the exception entry code (kernel/entry.S) and misaligned exception. Signed-off-by: Ley Foon Tan --- arch/nios2/kernel/entry.S | 554 + arch/nios2/kernel/misaligned.c | 255 +++ 2 files changed, 809 insertions

[PATCH v2 03/29] nios2: Exception handling

2014-07-15 Thread Ley Foon Tan
This patch contains the exception entry code (kernel/entry.S) and misaligned exception. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/kernel/entry.S | 554 + arch/nios2/kernel/misaligned.c | 255 +++ 2 files changed, 809

[PATCH v2 00/29] nios2 Linux kernel port

2014-07-15 Thread Ley Foon Tan
* update nios2 documentation * add futex support * bug fixes patchset history - [v1] : https://lkml.org/lkml/2014/4/18/216 Ley Foon Tan (29): nios2: Assembly macros and definitions nios2: Kernel booting and initialization nios2: Exception handling nios2: Traps exception handling

[PATCH v2 01/29] nios2: Assembly macros and definitions

2014-07-15 Thread Ley Foon Tan
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 lf...@altera.com --- arch/nios2/include/asm/asm-macros.h | 309 +++ arch/nios2/include/asm/asm-offsets.h | 20

[PATCH v2 05/29] nios2: Memory management

2014-07-15 Thread Ley Foon Tan
This patch contains the initialisation of the memory blocks, MMU attributes and the memory map. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/mmu.h | 18 +++ arch/nios2/include/asm/page.h| 113 +++ arch/nios2/include/asm/uaccess.h | 233

[PATCH v2 06/29] nios2: I/O Mapping

2014-07-15 Thread Ley Foon Tan
This patch adds several definitions for I/O accessors and ioremap(). Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/io.h | 174 arch/nios2/lib/io.c | 59 ++ arch/nios2/mm/ioremap.c | 188

[PATCH v2 08/29] nios2: Page table management

2014-07-15 Thread Ley Foon Tan
This patch adds support for page table management. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/pgalloc.h | 86 ++ arch/nios2/include/asm/pgtable-bits.h | 35 arch/nios2/include/asm/pgtable.h | 305 ++ arch/nios2

[PATCH v2 07/29] nios2: MMU Fault handling

2014-07-15 Thread Ley Foon Tan
This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch, kernel/entry.S). Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/mm/extable.c | 25 + arch/nios2/mm/fault.c | 245

[PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Ley Foon Tan
This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/kernel/module.c | 135 + 1 file changed, 135 insertions(+) create mode 100644 arch/nios2/kernel/module.c diff --git a/arch/nios2/kernel/module.c

[PATCH v2 17/29] nios2: Library functions

2014-07-15 Thread Ley Foon Tan
Add optimised library functions for nios2. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/checksum.h | 78 +++ arch/nios2/include/asm/string.h | 24 + arch/nios2/lib/memcpy.c | 199 ++ arch/nios2/lib

[PATCH v2 27/29] MAINTAINERS: Add nios2 maintainer

2014-07-15 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan lf...@altera.com --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index e31c874..db2bdf1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6350,6 +6350,13 @@ S: Maintained F: Documentation/scsi/NinjaSCSI.txt

[PATCH v2 29/29] nios2: Build infrastructure

2014-07-15 Thread Ley Foon Tan
This patch adds Makefile and Kconfig files required for building a nios2 kernel. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/Kconfig | 199 +++ arch/nios2/Kconfig.debug | 17 +++ arch/nios2/Makefile

[PATCH v2 21/29] nios2: Futex operations

2014-07-15 Thread Ley Foon Tan
This patch introduces the futex operation. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/futex-irq.h | 130 + arch/nios2/include/asm/futex.h | 110 +++ 2 files changed, 240 insertions(+) create mode

[PATCH v2 14/29] nios2: ELF definitions

2014-07-15 Thread Ley Foon Tan
This patch adds definitions for the ELF format Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/elf.h | 101 ++ arch/nios2/include/uapi/asm/elf.h | 67 + 2 files changed, 168 insertions(+) create mode

[PATCH v2 22/29] nios2: Miscellaneous header files

2014-07-15 Thread Ley Foon Tan
This patch introduces a few nios2-specific header files. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/cmpxchg.h| 61 + arch/nios2/include/asm/gpio.h | 23 + arch/nios2/include/asm/linkage.h| 25

[PATCH v2 23/29] nios2: Nios2 registers

2014-07-15 Thread Ley Foon Tan
This file contains constants for the instruction macros, cpu registers, fields and bits. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/registers.h | 71 ++ 1 file changed, 71 insertions(+) create mode 100644 arch/nios2/include/asm

[PATCH v2 26/29] Add ELF machine define for Nios2

2014-07-15 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan lf...@altera.com --- include/uapi/linux/elf-em.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/elf-em.h b/include/uapi/linux/elf-em.h index 01529bd..7f06c0d 100644 --- a/include/uapi/linux/elf-em.h +++ b/include/uapi/linux/elf-em.h @@ -33,6

[PATCH v2 15/29] nios2: System calls handling

2014-07-15 Thread Ley Foon Tan
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 lf...@altera.com

[PATCH v2 16/29] nios2: Signal handling support

2014-07-15 Thread Ley Foon Tan
This patch adds support for signal handling. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/signal.h | 22 +++ arch/nios2/include/asm/ucontext.h| 34 arch/nios2/include/uapi/asm/sigcontext.h | 30 +++ arch/nios2/include/uapi/asm/signal.h

[PATCH v2 13/29] nios2: DMA mapping API

2014-07-15 Thread Ley Foon Tan
This patch adds support for the DMA mapping API. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/dma-mapping.h | 106 arch/nios2/mm/dma-mapping.c | 186 +++ 2 files changed, 292 insertions(+) create mode

[PATCH v2 25/29] nios2: ptrace support

2014-07-15 Thread Ley Foon Tan
Add ptrace support for nios2. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/ptrace.h | 33 +++ arch/nios2/include/uapi/asm/ptrace.h | 120 +++ arch/nios2/kernel/ptrace.c | 180 +++ 3 files changed

[PATCH v2 20/29] nios2: Cpuinfo handling

2014-07-15 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/cpuinfo.h | 57 +++ arch/nios2/kernel/cpuinfo.c | 201 +++ 2 files changed, 258 insertions(+) create mode 100644 arch/nios2/include/asm/cpuinfo.h create mode 100644 arch

[PATCH v2 12/29] nios2: Interrupt handling

2014-07-15 Thread Ley Foon Tan
This patch adds the support for IRQ handling. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/irq.h | 34 +++ arch/nios2/include/asm/irqflags.h | 69 ++ arch/nios2/kernel/irq.c | 90

[PATCH v2 19/29] nios2: Time keeping

2014-07-15 Thread Ley Foon Tan
Add time keeping code for nios2. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/delay.h | 92 + arch/nios2/include/asm/timex.h | 27 arch/nios2/kernel/time.c | 150 + 3 files changed, 269

[PATCH v2 18/29] nios2: Device tree support

2014-07-15 Thread Ley Foon Tan
Add device tree support to arch/nios2. Signed-off-by: Ley Foon Tan lf...@altera.com --- Documentation/devicetree/bindings/nios2/nios2.txt | 62 + Documentation/devicetree/bindings/nios2/timer.txt | 19 +++ arch/nios2/boot/dts/3c120_devboard.dts| 155

[PATCH v2 09/29] nios2: Process management

2014-07-15 Thread Ley Foon Tan
This patch adds support for thread creation and context switching. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/mmu_context.h | 66 + arch/nios2/include/asm/processor.h | 102 ++ arch/nios2/include/asm/switch_to.h | 31 + arch/nios2

[PATCH v2 10/29] nios2: Cache handling

2014-07-15 Thread Ley Foon Tan
This patch adds functionality required for cache maintenance. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/cache.h | 36 + arch/nios2/include/asm/cacheflush.h | 54 arch/nios2/mm/cacheflush.c | 270 3

[PATCH v2 11/29] nios2: TLB handling

2014-07-15 Thread Ley Foon Tan
This patch adds the TLB maintenance functions. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/tlb.h | 34 + arch/nios2/include/asm/tlbflush.h | 46 +++ arch/nios2/mm/tlb.c | 274 ++ 3 files changed, 354

[PATCH v2 28/29] Documentation: Add documentation for Nios2 architecture

2014-07-15 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan lf...@altera.com --- Documentation/nios2/README | 23 +++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/nios2/README diff --git a/Documentation/nios2/README b/Documentation/nios2/README new file mode 100644 index 000

[PATCH v2 04/29] nios2: Traps exception handling

2014-07-15 Thread Ley Foon Tan
This patch contains traps exception handling. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/traps.h | 19 ++ arch/nios2/kernel/insnemu.S| 592 + arch/nios2/kernel/traps.c | 185 + 3 files changed, 796

[PATCH v2 02/29] nios2: Kernel booting and initialization

2014-07-15 Thread Ley Foon Tan
This patch adds the kernel booting and the initial setup code. Signed-off-by: Ley Foon Tan lf...@altera.com --- arch/nios2/include/asm/entry.h | 152 arch/nios2/include/asm/setup.h | 38 +++ arch/nios2/kernel/head.S | 175

Re: [PATCH v2 00/29] nios2 Linux kernel port

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:08 PM, Tobias Klauser tklau...@distanz.ch wrote: On 2014-07-15 at 10:45:27 +0200, Ley Foon Tan lf...@altera.com wrote: Very nice work Ley Foon! It's great to see the Nios II port finally making it upstream. I'll test the series on the NEEK and my custom board some

Re: [PATCH v2 26/29] Add ELF machine define for Nios2

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:04 PM, Tobias Klauser tklau...@distanz.ch wrote: On 2014-07-15 at 10:45:53 +0200, Ley Foon Tan lf...@altera.com wrote: Signed-off-by: Ley Foon Tan lf...@altera.com This should probably be sent/applied before [PATCH v2 14/29] nios2: ELF definitions, since

Re: [PATCH v2 18/29] nios2: Device tree support

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:41 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:45 Ley Foon Tan wrote: +static struct of_device_id altera_of_bus_ids[] __initdata = { + { .compatible = simple-bus, }, + { .compatible = altr,avalon, }, + {} +}; Can you

Re: [PATCH v2 06/29] nios2: I/O Mapping

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:22 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:33 Ley Foon Tan wrote: +#ifdef __IO_USE_DUFFS + +/* Use Duff's Device to unroll the loops. */ +#define __IO_OUT_LOOP(a, b, l) \ + do

Re: [PATCH v2 27/29] MAINTAINERS: Add nios2 maintainer

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 7:10 PM, Joe Perches j...@perches.com wrote: On Tue, 2014-07-15 at 16:45 +0800, Ley Foon Tan wrote: Signed-off-by: Ley Foon Tan lf...@altera.com trivia: diff --git a/MAINTAINERS b/MAINTAINERS [] @@ -6350,6 +6350,13 @@ S: Maintained [] +NIOS2 ARCHITECTURE +M

Re: [PATCH v2 00/29] nios2 Linux kernel port

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 7:15 PM, Tobias Klauser tklau...@distanz.ch wrote: Hi Ley Foon Ah, thanks for the notice. Is it still possible to use the old syscall ABI as a replacement on top of this series and use the current toolchain from Mentor Graphics? Hi Tobias There are other changes in

Re: [PATCH v2 24/29] nios2: Module support

2014-07-15 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 6:24 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 15 July 2014 16:45:51 Ley Foon Tan wrote: +void module_arch_cleanup(struct module *mod) +{ +} This is not needed at all. Okay, will remove this. -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH 00/25] Change time_t and clock_t to 64 bit

2014-05-14 Thread Ley Foon Tan
On Wed, May 14, 2014 at 2:10 AM, Arnd Bergmann wrote: > I've just spent two days looking at stuff that uses time_t inside > of the kernel, to get a better idea of what we actually need to > do to get provide new user interfaces for the existing architectures. > > My impression so far is that

Re: [PATCH 00/25] Change time_t and clock_t to 64 bit

2014-05-14 Thread Ley Foon Tan
On Wed, May 14, 2014 at 2:10 AM, Arnd Bergmann a...@arndb.de wrote: I've just spent two days looking at stuff that uses time_t inside of the kernel, to get a better idea of what we actually need to do to get provide new user interfaces for the existing architectures. My impression so far is

[PATCH 24/25] x86: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/x86/include/uapi/asm/posix_types_32.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/include/uapi/asm/posix_types_32.h b/arch/x86/include/uapi/asm/posix_types_32.h index 8e52505

Re: [PATCH 17/25] parisc: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
On Wed, May 14, 2014 at 4:17 AM, Helge Deller wrote: > Hi Ley, > > On 05/13/2014 11:06 AM, Ley Foon Tan wrote: >> Override time_t and clock_t in include/uapi/asm-generic. >> >> Signed-off-by: Ley Foon Tan >> --- >> arch/parisc/include/uapi/asm/posix_typ

Re: [PATCH 04/25] avr32: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
On Wed, May 14, 2014 at 4:19 AM, Hans-Christian Egtvedt wrote: > Around Tue 13 May 2014 17:02:49 +0800 or thereabout, Ley Foon Tan wrote: >> Override time_t and clock_t in include/uapi/asm-generic. >> >> Signed-off-by: Ley Foon Tan > > Acked-by: Hans-Christian Egtvedt

Re: [PATCH 01/25] asm-generic: Change time_t and clock_t to 64 bit

2014-05-13 Thread Ley Foon Tan
On Tue, May 13, 2014 at 5:50 PM, James Hogan wrote: > Hi, > > On 13/05/14 10:32, Ley Foon Tan wrote: >> On Tue, May 13, 2014 at 5:15 PM, James Hogan wrote: >>> On 13 May 2014 10:02, Ley Foon Tan wrote: >>>> /* >>>> + * Use 64 bit time_t

Re: [PATCH 16/25] openrisc: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
On Tue, May 13, 2014 at 5:30 PM, Jonas Bonn wrote: > On 05/13/2014 11:05 AM, Ley Foon Tan wrote: >> Override time_t and clock_t in include/uapi/asm-generic. >> >> diff --git a/arch/openrisc/include/uapi/asm/posix_types.h >> b/arch/openrisc/include/uapi/asm/posix_type

Re: [PATCH 01/25] asm-generic: Change time_t and clock_t to 64 bit

2014-05-13 Thread Ley Foon Tan
On Tue, May 13, 2014 at 5:15 PM, James Hogan wrote: > Hi, > > On 13 May 2014 10:02, Ley Foon Tan wrote: >> Use 64 bit time_t and clock_t as default. 32 bit users can provide >> an override to define these as "long" if needed. >> >> Signed-off-by: Ley Fo

Re: [PATCH 12/25] metag: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
On Tue, May 13, 2014 at 5:22 PM, James Hogan wrote: > Hi, > > On 13/05/14 10:04, Ley Foon Tan wrote: >> Override time_t and clock_t in include/uapi/asm-generic. >> >> Signed-off-by: Ley Foon Tan >> --- >> arch/metag/include/asm/Kbuild | 1 -

Re: [PATCH 00/25] Change time_t and clock_t to 64 bit

2014-05-13 Thread Ley Foon Tan
On Tue, May 13, 2014 at 5:10 PM, Geert Uytterhoeven wrote: > Hi, > > On Tue, May 13, 2014 at 10:57 AM, Ley Foon Tan wrote: >> This patchset change default time_t and clock_t to 64 bit in >> include/uapi/asm-generic/posix_types.h. The existing 32 bit architectures >&g

[PATCH 02/25] arc: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/arc/include/asm/Kbuild | 1 - arch/arc/include/uapi/asm/Kbuild| 1 + arch/arc/include/uapi/asm/posix_types.h | 17 + 3 files changed, 18 insertions(+), 1 deletion

[PATCH 05/25] blackfin: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/blackfin/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/blackfin/include/uapi/asm/posix_types.h b/arch/blackfin/include/uapi/asm/posix_types.h index

[PATCH 08/25] frv: Add 32 bit time_t and clock_t

2014-05-13 Thread Ley Foon Tan
Override time_t and clock_t in include/uapi/asm-generic. Signed-off-by: Ley Foon Tan --- arch/frv/include/uapi/asm/posix_types.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/frv/include/uapi/asm/posix_types.h b/arch/frv/include/uapi/asm/posix_types.h index fe512af..0a837e6

<    5   6   7   8   9   10   11   12   13   >