Skip to content

Commit

Permalink
Merge branch 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/willy/misc

* 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc:
  Deprecate the asm/semaphore.h files in feature-removal-schedule.
  Convert asm/semaphore.h users to linux/semaphore.h
  security: Remove unnecessary inclusions of asm/semaphore.h
  lib: Remove unnecessary inclusions of asm/semaphore.h
  kernel: Remove unnecessary inclusions of asm/semaphore.h
  include: Remove unnecessary inclusions of asm/semaphore.h
  fs: Remove unnecessary inclusions of asm/semaphore.h
  drivers: Remove unnecessary inclusions of asm/semaphore.h
  net: Remove unnecessary inclusions of asm/semaphore.h
  arch: Remove unnecessary inclusions of asm/semaphore.h
  • Loading branch information
torvalds committed Apr 21, 2008
2 parents 85b375a + d2f5e80 commit 429f731
Show file tree
Hide file tree
Showing 136 changed files with 44 additions and 143 deletions.
6 changes: 3 additions & 3 deletions Documentation/DocBook/kernel-locking.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
</para>
<para>
The third type is a semaphore
(<filename class="headerfile">include/asm/semaphore.h</filename>): it
(<filename class="headerfile">include/linux/semaphore.h</filename>): it
can have more than one holder at any time (the number decided at
initialization time), although it is most commonly used as a
single-holder lock (a mutex). If you can't get a semaphore, your
Expand Down Expand Up @@ -290,7 +290,7 @@
<para>
If you have a data structure which is only ever accessed from
user context, then you can use a simple semaphore
(<filename>linux/asm/semaphore.h</filename>) to protect it. This
(<filename>linux/linux/semaphore.h</filename>) to protect it. This
is the most trivial case: you initialize the semaphore to the number
of resources available (usually 1), and call
<function>down_interruptible()</function> to grab the semaphore, and
Expand Down Expand Up @@ -1656,7 +1656,7 @@ the amount of locking which needs to be done.
#include &lt;linux/slab.h&gt;
#include &lt;linux/string.h&gt;
+#include &lt;linux/rcupdate.h&gt;
#include &lt;asm/semaphore.h&gt;
#include &lt;linux/semaphore.h&gt;
#include &lt;asm/errno.h&gt;

struct object
Expand Down
8 changes: 8 additions & 0 deletions Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,11 @@ Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb
ocfs2-tools. 2 years should be sufficient time to phase in new versions
which know to look in /sys/fs/o2cb.
Who: [email protected]

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

What: asm/semaphore.h
When: 2.6.26
Why: Implementation became generic; users should now include
linux/semaphore.h instead.
Who: Matthew Wilcox <[email protected]>
1 change: 0 additions & 1 deletion arch/arm/common/rtctime.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <linux/mutex.h>

#include <asm/rtc.h>
#include <asm/semaphore.h>

static DECLARE_WAIT_QUEUE_HEAD(rtc_wait);
static struct fasync_struct *rtc_async_queue;
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-aaec2000/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include <linux/clk.h>
#include <linux/mutex.h>

#include <asm/semaphore.h>

#include "clock.h"

static LIST_HEAD(clocks);
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-at91/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/delay.h>
#include <linux/clk.h>

#include <asm/semaphore.h>
#include <asm/io.h>
#include <asm/mach-types.h>

Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-integrator/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <linux/clk.h>
#include <linux/mutex.h>

#include <asm/semaphore.h>
#include <asm/hardware/icst525.h>

#include "clock.h"
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-pnx4008/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/err.h>
#include <linux/delay.h>

#include <asm/semaphore.h>
#include <asm/hardware.h>
#include <asm/io.h>

Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-pnx4008/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/semaphore.h>
#include <asm/io.h>
#include <asm/arch/platform.h>
#include <asm/arch/gpio.h>
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-realview/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <linux/clk.h>
#include <linux/mutex.h>

