Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107774
b: refs/heads/master
c: 9b3cbf7
h: refs/heads/master
v: v3
  • Loading branch information
Isaku Yamahata authored and Tony Luck committed Aug 4, 2008
1 parent b5a3c4f commit e6de167
Show file tree
Hide file tree
Showing 705 changed files with 3,414 additions and 5,272 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8bc5fb6abb670fa9079cd1994f016a39f99698fe
refs/heads/master: 9b3cbf725fb98733976fd02e2e557f0ae3028df0
2 changes: 2 additions & 0 deletions trunk/Documentation/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ cciss.txt
- info, major/minor #'s for Compaq's SMART Array Controllers.
cdrom/
- directory with information on the CD-ROM drivers that Linux has.
cli-sti-removal.txt
- cli()/sti() removal guide.
computone.txt
- info on Computone Intelliport II/Plus Multiport Serial Driver.
connector/
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \
kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
mac80211.xml debugobjects.xml sh.xml
mac80211.xml debugobjects.xml

###
# The build process is as follows (targets):
Expand Down
8 changes: 4 additions & 4 deletions trunk/Documentation/DocBook/s390-drivers.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
the hardware structures represented here, please consult the Principles
of Operation.
</para>
!Iarch/s390/include/asm/cio.h
!Iinclude/asm-s390/cio.h
</sect1>
<sect1 id="ccwdev">
<title>ccw devices</title>
Expand All @@ -114,7 +114,7 @@
ccw device structure. Device drivers must not bypass those functions
or strange side effects may happen.
</para>
!Iarch/s390/include/asm/ccwdev.h
!Iinclude/asm-s390/ccwdev.h
!Edrivers/s390/cio/device.c
!Edrivers/s390/cio/device_ops.c
</sect1>
Expand All @@ -125,7 +125,7 @@
measurement data which is made available by the channel subsystem
for each channel attached device.
</para>
!Iarch/s390/include/asm/cmb.h
!Iinclude/asm-s390/cmb.h
!Edrivers/s390/cio/cmf.c
</sect1>
</chapter>
Expand All @@ -142,7 +142,7 @@
</para>
<sect1 id="ccwgroupdevices">
<title>ccw group devices</title>
!Iarch/s390/include/asm/ccwgroup.h
!Iinclude/asm-s390/ccwgroup.h
!Edrivers/s390/cio/ccwgroup.c
</sect1>
</chapter>
Expand Down
105 changes: 0 additions & 105 deletions trunk/Documentation/DocBook/sh.tmpl

This file was deleted.

2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/videobook.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ static struct video_buffer capture_fb;

<chapter id="pubfunctions">
<title>Public Functions Provided</title>
!Edrivers/media/video/v4l2-dev.c
!Edrivers/media/video/videodev.c
</chapter>

</book>
133 changes: 133 additions & 0 deletions trunk/Documentation/cli-sti-removal.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@

#### cli()/sti() removal guide, started by Ingo Molnar <mingo@redhat.com>


as of 2.5.28, five popular macros have been removed on SMP, and
are being phased out on UP:

cli(), sti(), save_flags(flags), save_flags_cli(flags), restore_flags(flags)

until now it was possible to protect driver code against interrupt
handlers via a cli(), but from now on other, more lightweight methods
have to be used for synchronization, such as spinlocks or semaphores.

for example, driver code that used to do something like:

struct driver_data;

irq_handler (...)
{
....
driver_data.finish = 1;
driver_data.new_work = 0;
....
}

...

ioctl_func (...)
{
...
cli();
...
driver_data.finish = 0;
driver_data.new_work = 2;
...
sti();
...
}

was SMP-correct because the cli() function ensured that no
interrupt handler (amongst them the above irq_handler()) function
would execute while the cli()-ed section is executing.

but from now on a more direct method of locking has to be used:

DEFINE_SPINLOCK(driver_lock);
struct driver_data;

irq_handler (...)
{
unsigned long flags;
....
spin_lock_irqsave(&driver_lock, flags);
....
driver_data.finish = 1;
driver_data.new_work = 0;
....
spin_unlock_irqrestore(&driver_lock, flags);
....
}

...

ioctl_func (...)
{
...
spin_lock_irq(&driver_lock);
...
driver_data.finish = 0;
driver_data.new_work = 2;
...
spin_unlock_irq(&driver_lock);
...
}

the above code has a number of advantages:

- the locking relation is easier to understand - actual lock usage
pinpoints the critical sections. cli() usage is too opaque.
Easier to understand means it's easier to debug.

- it's faster, because spinlocks are faster to acquire than the
potentially heavily-used IRQ lock. Furthermore, your driver does
not have to wait eg. for a big heavy SCSI interrupt to finish,
because the driver_lock spinlock is only used by your driver.
cli() on the other hand was used by many drivers, and extended
the critical section to the whole IRQ handler function - creating
serious lock contention.


