public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-arch@vger.kernel.org
Subject: Re: Consolidation of asm/unaligned.h
Date: Thu, 17 Mar 2005 14:03:16 -0800	[thread overview]
Message-ID: <20050317140316.79210a73.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.62.0503172255380.8760@numbat.sonytel.be>

On Thu, 17 Mar 2005 22:57:25 +0100 (CET)
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> On Thu, 17 Mar 2005, David S. Miller wrote:
> > 6) M68K can do unaligned access directly.
> 
> Just for the record, this is true for 68020 and later only. I.e. some MMU-less
> variants need unaligned support.

Thanks for the info.  I've just added the following diff
on top so that the COLDFIRE build uses the new generic
unaligned header.

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/03/17 14:02:44-08:00 davem@sunset.davemloft.net 
#   [M68KNOMMU]: Use asm-generic/unaligned.h for COLDFIRE.
#   
#   Based upon comments from Geert Uytterhoeven.
#   
#   Signed-off-by: David S. Miller <davem@davemloft.net>
# 
# include/asm-m68knommu/unaligned.h
#   2005/03/17 14:02:09-08:00 davem@sunset.davemloft.net +1 -9
#   [M68KNOMMU]: Use asm-generic/unaligned.h for COLDFIRE.
# 
diff -Nru a/include/asm-m68knommu/unaligned.h b/include/asm-m68knommu/unaligned.h
--- a/include/asm-m68knommu/unaligned.h	2005-03-17 14:03:19 -08:00
+++ b/include/asm-m68knommu/unaligned.h	2005-03-17 14:03:19 -08:00
@@ -5,15 +5,7 @@
 
 #ifdef CONFIG_COLDFIRE
 
-/* Use memmove here, so gcc does not insert a __builtin_memcpy. */
-
-#define get_unaligned(ptr) \
-  ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
-
-#define put_unaligned(val, ptr)				\
-  ({ __typeof__(*(ptr)) __tmp = (val);			\
-     memmove((ptr), &__tmp, sizeof(*(ptr)));		\
-     (void)0; })
+#include <asm-generic/unaligned.h>
 
 #else
 /*

  reply	other threads:[~2005-03-17 22:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-17 18:47 Consolidation of asm/unaligned.h David S. Miller
2005-03-17 21:33 ` Russell King
2005-03-17 21:51   ` David S. Miller
2005-03-17 21:57 ` Geert Uytterhoeven
2005-03-17 22:03   ` David S. Miller [this message]
2005-03-18  0:20     ` Richard Henderson
2005-03-18  4:13       ` David S. Miller
2005-03-17 23:27 ` Ralf Baechle
2005-03-18  0:25 ` David Woodhouse
2005-04-04  3:42 ` James Bottomley
2005-04-04  4:02   ` David S. Miller
2005-04-04  4:15     ` James Bottomley
2005-04-04  6:11       ` David S. Miller
2005-04-04 11:34       ` Matthew Wilcox
2005-04-04 10:47   ` Ralf Baechle
2005-04-05 14:10     ` James Bottomley
2005-04-05 14:15       ` Ralf Baechle
2005-04-05 15:02       ` Matthew Wilcox
2005-04-05 15:11         ` Ralf Baechle

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=20050317140316.79210a73.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=linux-arch@vger.kernel.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