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 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 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: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 and

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 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

[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 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 we're

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

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 b

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 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 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 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 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 kernel

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 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 12/29] nios2: Interrupt handling

2014-07-16 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-16 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 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 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

[PATCH 09/28] nios2: Page table management

2014-04-18 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 | 304 ++ arch/nios2/mm/pgtable.c

[PATCH 23/28] nios2: Nios2 registers

2014-04-18 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 | 65 ++ 1 file changed, 65 insertions(+) create mode 100644 arch/nios2/include/asm/registers.h diff

[PATCH 17/28] nios2: Signal handling support

2014-04-18 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/nios2

[PATCH 15/28] nios2: ELF definitions

2014-04-18 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 12/28] nios2: TLB handling

2014-04-18 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 28/28] Documentation: Add documentation for Nios2 architecture

2014-04-18 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..33eec4d --- /dev/null

[PATCH 10/28] nios2: Process management

2014-04-18 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 04/28] nios2: Exception handling

2014-04-18 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 | 551 + arch/nios2/kernel/misaligned.c | 319 2 files changed, 870 insertions

[PATCH 20/28] nios2: Time keeping

2014-04-18 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 18/28] nios2: Library functions

2014-04-18 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 06/28] nios2: Memory management

2014-04-18 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| 111 +++ arch/nios2/include/asm/uaccess.h | 233

[PATCH 16/28] nios2: System calls handling

2014-04-18 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 13/28] nios2: Interrupt handling

2014-04-18 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 19/28] nios2: Device tree support

2014-04-18 Thread Ley Foon Tan
Add device tree support to arch/nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/boot/dts/3c120_devboard.dts | 205 + arch/nios2/boot/linked_dtb.S | 19 +++ arch/nios2/include/asm/prom.h | 26 + arch/nios2/kernel/prom.c

[PATCH 22/28] nios2: Miscellaneous header files

2014-04-18 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 24/28] nios2: Module support

2014-04-18 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 25/28] nios2: ptrace support

2014-04-18 Thread Ley Foon Tan
Add ptrace support for nios2. Signed-off-by: Ley Foon Tan --- arch/nios2/include/asm/ptrace.h | 40 +++ arch/nios2/include/uapi/asm/ptrace.h | 123 ++ arch/nios2/kernel/ptrace.c | 198 +++ 3 files changed, 361 insertions

[PATCH 00/28] nios2 Linux kernel port

2014-04-18 Thread Ley Foon Tan
and and will be in the FSF 4.9 release. These patches are also available on this branch: git://git.rocketboards.org/linux-socfpga-next.git nios2-upstream Regards, Ley Foon Ley Foon Tan (28): nios2: Build infrastructure nios2: Assembly macros and definitions nios2: Kernel booting and

[PATCH 27/28] MAINTAINERS: Add nios2 maintainer

2014-04-18 Thread Ley Foon Tan
Signed-off-by: Ley Foon Tan --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 80399ff..389f3d5315b69660060f34617df402e27323c543 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6247,6 +6247,13 @@ S: Maintained F: Documentation

[PATCH 26/28] Add ELF machine define for Nios2

2014-04-18 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 01/28] nios2: Build infrastructure

2014-04-18 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 | 213 +++ arch/nios2/Kconfig.debug | 17 +++ arch/nios2/Makefile | 78

[PATCH 11/28] nios2: Cache handling

2014-04-18 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 | 48 +++ arch/nios2/mm/cacheflush.c | 255 3 files changed, 339

[PATCH 21/28] nios2: Cpuinfo handling

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

[PATCH 02/28] nios2: Assembly macros and definitions

2014-04-18 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 08/28] nios2: MMU Fault handling

2014-04-18 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 | 242 2 files changed

Re: [PATCH 00/28] nios2 Linux kernel port

2014-04-18 Thread Ley Foon Tan
Hi all I just found that 4 patches (03/28, 05/28,07/28 and 14/28) are missing here, because the issue in Git v1.8.3.2. But, the cover letter is correct. Do I need to resend the whole series (28 patches) or just the missing 4 patches? Thanks. Regards. On Fri, Apr 18, 2014 at 8:26 PM, Ley Foon

[PATCH 03/28] nios2: Kernel booting and initialization

2014-04-18 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 05/28] nios2: Traps exception handling

2014-04-18 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 07/28] nios2: I/O Mapping

2014-04-18 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 | 227 arch/nios2/mm/ioremap.c | 188 2 files changed, 415 insertions(+) create