to make the transition easier, we've still kept the cli(), sti(),
save_flags(), save_flags_cli() and restore_flags() macros defined
on UP systems - but their usage will be phased out until 2.6 is
released.

drivers that want to disable local interrupts (interrupts on the
current CPU), can use the following five macros:

local_irq_disable(), local_irq_enable(), local_save_flags(flags),
local_irq_save(flags), local_irq_restore(flags)

but beware, their meaning and semantics are much simpler, far from
that of the old cli(), sti(), save_flags(flags) and restore_flags(flags)
SMP meaning:

local_irq_disable() => turn local IRQs off

local_irq_enable() => turn local IRQs on

local_save_flags(flags) => save the current IRQ state into flags. The
state can be on or off. (on some
architectures there's even more bits in it.)

local_irq_save(flags) => save the current IRQ state into flags and
disable interrupts.

local_irq_restore(flags) => restore the IRQ state from flags.

(local_irq_save can save both irqs on and irqs off state, and
local_irq_restore can restore into both irqs on and irqs off state.)

another related change is that synchronize_irq() now takes a parameter:
synchronize_irq(irq). This change too has the purpose of making SMP
synchronization more lightweight - this way you can wait for your own
interrupt handler to finish, no need to wait for other IRQ sources.


why were these changes done? The main reason was the architectural burden
of maintaining the cli()/sti() interface - it became a real problem. The
new interrupt system is much more streamlined, easier to understand, debug,
and it's also a bit faster - the same happened to it that will happen to
cli()/sti() using drivers once they convert to spinlocks :-)

7 changes: 1 addition & 6 deletions trunk/Documentation/power/pm_qos_interface.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PM Quality Of Service Interface.
PM quality of Service interface.

This interface provides a kernel and user mode interface for registering
performance expectations by drivers, subsystems and user space applications on
Expand All @@ -7,11 +7,6 @@ one of the parameters.
Currently we have {cpu_dma_latency, network_latency, network_throughput} as the
initial set of pm_qos parameters.

Each parameters have defined units:
* latency: usec
* timeout: usec
* throughput: kbs (kilo bit / sec)

The infrastructure exposes multiple misc device nodes one per implemented
parameter. The set of parameters implement is defined by pm_qos_power_init()
and pm_qos_params.h. This is done because having the available parameters
Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/powerpc/booting-without-of.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ it with special cases.
a 64-bit platform.

d) request and get assigned a platform number (see PLATFORM_*
constants in arch/powerpc/include/asm/processor.h
constants in include/asm-powerpc/processor.h

32-bit embedded kernels:

Expand Down Expand Up @@ -340,7 +340,7 @@ the block to RAM before passing it to the kernel.
---------

The kernel is entered with r3 pointing to an area of memory that is
roughly described in arch/powerpc/include/asm/prom.h by the structure
roughly described in include/asm-powerpc/prom.h by the structure
boot_param_header:

struct boot_param_header {
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/powerpc/eeh-pci-error-recovery.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ error. Given an arbitrary address, the routine
pci_get_device_by_addr() will find the pci device associated
with that address (if any).

The default arch/powerpc/include/asm/io.h macros readb(), inb(), insb(),
The default include/asm-powerpc/io.h macros readb(), inb(), insb(),
etc. include a check to see if the i/o read returned all-0xff's.
If so, these make a call to eeh_dn_check_failure(), which in turn
asks the firmware if the all-ff's value is the sign of a true EEH
Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 27
EXTRAVERSION = -rc2
EXTRAVERSION = -rc1
NAME = Rotary Wombat

# *DOCUMENTATION*
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ia64/kernel/ivt.S
Original file line number Diff line number Diff line change
Expand Up @@ -1243,11 +1243,11 @@ ENTRY(speculation_vector)

add r17=r17,r18 // now add the offset
;;
MOV_FROM_IIP(r17)
MOV_TO_IIP(r17, r19)
dep r16=0,r16,41,2 // clear EI
;;

MOV_FROM_IPSR(p0, r16)
MOV_TO_IPSR(p0, r16, r19)
;;

RFI
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m68k/mac/baboon.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/ide.h>

#include <asm/traps.h>
#include <asm/bootinfo.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m68k/mac/via.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/ide.h>
#include <linux/module.h>

#include <asm/bootinfo.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/mips/emma2rh/markeins/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/types.h>
#include <linux/initrd.h>
#include <linux/irq.h>
#include <linux/ide.h>
#include <linux/ioport.h>
#include <linux/param.h> /* for HZ */
#include <linux/root_dev.h>
Expand Down
Loading

0 comments on commit e6de167

Please sign in to comment.