Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84006
b: refs/heads/master
c: 3796958
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Feb 7, 2008
1 parent c0d27ae commit 9b65cd1
Show file tree
Hide file tree
Showing 855 changed files with 23,111 additions and 24,222 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: 24f1a849614ba1805e26a05da7cc8c6bd67490ea
refs/heads/master: 37969581301e50872a1ae84dc73962b5f7ee6b76
24 changes: 4 additions & 20 deletions trunk/Documentation/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,16 @@ devices.txt
- plain ASCII listing of all the nodes in /dev/ with major minor #'s.
digiepca.txt
- info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards.
dnotify.txt
- info about directory notification in Linux.
dontdiff
- file containing a list of files that should never be diff'ed.
driver-model/
- directory with info about Linux driver model.
drivers/
- directory with driver documentation (currently only EDAC).
dvb/
- info on Linux Digital Video Broadcast (DVB) subsystem.
early-userspace/
- info about initramfs, klibc, and userspace early during boot.
edac.txt
- information on EDAC - Error Detection And Correction
eisa.txt
- info on EISA bus support.
exception.txt
Expand Down Expand Up @@ -334,20 +332,8 @@ rtc.txt
- notes on how to use the Real Time Clock (aka CMOS clock) driver.
s390/
- directory with info on using Linux on the IBM S390.
sched-arch.txt
- CPU Scheduler implementation hints for architecture specific code.
sched-coding.txt
- reference for various scheduler-related methods in the O(1) scheduler.
sched-design.txt
- goals, design and implementation of the Linux O(1) scheduler.
sched-design-CFS.txt
- goals, design and implementation of the Complete Fair Scheduler.
sched-domains.txt
- information on scheduling domains.
sched-nice-design.txt
- How and why the scheduler's nice levels are implemented.
sched-stats.txt
- information on schedstats (Linux Scheduler Statistics).
scheduler/
- directory with info on the scheduler.
scsi/
- directory with info on Linux scsi support.
serial/
Expand All @@ -360,8 +346,6 @@ sgi-visws.txt
- short blurb on the SGI Visual Workstations.
sh/
- directory with info on porting Linux to a new architecture.
sharedsubtree.txt
- a description of shared subtrees for namespaces.
smart-config.txt
- description of the Smart Config makefile feature.
sony-laptop.txt
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/ABI/testing/sysfs-kernel-uids
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Description:
example would be, if User A has shares = 1024 and user
B has shares = 2048, User B will get twice the CPU
bandwidth user A will. For more details refer
Documentation/sched-design-CFS.txt
Documentation/scheduler/sched-design-CFS.txt
17 changes: 17 additions & 0 deletions trunk/Documentation/BUG-HUNTING
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,23 @@ And recompile the kernel with CONFIG_DEBUG_INFO enabled:
gdb vmlinux
(gdb) p vt_ioctl
(gdb) l *(0x<address of vt_ioctl> + 0xda8)
or, as one command
(gdb) l *(vt_ioctl + 0xda8)

If you have a call trace, such as :-
>Call Trace:
> [<ffffffff8802c8e9>] :jbd:log_wait_commit+0xa3/0xf5
> [<ffffffff810482d9>] autoremove_wake_function+0x0/0x2e
> [<ffffffff8802770b>] :jbd:journal_stop+0x1be/0x1ee
> ...
this shows the problem in the :jbd: module. You can load that module in gdb
and list the relevant code.
gdb fs/jbd/jbd.ko
(gdb) p log_wait_commit
(gdb) l *(0x<address> + 0xa3)
or
(gdb) l *(log_wait_commit + 0xa3)


