diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-09-11 12:00:57 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-21 09:44:13 -0400 |
commit | 6de5bd128d381ad88ac6d419a5e597048eb468cf (patch) | |
tree | 7b3a0440f645c6e98367a87b1ca0ed1e0df204dd | |
parent | 7ff52efdca367d4bfe2449bd3d4a1f8172c5953a (diff) |
BKL: introduce CONFIG_BKL.
With all the patches we have queued in the BKL removal tree, only a
few dozen modules are left that actually rely on the BKL, and even
there are lots of low-hanging fruit. We need to decide what to do
about them, this patch illustrates one of the options:
Every user of the BKL is marked as 'depends on BKL' in Kconfig,
and the CONFIG_BKL becomes a user-visible option. If it gets
disabled, no BKL using module can be built any more and the BKL
code itself is compiled out.
The one exception is file locking, which is practically always
enabled and does a 'select BKL' instead. This effectively forces
CONFIG_BKL to be enabled until we have solved the fs/lockd
mess and can apply the patch that removes the BKL from fs/locks.c.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | drivers/gpu/drm/Kconfig | 5 | ||||
-rw-r--r-- | drivers/media/Kconfig | 1 | ||||
-rw-r--r-- | drivers/net/appletalk/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/cx25821/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/easycap/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/go7007/Kconfig | 1 | ||||
-rw-r--r-- | drivers/staging/usbip/Kconfig | 2 | ||||
-rw-r--r-- | fs/Kconfig | 1 | ||||
-rw-r--r-- | fs/adfs/Kconfig | 1 | ||||
-rw-r--r-- | fs/autofs/Kconfig | 1 | ||||
-rw-r--r-- | fs/hpfs/Kconfig | 1 | ||||
-rw-r--r-- | fs/nfs/Kconfig | 1 | ||||
-rw-r--r-- | fs/nfsd/Kconfig | 1 | ||||
-rw-r--r-- | fs/smbfs/Kconfig | 1 | ||||
-rw-r--r-- | fs/udf/Kconfig | 1 | ||||
-rw-r--r-- | fs/ufs/Kconfig | 1 | ||||
-rw-r--r-- | include/linux/smp_lock.h | 7 | ||||
-rw-r--r-- | init/Kconfig | 2 | ||||
-rw-r--r-- | lib/Kconfig.debug | 9 | ||||
-rw-r--r-- | net/ipx/Kconfig | 1 | ||||
-rw-r--r-- | net/x25/Kconfig | 1 |
21 files changed, 36 insertions, 5 deletions
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 4cab0c6397e3..7af443672626 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig | |||
@@ -73,7 +73,8 @@ source "drivers/gpu/drm/radeon/Kconfig" | |||
73 | 73 | ||
74 | config DRM_I810 | 74 | config DRM_I810 |
75 | tristate "Intel I810" | 75 | tristate "Intel I810" |
76 | depends on DRM && AGP && AGP_INTEL | 76 | # BKL usage in order to avoid AB-BA deadlocks, may become BROKEN_ON_SMP |
77 | depends on DRM && AGP && AGP_INTEL && BKL | ||
77 | help | 78 | help |
78 | Choose this option if you have an Intel I810 graphics card. If M is | 79 | Choose this option if you have an Intel I810 graphics card. If M is |
79 | selected, the module will be called i810. AGP support is required | 80 | selected, the module will be called i810. AGP support is required |
@@ -86,6 +87,8 @@ choice | |||
86 | 87 | ||
87 | config DRM_I830 | 88 | config DRM_I830 |
88 | tristate "i830 driver" | 89 | tristate "i830 driver" |
90 | # BKL usage in order to avoid AB-BA deadlocks, i830 may get removed | ||
91 | depends on BKL | ||
89 | help | 92 | help |
90 | Choose this option if you have a system that has Intel 830M, 845G, | 93 | Choose this option if you have a system that has Intel 830M, 845G, |
91 | 852GM, 855GM or 865G integrated graphics. If M is selected, the | 94 | 852GM, 855GM or 865G integrated graphics. If M is selected, the |
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index a28541b2b1a2..bad2cedb8d96 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
@@ -19,6 +19,7 @@ comment "Multimedia core support" | |||
19 | 19 | ||
20 | config VIDEO_DEV | 20 | config VIDEO_DEV |
21 | tristate "Video For Linux" | 21 | tristate "Video For Linux" |
22 | depends on BKL # used in many drivers for ioctl handling, need to kill | ||
22 | ---help--- | 23 | ---help--- |
23 | V4L core support for video capture and overlay devices, webcams and | 24 | V4L core support for video capture and overlay devices, webcams and |
24 | AM/FM radio cards. | 25 | AM/FM radio cards. |
diff --git a/drivers/net/appletalk/Kconfig b/drivers/net/appletalk/Kconfig index 0a0e0cd81a23..20f97e7017ce 100644 --- a/drivers/net/appletalk/Kconfig +++ b/drivers/net/appletalk/Kconfig | |||
@@ -3,6 +3,7 @@ | |||
3 | # | 3 | # |
4 | config ATALK | 4 | config ATALK |
5 | tristate "Appletalk protocol support" | 5 | tristate "Appletalk protocol support" |
6 | depends on BKL # waiting to be removed from net/appletalk/ddp.c | ||
6 | select LLC | 7 | select LLC |
7 | ---help--- | 8 | ---help--- |
8 | AppleTalk is the protocol that Apple computers can use to communicate | 9 | AppleTalk is the protocol that Apple computers can use to communicate |
diff --git a/drivers/staging/cx25821/Kconfig b/drivers/staging/cx25821/Kconfig index df7756a95fad..813cb355ac01 100644 --- a/drivers/staging/cx25821/Kconfig +++ b/drivers/staging/cx25821/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config VIDEO_CX25821 | 1 | config VIDEO_CX25821 |
2 | tristate "Conexant cx25821 support" | 2 | tristate "Conexant cx25821 support" |
3 | depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT | 3 | depends on DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT |
4 | depends on BKL # please fix | ||
4 | select I2C_ALGOBIT | 5 | select I2C_ALGOBIT |
5 | select VIDEO_BTCX | 6 | select VIDEO_BTCX |
6 | select VIDEO_TVEEPROM | 7 | select VIDEO_TVEEPROM |
diff --git a/drivers/staging/easycap/Kconfig b/drivers/staging/easycap/Kconfig index bd96f39f2735..9d5fe4ddc30a 100644 --- a/drivers/staging/easycap/Kconfig +++ b/drivers/staging/easycap/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config EASYCAP | 1 | config EASYCAP |
2 | tristate "EasyCAP USB ID 05e1:0408 support" | 2 | tristate "EasyCAP USB ID 05e1:0408 support" |
3 | depends on USB && VIDEO_DEV | 3 | depends on USB && VIDEO_DEV |
4 | depends on BKL # please fix | ||
4 | 5 | ||
5 | ---help--- | 6 | ---help--- |
6 | This is an integrated audio/video driver for EasyCAP cards with | 7 | This is an integrated audio/video driver for EasyCAP cards with |
diff --git a/drivers/staging/go7007/Kconfig b/drivers/staging/go7007/Kconfig index e47f683a323e..75fa46805527 100644 --- a/drivers/staging/go7007/Kconfig +++ b/drivers/staging/go7007/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config VIDEO_GO7007 | 1 | config VIDEO_GO7007 |
2 | tristate "WIS GO7007 MPEG encoder support" | 2 | tristate "WIS GO7007 MPEG encoder support" |
3 | depends on VIDEO_DEV && PCI && I2C && INPUT | 3 | depends on VIDEO_DEV && PCI && I2C && INPUT |
4 | depends on BKL # please fix | ||
4 | depends on SND | 5 | depends on SND |
5 | select VIDEOBUF_DMA_SG | 6 | select VIDEOBUF_DMA_SG |
6 | select VIDEO_IR | 7 | select VIDEO_IR |
diff --git a/drivers/staging/usbip/Kconfig b/drivers/staging/usbip/Kconfig index 2c1d10acb8b5..b11ec379b5c2 100644 --- a/drivers/staging/usbip/Kconfig +++ b/drivers/staging/usbip/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config USB_IP_COMMON | 1 | config USB_IP_COMMON |
2 | tristate "USB IP support (EXPERIMENTAL)" | 2 | tristate "USB IP support (EXPERIMENTAL)" |
3 | depends on USB && NET && EXPERIMENTAL | 3 | depends on USB && NET && EXPERIMENTAL && BKL |
4 | default N | 4 | default N |
5 | ---help--- | 5 | ---help--- |
6 | This enables pushing USB packets over IP to allow remote | 6 | This enables pushing USB packets over IP to allow remote |
diff --git a/fs/Kconfig b/fs/Kconfig index 3d185308ec88..65781de44fc0 100644 --- a/fs/Kconfig +++ b/fs/Kconfig | |||
@@ -50,6 +50,7 @@ endif # BLOCK | |||
50 | config FILE_LOCKING | 50 | config FILE_LOCKING |
51 | bool "Enable POSIX file locking API" if EMBEDDED | 51 | bool "Enable POSIX file locking API" if EMBEDDED |
52 | default y | 52 | default y |
53 | select BKL # while lockd still uses it. | ||
53 | help | 54 | help |
54 | This option enables standard file locking support, required | 55 | This option enables standard file locking support, required |
55 | for filesystems like NFS and for the flock() system | 56 | for filesystems like NFS and for the flock() system |
diff --git a/fs/adfs/Kconfig b/fs/adfs/Kconfig index e55182a74605..1dd5f34b3cf2 100644 --- a/fs/adfs/Kconfig +++ b/fs/adfs/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config ADFS_FS | 1 | config ADFS_FS |
2 | tristate "ADFS file system support (EXPERIMENTAL)" | 2 | tristate "ADFS file system support (EXPERIMENTAL)" |
3 | depends on BLOCK && EXPERIMENTAL | 3 | depends on BLOCK && EXPERIMENTAL |
4 | depends on BKL # need to fix | ||
4 | help | 5 | help |
5 | The Acorn Disc Filing System is the standard file system of the | 6 | The Acorn Disc Filing System is the standard file system of the |
6 | RiscOS operating system which runs on Acorn's ARM-based Risc PC | 7 | RiscOS operating system which runs on Acorn's ARM-based Risc PC |
diff --git a/fs/autofs/Kconfig b/fs/autofs/Kconfig index 5f3bea90911e..480e210c83ab 100644 --- a/fs/autofs/Kconfig +++ b/fs/autofs/Kconfig | |||
@@ -1,5 +1,6 @@ | |||
1 | config AUTOFS_FS | 1 | config AUTOFS_FS |
2 | tristate "Kernel automounter support" | 2 | tristate "Kernel automounter support" |
3 | depends on BKL # unfixable, just use autofs4 | ||
3 | help | 4 | help |
4 | The automounter is a tool to automatically mount remote file systems | 5 | The automounter is a tool to automatically mount remote file systems |
5 | on demand. This implementation is partially kernel-based to reduce | 6 | on demand. This implementation is partially kernel-based to reduce |
diff --git a/fs/hpfs/Kconfig b/fs/hpfs/Kconfig index 56bd15c5bf6c..63b6f5632318 100644 --- a/fs/hpfs/Kconfig +++ b/fs/hpfs/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config HPFS_FS | 1 | config HPFS_FS |
2 | tristate "OS/2 HPFS file system support" | 2 | tristate "OS/2 HPFS file system support" |
3 | depends on BLOCK | 3 | depends on BLOCK |
4 | depends on BKL # nontrivial to fix | ||
4 | help | 5 | help |
5 | OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS | 6 | OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS |
6 | is the file system used for organizing files on OS/2 hard disk | 7 | is the file system used for organizing files on OS/2 hard disk |
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig index 6c2aad49d731..10b9524bb908 100644 --- a/fs/nfs/Kconfig +++ b/fs/nfs/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config NFS_FS | 1 | config NFS_FS |
2 | tristate "NFS client support" | 2 | tristate "NFS client support" |
3 | depends on INET && FILE_LOCKING | 3 | depends on INET && FILE_LOCKING |
4 | depends on BKL # fix as soon as lockd is done | ||
4 | select LOCKD | 5 | select LOCKD |
5 | select SUNRPC | 6 | select SUNRPC |
6 | select NFS_ACL_SUPPORT if NFS_V3_ACL | 7 | select NFS_ACL_SUPPORT if NFS_V3_ACL |
diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig index 95932f523aef..429d4a142276 100644 --- a/fs/nfsd/Kconfig +++ b/fs/nfsd/Kconfig | |||
@@ -2,6 +2,7 @@ config NFSD | |||
2 | tristate "NFS server support" | 2 | tristate "NFS server support" |
3 | depends on INET | 3 | depends on INET |
4 | depends on FILE_LOCKING | 4 | depends on FILE_LOCKING |
5 | depends on BKL # fix as soon as lockd is done | ||
5 | select LOCKD | 6 | select LOCKD |
6 | select SUNRPC | 7 | select SUNRPC |
7 | select EXPORTFS | 8 | select EXPORTFS |
diff --git a/fs/smbfs/Kconfig b/fs/smbfs/Kconfig index e668127c8b2e..2bc24a8c4039 100644 --- a/fs/smbfs/Kconfig +++ b/fs/smbfs/Kconfig | |||
@@ -1,5 +1,6 @@ | |||
1 | config SMB_FS | 1 | config SMB_FS |
2 | tristate "SMB file system support (OBSOLETE, please use CIFS)" | 2 | tristate "SMB file system support (OBSOLETE, please use CIFS)" |
3 | depends on BKL # probably unfixable | ||
3 | depends on INET | 4 | depends on INET |
4 | select NLS | 5 | select NLS |
5 | help | 6 | help |
diff --git a/fs/udf/Kconfig b/fs/udf/Kconfig index 0e0e99bd6bce..f8def3c8ea4c 100644 --- a/fs/udf/Kconfig +++ b/fs/udf/Kconfig | |||
@@ -1,5 +1,6 @@ | |||
1 | config UDF_FS | 1 | config UDF_FS |
2 | tristate "UDF file system support" | 2 | tristate "UDF file system support" |
3 | depends on BKL # needs serious work to remove | ||
3 | select CRC_ITU_T | 4 | select CRC_ITU_T |
4 | help | 5 | help |
5 | This is the new file system used on some CD-ROMs and DVDs. Say Y if | 6 | This is the new file system used on some CD-ROMs and DVDs. Say Y if |
diff --git a/fs/ufs/Kconfig b/fs/ufs/Kconfig index e4f10a40768a..30c8f223253d 100644 --- a/fs/ufs/Kconfig +++ b/fs/ufs/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config UFS_FS | 1 | config UFS_FS |
2 | tristate "UFS file system support (read only)" | 2 | tristate "UFS file system support (read only)" |
3 | depends on BLOCK | 3 | depends on BLOCK |
4 | depends on BKL # probably fixable | ||
4 | help | 5 | help |
5 | BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD, | 6 | BSD and derivate versions of Unix (such as SunOS, FreeBSD, NetBSD, |
6 | OpenBSD and NeXTstep) use a file system called UFS. Some System V | 7 | OpenBSD and NeXTstep) use a file system called UFS. Some System V |
diff --git a/include/linux/smp_lock.h b/include/linux/smp_lock.h index 2ea1dd1ba21c..291f721144c2 100644 --- a/include/linux/smp_lock.h +++ b/include/linux/smp_lock.h | |||
@@ -54,12 +54,15 @@ static inline void cycle_kernel_lock(void) | |||
54 | 54 | ||
55 | #else | 55 | #else |
56 | 56 | ||
57 | #ifdef CONFIG_BKL /* provoke build bug if not set */ | ||
57 | #define lock_kernel() | 58 | #define lock_kernel() |
58 | #define unlock_kernel() | 59 | #define unlock_kernel() |
59 | #define release_kernel_lock(task) do { } while(0) | ||
60 | #define cycle_kernel_lock() do { } while(0) | 60 | #define cycle_kernel_lock() do { } while(0) |
61 | #define reacquire_kernel_lock(task) 0 | ||
62 | #define kernel_locked() 1 | 61 | #define kernel_locked() 1 |
62 | #endif /* CONFIG_BKL */ | ||
63 | |||
64 | #define release_kernel_lock(task) do { } while(0) | ||
65 | #define reacquire_kernel_lock(task) 0 | ||
63 | 66 | ||
64 | #endif /* CONFIG_LOCK_KERNEL */ | 67 | #endif /* CONFIG_LOCK_KERNEL */ |
65 | #endif /* __LINUX_SMPLOCK_H */ | 68 | #endif /* __LINUX_SMPLOCK_H */ |
diff --git a/init/Kconfig b/init/Kconfig index 2de5b1cbadd9..2005a1d49928 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -64,7 +64,7 @@ config BROKEN_ON_SMP | |||
64 | 64 | ||
65 | config LOCK_KERNEL | 65 | config LOCK_KERNEL |
66 | bool | 66 | bool |
67 | depends on SMP || PREEMPT | 67 | depends on (SMP || PREEMPT) && BKL |
68 | default y | 68 | default y |
69 | 69 | ||
70 | config INIT_ENV_ARG_LIMIT | 70 | config INIT_ENV_ARG_LIMIT |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1b4afd2e6ca0..088eea1c2bef 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -461,6 +461,15 @@ config DEBUG_MUTEXES | |||
461 | This feature allows mutex semantics violations to be detected and | 461 | This feature allows mutex semantics violations to be detected and |
462 | reported. | 462 | reported. |
463 | 463 | ||
464 | config BKL | ||
465 | bool "Big Kernel Lock" if (SMP || PREEMPT) | ||
466 | default y | ||
467 | help | ||
468 | This is the traditional lock that is used in old code instead | ||
469 | of proper locking. All drivers that use the BKL should depend | ||
470 | on this symbol. | ||
471 | Say Y here unless you are working on removing the BKL. | ||
472 | |||
464 | config DEBUG_LOCK_ALLOC | 473 | config DEBUG_LOCK_ALLOC |
465 | bool "Lock debugging: detect incorrect freeing of live locks" | 474 | bool "Lock debugging: detect incorrect freeing of live locks" |
466 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT | 475 | depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT |
diff --git a/net/ipx/Kconfig b/net/ipx/Kconfig index e9ad0062fbb6..02549cb2c328 100644 --- a/net/ipx/Kconfig +++ b/net/ipx/Kconfig | |||
@@ -3,6 +3,7 @@ | |||
3 | # | 3 | # |
4 | config IPX | 4 | config IPX |
5 | tristate "The IPX protocol" | 5 | tristate "The IPX protocol" |
6 | depends on BKL # should be fixable | ||
6 | select LLC | 7 | select LLC |
7 | ---help--- | 8 | ---help--- |
8 | This is support for the Novell networking protocol, IPX, commonly | 9 | This is support for the Novell networking protocol, IPX, commonly |
diff --git a/net/x25/Kconfig b/net/x25/Kconfig index e6759c9660bb..2196e55e4f61 100644 --- a/net/x25/Kconfig +++ b/net/x25/Kconfig | |||
@@ -5,6 +5,7 @@ | |||
5 | config X25 | 5 | config X25 |
6 | tristate "CCITT X.25 Packet Layer (EXPERIMENTAL)" | 6 | tristate "CCITT X.25 Packet Layer (EXPERIMENTAL)" |
7 | depends on EXPERIMENTAL | 7 | depends on EXPERIMENTAL |
8 | depends on BKL # should be fixable | ||
8 | ---help--- | 9 | ---help--- |
9 | X.25 is a set of standardized network protocols, similar in scope to | 10 | X.25 is a set of standardized network protocols, similar in scope to |
10 | frame relay; the one physical line from your box to the X.25 network | 11 | frame relay; the one physical line from your box to the X.25 network |