Re: nios2: is the ptrace ABI correct?

2015-03-10 Thread Chung-Lin Tang
On 2015/3/10 10:54 AM, Ley Foon Tan wrote: > On Tue, Mar 10, 2015 at 1:05 AM, Ezequiel Garcia > wrote: >> >> >> On 03/09/2015 02:02 PM, Chung-Lin Tang wrote: >>> On 2015/3/10 12:54 AM, Chung-Lin Tang wrote: >>>> It appears that some of the ways nios

Re: nios2: is the ptrace ABI correct?

2015-03-10 Thread Chung-Lin Tang
On 2015/3/10 10:54 AM, Ley Foon Tan wrote: On Tue, Mar 10, 2015 at 1:05 AM, Ezequiel Garcia ezequ...@vanguardiasur.com.ar wrote: On 03/09/2015 02:02 PM, Chung-Lin Tang wrote: On 2015/3/10 12:54 AM, Chung-Lin Tang wrote: It appears that some of the ways nios2 has organized the ucontext

Re: nios2: is the ptrace ABI correct?

2015-03-09 Thread Chung-Lin Tang
On 2015/3/10 12:54 AM, Chung-Lin Tang wrote: > It appears that some of the ways nios2 has organized the > ucontext/pt_regs/etc. are remnants of the pre-generic code, some > basically because the port was based off m68k. > > I've re-organized the headers a bit: nios2/include

Re: nios2: is the ptrace ABI correct?

2015-03-09 Thread Chung-Lin Tang
On 2015/2/27 07:19 PM, Ezequiel Garcia wrote: > Right now, my biggest problem is how to remove the pt_regs from being > exported to userspace, without breaking things. The struct is defined > and used in a few UAPI headers: > > arch/nios2/include/uapi/asm/ptrace.h >

Re: nios2: is the ptrace ABI correct?

2015-03-09 Thread Chung-Lin Tang
On 2015/3/10 12:54 AM, Chung-Lin Tang wrote: It appears that some of the ways nios2 has organized the ucontext/pt_regs/etc. are remnants of the pre-generic code, some basically because the port was based off m68k. I've re-organized the headers a bit: nios2/include/asm/ucontext.h is deleted

Re: nios2: is the ptrace ABI correct?

2015-03-09 Thread Chung-Lin Tang
On 2015/2/27 07:19 PM, Ezequiel Garcia wrote: Right now, my biggest problem is how to remove the pt_regs from being exported to userspace, without breaking things. The struct is defined and used in a few UAPI headers: arch/nios2/include/uapi/asm/ptrace.h

Re: nios2: is the ptrace ABI correct?

