Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138941
b: refs/heads/master
c: d883f7f
h: refs/heads/master
i:
  138939: 8728068
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Dave Airlie committed Mar 13, 2009
1 parent 7b2120f commit 0e05c6b
Show file tree
Hide file tree
Showing 5,618 changed files with 235,683 additions and 429,286 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 712b0006bf3a9ed0b14a56c3291975e582127766
refs/heads/master: d883f7f1b75c8dcafa891f7b9e69c5a2f0ff6d66
2 changes: 1 addition & 1 deletion trunk/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -3738,7 +3738,7 @@ S: 93149 Nittenau
S: Germany

N: Gertjan van Wingerde
E: gwingerde@gmail.com
E: gwingerde@home.nl
D: Ralink rt2x00 WLAN driver
D: Minix V2 file-system
D: Misc fixes
Expand Down
61 changes: 0 additions & 61 deletions trunk/Documentation/ABI/testing/ima_policy

This file was deleted.

106 changes: 0 additions & 106 deletions trunk/Documentation/DMA-API.txt
Original file line number Diff line number Diff line change
Expand Up @@ -609,109 +609,3 @@ size is the size (and should be a page-sized multiple).
The return value will be either a pointer to the processor virtual
address of the memory, or an error (via PTR_ERR()) if any part of the
region is occupied.

Part III - Debug drivers use of the DMA-API
-------------------------------------------

The DMA-API as described above as some constraints. DMA addresses must be
released with the corresponding function with the same size for example. With
the advent of hardware IOMMUs it becomes more and more important that drivers
do not violate those constraints. In the worst case such a violation can
result in data corruption up to destroyed filesystems.

To debug drivers and find bugs in the usage of the DMA-API checking code can
be compiled into the kernel which will tell the developer about those
violations. If your architecture supports it you can select the "Enable
debugging of DMA-API usage" option in your kernel configuration. Enabling this
option has a performance impact. Do not enable it in production kernels.

If you boot the resulting kernel will contain code which does some bookkeeping
about what DMA memory was allocated for which device. If this code detects an
error it prints a warning message with some details into your kernel log. An
example warning message may look like this:

------------[ cut here ]------------
WARNING: at /data2/repos/linux-2.6-iommu/lib/dma-debug.c:448
check_unmap+0x203/0x490()
Hardware name:
forcedeth 0000:00:08.0: DMA-API: device driver frees DMA memory with wrong
function [device address=0x00000000640444be] [size=66 bytes] [mapped as
single] [unmapped as page]
Modules linked in: nfsd exportfs bridge stp llc r8169
Pid: 0, comm: swapper Tainted: G W 2.6.28-dmatest-09289-g8bb99c0 #1
Call Trace:
<IRQ> [<ffffffff80240b22>] warn_slowpath+0xf2/0x130
[<ffffffff80647b70>] _spin_unlock+0x10/0x30
[<ffffffff80537e75>] usb_hcd_link_urb_to_ep+0x75/0xc0
[<ffffffff80647c22>] _spin_unlock_irqrestore+0x12/0x40
[<ffffffff8055347f>] ohci_urb_enqueue+0x19f/0x7c0
[<ffffffff80252f96>] queue_work+0x56/0x60
[<ffffffff80237e10>] enqueue_task_fair+0x20/0x50
[<ffffffff80539279>] usb_hcd_submit_urb+0x379/0xbc0
[<ffffffff803b78c3>] cpumask_next_and+0x23/0x40
[<ffffffff80235177>] find_busiest_group+0x207/0x8a0
[<ffffffff8064784f>] _spin_lock_irqsave+0x1f/0x50
[<ffffffff803c7ea3>] check_unmap+0x203/0x490
[<ffffffff803c8259>] debug_dma_unmap_page+0x49/0x50
[<ffffffff80485f26>] nv_tx_done_optimized+0xc6/0x2c0
[<ffffffff80486c13>] nv_nic_irq_optimized+0x73/0x2b0
[<ffffffff8026df84>] handle_IRQ_event+0x34/0x70
[<ffffffff8026ffe9>] handle_edge_irq+0xc9/0x150
[<ffffffff8020e3ab>] do_IRQ+0xcb/0x1c0
[<ffffffff8020c093>] ret_from_intr+0x0/0xa
<EOI> <4>---[ end trace f6435a98e2a38c0e ]---

The driver developer can find the driver and the device including a stacktrace
of the DMA-API call which caused this warning.

Per default only the first error will result in a warning message. All other
errors will only silently counted. This limitation exist to prevent the code
from flooding your kernel log. To support debugging a device driver this can
be disabled via debugfs. See the debugfs interface documentation below for
details.