Another very useful option of the Kernel Hacking section in menuconfig is
Debug memory allocations. This will help you see whether data has been
Expand Down
26 changes: 13 additions & 13 deletions trunk/Documentation/DocBook/genericirq.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<listitem><para>Chiplevel hardware encapsulation</para></listitem>
</orderedlist>
</para>
<sect1>
<sect1 id="Interrupt_control_flow">
<title>Interrupt control flow</title>
<para>
Each interrupt is described by an interrupt descriptor structure
Expand All @@ -190,7 +190,7 @@
referenced by the assigned chip descriptor structure.
</para>
</sect1>
<sect1>
<sect1 id="Highlevel_Driver_API">
<title>Highlevel Driver API</title>
<para>
The highlevel Driver API consists of following functions:
Expand All @@ -210,7 +210,7 @@
See the autogenerated function documentation for details.
</para>
</sect1>
<sect1>
<sect1 id="Highlevel_IRQ_flow_handlers">
<title>Highlevel IRQ flow handlers</title>
<para>
The generic layer provides a set of pre-defined irq-flow methods:
Expand All @@ -224,9 +224,9 @@
specific) are assigned to specific interrupts by the architecture
either during bootup or during device initialization.
</para>
<sect2>
<sect2 id="Default_flow_implementations">
<title>Default flow implementations</title>
<sect3>
<sect3 id="Helper_functions">
<title>Helper functions</title>
<para>
The helper functions call the chip primitives and
Expand Down Expand Up @@ -267,9 +267,9 @@ noop(irq)
</para>
</sect3>
</sect2>
<sect2>
<sect2 id="Default_flow_handler_implementations">
<title>Default flow handler implementations</title>
<sect3>
<sect3 id="Default_Level_IRQ_flow_handler">
<title>Default Level IRQ flow handler</title>
<para>
handle_level_irq provides a generic implementation
Expand All @@ -284,7 +284,7 @@ desc->chip->end();
</programlisting>
</para>
</sect3>
<sect3>
<sect3 id="Default_Edge_IRQ_flow_handler">
<title>Default Edge IRQ flow handler</title>
<para>
handle_edge_irq provides a generic implementation
Expand All @@ -311,7 +311,7 @@ desc->chip->end();
</programlisting>
</para>
</sect3>
<sect3>
<sect3 id="Default_simple_IRQ_flow_handler">
<title>Default simple IRQ flow handler</title>
<para>
handle_simple_irq provides a generic implementation
Expand All @@ -328,7 +328,7 @@ handle_IRQ_event(desc->action);
</programlisting>
</para>
</sect3>
<sect3>
<sect3 id="Default_per_CPU_flow_handler">
<title>Default per CPU flow handler</title>
<para>
handle_percpu_irq provides a generic implementation
Expand All @@ -349,7 +349,7 @@ desc->chip->end();
</para>
</sect3>
</sect2>
<sect2>
<sect2 id="Quirks_and_optimizations">
<title>Quirks and optimizations</title>
<para>
The generic functions are intended for 'clean' architectures and chips,
Expand All @@ -358,7 +358,7 @@ desc->chip->end();
overriding the highlevel irq-flow handler.
</para>
</sect2>
<sect2>
<sect2 id="Delayed_interrupt_disable">
<title>Delayed interrupt disable</title>
<para>
This per interrupt selectable feature, which was introduced by Russell
Expand All @@ -380,7 +380,7 @@ desc->chip->end();
</para>
</sect2>
</sect1>
<sect1>
<sect1 id="Chiplevel_hardware_encapsulation">
<title>Chiplevel hardware encapsulation</title>
<para>
The chip level hardware descriptor structure irq_chip
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ X!Ilib/string.c
!Emm/vmalloc.c
!Imm/page_alloc.c
!Emm/mempool.c
!Emm/dmapool.c
!Emm/page-writeback.c
!Emm/truncate.c
</sect1>
Expand Down Expand Up @@ -371,7 +372,6 @@ X!Iinclude/linux/device.h
!Edrivers/base/class.c
!Edrivers/base/firmware_class.c
!Edrivers/base/transport_class.c
!Edrivers/base/dmapool.c
<!-- Cannot be included, because
attribute_container_add_class_device_adapter
and attribute_container_classdev_to_container
Expand Down
32 changes: 16 additions & 16 deletions trunk/Documentation/DocBook/kernel-locking.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -717,15 +717,15 @@ used, and when it gets full, throws out the least used one.
<para>
For our first example, we assume that all operations are in user
context (ie. from system calls), so we can sleep. This means we can
use a semaphore to protect the cache and all the objects within
use a mutex to protect the cache and all the objects within
it. Here's the code:
</para>