#include <asm/semaphore.h>
#include <asm/hardware/icst307.h>

#include "clock.h"
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-versatile/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <linux/clk.h>
#include <linux/mutex.h>

#include <asm/semaphore.h>
#include <asm/hardware/icst307.h>

#include "clock.h"
Expand Down
1 change: 0 additions & 1 deletion arch/arm/plat-omap/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/platform_device.h>

#include <asm/io.h>
#include <asm/semaphore.h>

#include <asm/arch/clock.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/salinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
#include <linux/smp.h>
#include <linux/timer.h>
#include <linux/vmalloc.h>
#include <linux/semaphore.h>

#include <asm/semaphore.h>
#include <asm/sal.h>
#include <asm/uaccess.h>

Expand Down
1 change: 0 additions & 1 deletion arch/ia64/sn/kernel/sn2/sn_hwperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

#include <asm/processor.h>
#include <asm/topology.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>
#include <asm/sal.h>
#include <asm/sn/io.h>
Expand Down
1 change: 0 additions & 1 deletion arch/m68k/atari/stram.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <asm/atarihw.h>
#include <asm/atari_stram.h>
#include <asm/io.h>
#include <asm/semaphore.h>

#undef DEBUG

Expand Down
1 change: 0 additions & 1 deletion arch/m68k/sun3/intersil.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include <asm/errno.h>
#include <asm/system.h>
#include <asm/semaphore.h>
#include <asm/rtc.h>
#include <asm/intersil.h>

Expand Down
1 change: 0 additions & 1 deletion arch/mips/sgi-ip27/ip27-console.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <linux/init.h>

#include <asm/page.h>
#include <asm/semaphore.h>
#include <asm/sn/addrs.h>
#include <asm/sn/sn0/hub.h>
#include <asm/sn/klconfig.h>
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/kernel/sys_parisc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@

#include <asm/types.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <asm/mmu_context.h>

#include "sys32.h"
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/rtas.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <asm/prom.h>
#include <asm/rtas.h>
#include <asm/hvcall.h>
#include <asm/semaphore.h>
#include <asm/machdep.h>
#include <asm/firmware.h>
#include <asm/page.h>
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/sys_ppc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <asm/types.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include <asm/semaphore.h>
#include <asm/time.h>
#include <asm/mmu_context.h>
#include <asm/ppc-pci.h>
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <linux/personality.h>

#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <asm/syscalls.h>
#include <asm/time.h>
#include <asm/unistd.h>
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/cell/spufs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <linux/marker.h>

#include <asm/io.h>
#include <asm/semaphore.h>
#include <asm/spu.h>
#include <asm/spu_info.h>
#include <asm/uaccess.h>
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/cell/spufs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <linux/parser.h>

#include <asm/prom.h>
#include <asm/semaphore.h>
#include <asm/spu.h>
#include <asm/spu_priv1.h>
#include <asm/uaccess.h>
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/platforms/powermac/pfunc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/module.h>
#include <linux/mutex.h>

#include <asm/semaphore.h>
#include <asm/prom.h>
#include <asm/pmac_pfunc.h>

Expand Down
1 change: 0 additions & 1 deletion arch/ppc/syslib/ocp.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include <asm/io.h>
#include <asm/ocp.h>
#include <asm/errno.h>
#include <asm/semaphore.h>

//#define DBG(x) printk x
#define DBG(x)
Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/compat_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@

#include <asm/types.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>

#include <net/scm.h>
#include <net/sock.h>
Expand Down
1 change: 0 additions & 1 deletion arch/s390/kernel/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <linux/ctype.h>
#include <linux/sysctl.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/fs.h>
Expand Down
1 change: 0 additions & 1 deletion arch/sparc64/kernel/sys_sparc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#include <asm/types.h>
#include <asm/uaccess.h>
#include <asm/fpumacro.h>
#include <asm/semaphore.h>
#include <asm/mmu_context.h>
#include <asm/compat_signal.h>