[PATCH 14/28] nios2: DMA mapping API

2014-04-18 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 | 113 + arch/nios2/mm/dma-mapping.c | 186 +++ 2 files changed, 299 insertions(+) create mode 100644 arch/nios2

Re: [PATCH 00/28] nios2 Linux kernel port

2014-04-18 Thread Ley Foon Tan
Okay, I already submitted the remaining 4 patches. Thanks. On Sat, Apr 19, 2014 at 12:49 AM, Ley Foon Tan wrote: > Hi all > > I just found that 4 patches (03/28, 05/28,07/28 and 14/28) are missing > here, because the issue in Git v1.8.3.2. But, the cover letter is correct. > Do I

Re: [PATCH 01/28] nios2: Build infrastructure

2014-04-20 Thread Ley Foon Tan
for this time for consistency. Thanks. > > > > Signed-off-by: Ley Foon Tan > > --- > > > > diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig > > new file mode 100644 > > index 000..2bd0d0d7160f31a5c5890cf8a059b9f53378be6e > > --- /dev/null &g

Re: [PATCH 01/28] nios2: Build infrastructure

2014-04-20 Thread Ley Foon Tan
On Jum, 2014-04-18 at 21:41 +0200, Paul Bolle wrote: > On Fri, 2014-04-18 at 20:26 +0800, Ley Foon Tan wrote: > > diff --git a/arch/nios2/kernel/Makefile b/arch/nios2/kernel/Makefile > [...] > > +obj-$(CONFIG_CONSOLE) += console.o > > CONFIG_CONSOLE seems

Re: [PATCH 01/28] nios2: Build infrastructure

2014-04-20 Thread Ley Foon Tan
On Jum, 2014-04-18 at 21:16 +0200, Paul Bolle wrote: > On Fri, 2014-04-18 at 20:26 +0800, Ley Foon Tan wrote: > > diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig > >[...] > > +config GENERIC_FIND_NEXT_BIT > > + def_bool y > > This one is not needed, see c

Re: [PATCH 00/28] nios2 Linux kernel port

2014-04-20 Thread Ley Foon Tan
On Sat, Apr 19, 2014 at 11:30 PM, Arnd Bergmann wrote: > On Friday 18 April 2014, H. Peter Anvin wrote: >> Did the generic headers ever get updated to match Linus' guidance that >> any new architecture ports should use a 64-bit time_t? > > No, unfortunately not. With my rule that every architectur

Re: [PATCH 16/28] nios2: System calls handling

2014-04-21 Thread Ley Foon Tan
On Sun, Apr 20, 2014 at 4:12 AM, Geert Uytterhoeven wrote: >> +*/ >> + vma = find_vma(current->mm, addr); >> + if (vma == NULL || addr < vma->vm_start || addr + len > vma->vm_end) >> + return -EFAULT; >> + >> + /* Ignore the scope and cache arguments. */ > >

Re: [PATCH 16/28] nios2: System calls handling

2014-04-21 Thread Ley Foon Tan
On Sun, Apr 20, 2014 at 12:09 AM, Pavel Machek wrote: >> +/* Additional Nios II specific syscalls. */ >> +#define __NR_cacheflush (__NR_arch_specific_syscall) >> +__SYSCALL(__NR_cacheflush, sys_cacheflush) > > I guess you should Cc: Michael Kerrisk on this one. CC him this email. > > Also... expl

Re: [PATCH 09/28] nios2: Page table management