The debugfs directory for the DMA-API debugging code is called dma-api/. In
this directory the following files can currently be found:

dma-api/all_errors This file contains a numeric value. If this
value is not equal to zero the debugging code
will print a warning for every error it finds
into the kernel log. Be carefull with this
option. It can easily flood your logs.

dma-api/disabled This read-only file contains the character 'Y'
if the debugging code is disabled. This can
happen when it runs out of memory or if it was
disabled at boot time

dma-api/error_count This file is read-only and shows the total
numbers of errors found.

dma-api/num_errors The number in this file shows how many
warnings will be printed to the kernel log
before it stops. This number is initialized to
one at system boot and be set by writing into
this file

dma-api/min_free_entries
This read-only file can be read to get the
minimum number of free dma_debug_entries the
allocator has ever seen. If this value goes
down to zero the code will disable itself
because it is not longer reliable.

dma-api/num_free_entries
The current number of free dma_debug_entries
in the allocator.

If you have this code compiled into your kernel it will be enabled by default.
If you want to boot without the bookkeeping anyway you can provide
'dma_debug=off' as a boot parameter. This will disable DMA-API debugging.
Notice that you can not enable it again at runtime. You have to reboot to do
so.

When the code disables itself at runtime this is most likely because it ran
out of dma_debug_entries. These entries are preallocated at boot. The number
of preallocated entries is defined per architecture. If it is too low for you
boot with 'dma_debug_entries=<your_desired_number>' to overwrite the
architectural default.
3 changes: 1 addition & 2 deletions trunk/Documentation/DocBook/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ DOCBOOKS := z8530book.xml mcabook.xml device-drivers.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 regulator.xml \
alsa-driver-api.xml writing-an-alsa-driver.xml
mac80211.xml debugobjects.xml sh.xml regulator.xml

###
# The build process is as follows (targets):
Expand Down
1 change: 0 additions & 1 deletion trunk/Documentation/DocBook/genericirq.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ desc->chip->end();
used in the generic IRQ layer.
</para>
!Iinclude/linux/irq.h
!Iinclude/linux/interrupt.h
</chapter>

<chapter id="pubfunctions">
Expand Down
18 changes: 4 additions & 14 deletions trunk/Documentation/DocBook/mac80211.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
</authorgroup>

<copyright>
<year>2007-2009</year>
<year>2007</year>
<year>2008</year>
<holder>Johannes Berg</holder>
</copyright>

Expand Down Expand Up @@ -164,8 +165,8 @@ usage should require reading the full document.
!Pinclude/net/mac80211.h Frame format
</sect1>
<sect1>
<title>Packet alignment</title>
!Pnet/mac80211/rx.c Packet alignment
<title>Alignment issues</title>
<para>TBD</para>
</sect1>
<sect1>
<title>Calling into mac80211 from interrupts</title>
Expand Down Expand Up @@ -222,17 +223,6 @@ usage should require reading the full document.
!Finclude/net/mac80211.h ieee80211_key_flags
</chapter>

<chapter id="powersave">
<title>Powersave support</title>
!Pinclude/net/mac80211.h Powersave support
</chapter>

<chapter id="beacon-filter">
<title>Beacon filter support</title>
!Pinclude/net/mac80211.h Beacon filter support
!Finclude/net/mac80211.h ieee80211_beacon_loss
</chapter>

<chapter id="qos">
<title>Multiple queues and QoS support</title>
<para>TBD</para>
Expand Down
29 changes: 4 additions & 25 deletions trunk/Documentation/DocBook/uio-howto.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ GPL version 2.
</abstract>

<revhistory>
<revision>
<revnumber>0.8</revnumber>
<date>2008-12-24</date>
<authorinitials>hjk</authorinitials>
<revremark>Added name attributes in mem and portio sysfs directories.
</revremark>
</revision>
<revision>
<revnumber>0.7</revnumber>
<date>2008-12-23</date>
Expand Down Expand Up @@ -310,17 +303,10 @@ interested in translating it, please email me
appear if the size of the mapping is not 0.
</para>
<para>
Each <filename>mapX/</filename> directory contains four read-only files
that show attributes of the memory:
Each <filename>mapX/</filename> directory contains two read-only files
that show start address and size of the memory:
</para>
<itemizedlist>
<listitem>
<para>
<filename>name</filename>: A string identifier for this mapping. This
is optional, the string can be empty. Drivers can set this to make it
easier for userspace to find the correct mapping.
</para>
</listitem>
<listitem>
<para>
<filename>addr</filename>: The address of memory that can be mapped.
Expand Down Expand Up @@ -380,17 +366,10 @@ offset = N * getpagesize();
<filename>/sys/class/uio/uioX/portio/</filename>.
</para>
<para>
Each <filename>portX/</filename> directory contains four read-only
files that show name, start, size, and type of the port region:
Each <filename>portX/</filename> directory contains three read-only
files that show start, size, and type of the port region:
</para>
<itemizedlist>
<listitem>
<para>
<filename>name</filename>: A string identifier for this port region.
The string is optional and can be empty. Drivers can set it to make it
easier for userspace to find a certain port region.
</para>
</listitem>
<listitem>
<para>
<filename>start</filename>: The first port of this region.
Expand Down
42 changes: 5 additions & 37 deletions trunk/Documentation/Smack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,14 @@ length. Single character labels using special characters, that being anything
other than a letter or digit, are reserved for use by the Smack development
team. Smack labels are unstructured, case sensitive, and the only operation
ever performed on them is comparison for equality. Smack labels cannot
contain unprintable characters or the "/" (slash) character. Smack labels
cannot begin with a '-', which is reserved for special options.
contain unprintable characters or the "/" (slash) character.

