Quantcast
Channel: lkml.org : Ganesh Sittampalam
Viewing all articles
Browse latest Browse all 627

Re: [RFC PATCH 4/6] mm: provide generic compat_sys_readahead() imp ...

$
0
0
Linus Torvalds writes: (Summary) This is still too ugly to live.
What *may* be acceptable is if architectures defined something like this: What *may* be acceptable is if architectures defined something like this: x86:
x86:
    /* Little endian registers - low bits first, no padding for odd
register numbers necessary */
    #define COMPAT_ARG_64BIT(x) unsigned int x##_lo, unsigned int x##_hi
    #define COMPAT_ARG_64BIT_ODD(x) COMPAT_ARG_64BIT(x)

ppc BE:

    /* Big-endian registers - high bits first, odd argument pairs
padded up to the next even register */
    #define COMPAT_ARG_64BIT(x) unsigned int x##_hi, unsigned int x##_lo
    #define COMPAT_ARG_64BIT_ODD(x) unsigned int  x##_padding,
COMPAT_ARG_64BIT(x)

and then we can do

  COMPAT_SYSCALL_DEFINE5(readahead, int, fd,
COMPAT_ARG_64BIT_ODD(off), compat_size_t, count)
  {
      return do_readahead(fd, off_lo + ((u64)off_hi <<

Viewing all articles
Browse latest Browse all 627

Trending Articles