2014-04-22 Thread Ley Foon Tan
Hi On Sun, Apr 20, 2014 at 12:05 AM, Pavel Machek wrote: >> +static void pgd_init(pgd_t *pgd) >> +{ >> + unsigned long *p = (unsigned long *) pgd; >> + int i; >> + >> + for (i = 0; i < USER_PTRS_PER_PGD; i += 8) { >> + p[i + 0] = (unsigned long) invalid_pte_table; >> +

Re: [PATCH 16/28] nios2: System calls handling

2014-04-22 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 4:48 AM, Pavel Machek wrote: >> >>> +/* sys_cacheflush -- flush the processor cache. */ >> >>> +asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, >> >>> + unsigned int op) >> >>> +{ >> >>> + struct vm_area_struct *vma; >> >

Re: [PATCH 00/28] nios2 Linux kernel port

2014-04-22 Thread Ley Foon Tan
et to 64 bit on ARC or Meta, although I'm not 100% sure about ino_t and nlink_t. " Thanks. Regards Ley Foon On Mon, Apr 21, 2014 at 1:31 PM, H. Peter Anvin wrote: > On 04/20/2014 10:23 PM, Ley Foon Tan wrote: >> On Sat, Apr 19, 2014 at 11:30 PM, Arnd Bergmann wrote: >>&

Re: [PATCH 04/28] nios2: Exception handling

2014-04-22 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 6:57 PM, Ezequiel Garcia wrote: > Hi Ley Foon, > > Are you sure this is correct? Have you tested this works correctly? > > Last time I tested this, it caused the traced_system_call to be taken > for every system call. I already reported and provided a patch a few > months a

Re: [PATCH 00/28] nios2 Linux kernel port

2014-04-22 Thread Ley Foon Tan
On Tue, Apr 22, 2014 at 6:56 PM, Arnd Bergmann wrote: > On Tuesday 22 April 2014 18:37:11 Ley Foon Tan wrote: >> Hi Arnd and Peter Anvin, >> >> Other than 64-bit time_t, clock_t and suseconds_t, can you confirm >> that we don't need to have 64 bit off_t? See detai

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

2014-07-24 Thread Ley Foon Tan
On Tue, Jul 15, 2014 at 5:38 PM, Arnd Bergmann wrote: > On Tuesday 15 July 2014 16:45:40 Ley Foon Tan wrote: > >> +static inline void __dma_sync(void *vaddr, size_t size, >> + enum dma_data_direction direction) >> +{ >> + swit

Re: [PATCH 07/28] nios2: I/O Mapping

2014-05-05 Thread Ley Foon Tan
On Fri, May 2, 2014 at 8:22 PM, Arnd Bergmann wrote: >> >> I would recommend just doing all of this in out-of-line implementations >> >> rather than macros and inline functions. >> > Okay. Will move the macros to out-of-line function. >> >> I'm start working on this and found that it is better to

[PATCH] net: stmmac: add dcrs parameter

2014-08-25 Thread Ley Foon Tan
. When DCRS bit set high in control register, the MAC transmitter ignore the (G)MII Carrier Sense signal during frame transmission in the half-duplex mode. This request results in no errors generated because of Loss of Carrier or No Carrier during such transmission. Signed-off-by: Ley Foon Tan

[PATCH] net: stmmac: fix warning from Sparse for socfpga

2014-08-26 Thread Ley Foon Tan
Warning: drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:41: sparse: cast removes address space of expression drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:38: sparse: incorrect type in assignment (different address spaces) Signed-off-by: Ley Foon Tan --- drivers/net/ethernet

Re: [PATCH] net: stmmac: fix warning from Sparse for socfpga

2014-08-26 Thread Ley Foon Tan
On Tue, Aug 26, 2014 at 3:24 PM, Giuseppe CAVALLARO wrote: >> @@ -119,7 +119,8 @@ static int socfpga_dwmac_parse_data(struct >> socfpga_dwmac *dwmac, struct device * >> return -EINVAL; >> } >> >> - dwmac->splitter_base = (void *)devm_ioremap_re

Re: [PATCH] net: stmmac: fix warning from Sparse for socfpga

2014-08-26 Thread Ley Foon Tan
On Sel, 2014-08-26 at 10:04 +0200, Giuseppe CAVALLARO wrote: > > > > >> > >> patch should be for net-next > > Do you mean the patch need based on net-next git? > > yes I do. > > > I'm using linux-next git now. > > ok, can you signal it in the subject (e.g. [PATCH (net-next)] > This can help o

[PATCH (net-next) v2] net: stmmac: fix warning from Sparse for socfpga

2014-08-26 Thread Ley Foon Tan
Warning: drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:41: sparse: cast removes address space of expression drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:38: sparse: incorrect type in assignment (different address spaces) Signed-off-by: Ley Foon Tan --- drivers/net/ethernet

Re: [PATCH (net-next) v2] net: stmmac: fix warning from Sparse for socfpga

2014-08-26 Thread Ley Foon Tan
On Tue, Aug 26, 2014 at 6:13 PM, Giuseppe CAVALLARO wrote: > On 8/26/2014 11:47 AM, Ley Foon Tan wrote: >> >> Warning: >> drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:122:41: >> sparse: cast removes address space of expression >> drivers/net/ethernet/stmi

<    1   2   3   4   5   6   7   >