There are some predefined labels:

_ Pronounced "floor", a single underscore character.
^ Pronounced "hat", a single circumflex character.
* Pronounced "star", a single asterisk character.
? Pronounced "huh", a single question mark character.
@ Pronounced "Internet", a single at sign character.
_ Pronounced "floor", a single underscore character.
^ Pronounced "hat", a single circumflex character.
* Pronounced "star", a single asterisk character.
? Pronounced "huh", a single question mark character.

Every task on a Smack system is assigned a label. System tasks, such as
init(8) and systems daemons, are run with the floor ("_") label. User tasks
Expand Down Expand Up @@ -414,36 +412,6 @@ sockets.
A privileged program may set this to match the label of another
task with which it hopes to communicate.

Smack Netlabel Exceptions

You will often find that your labeled application has to talk to the outside,
unlabeled world. To do this there's a special file /smack/netlabel where you can
add some exceptions in the form of :
@IP1 LABEL1 or
@IP2/MASK LABEL2

It means that your application will have unlabeled access to @IP1 if it has
write access on LABEL1, and access to the subnet @IP2/MASK if it has write
access on LABEL2.

Entries in the /smack/netlabel file are matched by longest mask first, like in
classless IPv4 routing.

A special label '@' and an option '-CIPSO' can be used there :
@ means Internet, any application with any label has access to it
-CIPSO means standard CIPSO networking

If you don't know what CIPSO is and don't plan to use it, you can just do :
echo 127.0.0.1 -CIPSO > /smack/netlabel
echo 0.0.0.0/0 @ > /smack/netlabel

If you use CIPSO on your 192.168.0.0/16 local network and need also unlabeled
Internet access, you can have :
echo 127.0.0.1 -CIPSO > /smack/netlabel
echo 192.168.0.0/16 -CIPSO > /smack/netlabel
echo 0.0.0.0/0 @ > /smack/netlabel


Writing Applications for Smack

There are three sorts of applications that will run on a Smack system. How an
Expand Down
8 changes: 4 additions & 4 deletions trunk/Documentation/arm/Samsung-S3C24XX/Suspend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ Resuming
Machine Support
---------------

The machine specific functions must call the s3c_pm_init() function
The machine specific functions must call the s3c2410_pm_init() function
to say that its bootloader is capable of resuming. This can be as
simple as adding the following to the machine's definition:

INITMACHINE(s3c_pm_init)
INITMACHINE(s3c2410_pm_init)

A board can do its own setup before calling s3c_pm_init, if it
A board can do its own setup before calling s3c2410_pm_init, if it
needs to setup anything else for power management support.

There is currently no support for over-riding the default method of
Expand Down Expand Up @@ -74,7 +74,7 @@ statuc void __init machine_init(void)

enable_irq_wake(IRQ_EINT0);

s3c_pm_init();
s3c2410_pm_init();
}


Expand Down
9 changes: 1 addition & 8 deletions trunk/Documentation/arm/memory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,7 @@ ffff0000 ffff0fff CPU vector page.
CPU supports vector relocation (control
register V bit.)

fffe0000 fffeffff XScale cache flush area. This is used
in proc-xscale.S to flush the whole data
cache. Free for other usage on non-XScale.

fff00000 fffdffff Fixmap mapping region. Addresses provided
by fix_to_virt() will be located here.

ffc00000 ffefffff DMA memory mapping region. Memory returned
ffc00000 fffeffff DMA memory mapping region. Memory returned
by the dma_alloc_xxx functions will be
dynamically mapped here.

Expand Down
Loading

0 comments on commit 0e05c6b

Please sign in to comment.