Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55079
b: refs/heads/master
c: 393bfca
h: refs/heads/master
i:
  55077: 58d78d6
  55075: ab715b9
  55071: 2518d1b
v: v3
  • Loading branch information
Linus Torvalds committed May 8, 2007
1 parent aa15772 commit cb09dec
Show file tree
Hide file tree
Showing 1,317 changed files with 32,154 additions and 16,481 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: ba0acb5ee318901646f82c134cca2e4de0c43934
refs/heads/master: 393bfca19ecdce60a8d9a4d2577cac11ca924a25
9 changes: 4 additions & 5 deletions trunk/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ N: Kees Cook
E: kees@outflux.net
W: http://outflux.net/
P: 1024D/17063E6D 9FA3 C49C 23C9 D1BC 2E30 1975 1FFF 4BA9 1706 3E6D
D: Minor updates to SCSI code for the Communications type
D: Minor updates to SCSI types, added /proc/pid/maps protection
S: (ask for current address)
S: USA

Expand Down Expand Up @@ -2580,10 +2580,9 @@ S: Australia

N: Miguel Ojeda Sandonis
E: maxextreme@gmail.com
D: Author: Auxiliary LCD Controller driver (ks0108)
D: Author: Auxiliary LCD driver (cfag12864b)
D: Author: Auxiliary LCD framebuffer driver (cfag12864bfb)
D: Maintainer: Auxiliary display drivers tree (drivers/auxdisplay/*)
W: http://maxextreme.googlepages.com/
D: Author of the ks0108, cfag12864b and cfag12864bfb auxiliary display drivers.
D: Maintainer of the auxiliary display drivers tree (drivers/auxdisplay/*)
S: C/ Mieses 20, 9-B
S: Valladolid 47009
S: Spain
Expand Down
17 changes: 16 additions & 1 deletion trunk/Documentation/CodingStyle
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,21 @@ supply of new-lines on your screen is not a renewable resource (think
25-line terminal screens here), you have more empty lines to put
comments on.

Do not unnecessarily use braces where a single statement will do.

if (condition)
action();

This does not apply if one branch of a conditional statement is a single
statement. Use braces in both branches.

if (condition) {
do_this();
do_that();
} else {
otherwise();
}

3.1: Spaces

Linux kernel style for use of spaces depends (mostly) on
Expand Down Expand Up @@ -625,7 +640,7 @@ language.

There appears to be a common misperception that gcc has a magic "make me
faster" speedup option called "inline". While the use of inlines can be
appropriate (for example as a means of replacing macros, see Chapter 11), it
appropriate (for example as a means of replacing macros, see Chapter 12), it
very often is not. Abundant use of the inline keyword leads to a much bigger
kernel, which in turn slows the system as a whole down, due to a bigger
icache footprint for the CPU and simply because there is less memory
Expand Down
10 changes: 9 additions & 1 deletion trunk/Documentation/DocBook/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pdfdocs: $(PDF)

HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS)))
htmldocs: $(HTML)
$(call build_main_index)

MAN := $(patsubst %.xml, %.9, $(BOOKS))
mandocs: $(MAN)
Expand Down Expand Up @@ -132,10 +133,17 @@ quiet_cmd_db2pdf = PDF $@
%.pdf : %.xml
$(call cmd,db2pdf)


main_idx = Documentation/DocBook/index.html
build_main_index = rm -rf $(main_idx) && \
echo '<h1>Linux Kernel HTML Documentation</h1>' >> $(main_idx) && \
echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
cat $(HTML) >> $(main_idx)

quiet_cmd_db2html = HTML $@
cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \
Goto $(patsubst %.html,%,$(notdir $@))</a><p>' > $@
$(patsubst %.html,%,$(notdir $@))</a><p>' > $@

%.html: %.xml
@(which xmlto > /dev/null 2>&1) || \
Expand Down
63 changes: 63 additions & 0 deletions trunk/Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -576,4 +576,67 @@ X!Idrivers/video/console/fonts.c
!Edrivers/input/ff-core.c
!Edrivers/input/ff-memless.c
</chapter>

<chapter id="spi">
<title>Serial Peripheral Interface (SPI)</title>
<para>
SPI is the "Serial Peripheral Interface", widely used with
embedded systems because it is a simple and efficient
interface: basically a multiplexed shift register.
Its three signal wires hold a clock (SCK, often in the range
of 1-20 MHz), a "Master Out, Slave In" (MOSI) data line, and
a "Master In, Slave Out" (MISO) data line.
SPI is a full duplex protocol; for each bit shifted out the
MOSI line (one per clock) another is shifted in on the MISO line.
Those bits are assembled into words of various sizes on the
way to and from system memory.
An additional chipselect line is usually active-low (nCS);
four signals are normally used for each peripheral, plus
sometimes an interrupt.
</para>
<para>
The SPI bus facilities listed here provide a generalized
interface to declare SPI busses and devices, manage them
according to the standard Linux driver model, and perform
input/output operations.
At this time, only "master" side interfaces are supported,
where Linux talks to SPI peripherals and does not implement
such a peripheral itself.
(Interfaces to support implementing SPI slaves would
necessarily look different.)
</para>
<para>
The programming interface is structured around two kinds of driver,
and two kinds of device.
A "Controller Driver" abstracts the controller hardware, which may
be as simple as a set of GPIO pins or as complex as a pair of FIFOs
connected to dual DMA engines on the other side of the SPI shift
register (maximizing throughput). Such drivers bridge between
whatever bus they sit on (often the platform bus) and SPI, and
expose the SPI side of their device as a
<structname>struct spi_master</structname>.
SPI devices are children of that master, represented as a
<structname>struct spi_device</structname> and manufactured from
<structname>struct spi_board_info</structname> descriptors which
are usually provided by board-specific initialization code.
A <structname>struct spi_driver</structname> is called a
"Protocol Driver", and is bound to a spi_device using normal
driver model calls.
</para>
<para>
The I/O model is a set of queued messages. Protocol drivers
submit one or more <structname>struct spi_message</structname>
objects, which are processed and completed asynchronously.
(There are synchronous wrappers, however.) Messages are
built from one or more <structname>struct spi_transfer</structname>
objects, each of which wraps a full duplex SPI transfer.
A variety of protocol tweaking options are needed, because
different chips adopt very different policies for how they
use the bits transferred with SPI.
</para>
!Iinclude/linux/spi/spi.h
!Fdrivers/spi/spi.c spi_register_board_info
!Edrivers/spi/spi.c
</chapter>

</book>
16 changes: 8 additions & 8 deletions trunk/Documentation/DocBook/librs.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@
<chapter id="usage">
<title>Usage</title>
<para>
This chapter provides examples how to use the library.
This chapter provides examples of how to use the library.
</para>
<sect1>
<title>Initializing</title>
<para>
The init function init_rs returns a pointer to a
The init function init_rs returns a pointer to an
rs decoder structure, which holds the necessary
information for encoding, decoding and error correction
with the given polynomial. It either uses an existing
Expand All @@ -98,10 +98,10 @@
static struct rs_control *rs_decoder;

/* Symbolsize is 10 (bits)
* Primitve polynomial is x^10+x^3+1
* Primitive polynomial is x^10+x^3+1
* first consecutive root is 0
* primitve element to generate roots = 1
* generator polinomial degree (number of roots) = 6
* primitive element to generate roots = 1
* generator polynomial degree (number of roots) = 6
*/
rs_decoder = init_rs (10, 0x409, 0, 1, 6);
</programlisting>
Expand All @@ -116,12 +116,12 @@ rs_decoder = init_rs (10, 0x409, 0, 1, 6);
</para>
<para>
The expanded data can be inverted on the fly by
providing a non zero inversion mask. The expanded data is
providing a non-zero inversion mask. The expanded data is
XOR'ed with the mask. This is used e.g. for FLASH
ECC, where the all 0xFF is inverted to an all 0x00.
The Reed-Solomon code for all 0x00 is all 0x00. The
code is inverted before storing to FLASH so it is 0xFF
too. This prevent's that reading from an erased FLASH
too. This prevents that reading from an erased FLASH
results in ECC errors.
</para>
<para>
Expand Down Expand Up @@ -273,7 +273,7 @@ free_rs(rs_decoder);
May be used under the terms of the GNU General Public License (GPL)
</programlisting>
<para>
The wrapper functions and interfaces are written by Thomas Gleixner
The wrapper functions and interfaces are written by Thomas Gleixner.
</para>
<para>
Many users have provided bugfixes, improvements and helping hands for testing.
Expand Down
15 changes: 15 additions & 0 deletions trunk/Documentation/SubmittingDrivers
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,21 @@ Clarity: It helps if anyone can see how to fix the driver. It helps
driver that intentionally obfuscates how the hardware works
it will go in the bitbucket.

PM support: Since Linux is used on many portable and desktop systems, your
driver is likely to be used on such a system and therefore it
should support basic power management by implementing, if
necessary, the .suspend and .resume methods used during the
system-wide suspend and resume transitions. You should verify
that your driver correctly handles the suspend and resume, but
if you are unable to ensure that, please at least define the
.suspend method returning the -ENOSYS ("Function not
implemented") error. You should also try to make sure that your
driver uses as little power as possible when it's not doing
anything. For the driver testing instructions see
Documentation/power/drivers-testing.txt and for a relatively
complete overview of the power management issues related to
drivers see Documentation/power/devices.txt .

Control: In general if there is active maintainance of a driver by
the author then patches will be redirected to them unless
they are totally obvious and without need of checking.
Expand Down
20 changes: 14 additions & 6 deletions trunk/Documentation/accounting/getdelays.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ __u64 stime, utime;
#define MAX_MSG_SIZE 1024
/* Maximum number of cpus expected to be specified in a cpumask */
#define MAX_CPUS 32
/* Maximum length of pathname to log file */
#define MAX_FILENAME 256

struct msgtemplate {
struct nlmsghdr n;
Expand All @@ -72,6 +70,16 @@ struct msgtemplate {

char cpumask[100+6*MAX_CPUS];

static void usage(void)
{
fprintf(stderr, "getdelays [-dilv] [-w logfile] [-r bufsize] "
"[-m cpumask] [-t tgid] [-p pid]\n");
fprintf(stderr, " -d: print delayacct stats\n");
fprintf(stderr, " -i: print IO accounting (works only with -p)\n");
fprintf(stderr, " -l: listen forever\n");
fprintf(stderr, " -v: debug on\n");
}

/*
* Create a raw netlink socket and bind
*/
Expand Down Expand Up @@ -221,13 +229,13 @@ int main(int argc, char *argv[])
int count = 0;
int write_file = 0;
int maskset = 0;
char logfile[128];
char *logfile = NULL;
int loop = 0;

struct msgtemplate msg;

while (1) {
c = getopt(argc, argv, "diw:r:m:t:p:v:l");
c = getopt(argc, argv, "diw:r:m:t:p:vl");
if (c < 0)
break;

Expand All @@ -241,7 +249,7 @@ int main(int argc, char *argv[])
print_io_accounting = 1;
break;
case 'w':
strncpy(logfile, optarg, MAX_FILENAME);
logfile = strdup(optarg);
printf("write to file %s\n", logfile);
write_file = 1;
break;
Expand Down Expand Up @@ -277,7 +285,7 @@ int main(int argc, char *argv[])
loop = 1;
break;
default:
printf("Unknown option %d\n", c);
usage();
exit(-1);
}
}
Expand Down
13 changes: 10 additions & 3 deletions trunk/Documentation/cciss.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ This driver is known to work with the following cards:
* SA E200i
* SA E500

If nodes are not already created in the /dev/cciss directory, run as root:
Detecting drive failures:
-------------------------

# cd /dev
# ./MAKEDEV cciss
To get the status of logical volumes and to detect physical drive
failures, you can use the cciss_vol_status program found here:
http://cciss.sourceforge.net/#cciss_utils

Device Naming:
--------------

If nodes are not already created in the /dev/cciss directory, run as root:

# cd /dev
# ./MAKEDEV cciss

You need some entries in /dev for the cciss device. The MAKEDEV script
can make device nodes for you automatically. Currently the device setup
is as follows:
Expand Down
75 changes: 75 additions & 0 deletions trunk/Documentation/fb/deferred_io.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Deferred IO
-----------

Deferred IO is a way to delay and repurpose IO. It uses host memory as a
buffer and the MMU pagefault as a pretrigger for when to perform the device
IO. The following example may be a useful explaination of how one such setup
works:

- userspace app like Xfbdev mmaps framebuffer
- deferred IO and driver sets up nopage and page_mkwrite handlers
- userspace app tries to write to mmaped vaddress
- we get pagefault and reach nopage handler
- nopage handler finds and returns physical page
- we get page_mkwrite where we add this page to a list
- schedule a workqueue task to be run after a delay
- app continues writing to that page with no additional cost. this is
the key benefit.
- the workqueue task comes in and mkcleans the pages on the list, then
completes the work associated with updating the framebuffer. this is
the real work talking to the device.
- app tries to write to the address (that has now been mkcleaned)
- get pagefault and the above sequence occurs again

As can be seen from above, one benefit is roughly to allow bursty framebuffer
writes to occur at minimum cost. Then after some time when hopefully things
have gone quiet, we go and really update the framebuffer which would be
a relatively more expensive operation.

For some types of nonvolatile high latency displays, the desired image is
the final image rather than the intermediate stages which is why it's okay
to not update for each write that is occuring.

It may be the case that this is useful in other scenarios as well. Paul Mundt
has mentioned a case where it is beneficial to use the page count to decide
whether to coalesce and issue SG DMA or to do memory bursts.

Another one may be if one has a device framebuffer that is in an usual format,
say diagonally shifting RGB, this may then be a mechanism for you to allow
apps to pretend to have a normal framebuffer but reswizzle for the device
framebuffer at vsync time based on the touched pagelist.

How to use it: (for applications)
---------------------------------
No changes needed. mmap the framebuffer like normal and just use it.

How to use it: (for fbdev drivers)
----------------------------------
The following example may be helpful.

1. Setup your structure. Eg:

static struct fb_deferred_io hecubafb_defio = {
.delay = HZ,
.deferred_io = hecubafb_dpy_deferred_io,
};

The delay is the minimum delay between when the page_mkwrite trigger occurs
and when the deferred_io callback is called. The deferred_io callback is
explained below.

2. Setup your deferred IO callback. Eg:
static void hecubafb_dpy_deferred_io(struct fb_info *info,
struct list_head *pagelist)

The deferred_io callback is where you would perform all your IO to the display
device. You receive the pagelist which is the list of pages that were written
to during the delay. You must not modify this list. This callback is called
from a workqueue.

3. Call init
info->fbdefio = &hecubafb_defio;
fb_deferred_io_init(info);

4. Call cleanup
fb_deferred_io_cleanup(info);
Loading

0 comments on commit cb09dec

Please sign in to comment.