All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mariusz Mazur <mmazur@kernel.pl>
To: Jeff Mahoney <jeffm@suse.com>
Cc: reiserfs-list@namesys.com
Subject: Re: Invalid use of asm/unaligned.h
Date: Thu, 12 Aug 2004 00:27:12 +0200	[thread overview]
Message-ID: <200408120027.12385.mmazur@kernel.pl> (raw)
In-Reply-To: <411A87A5.7020608@suse.com>

On ¶roda 11 sierpieñ 2004 22:55, Jeff Mahoney wrote:
> Can you provide examples of what you consider depending on "kernel
> internal stuff" ? When I look through include/asm*/unaligned.h, I see no
> references to functions not provided in a standard C library. I also
> don't see any assembly code, so I'm not sure why you'd need to code
> assembly for each architecture.

Haven't checked good enough (just saw ifdef __KERNEL__ in {linux,asm}/string.h 
and didn't bother to check what's exactly inside - but that was just memcpy).

> There are other instances of libc headers defining macros that expand to
> standard libc functions. Why should the presence of memcpy/memmove calls
> be an exception to this? If you truly feel the need to create
> "userspace" headers for unaligned access, you can lift the kernel
> headers wholesale. If that's not desirable, take a look in
> asm-generic/unaligned.h and include that instead.

I don't like adding dependencies (even if it's libc), but what the heck. I'll 
add asm*/unaligned.h in llh 2.6.8.0 (whenever linus will release 2.6.8).

> That said, I don't believe the problem is the inclusion of
> asm/unaligned.h at all, but rather the fact that the PPC developers
> decided to surround the code with ifdef KERNEL. They're the only arch to
> do so, which is odd considering it's a no-op anyway.

I've got used to checking against ppc if I'm not sure whether a header is or 
isn't kernel only (contrary to other archs the ppc guys do separate kernel 
and userland stuff). The asm/unaligned.h header was always included as kernel 
stuff (+ ppc defined it as kernel only) which got me fooled.


-- 
In the year eighty five ten
God is gonna shake his mighty head
He'll either say,
"I'm pleased where man has been"
Or tear it down, and start again

      reply	other threads:[~2004-08-11 22:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-11 19:48 Invalid use of asm/unaligned.h Mariusz Mazur
2004-08-11 20:55 ` Jeff Mahoney
2004-08-11 22:27   ` Mariusz Mazur [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=200408120027.12385.mmazur@kernel.pl \
    --to=mmazur@kernel.pl \
    --cc=jeffm@suse.com \
    --cc=reiserfs-list@namesys.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.