<programlisting>
#include &lt;linux/list.h&gt;
#include &lt;linux/slab.h&gt;
#include &lt;linux/string.h&gt;
#include &lt;asm/semaphore.h&gt;
#include &lt;linux/mutex.h&gt;
#include &lt;asm/errno.h&gt;

struct object
Expand All @@ -737,7 +737,7 @@ struct object
};

/* Protects the cache, cache_num, and the objects within it */
static DECLARE_MUTEX(cache_lock);
static DEFINE_MUTEX(cache_lock);
static LIST_HEAD(cache);
static unsigned int cache_num = 0;
#define MAX_CACHE_SIZE 10
Expand Down Expand Up @@ -789,31 +789,31 @@ int cache_add(int id, const char *name)
obj-&gt;id = id;
obj-&gt;popularity = 0;

down(&amp;cache_lock);
mutex_lock(&amp;cache_lock);
__cache_add(obj);
up(&amp;cache_lock);
mutex_unlock(&amp;cache_lock);
return 0;
}

void cache_delete(int id)
{
down(&amp;cache_lock);
mutex_lock(&amp;cache_lock);
__cache_delete(__cache_find(id));
up(&amp;cache_lock);
mutex_unlock(&amp;cache_lock);
}

int cache_find(int id, char *name)
{
struct object *obj;
int ret = -ENOENT;

down(&amp;cache_lock);
mutex_lock(&amp;cache_lock);
obj = __cache_find(id);
if (obj) {
ret = 0;
strcpy(name, obj-&gt;name);
}
up(&amp;cache_lock);
mutex_unlock(&amp;cache_lock);
return ret;
}
</programlisting>
Expand Down Expand Up @@ -853,7 +853,7 @@ The change is shown below, in standard patch format: the
int popularity;
};

-static DECLARE_MUTEX(cache_lock);
-static DEFINE_MUTEX(cache_lock);
+static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
static LIST_HEAD(cache);
static unsigned int cache_num = 0;
Expand All @@ -870,22 +870,22 @@ The change is shown below, in standard patch format: the
obj-&gt;id = id;
obj-&gt;popularity = 0;

- down(&amp;cache_lock);
- mutex_lock(&amp;cache_lock);
+ spin_lock_irqsave(&amp;cache_lock, flags);
__cache_add(obj);
- up(&amp;cache_lock);
- mutex_unlock(&amp;cache_lock);
+ spin_unlock_irqrestore(&amp;cache_lock, flags);
return 0;
}

void cache_delete(int id)
{
- down(&amp;cache_lock);
- mutex_lock(&amp;cache_lock);
+ unsigned long flags;
+
+ spin_lock_irqsave(&amp;cache_lock, flags);
__cache_delete(__cache_find(id));
- up(&amp;cache_lock);
- mutex_unlock(&amp;cache_lock);
+ spin_unlock_irqrestore(&amp;cache_lock, flags);
}

Expand All @@ -895,14 +895,14 @@ The change is shown below, in standard patch format: the
int ret = -ENOENT;
+ unsigned long flags;

- down(&amp;cache_lock);
- mutex_lock(&amp;cache_lock);
+ spin_lock_irqsave(&amp;cache_lock, flags);
obj = __cache_find(id);
if (obj) {
ret = 0;
strcpy(name, obj-&gt;name);
}
- up(&amp;cache_lock);
- mutex_unlock(&amp;cache_lock);
+ spin_unlock_irqrestore(&amp;cache_lock, flags);
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/DocBook/lsm.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</authorgroup>
</articleinfo>

<sect1><title>Introduction</title>
<sect1 id="Introduction"><title>Introduction</title>

<para>
In March 2001, the National Security Agency (NSA) gave a presentation
Expand Down
Loading

0 comments on commit 9b65cd1

Please sign in to comment.