linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gene Heskett <gene.heskett@verizon.net>
To: linux-kernel@vger.kernel.org
Subject: Fwd:
Date: Mon, 27 Apr 2009 15:10:11 -0400	[thread overview]
Message-ID: <200904271510.11162.gene.heskett@verizon.net> (raw)


----------  Forwarded Message  ----------

Subject: 
Date: Monday 27 April 2009
From: arnd@arndb.de
To: "no To-header on input" <unlisted-recipients:; @gmail-pop.l.google.com>

>From arnd@arndb.de Mon Apr 27 16:28:40 2009
References: <20090427142010.587518220@arndb.de>
User-Agent: quilt/0.46-1
Date: Mon, 27 Apr 2009 16:20:22 +0200
From: arnd@arndb.de
To: linux-kernel@vger.kernel.org
Cc: john.williams@petalogix.com,
 monstr@monstr.eu,
 linux-api@vger.kernel.org,
 linux-arch@vger.kernel.org,
 liqin.chen@sunplusct.com,
 Sam Ravnborg <sam@ravnborg.org>,
 Harvey Harrison <harvey.harrison@gmail.com>,
 Remis Lima Baima <remis.developer@googlemail.com>
Subject: [RFC 12/17] asm-generic: add generic unaligned.h
Content-Disposition: inline; filename=0009-asm-generic-add-generic-
unaligned.h.patch
X-Provags-ID: V01U2FsdGVkX180uRkKPtTR6NE5qs40yQi4ziqxITkI8KKYXbv
 ceZfZA4rNxQHTjaGg5pO05a3RFhyObTUvhsERRtOhJTrzruub3
 3XgHSsqqDkZJnfLEIfR2g==

This implementation can be used by any architecture as a generic
way to provide the unaligned helpers. Many architectures can
override this by using linux/unaligned/access_ok.h.

Cc: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
---
 include/asm-generic/unaligned.h |   30 	30 +	0 -	0 !
 1 file changed, 30 insertions(+)
 create mode 100644 include/asm-generic/unaligned.h

Index: linux-2.6/include/asm-generic/unaligned.h
===================================================================
--- /dev/null
+++ linux-2.6/include/asm-generic/unaligned.h
@@ -0,0 +1,30 @@
+#ifndef __ASM_GENERIC_UNALIGNED_H
+#define __ASM_GENERIC_UNALIGNED_H
+
+/*
+ * This is the most generic implementation of unaligned accesses
+ * and should work almost anywhere.
+ *
+ * If an architecture can handle unaligned accesses in hardware,
+ * it may want to use the linux/unaligned/access_ok.h implementation
+ * instead.
+ */
+#include <asm/byteorder.h>
+
+#if defined(__LITTLE_ENDIAN)
+# 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
+#elif defined(__BIG_ENDIAN)
+# include <linux/unaligned/be_struct.h>
+# include <linux/unaligned/le_byteshift.h>
+# include <linux/unaligned/generic.h>
+# define get_unaligned	__get_unaligned_be
+# define put_unaligned	__put_unaligned_be
+#else
+# error need to define endianess
+#endif
+
+#endif /* __ASM_GENERIC_UNALIGNED_H */

-- 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


-------------------------------------------------------

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Backed up the system lately?


             reply	other threads:[~2009-04-27 19:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27 19:10 Gene Heskett [this message]
     [not found] <CAPoNrttA0HH+NLOG_AxEw6qbdzJjEZhWsZAP3JaKhzWYL73+Dw@mail.gmail.com>
2015-03-24  6:12 ` Fwd: Anurag Aggarwal
  -- strict thread matches above, loose matches on Subject: below --
2014-09-11  4:12 Fwd: joergsachau
2014-05-22 21:23 FWD: paul-zimmerman
2014-05-19  9:13 FWD: paul-zimmerman
     [not found] <CAJ8eaTxyODK+VFwK2csbxSs7LzAe2EqMXemxFRYF+A26rTmNwg@mail.gmail.com>
2013-06-12  5:16 ` Fwd: naveen yadav
2013-02-11  6:07 Fwd: Francis Moreau
2012-06-06  7:18 fwd: Badari Pulavarty
2011-11-22 12:18 Fwd: pradeep Annavarapu
2009-04-27 19:10 Fwd: Gene Heskett
2009-04-27 19:10 Fwd: Gene Heskett
2009-04-27 19:10 Fwd: Gene Heskett
2009-04-27 19:09 Fwd: Gene Heskett
2009-04-27 19:09 Fwd: Gene Heskett
2009-04-27 19:09 Fwd: Gene Heskett
2009-04-27 19:09 Fwd: Gene Heskett
2009-04-27 19:09 Fwd: Gene Heskett
2009-04-27 19:08 Fwd: Gene Heskett
2009-04-27 19:08 Fwd: Gene Heskett
2009-04-27 19:08 Fwd: Gene Heskett
2009-04-27 19:08 Fwd: Gene Heskett
2009-04-27 19:07 Fwd: Gene Heskett
2009-04-27 19:07 Fwd: Gene Heskett
2009-04-27 19:06 Fwd: Gene Heskett
2006-10-20 13:56 Fwd: Isidro Olariu
2006-10-19 13:05 Fwd: Clifton Stephan
2006-03-02  4:20 Fwd: Victor R. Scofield, II
2006-02-25 15:22 Fwd: Labovitz
2006-02-22  1:18 Fwd: Alden
2006-02-15 10:39 Fwd: Baez
2001-11-16 22:11 Fwd: Andrey Nekrasov

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=200904271510.11162.gene.heskett@verizon.net \
    --to=gene.heskett@verizon.net \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).