2015-02-27 Thread Chung-Lin Tang
On 15/2/25 10:07 PM, Arnd Bergmann wrote: > On Wednesday 25 February 2015 08:33:16 Ezequiel Garcia wrote: >> >> /me is more confused now >> >> In arch/nios2/include/asm/ucontext.h >> >> struct ucontext { >> unsigned long uc_flags; >> struct ucontext *uc_link; >>

Re: nios2: is the ptrace ABI correct?

2015-02-27 Thread Chung-Lin Tang
On 15/2/25 10:07 PM, Arnd Bergmann wrote: On Wednesday 25 February 2015 08:33:16 Ezequiel Garcia wrote: /me is more confused now In arch/nios2/include/asm/ucontext.h struct ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t

Re: [PATCH] nios2: __kuser_sigtramp placement fix

2015-01-22 Thread Chung-Lin Tang
On 2015/1/22 下午 04:43, Ley Foon Tan wrote: > On Thu, Jan 22, 2015 at 4:15 PM, Chung-Lin Tang > wrote: >> On 2015/1/22 03:54 PM, Ley Foon Tan wrote: >>> On Thu, Jan 22, 2015 at 3:14 PM, Chung-Lin Tang >>> wrote: >>>> The address of __kuser_sig

Re: [PATCH] nios2: __kuser_sigtramp placement fix

2015-01-22 Thread Chung-Lin Tang
On 2015/1/22 03:54 PM, Ley Foon Tan wrote: > On Thu, Jan 22, 2015 at 3:14 PM, Chung-Lin Tang > wrote: >> The address of __kuser_sigtramp is wrong by one word, due to padding >> __kuser_cmpxchg to fully 64 bytes. The version word at the start of the >> page displaces __

Re: [PATCH] nios2: __kuser_sigtramp placement fix

2015-01-22 Thread Chung-Lin Tang
On 2015/1/22 03:54 PM, Ley Foon Tan wrote: On Thu, Jan 22, 2015 at 3:14 PM, Chung-Lin Tang chunglin.t...@gmail.com wrote: The address of __kuser_sigtramp is wrong by one word, due to padding __kuser_cmpxchg to fully 64 bytes. The version word at the start of the page displaces

Re: [PATCH] nios2: __kuser_sigtramp placement fix

2015-01-22 Thread Chung-Lin Tang
On 2015/1/22 下午 04:43, Ley Foon Tan wrote: On Thu, Jan 22, 2015 at 4:15 PM, Chung-Lin Tang clt...@codesourcery.com wrote: On 2015/1/22 03:54 PM, Ley Foon Tan wrote: On Thu, Jan 22, 2015 at 3:14 PM, Chung-Lin Tang chunglin.t...@gmail.com wrote: The address of __kuser_sigtramp is wrong

[PATCH] nios2: __kuser_sigtramp placement fix

2015-01-21 Thread Chung-Lin Tang
, Chung-Lin Cc: Ley Foon Tan Cc: Tobias Klauser Signed-off-by: Chung-Lin Tang diff --git a/arch/nios2/kernel/entry.S b/arch/nios2/kernel/entry.S index 0bdfd13..3224839 100644 --- a/arch/nios2/kernel/entry.S +++ b/arch/nios2/kernel/entry.S @@ -492,14 +492,7 @@ ENTRY(ret_from_kernel_thread

[PATCH] nios2: __kuser_sigtramp placement fix

2015-01-21 Thread Chung-Lin Tang
, Chung-Lin Cc: Ley Foon Tan lf...@altera.com Cc: Tobias Klauser tklau...@distanz.ch Signed-off-by: Chung-Lin Tang clt...@codesourcery.com diff --git a/arch/nios2/kernel/entry.S b/arch/nios2/kernel/entry.S index 0bdfd13..3224839 100644 --- a/arch/nios2/kernel/entry.S +++ b/arch/nios2/kernel/entry.S

Re: [PATCH v3 25/29] nios2: Module support

2014-09-10 Thread Chung-Lin Tang
On 14/9/10 5:25 AM, valdis.kletni...@vt.edu wrote: > On Mon, 08 Sep 2014 17:22:36 +0800, Ley Foon Tan said: >> This patch adds support for loadable modules. >> >> Signed-off-by: Ley Foon Tan > >> +/* >> + * Modules should NOT be allocated with kmalloc for (obvious) reasons. >> + * But we do it

Re: [PATCH v3 25/29] nios2: Module support

2014-09-10 Thread Chung-Lin Tang
On 14/9/10 5:25 AM, valdis.kletni...@vt.edu wrote: On Mon, 08 Sep 2014 17:22:36 +0800, Ley Foon Tan said: This patch adds support for loadable modules. Signed-off-by: Ley Foon Tan lf...@altera.com +/* + * Modules should NOT be allocated with kmalloc for (obvious) reasons. + * But we do it

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

2014-07-18 Thread Chung-Lin Tang
Hi Arnd, Considering two other kernel interface issues that appeared earlier in the context of nios2 glibc/kernel upstreaming: (1) The 64-bit time_t/timespec issue. (2) Dropping renameat by default in favor of renameat2 What's the decision for these? Are they delayed to the next release?

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

2014-07-18 Thread Chung-Lin Tang
Hi Arnd, Considering two other kernel interface issues that appeared earlier in the context of nios2 glibc/kernel upstreaming: (1) The 64-bit time_t/timespec issue. (2) Dropping renameat by default in favor of renameat2 What's the decision for these? Are they delayed to the next release?

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

2014-07-15 Thread Chung-Lin Tang
On 2014/7/15 06:22 PM, Arnd Bergmann wrote: >> + >> > +#ifndef _UAPI_ASM_NIOS2_STATFS_H >> > +#define _UAPI_ASM_NIOS2_STATFS_H >> > + >> > +#define __statfs_word __s32 > Why this? Every other architecture except parisc uses the default __u32 here. Because include/uapi/asm/statfs.h has this:

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

2014-07-15 Thread Chung-Lin Tang
On 2014/7/15 06:22 PM, Arnd Bergmann wrote: + +#ifndef _UAPI_ASM_NIOS2_STATFS_H +#define _UAPI_ASM_NIOS2_STATFS_H + +#define __statfs_word __s32 Why this? Every other architecture except parisc uses the default __u32 here. Because include/uapi/asm/statfs.h has this: #ifndef

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

2014-05-15 Thread Chung-Lin Tang
On 2014/5/15 07:08 PM, Arnd Bergmann wrote: > On Wednesday 14 May 2014 14:33:18 John Stultz wrote: >> On Tue, May 13, 2014 at 12:32 PM, Arnd Bergmann wrote: >>> On Tuesday 13 May 2014 20:24:59 Geert Uytterhoeven wrote: On Tue, May 13, 2014 at 8:10 PM, Arnd Bergmann wrote: > Using 64-bit

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

2014-05-15 Thread Chung-Lin Tang
On 2014/5/15 07:08 PM, Arnd Bergmann wrote: > On Wednesday 14 May 2014 14:33:18 John Stultz wrote: >> On Tue, May 13, 2014 at 12:32 PM, Arnd Bergmann wrote: >>> On Tuesday 13 May 2014 20:24:59 Geert Uytterhoeven wrote: On Tue, May 13, 2014 at 8:10 PM, Arnd Bergmann wrote: > Using 64-bit

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

2014-05-15 Thread Chung-Lin Tang
On 2014/5/15 07:08 PM, Arnd Bergmann wrote: On Wednesday 14 May 2014 14:33:18 John Stultz wrote: On Tue, May 13, 2014 at 12:32 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 13 May 2014 20:24:59 Geert Uytterhoeven wrote: On Tue, May 13, 2014 at 8:10 PM, Arnd Bergmann a...@arndb.de wrote:

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

2014-05-15 Thread Chung-Lin Tang
On 2014/5/15 07:08 PM, Arnd Bergmann wrote: On Wednesday 14 May 2014 14:33:18 John Stultz wrote: On Tue, May 13, 2014 at 12:32 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 13 May 2014 20:24:59 Geert Uytterhoeven wrote: On Tue, May 13, 2014 at 8:10 PM, Arnd Bergmann a...@arndb.de wrote:

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

2014-04-25 Thread Chung-Lin Tang
On 14/4/25 下午4:37, Pinski, Andrew wrote: > > >> On Apr 24, 2014, at 11:06 PM, "Chung-Lin Tang" >> wrote: >> >>> On 2014/4/25 02:42 AM, Pinski, Andrew wrote: >>> >>> >>>>> On Apr 24, 2014, at 11:37 AM, "Chung-L

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

2014-04-25 Thread Chung-Lin Tang
On 2014/4/25 02:42 AM, Pinski, Andrew wrote: > > >> On Apr 24, 2014, at 11:37 AM, "Chung-Lin Tang" >> wrote: >> >>> On 2014/4/24 11:28 PM, Catalin Marinas wrote: >>>> On Thu, Apr 24, 2014 at 09:55:25AM +0100, Chung-Lin Tang w

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

2014-04-25 Thread Chung-Lin Tang
On 2014/4/25 02:42 AM, Pinski, Andrew wrote: On Apr 24, 2014, at 11:37 AM, Chung-Lin Tang clt...@codesourcery.com wrote: On 2014/4/24 11:28 PM, Catalin Marinas wrote: On Thu, Apr 24, 2014 at 09:55:25AM +0100, Chung-Lin Tang wrote: On 2014/4/24 02:26 PM, Chung-Lin Tang wrote: On 2014/4

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

2014-04-25 Thread Chung-Lin Tang
On 14/4/25 下午4:37, Pinski, Andrew wrote: On Apr 24, 2014, at 11:06 PM, Chung-Lin Tang clt...@codesourcery.com wrote: On 2014/4/25 02:42 AM, Pinski, Andrew wrote: On Apr 24, 2014, at 11:37 AM, Chung-Lin Tang clt...@codesourcery.com wrote: On 2014/4/24 11:28 PM, Catalin Marinas wrote

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

2014-04-24 Thread Chung-Lin Tang
On 2014/4/24 11:28 PM, Catalin Marinas wrote: > On Thu, Apr 24, 2014 at 09:55:25AM +0100, Chung-Lin Tang wrote: >> On 2014/4/24 02:26 PM, Chung-Lin Tang wrote: >>> On 2014/4/24 上午 02:15, Pinski, Andrew wrote: >>>> >>>>>> On Apr 23, 20

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

2014-04-24 Thread Chung-Lin Tang
On 2014/4/24 02:26 PM, Chung-Lin Tang wrote: > On 2014/4/24 上午 02:15, Pinski, Andrew wrote: >> >>>> On Apr 23, 2014, at 10:59 AM, "Chung-Lin Tang" >>>> wrote: >>>> >>>>>> On 2014/4/22 07:20 PM, Ley Foo

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

2014-04-24 Thread Chung-Lin Tang
On 2014/4/24 上午 02:15, Pinski, Andrew wrote: > >> > On Apr 23, 2014, at 10:59 AM, "Chung-Lin Tang" >> > wrote: >> > >>> >> On 2014/4/22 07:20 PM, Ley Foon Tan wrote: >>> >> On Tue, Apr 22, 2014 at 6:56 PM, Arnd Bergmann

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

2014-04-24 Thread Chung-Lin Tang
On 2014/4/24 上午 02:15, Pinski, Andrew wrote: On Apr 23, 2014, at 10:59 AM, Chung-Lin Tang clt...@codesourcery.com wrote: On 2014/4/22 07:20 PM, Ley Foon Tan wrote: On Tue, Apr 22, 2014 at 6:56 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday 22 April 2014 18:37:11 Ley Foon Tan

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

2014-04-24 Thread Chung-Lin Tang
On 2014/4/24 02:26 PM, Chung-Lin Tang wrote: On 2014/4/24 上午 02:15, Pinski, Andrew wrote: On Apr 23, 2014, at 10:59 AM, Chung-Lin Tang clt...@codesourcery.com wrote: On 2014/4/22 07:20 PM, Ley Foon Tan wrote: On Tue, Apr 22, 2014 at 6:56 PM, Arnd Bergmann a...@arndb.de wrote: On Tuesday

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

2014-04-24 Thread Chung-Lin Tang
On 2014/4/24 11:28 PM, Catalin Marinas wrote: On Thu, Apr 24, 2014 at 09:55:25AM +0100, Chung-Lin Tang wrote: On 2014/4/24 02:26 PM, Chung-Lin Tang wrote: On 2014/4/24 上午 02:15, Pinski, Andrew wrote: On Apr 23, 2014, at 10:59 AM, Chung-Lin Tang clt...@codesourcery.com wrote: On 2014/4/22

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

2014-04-23 Thread Chung-Lin Tang
On 2014/4/22 07:20 PM, Ley Foon Tan wrote: > 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

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

2014-04-23 Thread Chung-Lin Tang
On 2014/4/22 07:20 PM, Ley Foon Tan wrote: On Tue, Apr 22, 2014 at 6:56 PM, Arnd Bergmann a...@arndb.de 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

Re: [PATCH 06/28] nios2: Memory management

2014-04-22 Thread Chung-Lin Tang
On 2014/4/23 上午 12:27, Ezequiel Garcia wrote: > On Apr 23, Chung-Lin Tang wrote: >> On 2014/4/22 下午 11:35, Ezequiel Garcia wrote: >>> On Apr 22, Tobias Klauser wrote: >>>> On 2014-04-22 at 16:24:43 +0200, Ezequiel Garcia >>>> wrote: >>>>&g

Re: [PATCH 06/28] nios2: Memory management

2014-04-22 Thread Chung-Lin Tang
On 2014/4/22 下午 11:35, Ezequiel Garcia wrote: > On Apr 22, Tobias Klauser wrote: >> On 2014-04-22 at 16:24:43 +0200, Ezequiel Garcia >> wrote: >>> Hi Ley Foon, >>> >>> On Apr 18, Ley Foon Tan wrote: +/* + * PAGE_SHIFT determines the page size + */ +#define PAGE_SHIFT

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

2014-04-22 Thread Chung-Lin Tang
On 2014/4/22 07:20 PM, Ley Foon Tan wrote: > 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

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

2014-04-22 Thread Chung-Lin Tang
On 2014/4/22 07:20 PM, Ley Foon Tan wrote: On Tue, Apr 22, 2014 at 6:56 PM, Arnd Bergmann a...@arndb.de 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

Re: [PATCH 06/28] nios2: Memory management

2014-04-22 Thread Chung-Lin Tang
On 2014/4/22 下午 11:35, Ezequiel Garcia wrote: On Apr 22, Tobias Klauser wrote: On 2014-04-22 at 16:24:43 +0200, Ezequiel Garcia ezequiel.gar...@free-electrons.com wrote: Hi Ley Foon, On Apr 18, Ley Foon Tan wrote: +/* + * PAGE_SHIFT determines the page size + */ +#define PAGE_SHIFT

Re: [PATCH 06/28] nios2: Memory management

2014-04-22 Thread Chung-Lin Tang
On 2014/4/23 上午 12:27, Ezequiel Garcia wrote: On Apr 23, Chung-Lin Tang wrote: On 2014/4/22 下午 11:35, Ezequiel Garcia wrote: On Apr 22, Tobias Klauser wrote: On 2014-04-22 at 16:24:43 +0200, Ezequiel Garcia ezequiel.gar...@free-electrons.com wrote: Hi Ley Foon, On Apr 18, Ley Foon Tan

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

2014-04-21 Thread Chung-Lin Tang
On 14/4/21 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: >>> On Friday 18 April 2014, H. Peter Anvin wrote: Did the generic headers ever get updated to match Linus' guidance that any new

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

2014-04-21 Thread Chung-Lin Tang
On 14/4/21 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 a...@arndb.de 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