From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, Michal Simek <monstr@monstr.eu>,
Remis Lima Baima <remis.developer@googlemail.com>
Subject: [PATCH v2 5/9] asm-generic: make bitops.h usable
Date: Thu, 30 Apr 2009 20:56:33 +0200 [thread overview]
Message-ID: <20090430185717.172479257@arndb.de> (raw)
In-Reply-To: 20090430185628.866082445@arndb.de
[-- Attachment #1: 0005-asm-generic-make-bitops.h-usable.patch --]
[-- Type: text/plain, Size: 2053 bytes --]
bitops.h apparently suffered from some level of bitrot, it
was missing the smp_mb__{before,after}_clear_bit functions,
and included other headers in an invalid order.
This changes the file so that new architectures can use
it out of the box.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Remis Lima Baima <remis.developer@googlemail.com>
---
include/asm-generic/bitops.h | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h
index c9f369c..a54f442 100644
--- a/include/asm-generic/bitops.h
+++ b/include/asm-generic/bitops.h
@@ -1,19 +1,29 @@
-#ifndef _ASM_GENERIC_BITOPS_H_
-#define _ASM_GENERIC_BITOPS_H_
+#ifndef __ASM_GENERIC_BITOPS_H
+#define __ASM_GENERIC_BITOPS_H
/*
* For the benefit of those who are trying to port Linux to another
* architecture, here are some C-language equivalents. You should
* recode these in the native assembly language, if at all possible.
- *
+ *
* C language equivalents written by Theodore Ts'o, 9/26/92
*/
-#include <asm-generic/bitops/atomic.h>
-#include <asm-generic/bitops/non-atomic.h>
+#include <linux/irqflags.h>
+#include <linux/compiler.h>
+
+/*
+ * clear_bit may not imply a memory barrier
+ */
+#ifndef smp_mb__before_clear_bit
+#define smp_mb__before_clear_bit() smp_mb()
+#define smp_mb__after_clear_bit() smp_mb()
+#endif
+
#include <asm-generic/bitops/__ffs.h>
#include <asm-generic/bitops/ffz.h>
#include <asm-generic/bitops/fls.h>
+#include <asm-generic/bitops/__fls.h>
#include <asm-generic/bitops/fls64.h>
#include <asm-generic/bitops/find.h>
@@ -26,8 +36,10 @@
#include <asm-generic/bitops/hweight.h>
#include <asm-generic/bitops/lock.h>
+#include <asm-generic/bitops/atomic.h>
+#include <asm-generic/bitops/non-atomic.h>
#include <asm-generic/bitops/ext2-non-atomic.h>
#include <asm-generic/bitops/ext2-atomic.h>
#include <asm-generic/bitops/minix.h>
-#endif /* _ASM_GENERIC_BITOPS_H */
+#endif /* __ASM_GENERIC_BITOPS_H */
--
1.5.6.3
--
next prev parent reply other threads:[~2009-04-30 19:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 18:56 [PATCH v2 0/9] more non-ABI asm-generic headers Arnd Bergmann
2009-04-30 18:56 ` [PATCH v2 1/9] asm-generic: rename atomic.h to atomic-long.h Arnd Bergmann
2009-04-30 18:56 ` [PATCH v2 2/9] asm-generic: rename page.h to getorder.h Arnd Bergmann
2009-04-30 18:56 ` [PATCH v2 3/9] asm-generic: rename uaccess.h to uaccess-unaligned.h Arnd Bergmann
2009-04-30 18:56 ` [PATCH v2 4/9] asm-generic: make pci.h usable directly Arnd Bergmann
2009-04-30 18:56 ` Arnd Bergmann [this message]
2009-04-30 18:56 ` [PATCH v2 6/9] asm-generic: add generic versions of common headers Arnd Bergmann
2009-04-30 18:56 ` [PATCH v2 7/9] asm-generic: add legacy I/O header files Arnd Bergmann
2009-04-30 18:56 ` [PATCH v2 8/9] asm-generic: add generic atomic.h and io.h Arnd Bergmann
2009-04-30 18:56 ` [PATCH v2 9/9] asm-generic: add generic NOMMU versions of some headers Arnd Bergmann
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=20090430185717.172479257@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=monstr@monstr.eu \
--cc=remis.developer@googlemail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox