linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: liqin.chen@sunplusct.com
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	torvalds@linux-foundation.org
Subject: Re: [PATCH 18/27] score: create head files uaccess.h unaligned.h unistd.h user.h
Date: Tue, 9 Jun 2009 19:46:10 +0200	[thread overview]
Message-ID: <200906091946.10195.arnd@arndb.de> (raw)
In-Reply-To: <OF596C037E.9CF83913-ON482575D0.0024055D-482575D0.002476E7@sunplusct.com>

On Tuesday 09 June 2009, liqin.chen@sunplusct.com wrote:

> diff --git a/arch/score/include/asm/unaligned.h 
> b/arch/score/include/asm/unaligned.h
> new file mode 100644
> index 0000000..4b8fec0
> --- /dev/null
> +++ b/arch/score/include/asm/unaligned.h
> @@ -0,0 +1,11 @@
> +#ifndef _ASM_SCORE_UNALIGNED_H
> +#define _ASM_SCORE_UNALIGNED_H
> +
> +#include <linux/unaligned/le_struct.h>
> +#include <linux/unaligned/be_byteshift.h>
> +#include <linux/unaligned/generic.h>
> +
> +#define get_unaligned  __get_unaligned_le
> +#define put_unaligned  __put_unaligned_le
> +
> +#endif /* _ASM_SCORE_UNALIGNED_H */

Any reason not to use the asm-generic version of this file?
If it didn't work, that is probably a bug in my code, not
yours, but they really look compatible.

> diff --git a/arch/score/include/asm/unistd.h 
> b/arch/score/include/asm/unistd.h
> new file mode 100644
> index 0000000..0cbfef8
> --- /dev/null
> +++ b/arch/score/include/asm/unistd.h
> @@ -0,0 +1,12 @@
> +#ifndef _ASM_SCORE_UNISTD_H
> +#define _ASM_SCORE_UNISTD_H
> +
> +#define __ARCH_HAVE_MMU
> +#define __ARCH_WANT_SYSCALL_NO_AT
> +#define __ARCH_WANT_SYSCALL_NO_FLAGS
> +#define __ARCH_WANT_SYSCALL_OFF_T
> +#define __ARCH_WANT_SYSCALL_DEPRECATED
> +
> +#include <asm-generic/unistd.h>

I realize that this is the code I added to microblaze in my tree.
However, the four __ARCH_WANT_SYSCALL_* definitions are really
only meant as a transitional helper to get your code ported
from the older ABI. They should be removed from your file in 
order to get the short system call list. Have you tried this?

In order to get there, you probably need to add a lot of wrappers
to libc along the lines of

int unlink(const char *pathname)
{
	return unlinkat(AT_FDCWD, pathname, 0);
}

	Arnd <><

      parent reply	other threads:[~2009-06-09 17:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09  6:34 [PATCH 18/27] score: create head files uaccess.h unaligned.h unistd.h user.h liqin.chen
2009-06-09  6:34 ` liqin.chen
2009-06-09 17:46 ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200906091946.10195.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liqin.chen@sunplusct.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).