Expand Down
1 change: 0 additions & 1 deletion arch/v850/kernel/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <linux/file.h>

#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <asm/unistd.h>

/*
Expand Down
1 change: 0 additions & 1 deletion arch/x86/ia32/sys_ia32.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <asm/mman.h>
#include <asm/types.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>
#include <asm/atomic.h>
#include <asm/ia32.h>
#include <asm/vgtod.h>
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <linux/module.h>
#include <linux/percpu.h>
#include <linux/bootmem.h>
#include <asm/semaphore.h>
#include <asm/processor.h>
#include <asm/i387.h>
#include <asm/msr.h>
Expand Down
1 change: 0 additions & 1 deletion arch/x86/kernel/cpu/proc.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <linux/smp.h>
#include <linux/timex.h>
#include <linux/string.h>
#include <asm/semaphore.h>
#include <linux/seq_file.h>
#include <linux/cpufreq.h>

Expand Down
1 change: 0 additions & 1 deletion drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_host.h>
#include <linux/libata.h>
#include <asm/semaphore.h>
#include <asm/byteorder.h>
#include <linux/cdrom.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <linux/notifier.h>
#include <linux/genhd.h>
#include <linux/kallsyms.h>
#include <asm/semaphore.h>
#include <linux/semaphore.h>

#include "base.h"
#include "power/power.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/block/cryptoloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <linux/blkdev.h>
#include <linux/loop.h>
#include <linux/scatterlist.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

MODULE_LICENSE("GPL");
Expand Down
1 change: 0 additions & 1 deletion drivers/char/generic_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <linux/interrupt.h>
#include <linux/tty_flip.h>
#include <linux/delay.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

#define DEBUG
Expand Down
1 change: 0 additions & 1 deletion drivers/char/rio/rioboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <linux/termios.h>
#include <linux/serial.h>
#include <linux/vmalloc.h>
#include <asm/semaphore.h>
#include <linux/generic_serial.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/rio/riocmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ static char *_riocmd_c_sccs_ = "@(#)riocmd.c 1.2";
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

#include <linux/termios.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/rio/rioctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ static char *_rioctrl_c_sccs_ = "@(#)rioctrl.c 1.3";
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

#include <linux/termios.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/rio/rioinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3";
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

#include <linux/termios.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/rio/riointr.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ static char *_riointr_c_sccs_ = "@(#)riointr.c 1.2";
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

#include <linux/termios.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/rio/rioparam.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ static char *_rioparam_c_sccs_ = "@(#)rioparam.c 1.3";
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

#include <linux/termios.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/rio/rioroute.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ static char *_rioroute_c_sccs_ = "@(#)rioroute.c 1.3";
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

#include <linux/termios.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/rio/riotable.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ static char *_riotable_c_sccs_ = "@(#)riotable.c 1.2";
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

#include <linux/termios.h>
Expand Down
1 change: 0 additions & 1 deletion drivers/char/rio/riotty.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ static char *_riotty_c_sccs_ = "@(#)riotty.c 1.3";
#include <asm/io.h>
#include <asm/system.h>
#include <asm/string.h>
#include <asm/semaphore.h>
#include <asm/uaccess.h>

#include <linux/termios.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/snsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include <linux/kobject.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/semaphore.h>
#include <asm/sn/types.h>
#include <asm/semaphore.h>

#define CHUNKSIZE 127

Expand Down
3 changes: 2 additions & 1 deletion drivers/firewire/fw-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
#include <linux/delay.h>
#include <linux/idr.h>
#include <linux/string.h>
#include <asm/semaphore.h>
#include <linux/rwsem.h>
#include <linux/semaphore.h>
#include <asm/system.h>
#include <linux/ctype.h>
#include "fw-transaction.h"
Expand Down
Loading

0 comments on commit 429f731

Please sign in to comment.