Re: [PATCH v2 17/31] arm64: System calls handling

2012-09-03 Thread Arnd Bergmann
On Monday 03 September 2012, Catalin Marinas wrote: > I forgot about this at the KS and we haven't got to a clear conclusion. > > Do we (1) stick with the sys_mmap() for 64-bit systems and avoid offset > conversion in both glibc and kernel or (2) use sys_mmap2() with a 12 > shift in glibc and (PAG

Re: [PATCH v2 17/31] arm64: System calls handling

2012-09-03 Thread Catalin Marinas
Hi Arnd, On Wed, Aug 22, 2012 at 06:13:10PM +0100, Catalin Marinas wrote: > On Wed, Aug 22, 2012 at 01:27:14PM +0100, Arnd Bergmann wrote: > > On Wednesday 22 August 2012, Catalin Marinas wrote: > > > But what's more important - moving this wrapper to glibc causes issues > > > with the page size.

Re: [PATCH v2 17/31] arm64: System calls handling

2012-08-22 Thread Catalin Marinas
On Wed, Aug 22, 2012 at 01:27:14PM +0100, Arnd Bergmann wrote: > On Wednesday 22 August 2012, Catalin Marinas wrote: > > But what's more important - moving this wrapper to glibc causes issues > > with the page size. We support both 4KB and 64KB pages on 64-bit systems > > (the latter without compat

Re: [PATCH v2 17/31] arm64: System calls handling

2012-08-22 Thread Arnd Bergmann
On Wednesday 22 August 2012, Catalin Marinas wrote: > But what's more important - moving this wrapper to glibc causes issues > with the page size. We support both 4KB and 64KB pages on 64-bit systems > (the latter without compat support). The kernel is in a better position > to do the shift by a co

Re: [PATCH v2 17/31] arm64: System calls handling

2012-08-22 Thread Catalin Marinas
On Wed, Aug 22, 2012 at 08:56:30AM +0100, Arnd Bergmann wrote: > On Tuesday 21 August 2012, Catalin Marinas wrote: > > As I understand, sys_mmap_pgoff can be used instead of sys_mmap2 on new > > 32-bit architectures. But on 64-bit architectures we don't have > > sys_mmap2, only sys_mmap with the di

Re: [PATCH v2 17/31] arm64: System calls handling

2012-08-22 Thread Arnd Bergmann
On Tuesday 21 August 2012, Catalin Marinas wrote: > As I understand, sys_mmap_pgoff can be used instead of sys_mmap2 on new > 32-bit architectures. But on 64-bit architectures we don't have > sys_mmap2, only sys_mmap with the difference that the last argument is > the offset in bytes (and multiple

Re: [PATCH v2 17/31] arm64: System calls handling

2012-08-21 Thread Catalin Marinas
On Tue, Aug 21, 2012 at 09:14:01PM +0100, Arnd Bergmann wrote: > On Tuesday 21 August 2012, Catalin Marinas wrote: > > > > +asmlinkage long sys_mmap(unsigned long addr, unsigned long len, > > > > +unsigned long prot, unsigned long flags, > > > > +unsigned lon

Re: [PATCH v2 17/31] arm64: System calls handling

2012-08-21 Thread Arnd Bergmann
On Tuesday 21 August 2012, Catalin Marinas wrote: > > > +asmlinkage long sys_mmap(unsigned long addr, unsigned long len, > > > +unsigned long prot, unsigned long flags, > > > +unsigned long fd, off_t off) > > > +{ > > > + if (offset_in_page(off) != 0) > > >

Re: [PATCH v2 17/31] arm64: System calls handling

2012-08-21 Thread Catalin Marinas
On Wed, Aug 15, 2012 at 03:22:16PM +0100, Arnd Bergmann wrote: > On Tuesday 14 August 2012, Catalin Marinas wrote: > > > + > > +/* This matches struct stat64 in glibc2.1, hence the absolutely > > + * insane amounts of padding around dev_t's. > > + * Note: The kernel zero's the padded region becaus

Re: [PATCH v2 17/31] arm64: System calls handling

2012-08-15 Thread Arnd Bergmann
On Tuesday 14 August 2012, Catalin Marinas wrote: > + > +/* This matches struct stat64 in glibc2.1, hence the absolutely > + * insane amounts of padding around dev_t's. > + * Note: The kernel zero's the padded region because glibc might read them > + * in the hope that the kernel has stretched to

[PATCH v2 17/31] arm64: System calls handling

2012-08-14 Thread Catalin Marinas
This patch adds support for system calls coming from 64-bit applications. It uses the asm-generic/unistd.h definitions with the canonical set of system calls. The private system calls are only used for 32-bit (compat) applications as 64-bit ones can set the TLS and flush the caches entirely from us