#include <asm/bitops.h> -> #include <linux/bitops.h>

#include <asm/bitops.h> -> #include <linux/bitops.h>

Post by OGAWA Hirofum » Thu, 18 Apr 2002 02:50:11



Hi,

We have to include linux/bitops.h for arch using generic_xxx().
And I think, at least the include/linux/* should include linux/bitops.h.
(fatfs really needed the addition of linux/bitops.h.)

The following patch changes <asm/bitops.h> of include/linux/* to
<linux/bitops.h>.

Please apply.
--

diff -urN linux-2.5.8/include/linux/fs.h linux-2.5.8-bitops/include/linux/fs.h
--- linux-2.5.8/include/linux/fs.h      Mon Apr 15 23:01:35 2002

 #include <linux/stddef.h>
 #include <linux/string.h>
 #include <linux/radix-tree.h>
+#include <linux/bitops.h>

 #include <asm/atomic.h>
-#include <asm/bitops.h>

 struct poll_table_struct;

diff -urN linux-2.5.8/include/linux/ide.h linux-2.5.8-bitops/include/linux/ide.h
--- linux-2.5.8/include/linux/ide.h     Mon Apr 15 23:03:06 2002

 #include <linux/device.h>
 #include <linux/devfs_fs_kernel.h>
 #include <linux/interrupt.h>
+#include <linux/bitops.h>
 #include <asm/hdreg.h>
-#include <asm/bitops.h>

 /*
  * This is the multiple IDE interface driver, as evolved from hd.c.
diff -urN linux-2.5.8/include/linux/interrupt.h linux-2.5.8-bitops/include/linux/interrupt.h
--- linux-2.5.8/include/linux/interrupt.h       Mon Apr 15 23:01:49 2002

 #include <linux/kernel.h>
 #include <linux/smp.h>
 #include <linux/cache.h>
+#include <linux/bitops.h>

-#include <asm/bitops.h>
 #include <asm/atomic.h>
 #include <asm/system.h>
 #include <asm/ptrace.h>
diff -urN linux-2.5.8/include/linux/raid/md.h linux-2.5.8-bitops/include/linux/raid/md.h
--- linux-2.5.8/include/linux/raid/md.h Mon Apr 15 23:04:26 2002

 #include <linux/major.h>
 #include <linux/ioctl.h>
 #include <linux/types.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <linux/module.h>
 #include <linux/hdreg.h>
 #include <linux/proc_fs.h>
diff -urN linux-2.5.8/include/linux/signal.h linux-2.5.8-bitops/include/linux/signal.h
--- linux-2.5.8/include/linux/signal.h  Mon Apr 15 23:01:34 2002

  */

 #ifndef __HAVE_ARCH_SIG_BITOPS
-#include <asm/bitops.h>
+#include <linux/bitops.h>

-/* We don't use <asm/bitops.h> for these because there is no need to
+/* We don't use <linux/bitops.h> for these because there is no need to
    be atomic.  */
 static inline void sigaddset(sigset_t *set, int _sig)
 {
diff -urN linux-2.5.8/include/linux/thread_info.h linux-2.5.8-bitops/include/linux/thread_info.h
--- linux-2.5.8/include/linux/thread_info.h     Mon Apr 15 23:01:34 2002

 #ifndef _LINUX_THREAD_INFO_H
 #define _LINUX_THREAD_INFO_H

+#include <linux/bitops.h>
 #include <asm/thread_info.h>
-#include <asm/bitops.h>

 #ifdef __KERNEL__

diff -urN linux-2.5.8/include/linux/tqueue.h linux-2.5.8-bitops/include/linux/tqueue.h
--- linux-2.5.8/include/linux/tqueue.h  Mon Apr 15 23:01:35 2002

 #include <linux/spinlock.h>
 #include <linux/list.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/system.h>

 /*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. ehci-hcd.c needs to include <linux/bitops.h>

When I try to configure in EHCI support without this patch, I get
generic_ffs undefined at link time.  (This is with 2.4.21-rc2 on our
sh64 (SH-5) port).  Perhaps there are other ways to achieve this, but
this worked for me.

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.1212  -> 1.1213
#       drivers/usb/host/ehci-hcd.c     1.12    -> 1.13  
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------

# ehci-hcd.c needs to include <linux/bitops.h>, otherwise the inline
# definition of generic_ffs is not visible and it becomes an undefined
# symbol at link time.
# --------------------------------------------
#
diff -Nru a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
--- a/drivers/usb/host/ehci-hcd.c       Tue May 13 16:50:22 2003

 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/reboot.h>
+#include <linux/bitops.h> /* for generic_ffs */

 #ifdef CONFIG_USB_DEBUG
        #define DEBUG

--
Richard \\\ SuperH Core+Debug Architect /// .. At home ..

Curnow  \\\ http://www.superh.com/    ///  www.rc0.org.uk
Speaking for myself, not on behalf of SuperH
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Relinquish CPU control

3. 1.3.98: <linux/if_arp.h> needs to include <linux/netdevice.h>

4. aix backup

5. Include <linux/stddef.h> in <linux/list.h>

6. Help needed with wireless LAN (RedHat 7.1)...

7. Kernel include files <sys/socket.h> and <linux/in.h>

8. integration of lp0 or lp1

9. include files <sys/ipc.h> and <sys/shm.h>

10. <asm/bitops.h>: __inline__ needed where inline found

11. #include <linux/errno.h> WHERE are these includes?

12. gcc default include path ('#include <linux/xxxx.h>' fails)

13. #including <bsd/signal.h>: no include path