public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 2/2] kernel: Move arches to use common unaligned access
Date: Fri, 11 Apr 2008 08:19:26 -0700	[thread overview]
Message-ID: <1207927166.22001.91.camel@brick> (raw)
In-Reply-To: <15208.1207908688@redhat.com>

On Fri, 2008-04-11 at 11:11 +0100, David Howells wrote:
> Harvey Harrison <harvey.harrison@gmail.com> wrote:
> 
> > -#ifndef _ASM_UNALIGNED_H
> > -#define _ASM_UNALIGNED_H
> > -
> > +#ifndef _ASM_FRV_UNALIGNED_H_
> > +#define _ASM_FRV_UNALIGNED_H_
> 
> Why?

Consistency with every other arch..no other reason.

> 
> > - * impractical.  So, now we fall back to using memcpy.
> > + * impractical.  So, now we fall back to using memmov.
> 
> That's memmove, not memmov.  Any why memmove, not memcpy?  Is __tmp likely to
> overlap with *ptr?
> 
> Also, for FRV, I think calling memmove/memcpy for MMU kernels may be the wrong
> thing to do...  I'm sort of leaning towards doing the same thing as NOMMU
> kernels and just using your inline ones.

OK, just let me know what you decide.  I'm stil open to bringing back
the frv asm versions if the do end up being faster.

> 
> The advantage of the inline ones is that they are quicker and probably involve
> fewer instructions executed; whereas using memcpy/memmove may end up with
> smaller, but slower code.  Hmmm...  Maybe key on CONFIG_CC_OPTIMIZE_FOR_SIZE?
> 

I suppose an out-of-line version could be easily added to accomplish
this.  It would be identical to the byteshifting implementation-wise.

Let me know if you'd like me to spin such a patch.

Harvey


  parent reply	other threads:[~2008-04-11 15:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11  3:38 [PATCH 2/2] kernel: Move arches to use common unaligned access Harvey Harrison
2008-04-11  7:48 ` Ingo Molnar
2008-04-11 10:11 ` David Howells
2008-04-11 10:16   ` David Miller
2008-04-11 10:27     ` David Howells
2008-04-11 15:19   ` Harvey Harrison [this message]
2008-04-11 15:50     ` David Howells
2008-04-11 17:31       ` Harvey Harrison
2008-04-11 17:55       ` [PATCH 2/2-revised] " Harvey Harrison

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=1207927166.22001.91.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhowells@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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