diff options
author | Steve French <sfrench@us.ibm.com> | 2007-10-20 00:26:44 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-10-20 00:26:44 -0400 |
commit | 748c5151deb56e4b7b5a9b07a884243764933831 (patch) | |
tree | e9dd45b8806d00b56503cfa55c46f3ebce0d151c | |
parent | 4879b44829d94a1f8facf90cced3c5f23c5a8c62 (diff) | |
parent | e8b8c977734193adedf2b0f607d6252c78e86394 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
746 files changed, 3754 insertions, 3029 deletions
diff --git a/.gitignore b/.gitignore index 22fb8fa9bc3d..8d14531846b9 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -12,6 +12,7 @@ | |||
12 | *.s | 12 | *.s |
13 | *.ko | 13 | *.ko |
14 | *.so | 14 | *.so |
15 | *.so.dbg | ||
15 | *.mod.c | 16 | *.mod.c |
16 | *.i | 17 | *.i |
17 | *.lst | 18 | *.lst |
@@ -959,7 +959,7 @@ S: 2037 Walnut #6 | |||
959 | S: Boulder, Colorado 80302 | 959 | S: Boulder, Colorado 80302 |
960 | S: USA | 960 | S: USA |
961 | 961 | ||
962 | N: Heiko Eissfeldt | 962 | N: Heiko Eißfeldt |
963 | E: heiko@colossus.escape.de heiko@unifix.de | 963 | E: heiko@colossus.escape.de heiko@unifix.de |
964 | D: verify_area stuff, generic SCSI fixes | 964 | D: verify_area stuff, generic SCSI fixes |
965 | D: SCSI Programming HOWTO | 965 | D: SCSI Programming HOWTO |
@@ -1988,8 +1988,8 @@ N: Volker Lendecke | |||
1988 | E: vl@kki.org | 1988 | E: vl@kki.org |
1989 | D: Kernel smbfs (to mount WfW, NT and OS/2 network drives.) | 1989 | D: Kernel smbfs (to mount WfW, NT and OS/2 network drives.) |
1990 | D: NCP filesystem support (to mount NetWare volumes) | 1990 | D: NCP filesystem support (to mount NetWare volumes) |
1991 | S: Von Ossietzky Str. 12 | 1991 | S: Von-Ossietzky-Str. 12 |
1992 | S: 37085 Goettingen | 1992 | S: 37085 Göttingen |
1993 | S: Germany | 1993 | S: Germany |
1994 | 1994 | ||
1995 | N: Kevin Lentin | 1995 | N: Kevin Lentin |
@@ -2431,11 +2431,11 @@ S: 12725 SW Millikan Way, Suite 400 | |||
2431 | S: Beaverton, Oregon 97005 | 2431 | S: Beaverton, Oregon 97005 |
2432 | S: USA | 2432 | S: USA |
2433 | 2433 | ||
2434 | N: Eberhard Moenkeberg | 2434 | N: Eberhard Mönkeberg |
2435 | E: emoenke@gwdg.de | 2435 | E: emoenke@gwdg.de |
2436 | D: CDROM driver "sbpcd" (Matsushita/Panasonic/Soundblaster) | 2436 | D: CDROM driver "sbpcd" (Matsushita/Panasonic/Soundblaster) |
2437 | S: Ruhstrathoehe 2 b. | 2437 | S: Ruhstrathöhe 2 b. |
2438 | S: D-37085 Goettingen | 2438 | S: D-37085 Göttingen |
2439 | S: Germany | 2439 | S: Germany |
2440 | 2440 | ||
2441 | N: Thomas Molina | 2441 | N: Thomas Molina |
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 1a7f53068ec2..054a7ecf64c6 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -165,7 +165,7 @@ quiet_cmd_db2man = MAN $@ | |||
165 | @touch $@ | 165 | @touch $@ |
166 | 166 | ||
167 | ### | 167 | ### |
168 | # Rules to generate postscripts and PNG imgages from .fig format files | 168 | # Rules to generate postscripts and PNG images from .fig format files |
169 | quiet_cmd_fig2eps = FIG2EPS $@ | 169 | quiet_cmd_fig2eps = FIG2EPS $@ |
170 | cmd_fig2eps = fig2dev -Leps $< $@ | 170 | cmd_fig2eps = fig2dev -Leps $< $@ |
171 | 171 | ||
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index 6fbc41d98c1e..957cf5c26831 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl | |||
@@ -282,7 +282,7 @@ int __init board_init (void) | |||
282 | goto out; | 282 | goto out; |
283 | } | 283 | } |
284 | 284 | ||
285 | /* map physical adress */ | 285 | /* map physical address */ |
286 | baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024); | 286 | baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024); |
287 | if(!baseaddr){ | 287 | if(!baseaddr){ |
288 | printk("Ioremap to access NAND chip failed\n"); | 288 | printk("Ioremap to access NAND chip failed\n"); |
@@ -306,7 +306,7 @@ int __init board_init (void) | |||
306 | this->dev_ready = board_dev_ready; | 306 | this->dev_ready = board_dev_ready; |
307 | this->eccmode = NAND_ECC_SOFT; | 307 | this->eccmode = NAND_ECC_SOFT; |
308 | 308 | ||
309 | /* Scan to find existance of the device */ | 309 | /* Scan to find existence of the device */ |
310 | if (nand_scan (board_mtd, 1)) { | 310 | if (nand_scan (board_mtd, 1)) { |
311 | err = -ENXIO; | 311 | err = -ENXIO; |
312 | goto out_ior; | 312 | goto out_ior; |
@@ -340,7 +340,7 @@ static void __exit board_cleanup (void) | |||
340 | /* Release resources, unregister device */ | 340 | /* Release resources, unregister device */ |
341 | nand_release (board_mtd); | 341 | nand_release (board_mtd); |
342 | 342 | ||
343 | /* unmap physical adress */ | 343 | /* unmap physical address */ |
344 | iounmap((void *)baseaddr); | 344 | iounmap((void *)baseaddr); |
345 | 345 | ||
346 | /* Free the MTD device structure */ | 346 | /* Free the MTD device structure */ |
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist index 19e7f65c269f..34e06d2f194f 100644 --- a/Documentation/SubmitChecklist +++ b/Documentation/SubmitChecklist | |||
@@ -67,7 +67,7 @@ kernel patches. | |||
67 | 20: Check that it all passes `make headers_check'. | 67 | 20: Check that it all passes `make headers_check'. |
68 | 68 | ||
69 | 21: Has been checked with injection of at least slab and page-allocation | 69 | 21: Has been checked with injection of at least slab and page-allocation |
70 | fauilures. See Documentation/fault-injection/. | 70 | failures. See Documentation/fault-injection/. |
71 | 71 | ||
72 | If the new code is substantial, addition of subsystem-specific fault | 72 | If the new code is substantial, addition of subsystem-specific fault |
73 | injection might be appropriate. | 73 | injection might be appropriate. |
diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers index d7e26427e426..24f2eb40cae5 100644 --- a/Documentation/SubmittingDrivers +++ b/Documentation/SubmittingDrivers | |||
@@ -36,8 +36,7 @@ Linux 2.4: | |||
36 | If the code area has a general maintainer then please submit it to | 36 | If the code area has a general maintainer then please submit it to |
37 | the maintainer listed in MAINTAINERS in the kernel file. If the | 37 | the maintainer listed in MAINTAINERS in the kernel file. If the |
38 | maintainer does not respond or you cannot find the appropriate | 38 | maintainer does not respond or you cannot find the appropriate |
39 | maintainer then please contact Marcelo Tosatti | 39 | maintainer then please contact Willy Tarreau <w@1wt.eu>. |
40 | <marcelo.tosatti@cyclades.com>. | ||
41 | 40 | ||
42 | Linux 2.6: | 41 | Linux 2.6: |
43 | The same rules apply as 2.4 except that you should follow linux-kernel | 42 | The same rules apply as 2.4 except that you should follow linux-kernel |
diff --git a/Documentation/arm/Samsung-S3C24XX/DMA.txt b/Documentation/arm/Samsung-S3C24XX/DMA.txt index 37f4edcc5d87..3ed82383efea 100644 --- a/Documentation/arm/Samsung-S3C24XX/DMA.txt +++ b/Documentation/arm/Samsung-S3C24XX/DMA.txt | |||
@@ -5,7 +5,7 @@ Introduction | |||
5 | ------------ | 5 | ------------ |
6 | 6 | ||
7 | The kernel provides an interface to manage DMA transfers | 7 | The kernel provides an interface to manage DMA transfers |
8 | using the DMA channels in the cpu, so that the central | 8 | using the DMA channels in the CPU, so that the central |
9 | duty of managing channel mappings, and programming the | 9 | duty of managing channel mappings, and programming the |
10 | channel generators is in one place. | 10 | channel generators is in one place. |
11 | 11 | ||
@@ -17,24 +17,24 @@ DMA Channel Ordering | |||
17 | channels to all sources, which means that some devices | 17 | channels to all sources, which means that some devices |
18 | have a restricted number of channels that can be used. | 18 | have a restricted number of channels that can be used. |
19 | 19 | ||
20 | To allow flexibilty for each cpu type and board, the | 20 | To allow flexibility for each CPU type and board, the |
21 | dma code can be given an dma ordering structure which | 21 | DMA code can be given a DMA ordering structure which |
22 | allows the order of channel search to be specified, as | 22 | allows the order of channel search to be specified, as |
23 | well as allowing the prohibition of certain claims. | 23 | well as allowing the prohibition of certain claims. |
24 | 24 | ||
25 | struct s3c24xx_dma_order has a list of channels, and | 25 | struct s3c24xx_dma_order has a list of channels, and |
26 | each channel within has a slot for a list of dma | 26 | each channel within has a slot for a list of DMA |
27 | channel numbers. The slots are searched in order, for | 27 | channel numbers. The slots are searched in order for |
28 | the presence of a dma channel number with DMA_CH_VALID | 28 | the presence of a DMA channel number with DMA_CH_VALID |
29 | orred in. | 29 | or-ed in. |
30 | 30 | ||
31 | If the order has the flag DMA_CH_NEVER set, then after | 31 | If the order has the flag DMA_CH_NEVER set, then after |
32 | checking the channel list, the system will return no | 32 | checking the channel list, the system will return no |
33 | found channel, thus denying the request. | 33 | found channel, thus denying the request. |
34 | 34 | ||
35 | A board support file can call s3c24xx_dma_order_set() | 35 | A board support file can call s3c24xx_dma_order_set() |
36 | to register an complete ordering set. The routine will | 36 | to register a complete ordering set. The routine will |
37 | copy the data, so the original can be discared with | 37 | copy the data, so the original can be discarded with |
38 | __initdata. | 38 | __initdata. |
39 | 39 | ||
40 | 40 | ||
diff --git a/Documentation/cdrom/cdrom-standard.tex b/Documentation/cdrom/cdrom-standard.tex index 92f94e597582..c713aeb020c4 100644 --- a/Documentation/cdrom/cdrom-standard.tex +++ b/Documentation/cdrom/cdrom-standard.tex | |||
@@ -1009,7 +1009,7 @@ taken over the torch in maintaining \cdromc\ and integrating much | |||
1009 | \cdrom-related code in the 2.1-kernel. Thanks to Scott Snyder and | 1009 | \cdrom-related code in the 2.1-kernel. Thanks to Scott Snyder and |
1010 | Gerd Knorr, who were the first to implement this interface for SCSI | 1010 | Gerd Knorr, who were the first to implement this interface for SCSI |
1011 | and IDE-CD drivers and added many ideas for extension of the data | 1011 | and IDE-CD drivers and added many ideas for extension of the data |
1012 | structures relative to kernel~2.0. Further thanks to Heiko Eissfeldt, | 1012 | structures relative to kernel~2.0. Further thanks to Heiko Ei{\sz}feldt, |
1013 | Thomas Quinot, Jon Tombs, Ken Pizzini, Eberhard M\"onkeberg and Andrew | 1013 | Thomas Quinot, Jon Tombs, Ken Pizzini, Eberhard M\"onkeberg and Andrew |
1014 | Kroll, the \linux\ \cdrom\ device driver developers who were kind | 1014 | Kroll, the \linux\ \cdrom\ device driver developers who were kind |
1015 | enough to give suggestions and criticisms during the writing. Finally | 1015 | enough to give suggestions and criticisms during the writing. Finally |
diff --git a/Documentation/device-mapper/dm-uevent.txt b/Documentation/device-mapper/dm-uevent.txt new file mode 100644 index 000000000000..07edbd85c714 --- /dev/null +++ b/Documentation/device-mapper/dm-uevent.txt | |||
@@ -0,0 +1,97 @@ | |||
1 | The device-mapper uevent code adds the capability to device-mapper to create | ||
2 | and send kobject uevents (uevents). Previously device-mapper events were only | ||
3 | available through the ioctl interface. The advantage of the uevents interface | ||
4 | is the event contains environment attributes providing increased context for | ||
5 | the event avoiding the need to query the state of the device-mapper device after | ||
6 | the event is received. | ||
7 | |||
8 | There are two functions currently for device-mapper events. The first function | ||
9 | listed creates the event and the second function sends the event(s). | ||
10 | |||
11 | void dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti, | ||
12 | const char *path, unsigned nr_valid_paths) | ||
13 | |||
14 | void dm_send_uevents(struct list_head *events, struct kobject *kobj) | ||
15 | |||
16 | |||
17 | The variables added to the uevent environment are: | ||
18 | |||
19 | Variable Name: DM_TARGET | ||
20 | Uevent Action(s): KOBJ_CHANGE | ||
21 | Type: string | ||
22 | Description: | ||
23 | Value: Name of device-mapper target that generated the event. | ||
24 | |||
25 | Variable Name: DM_ACTION | ||
26 | Uevent Action(s): KOBJ_CHANGE | ||
27 | Type: string | ||
28 | Description: | ||
29 | Value: Device-mapper specific action that caused the uevent action. | ||
30 | PATH_FAILED - A path has failed. | ||
31 | PATH_REINSTATED - A path has been reinstated. | ||
32 | |||
33 | Variable Name: DM_SEQNUM | ||
34 | Uevent Action(s): KOBJ_CHANGE | ||
35 | Type: unsigned integer | ||
36 | Description: A sequence number for this specific device-mapper device. | ||
37 | Value: Valid unsigned integer range. | ||
38 | |||
39 | Variable Name: DM_PATH | ||
40 | Uevent Action(s): KOBJ_CHANGE | ||
41 | Type: string | ||
42 | Description: Major and minor number of the path device pertaining to this | ||
43 | event. | ||
44 | Value: Path name in the form of "Major:Minor" | ||
45 | |||
46 | Variable Name: DM_NR_VALID_PATHS | ||
47 | Uevent Action(s): KOBJ_CHANGE | ||
48 | Type: unsigned integer | ||
49 | Description: | ||
50 | Value: Valid unsigned integer range. | ||
51 | |||
52 | Variable Name: DM_NAME | ||
53 | Uevent Action(s): KOBJ_CHANGE | ||
54 | Type: string | ||
55 | Description: Name of the device-mapper device. | ||
56 | Value: Name | ||
57 | |||
58 | Variable Name: DM_UUID | ||
59 | Uevent Action(s): KOBJ_CHANGE | ||
60 | Type: string | ||
61 | Description: UUID of the device-mapper device. | ||
62 | Value: UUID. (Empty string if there isn't one.) | ||
63 | |||
64 | An example of the uevents generated as captured by udevmonitor is shown | ||
65 | below. | ||
66 | |||
67 | 1.) Path failure. | ||
68 | UEVENT[1192521009.711215] change@/block/dm-3 | ||
69 | ACTION=change | ||
70 | DEVPATH=/block/dm-3 | ||
71 | SUBSYSTEM=block | ||
72 | DM_TARGET=multipath | ||
73 | DM_ACTION=PATH_FAILED | ||
74 | DM_SEQNUM=1 | ||
75 | DM_PATH=8:32 | ||
76 | DM_NR_VALID_PATHS=0 | ||
77 | DM_NAME=mpath2 | ||
78 | DM_UUID=mpath-35333333000002328 | ||
79 | MINOR=3 | ||
80 | MAJOR=253 | ||
81 | SEQNUM=1130 | ||
82 | |||
83 | 2.) Path reinstate. | ||
84 | UEVENT[1192521132.989927] change@/block/dm-3 | ||
85 | ACTION=change | ||
86 | DEVPATH=/block/dm-3 | ||
87 | SUBSYSTEM=block | ||
88 | DM_TARGET=multipath | ||
89 | DM_ACTION=PATH_REINSTATED | ||
90 | DM_SEQNUM=2 | ||
91 | DM_PATH=8:32 | ||
92 | DM_NR_VALID_PATHS=1 | ||
93 | DM_NAME=mpath2 | ||
94 | DM_UUID=mpath-35333333000002328 | ||
95 | MINOR=3 | ||
96 | MAJOR=253 | ||
97 | SEQNUM=1131 | ||
diff --git a/Documentation/devices.txt b/Documentation/devices.txt index 6c46730c631a..e6244cde26e9 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt | |||
@@ -2188,7 +2188,7 @@ Your cooperation is appreciated. | |||
2188 | 2188 | ||
2189 | 136-143 char Unix98 PTY slaves | 2189 | 136-143 char Unix98 PTY slaves |
2190 | 0 = /dev/pts/0 First Unix98 pseudo-TTY | 2190 | 0 = /dev/pts/0 First Unix98 pseudo-TTY |
2191 | 1 = /dev/pts/1 Second Unix98 pesudo-TTY | 2191 | 1 = /dev/pts/1 Second Unix98 pseudo-TTY |
2192 | ... | 2192 | ... |
2193 | 2193 | ||
2194 | These device nodes are automatically generated with | 2194 | These device nodes are automatically generated with |
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index 8569072fa387..387b8a720f4a 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt | |||
@@ -32,7 +32,7 @@ braindamaged document, if it's finally working, well, it's working. | |||
32 | 32 | ||
33 | For one reason or another, low level drivers don't receive as much | 33 | For one reason or another, low level drivers don't receive as much |
34 | attention or testing as core code, and bugs on driver detach or | 34 | attention or testing as core code, and bugs on driver detach or |
35 | initilaization failure doesn't happen often enough to be noticeable. | 35 | initialization failure don't happen often enough to be noticeable. |
36 | Init failure path is worse because it's much less travelled while | 36 | Init failure path is worse because it's much less travelled while |
37 | needs to handle multiple entry points. | 37 | needs to handle multiple entry points. |
38 | 38 | ||
@@ -160,7 +160,7 @@ resources on failure. For example, | |||
160 | devres_release_group(dev, NULL); | 160 | devres_release_group(dev, NULL); |
161 | return err_code; | 161 | return err_code; |
162 | 162 | ||
163 | As resource acquision failure usually means probe failure, constructs | 163 | As resource acquisition failure usually means probe failure, constructs |
164 | like above are usually useful in midlayer driver (e.g. libata core | 164 | like above are usually useful in midlayer driver (e.g. libata core |
165 | layer) where interface function shouldn't have side effect on failure. | 165 | layer) where interface function shouldn't have side effect on failure. |
166 | For LLDs, just returning error code suffices in most cases. | 166 | For LLDs, just returning error code suffices in most cases. |
diff --git a/Documentation/fb/deferred_io.txt b/Documentation/fb/deferred_io.txt index 73cf9fb7cf60..63883a892120 100644 --- a/Documentation/fb/deferred_io.txt +++ b/Documentation/fb/deferred_io.txt | |||
@@ -3,7 +3,7 @@ Deferred IO | |||
3 | 3 | ||
4 | Deferred IO is a way to delay and repurpose IO. It uses host memory as a | 4 | Deferred IO is a way to delay and repurpose IO. It uses host memory as a |
5 | buffer and the MMU pagefault as a pretrigger for when to perform the device | 5 | buffer and the MMU pagefault as a pretrigger for when to perform the device |
6 | IO. The following example may be a useful explaination of how one such setup | 6 | IO. The following example may be a useful explanation of how one such setup |
7 | works: | 7 | works: |
8 | 8 | ||
9 | - userspace app like Xfbdev mmaps framebuffer | 9 | - userspace app like Xfbdev mmaps framebuffer |
@@ -28,7 +28,7 @@ a relatively more expensive operation. | |||
28 | 28 | ||
29 | For some types of nonvolatile high latency displays, the desired image is | 29 | For some types of nonvolatile high latency displays, the desired image is |
30 | the final image rather than the intermediate stages which is why it's okay | 30 | the final image rather than the intermediate stages which is why it's okay |
31 | to not update for each write that is occuring. | 31 | to not update for each write that is occurring. |
32 | 32 | ||
33 | It may be the case that this is useful in other scenarios as well. Paul Mundt | 33 | It may be the case that this is useful in other scenarios as well. Paul Mundt |
34 | has mentioned a case where it is beneficial to use the page count to decide | 34 | has mentioned a case where it is beneficial to use the page count to decide |
diff --git a/Documentation/filesystems/9p.txt b/Documentation/filesystems/9p.txt index d6fd6c6e4244..b90f537af35c 100644 --- a/Documentation/filesystems/9p.txt +++ b/Documentation/filesystems/9p.txt | |||
@@ -54,7 +54,7 @@ OPTIONS | |||
54 | aname=name aname specifies the file tree to access when the server is | 54 | aname=name aname specifies the file tree to access when the server is |
55 | offering several exported file systems. | 55 | offering several exported file systems. |
56 | 56 | ||
57 | cache=mode specifies a cacheing policy. By default, no caches are used. | 57 | cache=mode specifies a caching policy. By default, no caches are used. |
58 | loose = no attempts are made at consistency, | 58 | loose = no attempts are made at consistency, |
59 | intended for exclusive, read-only mounts | 59 | intended for exclusive, read-only mounts |
60 | 60 | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index fe26cc978523..37c10cba7177 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -224,7 +224,7 @@ against the page the filesystem should redirty the page with | |||
224 | redirty_page_for_writepage(), then unlock the page and return zero. | 224 | redirty_page_for_writepage(), then unlock the page and return zero. |
225 | This may also be done to avoid internal deadlocks, but rarely. | 225 | This may also be done to avoid internal deadlocks, but rarely. |
226 | 226 | ||
227 | If the filesytem is called for sync then it must wait on any | 227 | If the filesystem is called for sync then it must wait on any |
228 | in-progress I/O and then start new I/O. | 228 | in-progress I/O and then start new I/O. |
229 | 229 | ||
230 | The filesystem should unlock the page synchronously, before returning to the | 230 | The filesystem should unlock the page synchronously, before returning to the |
diff --git a/Documentation/filesystems/ext3.txt b/Documentation/filesystems/ext3.txt index 4aecc9bdb273..b45f3c1b8b43 100644 --- a/Documentation/filesystems/ext3.txt +++ b/Documentation/filesystems/ext3.txt | |||
@@ -130,12 +130,12 @@ Device layer. | |||
130 | 130 | ||
131 | Journaling Block Device layer | 131 | Journaling Block Device layer |
132 | ----------------------------- | 132 | ----------------------------- |
133 | The Journaling Block Device layer (JBD) isn't ext3 specific. It was design to | 133 | The Journaling Block Device layer (JBD) isn't ext3 specific. It was designed |
134 | add journaling capabilities on a block device. The ext3 filesystem code will | 134 | to add journaling capabilities to a block device. The ext3 filesystem code |
135 | inform the JBD of modifications it is performing (called a transaction). The | 135 | will inform the JBD of modifications it is performing (called a transaction). |
136 | journal supports the transactions start and stop, and in case of crash, the | 136 | The journal supports the transactions start and stop, and in case of a crash, |
137 | journal can replayed the transactions to put the partition back in a | 137 | the journal can replay the transactions to quickly put the partition back into |
138 | consistent state fast. | 138 | a consistent state. |
139 | 139 | ||
140 | Handles represent a single atomic update to a filesystem. JBD can handle an | 140 | Handles represent a single atomic update to a filesystem. JBD can handle an |
141 | external journal on a block device. | 141 | external journal on a block device. |
@@ -164,7 +164,7 @@ written to the journal first, and then to its final location. | |||
164 | In the event of a crash, the journal can be replayed, bringing both data and | 164 | In the event of a crash, the journal can be replayed, bringing both data and |
165 | metadata into a consistent state. This mode is the slowest except when data | 165 | metadata into a consistent state. This mode is the slowest except when data |
166 | needs to be read from and written to disk at the same time where it | 166 | needs to be read from and written to disk at the same time where it |
167 | outperforms all others modes. | 167 | outperforms all other modes. |
168 | 168 | ||
169 | Compatibility | 169 | Compatibility |
170 | ------------- | 170 | ------------- |
diff --git a/Documentation/filesystems/files.txt b/Documentation/filesystems/files.txt index 133e213ebb72..bb0142f61084 100644 --- a/Documentation/filesystems/files.txt +++ b/Documentation/filesystems/files.txt | |||
@@ -76,13 +76,13 @@ the fdtable structure - | |||
76 | 5. Handling of the file structures is special. Since the look-up | 76 | 5. Handling of the file structures is special. Since the look-up |
77 | of the fd (fget()/fget_light()) are lock-free, it is possible | 77 | of the fd (fget()/fget_light()) are lock-free, it is possible |
78 | that look-up may race with the last put() operation on the | 78 | that look-up may race with the last put() operation on the |
79 | file structure. This is avoided using the rcuref APIs | 79 | file structure. This is avoided using atomic_inc_not_zero() |
80 | on ->f_count : | 80 | on ->f_count : |
81 | 81 | ||
82 | rcu_read_lock(); | 82 | rcu_read_lock(); |
83 | file = fcheck_files(files, fd); | 83 | file = fcheck_files(files, fd); |
84 | if (file) { | 84 | if (file) { |
85 | if (rcuref_inc_lf(&file->f_count)) | 85 | if (atomic_inc_not_zero(&file->f_count)) |
86 | *fput_needed = 1; | 86 | *fput_needed = 1; |
87 | else | 87 | else |
88 | /* Didn't get the reference, someone's freed */ | 88 | /* Didn't get the reference, someone's freed */ |
@@ -92,7 +92,7 @@ the fdtable structure - | |||
92 | .... | 92 | .... |
93 | return file; | 93 | return file; |
94 | 94 | ||
95 | rcuref_inc_lf() detects if refcounts is already zero or | 95 | atomic_inc_not_zero() detects if refcounts is already zero or |
96 | goes to zero during increment. If it does, we fail | 96 | goes to zero during increment. If it does, we fail |
97 | fget()/fget_light(). | 97 | fget()/fget_light(). |
98 | 98 | ||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index e5c1df52a876..dec99455321f 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -813,9 +813,9 @@ Various pieces of information about kernel activity are available in the | |||
813 | since the system first booted. For a quick look, simply cat the file: | 813 | since the system first booted. For a quick look, simply cat the file: |
814 | 814 | ||
815 | > cat /proc/stat | 815 | > cat /proc/stat |
816 | cpu 2255 34 2290 22625563 6290 127 456 | 816 | cpu 2255 34 2290 22625563 6290 127 456 0 |
817 | cpu0 1132 34 1441 11311718 3675 127 438 | 817 | cpu0 1132 34 1441 11311718 3675 127 438 0 |
818 | cpu1 1123 0 849 11313845 2614 0 18 | 818 | cpu1 1123 0 849 11313845 2614 0 18 0 |
819 | intr 114930548 113199788 3 0 5 263 0 4 [... lots more numbers ...] | 819 | intr 114930548 113199788 3 0 5 263 0 4 [... lots more numbers ...] |
820 | ctxt 1990473 | 820 | ctxt 1990473 |
821 | btime 1062191376 | 821 | btime 1062191376 |
@@ -835,6 +835,7 @@ second). The meanings of the columns are as follows, from left to right: | |||
835 | - iowait: waiting for I/O to complete | 835 | - iowait: waiting for I/O to complete |
836 | - irq: servicing interrupts | 836 | - irq: servicing interrupts |
837 | - softirq: servicing softirqs | 837 | - softirq: servicing softirqs |
838 | - steal: involuntary wait | ||
838 | 839 | ||
839 | The "intr" line gives counts of interrupts serviced since boot time, for each | 840 | The "intr" line gives counts of interrupts serviced since boot time, for each |
840 | of the possible system interrupts. The first column is the total of all | 841 | of the possible system interrupts. The first column is the total of all |
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index 4b5ca26e5048..4598ef7b622b 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
@@ -51,7 +51,7 @@ for the attributes, providing a means to read and write kernel | |||
51 | attributes. | 51 | attributes. |
52 | 52 | ||
53 | Attributes should be ASCII text files, preferably with only one value | 53 | Attributes should be ASCII text files, preferably with only one value |
54 | per file. It is noted that it may not be efficient to contain only | 54 | per file. It is noted that it may not be efficient to contain only one |
55 | value per file, so it is socially acceptable to express an array of | 55 | value per file, so it is socially acceptable to express an array of |
56 | values of the same type. | 56 | values of the same type. |
57 | 57 | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 6f8e16e3d6c0..9d019d35728f 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -706,7 +706,7 @@ struct address_space_operations { | |||
706 | wants to make it a free page. If ->releasepage succeeds, the | 706 | wants to make it a free page. If ->releasepage succeeds, the |
707 | page will be removed from the address_space and become free. | 707 | page will be removed from the address_space and become free. |
708 | 708 | ||
709 | The second case if when a request has been made to invalidate | 709 | The second case is when a request has been made to invalidate |
710 | some or all pages in an address_space. This can happen | 710 | some or all pages in an address_space. This can happen |
711 | through the fadvice(POSIX_FADV_DONTNEED) system call or by the | 711 | through the fadvice(POSIX_FADV_DONTNEED) system call or by the |
712 | filesystem explicitly requesting it as nfs and 9fs do (when | 712 | filesystem explicitly requesting it as nfs and 9fs do (when |
diff --git a/Documentation/i2c/i2c-protocol b/Documentation/i2c/i2c-protocol index 579b92d5f3a3..10518dd58814 100644 --- a/Documentation/i2c/i2c-protocol +++ b/Documentation/i2c/i2c-protocol | |||
@@ -68,7 +68,7 @@ We have found some I2C devices that needs the following modifications: | |||
68 | 68 | ||
69 | Flags I2C_M_IGNORE_NAK | 69 | Flags I2C_M_IGNORE_NAK |
70 | Normally message is interrupted immediately if there is [NA] from the | 70 | Normally message is interrupted immediately if there is [NA] from the |
71 | client. Setting this flag treats any [NA] as [A], and all of | 71 | client. Setting this flag treats any [NA] as [A], and all of |
72 | message is sent. | 72 | message is sent. |
73 | These messages may still fail to SCL lo->hi timeout. | 73 | These messages may still fail to SCL lo->hi timeout. |
74 | 74 | ||
diff --git a/Documentation/ia64/err_inject.txt b/Documentation/ia64/err_inject.txt index 6449a7090dbb..223e4f0582d0 100644 --- a/Documentation/ia64/err_inject.txt +++ b/Documentation/ia64/err_inject.txt | |||
@@ -21,10 +21,10 @@ software test suits to do stressful testing on IPF. | |||
21 | 21 | ||
22 | Below is a sample application as part of the whole tool. The sample | 22 | Below is a sample application as part of the whole tool. The sample |
23 | can be used as a working test tool. Or it can be expanded to include | 23 | can be used as a working test tool. Or it can be expanded to include |
24 | more features. It also can be a integrated into a libary or other user | 24 | more features. It also can be a integrated into a library or other user |
25 | application to have more thorough test. | 25 | application to have more thorough test. |
26 | 26 | ||
27 | The sample application takes err.conf as error configuation input. Gcc | 27 | The sample application takes err.conf as error configuration input. GCC |
28 | compiles the code. After you install err_inject driver, you can run | 28 | compiles the code. After you install err_inject driver, you can run |
29 | this sample application to inject errors. | 29 | this sample application to inject errors. |
30 | 30 | ||
@@ -809,7 +809,7 @@ int err_inj() | |||
809 | } | 809 | } |
810 | 810 | ||
811 | /* Create semaphore: If one_lock, one semaphore for all processors. | 811 | /* Create semaphore: If one_lock, one semaphore for all processors. |
812 | Otherwise, one sempaphore for each processor. */ | 812 | Otherwise, one semaphore for each processor. */ |
813 | if (one_lock) { | 813 | if (one_lock) { |
814 | if (create_sem(0)) { | 814 | if (create_sem(0)) { |
815 | printf("Can not create semaphore...exit\n"); | 815 | printf("Can not create semaphore...exit\n"); |
diff --git a/Documentation/input/atarikbd.txt b/Documentation/input/atarikbd.txt index ab050621e20f..f3a3ba8847ba 100644 --- a/Documentation/input/atarikbd.txt +++ b/Documentation/input/atarikbd.txt | |||
@@ -170,7 +170,7 @@ major controller faults (ROM checksum and RAM test) and such things as stuck | |||
170 | keys. Any keys down at power-up are presumed to be stuck, and their BREAK | 170 | keys. Any keys down at power-up are presumed to be stuck, and their BREAK |
171 | (sic) code is returned (which without the preceding MAKE code is a flag for a | 171 | (sic) code is returned (which without the preceding MAKE code is a flag for a |
172 | keyboard error). If the controller self-test completes without error, the code | 172 | keyboard error). If the controller self-test completes without error, the code |
173 | 0xF0 is returned. (This code will be used to indicate the version/rlease of | 173 | 0xF0 is returned. (This code will be used to indicate the version/release of |
174 | the ikbd controller. The first release of the ikbd is version 0xF0, should | 174 | the ikbd controller. The first release of the ikbd is version 0xF0, should |
175 | there be a second release it will be 0xF1, and so on.) | 175 | there be a second release it will be 0xF1, and so on.) |
176 | The ikbd defaults to a mouse position reporting with threshold of 1 unit in | 176 | The ikbd defaults to a mouse position reporting with threshold of 1 unit in |
@@ -413,7 +413,7 @@ INTERROGATION MODE. | |||
413 | %nnnnmmmm ; where m is JOYSTICK1 state | 413 | %nnnnmmmm ; where m is JOYSTICK1 state |
414 | ; and n is JOYSTICK0 state | 414 | ; and n is JOYSTICK0 state |
415 | 415 | ||
416 | Sets the ikbd to do nothing but monitor the serial command lne, maintain the | 416 | Sets the ikbd to do nothing but monitor the serial command line, maintain the |
417 | time-of-day clock, and monitor the joystick. The rate sets the interval | 417 | time-of-day clock, and monitor the joystick. The rate sets the interval |
418 | between joystick samples. | 418 | between joystick samples. |
419 | N.B. The user should not set the rate higher than the serial communications | 419 | N.B. The user should not set the rate higher than the serial communications |
@@ -446,10 +446,10 @@ The sample interval should be as constant as possible. | |||
446 | ; until vertical cursor key is generated before RY | 446 | ; until vertical cursor key is generated before RY |
447 | ; has elapsed | 447 | ; has elapsed |
448 | VX ; length (in tenths of seconds) of joystick closure | 448 | VX ; length (in tenths of seconds) of joystick closure |
449 | ; until horizontal cursor keystokes are generated | 449 | ; until horizontal cursor keystrokes are generated |
450 | ; after RX has elapsed | 450 | ; after RX has elapsed |
451 | VY ; length (in tenths of seconds) of joystick closure | 451 | VY ; length (in tenths of seconds) of joystick closure |
452 | ; until vertical cursor keystokes are generated | 452 | ; until vertical cursor keystrokes are generated |
453 | ; after RY has elapsed | 453 | ; after RY has elapsed |
454 | 454 | ||
455 | In this mode, joystick 0 is scanned in a way that simulates cursor keystrokes. | 455 | In this mode, joystick 0 is scanned in a way that simulates cursor keystrokes. |
diff --git a/Documentation/input/ff.txt b/Documentation/input/ff.txt index 085eb15b45b7..ded4d5f53109 100644 --- a/Documentation/input/ff.txt +++ b/Documentation/input/ff.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | Force feedback for Linux. | 1 | Force feedback for Linux. |
2 | By Johann Deneux <deneux@ifrance.com> on 2001/04/22. | 2 | By Johann Deneux <johann.deneux@gmail.com> on 2001/04/22. |
3 | Updated by Anssi Hannula <anssi.hannula@gmail.com> on 2006/04/09. | 3 | Updated by Anssi Hannula <anssi.hannula@gmail.com> on 2006/04/09. |
4 | You may redistribute this file. Please remember to include shape.fig and | 4 | You may redistribute this file. Please remember to include shape.fig and |
5 | interactive.fig as well. | 5 | interactive.fig as well. |
diff --git a/Documentation/input/iforce-protocol.txt b/Documentation/input/iforce-protocol.txt index 8777d2d321e3..3ac92413c874 100644 --- a/Documentation/input/iforce-protocol.txt +++ b/Documentation/input/iforce-protocol.txt | |||
@@ -4,10 +4,10 @@ specify force effects to I-Force 2.0 devices. None of this information comes | |||
4 | from Immerse. That's why you should not trust what is written in this | 4 | from Immerse. That's why you should not trust what is written in this |
5 | document. This document is intended to help understanding the protocol. | 5 | document. This document is intended to help understanding the protocol. |
6 | This is not a reference. Comments and corrections are welcome. To contact me, | 6 | This is not a reference. Comments and corrections are welcome. To contact me, |
7 | send an email to: deneux@ifrance.com | 7 | send an email to: johann.deneux@gmail.com |
8 | 8 | ||
9 | ** WARNING ** | 9 | ** WARNING ** |
10 | I may not be held responsible for any dammage or harm caused if you try to | 10 | I shall not be held responsible for any damage or harm caused if you try to |
11 | send data to your I-Force device based on what you read in this document. | 11 | send data to your I-Force device based on what you read in this document. |
12 | 12 | ||
13 | ** Preliminary Notes: | 13 | ** Preliminary Notes: |
@@ -151,13 +151,13 @@ OP= ff | |||
151 | Query command. Length varies according to the query type. | 151 | Query command. Length varies according to the query type. |
152 | The general format of this packet is: | 152 | The general format of this packet is: |
153 | ff 01 QUERY [INDEX] CHECKSUM | 153 | ff 01 QUERY [INDEX] CHECKSUM |
154 | reponses are of the same form: | 154 | responses are of the same form: |
155 | FF LEN QUERY VALUE_QUERIED CHECKSUM2 | 155 | FF LEN QUERY VALUE_QUERIED CHECKSUM2 |
156 | where LEN = 1 + length(VALUE_QUERIED) | 156 | where LEN = 1 + length(VALUE_QUERIED) |
157 | 157 | ||
158 | **** Query ram size **** | 158 | **** Query ram size **** |
159 | QUERY = 42 ('B'uffer size) | 159 | QUERY = 42 ('B'uffer size) |
160 | The device should reply with the same packet plus two additionnal bytes | 160 | The device should reply with the same packet plus two additional bytes |
161 | containing the size of the memory: | 161 | containing the size of the memory: |
162 | ff 03 42 03 e8 CS would mean that the device has 1000 bytes of ram available. | 162 | ff 03 42 03 e8 CS would mean that the device has 1000 bytes of ram available. |
163 | 163 | ||
@@ -234,19 +234,23 @@ is the amount of memory apparently needed for every set of parameters: | |||
234 | 234 | ||
235 | ** Appendix: How to study the protocol ? ** | 235 | ** Appendix: How to study the protocol ? ** |
236 | 236 | ||
237 | 1. Generate effects using the force editor provided with the DirectX SDK, or use Immersion Studio (freely available at their web site in the developer section: www.immersion.com) | 237 | 1. Generate effects using the force editor provided with the DirectX SDK, or |
238 | 2. Start a soft spying RS232 or USB (depending on where you connected your joystick/wheel). I used ComPortSpy from fCoder (alpha version!) | 238 | use Immersion Studio (freely available at their web site in the developer section: |
239 | www.immersion.com) | ||
240 | 2. Start a soft spying RS232 or USB (depending on where you connected your | ||
241 | joystick/wheel). I used ComPortSpy from fCoder (alpha version!) | ||
239 | 3. Play the effect, and watch what happens on the spy screen. | 242 | 3. Play the effect, and watch what happens on the spy screen. |
240 | 243 | ||
241 | A few words about ComPortSpy: | 244 | A few words about ComPortSpy: |
242 | At first glance, this soft seems, hum, well... buggy. In fact, data appear with a few seconds latency. Personnaly, I restart it every time I play an effect. | 245 | At first glance, this software seems, hum, well... buggy. In fact, data appear with a |
246 | few seconds latency. Personally, I restart it every time I play an effect. | ||
243 | Remember it's free (as in free beer) and alpha! | 247 | Remember it's free (as in free beer) and alpha! |
244 | 248 | ||
245 | ** URLS ** | 249 | ** URLS ** |
246 | Check www.immerse.com for Immersion Studio, and www.fcoder.com for ComPortSpy. | 250 | Check www.immerse.com for Immersion Studio, and www.fcoder.com for ComPortSpy. |
247 | 251 | ||
248 | ** Author of this document ** | 252 | ** Author of this document ** |
249 | Johann Deneux <deneux@ifrance.com> | 253 | Johann Deneux <johann.deneux@gmail.com> |
250 | Home page at http://www.esil.univ-mrs.fr/~jdeneux/projects/ff/ | 254 | Home page at http://www.esil.univ-mrs.fr/~jdeneux/projects/ff/ |
251 | 255 | ||
252 | Additions by Vojtech Pavlik. | 256 | Additions by Vojtech Pavlik. |
diff --git a/Documentation/input/input-programming.txt b/Documentation/input/input-programming.txt index 4d932dc66098..47fc86830cd7 100644 --- a/Documentation/input/input-programming.txt +++ b/Documentation/input/input-programming.txt | |||
@@ -79,7 +79,7 @@ In the _init function, which is called either upon module load or when | |||
79 | booting the kernel, it grabs the required resources (it should also check | 79 | booting the kernel, it grabs the required resources (it should also check |
80 | for the presence of the device). | 80 | for the presence of the device). |
81 | 81 | ||
82 | Then it allocates a new input device structure with input_aloocate_device() | 82 | Then it allocates a new input device structure with input_allocate_device() |
83 | and sets up input bitfields. This way the device driver tells the other | 83 | and sets up input bitfields. This way the device driver tells the other |
84 | parts of the input systems what it is - what events can be generated or | 84 | parts of the input systems what it is - what events can be generated or |
85 | accepted by this input device. Our example device can only generate EV_KEY | 85 | accepted by this input device. Our example device can only generate EV_KEY |
diff --git a/Documentation/isdn/CREDITS b/Documentation/isdn/CREDITS index 7c17c837064f..8cac6c2f23ee 100644 --- a/Documentation/isdn/CREDITS +++ b/Documentation/isdn/CREDITS | |||
@@ -40,7 +40,7 @@ Andreas Kool (akool@Kool.f.EUnet.de) | |||
40 | Pedro Roque Marques (roque@di.fc.ul.pt) | 40 | Pedro Roque Marques (roque@di.fc.ul.pt) |
41 | For lot of new ideas and the pcbit driver. | 41 | For lot of new ideas and the pcbit driver. |
42 | 42 | ||
43 | Eberhard Moenkeberg (emoenke@gwdg.de) | 43 | Eberhard Mönkeberg (emoenke@gwdg.de) |
44 | For testing and help to get into kernel. | 44 | For testing and help to get into kernel. |
45 | 45 | ||
46 | Thomas Neumann (tn@ruhr.de) | 46 | Thomas Neumann (tn@ruhr.de) |
diff --git a/Documentation/isdn/README.concap b/Documentation/isdn/README.concap index 2f114babe4b6..a76d74845a4c 100644 --- a/Documentation/isdn/README.concap +++ b/Documentation/isdn/README.concap | |||
@@ -111,7 +111,7 @@ struct concap_proto_ops{ | |||
111 | struct concap_proto * (*proto_new) (void); | 111 | struct concap_proto * (*proto_new) (void); |
112 | 112 | ||
113 | /* delete encapsulation protocol instance and free all its resources. | 113 | /* delete encapsulation protocol instance and free all its resources. |
114 | cprot may no loger be referenced after calling this */ | 114 | cprot may no longer be referenced after calling this */ |
115 | void (*proto_del)(struct concap_proto *cprot); | 115 | void (*proto_del)(struct concap_proto *cprot); |
116 | 116 | ||
117 | /* initialize the protocol's data. To be called at interface startup | 117 | /* initialize the protocol's data. To be called at interface startup |
diff --git a/Documentation/java.txt b/Documentation/java.txt index 3cce3fbb6644..e6a723281547 100644 --- a/Documentation/java.txt +++ b/Documentation/java.txt | |||
@@ -37,7 +37,7 @@ other program after you have done the following: | |||
37 | or the following, if you want to be more selective: | 37 | or the following, if you want to be more selective: |
38 | ':Applet:M::<!--applet::/usr/bin/appletviewer:' | 38 | ':Applet:M::<!--applet::/usr/bin/appletviewer:' |
39 | 39 | ||
40 | Of cause you have to fix the path names. Given path/file names in this | 40 | Of course you have to fix the path names. The path/file names given in this |
41 | document match the Debian 2.1 system. (i.e. jdk installed in /usr, | 41 | document match the Debian 2.1 system. (i.e. jdk installed in /usr, |
42 | custom wrappers from this document in /usr/local) | 42 | custom wrappers from this document in /usr/local) |
43 | 43 | ||
diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index fe8b0c4892cf..616043a6da99 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt | |||
@@ -77,7 +77,12 @@ applicable everywhere (see syntax). | |||
77 | Optionally, dependencies only for this default value can be added with | 77 | Optionally, dependencies only for this default value can be added with |
78 | "if". | 78 | "if". |
79 | 79 | ||
80 | - dependencies: "depends on"/"requires" <expr> | 80 | - type definition + default value: |
81 | "def_bool"/"def_tristate" <expr> ["if" <expr>] | ||
82 | This is a shorthand notation for a type definition plus a value. | ||
83 | Optionally dependencies for this default value can be added with "if". | ||
84 | |||
85 | - dependencies: "depends on" <expr> | ||
81 | This defines a dependency for this menu entry. If multiple | 86 | This defines a dependency for this menu entry. If multiple |
82 | dependencies are defined, they are connected with '&&'. Dependencies | 87 | dependencies are defined, they are connected with '&&'. Dependencies |
83 | are applied to all other options within this menu entry (which also | 88 | are applied to all other options within this menu entry (which also |
@@ -289,3 +294,10 @@ source: | |||
289 | "source" <prompt> | 294 | "source" <prompt> |
290 | 295 | ||
291 | This reads the specified configuration file. This file is always parsed. | 296 | This reads the specified configuration file. This file is always parsed. |
297 | |||
298 | mainmenu: | ||
299 | |||
300 | "mainmenu" <prompt> | ||
301 | |||
302 | This sets the config program's title bar if the config program chooses | ||
303 | to use it. | ||
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index f099b814d383..6166e2d7da76 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
@@ -518,6 +518,28 @@ more details, with real examples. | |||
518 | In this example for a specific GCC version the build will error out explaining | 518 | In this example for a specific GCC version the build will error out explaining |
519 | to the user why it stops. | 519 | to the user why it stops. |
520 | 520 | ||
521 | cc-cross-prefix | ||
522 | cc-cross-prefix is used to check if there exist a $(CC) in path with | ||
523 | one of the listed prefixes. The first prefix where there exist a | ||
524 | prefix$(CC) in the PATH is returned - and if no prefix$(CC) is found | ||
525 | then nothing is returned. | ||
526 | Additional prefixes are separated by a single space in the | ||
527 | call of cc-cross-prefix. | ||
528 | This functionality is usefull for architecture Makefile that try | ||
529 | to set CROSS_COMPILE to well know values but may have several | ||
530 | values to select between. | ||
531 | It is recommended only to try to set CROSS_COMPILE is it is a cross | ||
532 | build (host arch is different from target arch). And is CROSS_COMPILE | ||
533 | is already set then leave it with the old value. | ||
534 | |||
535 | Example: | ||
536 | #arch/m68k/Makefile | ||
537 | ifneq ($(SUBARCH),$(ARCH)) | ||
538 | ifeq ($(CROSS_COMPILE),) | ||
539 | CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu-) | ||
540 | endif | ||
541 | endif | ||
542 | |||
521 | === 4 Host Program support | 543 | === 4 Host Program support |
522 | 544 | ||
523 | Kbuild supports building executables on the host for use during the | 545 | Kbuild supports building executables on the host for use during the |
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt index d9e3b199929b..5a4ef48224ae 100644 --- a/Documentation/kernel-docs.txt +++ b/Documentation/kernel-docs.txt | |||
@@ -76,9 +76,9 @@ | |||
76 | * Title: "Conceptual Architecture of the Linux Kernel" | 76 | * Title: "Conceptual Architecture of the Linux Kernel" |
77 | Author: Ivan T. Bowman. | 77 | Author: Ivan T. Bowman. |
78 | URL: http://plg.uwaterloo.ca/~itbowman/papers/CS746G-a1.html | 78 | URL: http://plg.uwaterloo.ca/~itbowman/papers/CS746G-a1.html |
79 | Keywords: conceptual software arquitecture, extracted design, | 79 | Keywords: conceptual software architecture, extracted design, |
80 | reverse engineering, system structure. | 80 | reverse engineering, system structure. |
81 | Description: Conceptual software arquitecture of the Linux kernel, | 81 | Description: Conceptual software architecture of the Linux kernel, |
82 | automatically extracted from the source code. Very detailed. Good | 82 | automatically extracted from the source code. Very detailed. Good |
83 | figures. Gives good overall kernel understanding. | 83 | figures. Gives good overall kernel understanding. |
84 | 84 | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 0a3fed445249..6accd360da73 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -222,9 +222,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
222 | Warning: Many of these options can produce a lot of | 222 | Warning: Many of these options can produce a lot of |
223 | output and make your system unusable. Be very careful. | 223 | output and make your system unusable. Be very careful. |
224 | 224 | ||
225 | |||
226 | acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT | ||
227 | |||
228 | acpi_pm_good [X86-32,X86-64] | 225 | acpi_pm_good [X86-32,X86-64] |
229 | Override the pmtimer bug detection: force the kernel | 226 | Override the pmtimer bug detection: force the kernel |
230 | to assume that this machine's pmtimer latches its value | 227 | to assume that this machine's pmtimer latches its value |
@@ -297,9 +294,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
297 | apm= [APM] Advanced Power Management | 294 | apm= [APM] Advanced Power Management |
298 | See header of arch/i386/kernel/apm.c. | 295 | See header of arch/i386/kernel/apm.c. |
299 | 296 | ||
300 | applicom= [HW] | ||
301 | Format: <mem>,<irq> | ||
302 | |||
303 | arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards | 297 | arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards |
304 | Format: <io>,<irq>,<nodeID> | 298 | Format: <io>,<irq>,<nodeID> |
305 | 299 | ||
@@ -345,12 +339,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
345 | Format: <io>,<irq>,<mode> | 339 | Format: <io>,<irq>,<mode> |
346 | See header of drivers/net/hamradio/baycom_ser_hdx.c. | 340 | See header of drivers/net/hamradio/baycom_ser_hdx.c. |
347 | 341 | ||
348 | blkmtd_device= [HW,MTD] | ||
349 | blkmtd_erasesz= | ||
350 | blkmtd_ro= | ||
351 | blkmtd_bs= | ||
352 | blkmtd_count= | ||
353 | |||
354 | boot_delay= Milliseconds to delay each printk during boot. | 342 | boot_delay= Milliseconds to delay each printk during boot. |
355 | Values larger than 10 seconds (10000) are changed to | 343 | Values larger than 10 seconds (10000) are changed to |
356 | no delay (0). | 344 | no delay (0). |
@@ -431,8 +419,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
431 | over the 8254 in addition to over the IO-APIC. The | 419 | over the 8254 in addition to over the IO-APIC. The |
432 | kernel tries to set a sensible default. | 420 | kernel tries to set a sensible default. |
433 | 421 | ||
434 | hpet= [X86-32,HPET] option to disable HPET and use PIT. | 422 | hpet= [X86-32,HPET] option to control HPET usage |
435 | Format: disable | 423 | Format: { enable (default) | disable | force } |
424 | disable: disable HPET and use PIT instead | ||
425 | force: allow force enabled of undocumented chips (ICH4, VIA) | ||
436 | 426 | ||
437 | com20020= [HW,NET] ARCnet - COM20020 chipset | 427 | com20020= [HW,NET] ARCnet - COM20020 chipset |
438 | Format: | 428 | Format: |
@@ -513,8 +503,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
513 | cs89x0_media= [HW,NET] | 503 | cs89x0_media= [HW,NET] |
514 | Format: { rj45 | aui | bnc } | 504 | Format: { rj45 | aui | bnc } |
515 | 505 | ||
516 | cyclades= [HW,SERIAL] Cyclades multi-serial port adapter. | ||
517 | |||
518 | dasd= [HW,NET] | 506 | dasd= [HW,NET] |
519 | See header of drivers/s390/block/dasd_devmap.c. | 507 | See header of drivers/s390/block/dasd_devmap.c. |
520 | 508 | ||
@@ -572,10 +560,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
572 | See drivers/char/README.epca and | 560 | See drivers/char/README.epca and |
573 | Documentation/digiepca.txt. | 561 | Documentation/digiepca.txt. |
574 | 562 | ||
575 | dmascc= [HW,AX25,SERIAL] AX.25 Z80SCC driver with DMA | ||
576 | support available. | ||
577 | Format: <io_dev0>[,<io_dev1>[,..<io_dev32>]] | ||
578 | |||
579 | dmasound= [HW,OSS] Sound subsystem buffers | 563 | dmasound= [HW,OSS] Sound subsystem buffers |
580 | 564 | ||
581 | dscc4.setup= [NET] | 565 | dscc4.setup= [NET] |
@@ -606,17 +590,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
606 | 0: polling mode | 590 | 0: polling mode |
607 | non-0: interrupt mode (default) | 591 | non-0: interrupt mode (default) |
608 | 592 | ||
609 | eda= [HW,PS2] | ||
610 | |||
611 | edb= [HW,PS2] | ||
612 | |||
613 | edd= [EDD] | 593 | edd= [EDD] |
614 | Format: {"of[f]" | "sk[ipmbr]"} | 594 | Format: {"of[f]" | "sk[ipmbr]"} |
615 | See comment in arch/i386/boot/edd.S | 595 | See comment in arch/i386/boot/edd.S |
616 | 596 | ||
617 | eicon= [HW,ISDN] | ||
618 | Format: <id>,<membase>,<irq> | ||
619 | |||
620 | eisa_irq_edge= [PARISC,HW] | 597 | eisa_irq_edge= [PARISC,HW] |
621 | See header of drivers/parisc/eisa.c. | 598 | See header of drivers/parisc/eisa.c. |
622 | 599 | ||
@@ -892,9 +869,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
892 | lapic_timer_c2_ok [X86-32,x86-64,APIC] trust the local apic timer in | 869 | lapic_timer_c2_ok [X86-32,x86-64,APIC] trust the local apic timer in |
893 | C2 power state. | 870 | C2 power state. |
894 | 871 | ||
895 | lasi= [HW,SCSI] PARISC LASI driver for the 53c700 chip | ||
896 | Format: addr:<io>,irq:<irq> | ||
897 | |||
898 | libata.noacpi [LIBATA] Disables use of ACPI in libata suspend/resume | 872 | libata.noacpi [LIBATA] Disables use of ACPI in libata suspend/resume |
899 | when set. | 873 | when set. |
900 | Format: <int> | 874 | Format: <int> |
@@ -1142,9 +1116,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1142 | noapic [SMP,APIC] Tells the kernel to not make use of any | 1116 | noapic [SMP,APIC] Tells the kernel to not make use of any |
1143 | IOAPICs that may be present in the system. | 1117 | IOAPICs that may be present in the system. |
1144 | 1118 | ||
1145 | noasync [HW,M68K] Disables async and sync negotiation for | ||
1146 | all devices. | ||
1147 | |||
1148 | nobats [PPC] Do not use BATs for mapping kernel lowmem | 1119 | nobats [PPC] Do not use BATs for mapping kernel lowmem |
1149 | on "Classic" PPC cores. | 1120 | on "Classic" PPC cores. |
1150 | 1121 | ||
@@ -1456,6 +1427,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1456 | Param: <number> - step/bucket size as a power of 2 for | 1427 | Param: <number> - step/bucket size as a power of 2 for |
1457 | statistical time based profiling. | 1428 | statistical time based profiling. |
1458 | Param: "sleep" - profile D-state sleeping (millisecs) | 1429 | Param: "sleep" - profile D-state sleeping (millisecs) |
1430 | Param: "kvm" - profile VM exits. | ||
1459 | 1431 | ||
1460 | processor.max_cstate= [HW,ACPI] | 1432 | processor.max_cstate= [HW,ACPI] |
1461 | Limit processor to maximum C-state | 1433 | Limit processor to maximum C-state |
@@ -1582,9 +1554,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1582 | sa1100ir [NET] | 1554 | sa1100ir [NET] |
1583 | See drivers/net/irda/sa1100_ir.c. | 1555 | See drivers/net/irda/sa1100_ir.c. |
1584 | 1556 | ||
1585 | sb= [HW,OSS] | ||
1586 | Format: <io>,<irq>,<dma>,<dma2> | ||
1587 | |||
1588 | sbni= [NET] Granch SBNI12 leased line adapter | 1557 | sbni= [NET] Granch SBNI12 leased line adapter |
1589 | 1558 | ||
1590 | sc1200wdt= [HW,WDT] SC1200 WDT (watchdog) driver | 1559 | sc1200wdt= [HW,WDT] SC1200 WDT (watchdog) driver |
@@ -1628,8 +1597,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1628 | 1597 | ||
1629 | serialnumber [BUGS=X86-32] | 1598 | serialnumber [BUGS=X86-32] |
1630 | 1599 | ||
1631 | sg_def_reserved_size= [SCSI] | ||
1632 | |||
1633 | shapers= [NET] | 1600 | shapers= [NET] |
1634 | Maximal number of shapers. | 1601 | Maximal number of shapers. |
1635 | 1602 | ||
@@ -2020,10 +1987,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2020 | norandmaps Don't use address space randomization | 1987 | norandmaps Don't use address space randomization |
2021 | Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space | 1988 | Equivalent to echo 0 > /proc/sys/kernel/randomize_va_space |
2022 | 1989 | ||
2023 | unwind_debug=N N > 0 will enable dwarf2 unwinder debugging | ||
2024 | This is useful to get more information why | ||
2025 | you got a "dwarf2 unwinder stuck" | ||
2026 | |||
2027 | ______________________________________________________________________ | 1990 | ______________________________________________________________________ |
2028 | 1991 | ||
2029 | TODO: | 1992 | TODO: |
diff --git a/Documentation/m68k/kernel-options.txt b/Documentation/m68k/kernel-options.txt index 8a523f6af48a..248589e8bcf5 100644 --- a/Documentation/m68k/kernel-options.txt +++ b/Documentation/m68k/kernel-options.txt | |||
@@ -890,10 +890,7 @@ Syntax: nosync:0 | |||
890 | 5.5.2) noasync | 890 | 5.5.2) noasync |
891 | -------------- | 891 | -------------- |
892 | 892 | ||
893 | Syntax: noasync:0 | 893 | [OBSOLETE, REMOVED] |
894 | |||
895 | Disables async and sync negotiation for all devices. Any value | ||
896 | after the colon is acceptable (and has the same effect). | ||
897 | 894 | ||
898 | 5.5.3) nodisconnect | 895 | 5.5.3) nodisconnect |
899 | ------------------- | 896 | ------------------- |
diff --git a/Documentation/mips/AU1xxx_IDE.README b/Documentation/mips/AU1xxx_IDE.README index afb31c141d9d..5c8334123f4f 100644 --- a/Documentation/mips/AU1xxx_IDE.README +++ b/Documentation/mips/AU1xxx_IDE.README | |||
@@ -59,7 +59,7 @@ Four configs variables are introduced: | |||
59 | CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA - enable the PIO+DBDMA mode | 59 | CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA - enable the PIO+DBDMA mode |
60 | CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA - enable the MWDMA mode | 60 | CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA - enable the MWDMA mode |
61 | CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON - set Burstable FIFO in DBDMA | 61 | CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON - set Burstable FIFO in DBDMA |
62 | controler | 62 | controller |
63 | CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ - maximum transfer size | 63 | CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ - maximum transfer size |
64 | per descriptor | 64 | per descriptor |
65 | 65 | ||
diff --git a/Documentation/mutex-design.txt b/Documentation/mutex-design.txt index 51f935191ae5..aa60d1f627e5 100644 --- a/Documentation/mutex-design.txt +++ b/Documentation/mutex-design.txt | |||
@@ -133,4 +133,6 @@ the APIs of 'struct mutex' have been streamlined: | |||
133 | int mutex_trylock(struct mutex *lock); | 133 | int mutex_trylock(struct mutex *lock); |
134 | void mutex_unlock(struct mutex *lock); | 134 | void mutex_unlock(struct mutex *lock); |
135 | int mutex_is_locked(struct mutex *lock); | 135 | int mutex_is_locked(struct mutex *lock); |
136 | 136 | void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | |
137 | int mutex_lock_interruptible_nested(struct mutex *lock, | ||
138 | unsigned int subclass); | ||
diff --git a/Documentation/networking/bcm43xx.txt b/Documentation/networking/bcm43xx.txt index a136721499bf..d602c8d6ff3e 100644 --- a/Documentation/networking/bcm43xx.txt +++ b/Documentation/networking/bcm43xx.txt | |||
@@ -37,7 +37,7 @@ all, distributions. There is, however, additional software that is | |||
37 | required. The firmware used by the chip is the intellectual property | 37 | required. The firmware used by the chip is the intellectual property |
38 | of Broadcom and they have not given the bcm43xx team redistribution | 38 | of Broadcom and they have not given the bcm43xx team redistribution |
39 | rights to this firmware. Since we cannot legally redistribute | 39 | rights to this firmware. Since we cannot legally redistribute |
40 | the firwmare we cannot include it with the driver. Furthermore, it | 40 | the firmware we cannot include it with the driver. Furthermore, it |
41 | cannot be placed in the downloadable archives of any distributing | 41 | cannot be placed in the downloadable archives of any distributing |
42 | organization; therefore, the user is responsible for obtaining the | 42 | organization; therefore, the user is responsible for obtaining the |
43 | firmware and placing it in the appropriate location so that the driver | 43 | firmware and placing it in the appropriate location so that the driver |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 6ae2feff3087..747a5d15d529 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -293,7 +293,7 @@ tcp_no_metrics_save - BOOLEAN | |||
293 | when the connection closes, so that connections established in the | 293 | when the connection closes, so that connections established in the |
294 | near future can use these to set initial conditions. Usually, this | 294 | near future can use these to set initial conditions. Usually, this |
295 | increases overall performance, but may sometimes cause performance | 295 | increases overall performance, but may sometimes cause performance |
296 | degredation. If set, TCP will not cache metrics on closing | 296 | degradation. If set, TCP will not cache metrics on closing |
297 | connections. | 297 | connections. |
298 | 298 | ||
299 | tcp_orphan_retries - INTEGER | 299 | tcp_orphan_retries - INTEGER |
diff --git a/Documentation/networking/rxrpc.txt b/Documentation/networking/rxrpc.txt index c36b64b0020f..c3669a3fb4af 100644 --- a/Documentation/networking/rxrpc.txt +++ b/Documentation/networking/rxrpc.txt | |||
@@ -689,7 +689,7 @@ such as the AFS filesystem. This permits such a utility to: | |||
689 | buffers manipulated directly. | 689 | buffers manipulated directly. |
690 | 690 | ||
691 | To use the RxRPC facility, a kernel utility must still open an AF_RXRPC socket, | 691 | To use the RxRPC facility, a kernel utility must still open an AF_RXRPC socket, |
692 | bind an addess as appropriate and listen if it's to be a server socket, but | 692 | bind an address as appropriate and listen if it's to be a server socket, but |
693 | then it passes this to the kernel interface functions. | 693 | then it passes this to the kernel interface functions. |
694 | 694 | ||
695 | The kernel interface functions are as follows: | 695 | The kernel interface functions are as follows: |
diff --git a/Documentation/networking/udplite.txt b/Documentation/networking/udplite.txt index 6be09ba24a36..b6409cab075c 100644 --- a/Documentation/networking/udplite.txt +++ b/Documentation/networking/udplite.txt | |||
@@ -12,7 +12,7 @@ | |||
12 | For in-depth information, you can consult: | 12 | For in-depth information, you can consult: |
13 | 13 | ||
14 | o The UDP-Lite Homepage: http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/ | 14 | o The UDP-Lite Homepage: http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/ |
15 | Fom here you can also download some example application source code. | 15 | From here you can also download some example application source code. |
16 | 16 | ||
17 | o The UDP-Lite HOWTO on | 17 | o The UDP-Lite HOWTO on |
18 | http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/files/UDP-Lite-HOWTO.txt | 18 | http://www.erg.abdn.ac.uk/users/gerrit/udp-lite/files/UDP-Lite-HOWTO.txt |
@@ -223,7 +223,7 @@ | |||
223 | While it is important that such cases are dealt with correctly, they | 223 | While it is important that such cases are dealt with correctly, they |
224 | are (annoyingly) rare: UDP-Lite is designed for optimising multimedia | 224 | are (annoyingly) rare: UDP-Lite is designed for optimising multimedia |
225 | performance over wireless (or generally noisy) links and thus smaller | 225 | performance over wireless (or generally noisy) links and thus smaller |
226 | coverage lenghts are likely to be expected. | 226 | coverage lengths are likely to be expected. |
227 | 227 | ||
228 | 228 | ||
229 | V) UDP-LITE RUNTIME STATISTICS AND THEIR MEANING | 229 | V) UDP-LITE RUNTIME STATISTICS AND THEIR MEANING |
@@ -259,7 +259,7 @@ | |||
259 | VI) IPTABLES | 259 | VI) IPTABLES |
260 | 260 | ||
261 | There is packet match support for UDP-Lite as well as support for the LOG target. | 261 | There is packet match support for UDP-Lite as well as support for the LOG target. |
262 | If you copy and paste the following line into /etc/protcols, | 262 | If you copy and paste the following line into /etc/protocols, |
263 | 263 | ||
264 | udplite 136 UDP-Lite # UDP-Lite [RFC 3828] | 264 | udplite 136 UDP-Lite # UDP-Lite [RFC 3828] |
265 | 265 | ||
diff --git a/Documentation/power/swsusp-and-swap-files.txt b/Documentation/power/swsusp-and-swap-files.txt index 06f911a5f885..f281886de490 100644 --- a/Documentation/power/swsusp-and-swap-files.txt +++ b/Documentation/power/swsusp-and-swap-files.txt | |||
@@ -39,7 +39,7 @@ resume=<swap_file_partition> resume_offset=<swap_file_offset> | |||
39 | where <swap_file_partition> is the partition on which the swap file is located | 39 | where <swap_file_partition> is the partition on which the swap file is located |
40 | and <swap_file_offset> is the offset of the swap header determined by the | 40 | and <swap_file_offset> is the offset of the swap header determined by the |
41 | application in 2) (of course, this step may be carried out automatically | 41 | application in 2) (of course, this step may be carried out automatically |
42 | by the same application that determies the swap file's header offset using the | 42 | by the same application that determines the swap file's header offset using the |
43 | FIBMAP ioctl) | 43 | FIBMAP ioctl) |
44 | 44 | ||
45 | OR | 45 | OR |
diff --git a/Documentation/powerpc/eeh-pci-error-recovery.txt b/Documentation/powerpc/eeh-pci-error-recovery.txt index 4530d1bf0286..df7afe43d462 100644 --- a/Documentation/powerpc/eeh-pci-error-recovery.txt +++ b/Documentation/powerpc/eeh-pci-error-recovery.txt | |||
@@ -36,8 +36,8 @@ Causes of EEH Errors | |||
36 | EEH was originally designed to guard against hardware failure, such | 36 | EEH was originally designed to guard against hardware failure, such |
37 | as PCI cards dying from heat, humidity, dust, vibration and bad | 37 | as PCI cards dying from heat, humidity, dust, vibration and bad |
38 | electrical connections. The vast majority of EEH errors seen in | 38 | electrical connections. The vast majority of EEH errors seen in |
39 | "real life" are due to eithr poorly seated PCI cards, or, | 39 | "real life" are due to either poorly seated PCI cards, or, |
40 | unfortunately quite commonly, due device driver bugs, device firmware | 40 | unfortunately quite commonly, due to device driver bugs, device firmware |
41 | bugs, and sometimes PCI card hardware bugs. | 41 | bugs, and sometimes PCI card hardware bugs. |
42 | 42 | ||
43 | The most common software bug, is one that causes the device to | 43 | The most common software bug, is one that causes the device to |
diff --git a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt index e59fcbbe338c..5f7d536cb0c6 100644 --- a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt +++ b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt | |||
@@ -17,12 +17,12 @@ passed by the boot loader to the kernel at boot time. The device tree | |||
17 | describes what devices are present on the board and how they are | 17 | describes what devices are present on the board and how they are |
18 | connected. The device tree can either be passed as a binary blob (as | 18 | connected. The device tree can either be passed as a binary blob (as |
19 | described in Documentation/powerpc/booting-without-of.txt), or passed | 19 | described in Documentation/powerpc/booting-without-of.txt), or passed |
20 | by Open Firmare (IEEE 1275) compatible firmware using an OF compatible | 20 | by Open Firmware (IEEE 1275) compatible firmware using an OF compatible |
21 | client interface API. | 21 | client interface API. |
22 | 22 | ||
23 | This document specifies the requirements on the device-tree for mpc5200 | 23 | This document specifies the requirements on the device-tree for mpc5200 |
24 | based boards. These requirements are above and beyond the details | 24 | based boards. These requirements are above and beyond the details |
25 | specified in either the OpenFirmware spec or booting-without-of.txt | 25 | specified in either the Open Firmware spec or booting-without-of.txt |
26 | 26 | ||
27 | All new mpc5200-based boards are expected to match this document. In | 27 | All new mpc5200-based boards are expected to match this document. In |
28 | cases where this document is not sufficient to support a new board port, | 28 | cases where this document is not sufficient to support a new board port, |
@@ -73,8 +73,8 @@ match on the compatible list; the 'most compatible' driver should be | |||
73 | selected. | 73 | selected. |
74 | 74 | ||
75 | The split between the MPC5200 and the MPC5200B leaves a bit of a | 75 | The split between the MPC5200 and the MPC5200B leaves a bit of a |
76 | connundrum. How should the compatible property be set up to provide | 76 | conundrum. How should the compatible property be set up to provide |
77 | maximum compatability information; but still acurately describe the | 77 | maximum compatibility information; but still accurately describe the |
78 | chip? For the MPC5200; the answer is easy. Most of the SoC devices | 78 | chip? For the MPC5200; the answer is easy. Most of the SoC devices |
79 | originally appeared on the MPC5200. Since they didn't exist anywhere | 79 | originally appeared on the MPC5200. Since they didn't exist anywhere |
80 | else; the 5200 compatible properties will contain only one item; | 80 | else; the 5200 compatible properties will contain only one item; |
@@ -84,7 +84,7 @@ The 5200B is almost the same as the 5200, but not quite. It fixes | |||
84 | silicon bugs and it adds a small number of enhancements. Most of the | 84 | silicon bugs and it adds a small number of enhancements. Most of the |
85 | devices either provide exactly the same interface as on the 5200. A few | 85 | devices either provide exactly the same interface as on the 5200. A few |
86 | devices have extra functions but still have a backwards compatible mode. | 86 | devices have extra functions but still have a backwards compatible mode. |
87 | To express this infomation as completely as possible, 5200B device trees | 87 | To express this information as completely as possible, 5200B device trees |
88 | should have two items in the compatible list; | 88 | should have two items in the compatible list; |
89 | "mpc5200b-<device>\0mpc5200-<device>". It is *strongly* recommended | 89 | "mpc5200b-<device>\0mpc5200-<device>". It is *strongly* recommended |
90 | that 5200B device trees follow this convention (instead of only listing | 90 | that 5200B device trees follow this convention (instead of only listing |
@@ -199,7 +199,7 @@ ethernet@<addr> network mpc5200-fec MPC5200 ethernet device | |||
199 | ata@<addr> ata mpc5200-ata IDE ATA interface | 199 | ata@<addr> ata mpc5200-ata IDE ATA interface |
200 | i2c@<addr> i2c mpc5200-i2c I2C controller | 200 | i2c@<addr> i2c mpc5200-i2c I2C controller |
201 | usb@<addr> usb-ohci-be mpc5200-ohci,ohci-be USB controller | 201 | usb@<addr> usb-ohci-be mpc5200-ohci,ohci-be USB controller |
202 | xlb@<addr> xlb mpc5200-xlb XLB arbritrator | 202 | xlb@<addr> xlb mpc5200-xlb XLB arbitrator |
203 | 203 | ||
204 | Important child node properties | 204 | Important child node properties |
205 | name type description | 205 | name type description |
diff --git a/Documentation/scsi/aic79xx.txt b/Documentation/scsi/aic79xx.txt index 6aa9a891f3d0..683ccae00ad4 100644 --- a/Documentation/scsi/aic79xx.txt +++ b/Documentation/scsi/aic79xx.txt | |||
@@ -120,7 +120,7 @@ The following information is available in this file: | |||
120 | list size to avoid SCSI malloc pool fragmentation. | 120 | list size to avoid SCSI malloc pool fragmentation. |
121 | - Cleanup channel display in our /proc output. | 121 | - Cleanup channel display in our /proc output. |
122 | - Workaround duplicate device entries in the mid-layer | 122 | - Workaround duplicate device entries in the mid-layer |
123 | devlice list during add-single-device. | 123 | device list during add-single-device. |
124 | 124 | ||
125 | 1.3.6 (March 28th, 2003) | 125 | 1.3.6 (March 28th, 2003) |
126 | - Correct a double free in the Domain Validation code. | 126 | - Correct a double free in the Domain Validation code. |
diff --git a/Documentation/scsi/aic7xxx.txt b/Documentation/scsi/aic7xxx.txt index 5f34d2ba69b4..b7e238cbb5a7 100644 --- a/Documentation/scsi/aic7xxx.txt +++ b/Documentation/scsi/aic7xxx.txt | |||
@@ -159,7 +159,7 @@ The following information is available in this file: | |||
159 | - Add support for 2.5.X's scsi_report_device_reset(). | 159 | - Add support for 2.5.X's scsi_report_device_reset(). |
160 | 160 | ||
161 | 6.2.34 (May 5th, 2003) | 161 | 6.2.34 (May 5th, 2003) |
162 | - Fix locking regression instroduced in 6.2.29 that | 162 | - Fix locking regression introduced in 6.2.29 that |
163 | could cause a lock order reversal between the io_request_lock | 163 | could cause a lock order reversal between the io_request_lock |
164 | and our per-softc lock. This was only possible on RH9, | 164 | and our per-softc lock. This was only possible on RH9, |
165 | SuSE, and kernel.org 2.4.X kernels. | 165 | SuSE, and kernel.org 2.4.X kernels. |
@@ -264,7 +264,7 @@ The following information is available in this file: | |||
264 | Option: tag_info:{{value[,value...]}[,{value[,value...]}...]} | 264 | Option: tag_info:{{value[,value...]}[,{value[,value...]}...]} |
265 | Definition: Set the per-target tagged queue depth on a | 265 | Definition: Set the per-target tagged queue depth on a |
266 | per controller basis. Both controllers and targets | 266 | per controller basis. Both controllers and targets |
267 | may be ommitted indicating that they should retain | 267 | may be omitted indicating that they should retain |
268 | the default tag depth. | 268 | the default tag depth. |
269 | Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32} | 269 | Examples: tag_info:{{16,32,32,64,8,8,,32,32,32,32,32,32,32,32,32} |
270 | On Controller 0 | 270 | On Controller 0 |
@@ -290,7 +290,7 @@ The following information is available in this file: | |||
290 | ----------------------------------------------------------------- | 290 | ----------------------------------------------------------------- |
291 | Option: dv: {value[,value...]} | 291 | Option: dv: {value[,value...]} |
292 | Definition: Set Domain Validation Policy on a per-controller basis. | 292 | Definition: Set Domain Validation Policy on a per-controller basis. |
293 | Controllers may be ommitted indicating that | 293 | Controllers may be omitted indicating that |
294 | they should retain the default read streaming setting. | 294 | they should retain the default read streaming setting. |
295 | Example: dv:{-1,0,,1,1,0} | 295 | Example: dv:{-1,0,,1,1,0} |
296 | On Controller 0 leave DV at its default setting. | 296 | On Controller 0 leave DV at its default setting. |
diff --git a/Documentation/scsi/arcmsr_spec.txt b/Documentation/scsi/arcmsr_spec.txt index 5e0042340fd3..45d9482c1517 100644 --- a/Documentation/scsi/arcmsr_spec.txt +++ b/Documentation/scsi/arcmsr_spec.txt | |||
@@ -3,7 +3,7 @@ | |||
3 | ******************************************************************************* | 3 | ******************************************************************************* |
4 | ** Usage of IOP331 adapter | 4 | ** Usage of IOP331 adapter |
5 | ** (All In/Out is in IOP331's view) | 5 | ** (All In/Out is in IOP331's view) |
6 | ** 1. Message 0 --> InitThread message and retrun code | 6 | ** 1. Message 0 --> InitThread message and return code |
7 | ** 2. Doorbell is used for RS-232 emulation | 7 | ** 2. Doorbell is used for RS-232 emulation |
8 | ** inDoorBell : bit0 -- data in ready | 8 | ** inDoorBell : bit0 -- data in ready |
9 | ** (DRIVER DATA WRITE OK) | 9 | ** (DRIVER DATA WRITE OK) |
diff --git a/Documentation/scsi/ibmmca.txt b/Documentation/scsi/ibmmca.txt index a08e225653d6..a810421f1fb3 100644 --- a/Documentation/scsi/ibmmca.txt +++ b/Documentation/scsi/ibmmca.txt | |||
@@ -21,7 +21,7 @@ | |||
21 | versions older than 4.0 do not work with kernels 2.4.0 or later! If you | 21 | versions older than 4.0 do not work with kernels 2.4.0 or later! If you |
22 | try to compile your kernel with the wrong driver source, the | 22 | try to compile your kernel with the wrong driver source, the |
23 | compilation is aborted and you get a corresponding error message. This is | 23 | compilation is aborted and you get a corresponding error message. This is |
24 | no bug in the driver. It prevents you from using the wrong sourcecode | 24 | no bug in the driver; it prevents you from using the wrong source code |
25 | with the wrong kernel version. | 25 | with the wrong kernel version. |
26 | 26 | ||
27 | Authors of this Driver | 27 | Authors of this Driver |
@@ -58,7 +58,7 @@ | |||
58 | 5 Users' Manual | 58 | 5 Users' Manual |
59 | 5.1 Commandline Parameters | 59 | 5.1 Commandline Parameters |
60 | 5.2 Troubleshooting | 60 | 5.2 Troubleshooting |
61 | 5.3 Bugreports | 61 | 5.3 Bug reports |
62 | 5.4 Support WWW-page | 62 | 5.4 Support WWW-page |
63 | 6 References | 63 | 6 References |
64 | 7 Credits to | 64 | 7 Credits to |
@@ -71,13 +71,13 @@ | |||
71 | 71 | ||
72 | 1 Abstract | 72 | 1 Abstract |
73 | ---------- | 73 | ---------- |
74 | This README-file describes the IBM SCSI-subsystem low level driver for | 74 | This README-file describes the IBM SCSI-subsystem low level driver for |
75 | Linux. The descriptions which were formerly kept in the source-code have | 75 | Linux. The descriptions which were formerly kept in the source code have |
76 | been taken out to this file to easify the codes' readability. The driver | 76 | been taken out of this file to simplify the codes readability. The driver |
77 | description has been updated, as most of the former description was already | 77 | description has been updated, as most of the former description was already |
78 | quite outdated. The history of the driver development is also kept inside | 78 | quite outdated. The history of the driver development is also kept inside |
79 | here. Multiple historical developments have been summarized to shorten the | 79 | here. Multiple historical developments have been summarized to shorten the |
80 | textsize a bit. At the end of this file you can find a small manual for | 80 | text size a bit. At the end of this file you can find a small manual for |
81 | this driver and hints to get it running on your machine. | 81 | this driver and hints to get it running on your machine. |
82 | 82 | ||
83 | 2 Driver Description | 83 | 2 Driver Description |
@@ -186,7 +186,7 @@ | |||
186 | between 0 and 7). The IBM SCSI-2 F/W adapter offers this on up to two | 186 | between 0 and 7). The IBM SCSI-2 F/W adapter offers this on up to two |
187 | busses and provides support for 30 logical devices at the same time, where | 187 | busses and provides support for 30 logical devices at the same time, where |
188 | in wide-addressing mode you can have 16 puns with 32 luns on each device. | 188 | in wide-addressing mode you can have 16 puns with 32 luns on each device. |
189 | This section dexribes you the handling of devices on non-F/W adapters. | 189 | This section describes the handling of devices on non-F/W adapters. |
190 | Just imagine, that you can have 16 * 32 = 512 devices on a F/W adapter | 190 | Just imagine, that you can have 16 * 32 = 512 devices on a F/W adapter |
191 | which means a lot of possible devices for such a small machine. | 191 | which means a lot of possible devices for such a small machine. |
192 | 192 | ||
@@ -209,10 +209,10 @@ | |||
209 | -------------------------------------------------------- | 209 | -------------------------------------------------------- |
210 | One consequence of information hiding is that the real (pun,lun) | 210 | One consequence of information hiding is that the real (pun,lun) |
211 | numbers are also hidden. The two possibilities to get around this problem | 211 | numbers are also hidden. The two possibilities to get around this problem |
212 | is to offer fake pun/lun combinations to the operating system or to | 212 | are to offer fake pun/lun combinations to the operating system or to |
213 | delete the whole mapping of the adapter and to reassign the ldns, using | 213 | delete the whole mapping of the adapter and to reassign the ldns, using |
214 | the immediate assign command of the SCSI-subsystem for probing through | 214 | the immediate assign command of the SCSI-subsystem for probing through |
215 | all possible pun/lun combinations. a ldn is a "logical device number" | 215 | all possible pun/lun combinations. An ldn is a "logical device number" |
216 | which is used by IBM SCSI-subsystems to access some valid SCSI-device. | 216 | which is used by IBM SCSI-subsystems to access some valid SCSI-device. |
217 | At the beginning of the development of this driver, the following approach | 217 | At the beginning of the development of this driver, the following approach |
218 | was used: | 218 | was used: |
@@ -251,9 +251,9 @@ | |||
251 | lun>0 or to non-existing devices, in order to satisfy the subsystem, if | 251 | lun>0 or to non-existing devices, in order to satisfy the subsystem, if |
252 | there are less than 15 SCSI-devices connected. In the case of more than 15 | 252 | there are less than 15 SCSI-devices connected. In the case of more than 15 |
253 | devices, the dynamical mapping goes active. If the get_scsi[][] reports a | 253 | devices, the dynamical mapping goes active. If the get_scsi[][] reports a |
254 | device to be existant, but it has no ldn assigned, it gets a ldn out of 7 | 254 | device to be existent, but it has no ldn assigned, it gets an ldn out of 7 |
255 | to 14. The numbers are assigned in cyclic order. Therefore it takes 8 | 255 | to 14. The numbers are assigned in cyclic order, therefore it takes 8 |
256 | dynamical reassignments on the SCSI-devices, until a certain device | 256 | dynamical reassignments on the SCSI-devices until a certain device |
257 | loses its ldn again. This assures that dynamical remapping is avoided | 257 | loses its ldn again. This assures that dynamical remapping is avoided |
258 | during intense I/O between up to 15 SCSI-devices (means pun,lun | 258 | during intense I/O between up to 15 SCSI-devices (means pun,lun |
259 | combinations). A further advantage of this method is that people who | 259 | combinations). A further advantage of this method is that people who |
@@ -551,7 +551,7 @@ | |||
551 | than devices are available, they are assigned to non existing pun,lun | 551 | than devices are available, they are assigned to non existing pun,lun |
552 | combinations to satisfy the adapter. With this, the dynamical mapping | 552 | combinations to satisfy the adapter. With this, the dynamical mapping |
553 | was possible to implement. (For further info see the text in the | 553 | was possible to implement. (For further info see the text in the |
554 | source-code and in the description below. Read the description | 554 | source code and in the description below. Read the description |
555 | below BEFORE installing this driver on your system!) | 555 | below BEFORE installing this driver on your system!) |
556 | 2) Changed the name IBMMCA_DRIVER_VERSION to IBMMCA_SCSI_DRIVER_VERSION. | 556 | 2) Changed the name IBMMCA_DRIVER_VERSION to IBMMCA_SCSI_DRIVER_VERSION. |
557 | 3) The LED-display shows on PS/2-95 no longer the ldn, but the SCSI-ID | 557 | 3) The LED-display shows on PS/2-95 no longer the ldn, but the SCSI-ID |
@@ -762,9 +762,9 @@ | |||
762 | - Michael Lang | 762 | - Michael Lang |
763 | 763 | ||
764 | Apr 23, 2000 (v3.2pre1) | 764 | Apr 23, 2000 (v3.2pre1) |
765 | 1) During a very long time, I collected a huge amount of bugreports from | 765 | 1) During a very long time, I collected a huge amount of bug reports from |
766 | various people, trying really quite different things on their SCSI- | 766 | various people, trying really quite different things on their SCSI- |
767 | PS/2s. Today, all these bugreports are taken into account and should be | 767 | PS/2s. Today, all these bug reports are taken into account and should be |
768 | mostly solved. The major topics were: | 768 | mostly solved. The major topics were: |
769 | - Driver crashes during boottime by no obvious reason. | 769 | - Driver crashes during boottime by no obvious reason. |
770 | - Driver panics while the midlevel-SCSI-driver is trying to inquire | 770 | - Driver panics while the midlevel-SCSI-driver is trying to inquire |
@@ -819,7 +819,7 @@ | |||
819 | - Michael Lang | 819 | - Michael Lang |
820 | 820 | ||
821 | July 17, 2000 (v3.2pre8) | 821 | July 17, 2000 (v3.2pre8) |
822 | A long period of collecting bugreports from all corners of the world | 822 | A long period of collecting bug reports from all corners of the world |
823 | now lead to the following corrections to the code: | 823 | now lead to the following corrections to the code: |
824 | 1) SCSI-2 F/W support crashed with a COMMAND ERROR. The reason for this | 824 | 1) SCSI-2 F/W support crashed with a COMMAND ERROR. The reason for this |
825 | was that it is possible to disable Fast-SCSI for the external bus. | 825 | was that it is possible to disable Fast-SCSI for the external bus. |
@@ -873,7 +873,7 @@ | |||
873 | July 26, 2000 (v3.2pre11) | 873 | July 26, 2000 (v3.2pre11) |
874 | 1) I passed a horrible weekend getting mad with NMIs on kernel 2.2.14 and | 874 | 1) I passed a horrible weekend getting mad with NMIs on kernel 2.2.14 and |
875 | a model 9595. Asking around in the community, nobody except of me has | 875 | a model 9595. Asking around in the community, nobody except of me has |
876 | seen such errors. Weired, but I am trying to recompile everything on | 876 | seen such errors. Weird, but I am trying to recompile everything on |
877 | the model 9595. Maybe, as I use a specially modified gcc, that could | 877 | the model 9595. Maybe, as I use a specially modified gcc, that could |
878 | cause problems. But, it was not the reason. The true background was, | 878 | cause problems. But, it was not the reason. The true background was, |
879 | that the kernel was compiled for i386 and the 9595 has a 486DX-2. | 879 | that the kernel was compiled for i386 and the 9595 has a 486DX-2. |
@@ -886,7 +886,7 @@ | |||
886 | alive rotator during boottime. This makes sense, when no monitor is | 886 | alive rotator during boottime. This makes sense, when no monitor is |
887 | connected to the system. You can get rid of all display activity, if | 887 | connected to the system. You can get rid of all display activity, if |
888 | you do not use any parameter or just ibmmcascsi=activity, for the | 888 | you do not use any parameter or just ibmmcascsi=activity, for the |
889 | harddrive activity LED, existant on all PS/2, except models 8595-XXX. | 889 | harddrive activity LED, existent on all PS/2, except models 8595-XXX. |
890 | If no monitor is available, please use ibmmcascsi=display, which works | 890 | If no monitor is available, please use ibmmcascsi=display, which works |
891 | fine together with the linuxinfo utility for the LED-panel. | 891 | fine together with the linuxinfo utility for the LED-panel. |
892 | - Michael Lang | 892 | - Michael Lang |
@@ -1115,7 +1115,7 @@ | |||
1115 | If this really happens, do also send e-mail to the maintainer, as | 1115 | If this really happens, do also send e-mail to the maintainer, as |
1116 | forced detection should be never necessary. Forced detection is in | 1116 | forced detection should be never necessary. Forced detection is in |
1117 | principal some flaw of the driver adapter detection and goes into | 1117 | principal some flaw of the driver adapter detection and goes into |
1118 | bugreports. | 1118 | bug reports. |
1119 | Q: The driver screws up, if it starts to probe SCSI-devices, is there | 1119 | Q: The driver screws up, if it starts to probe SCSI-devices, is there |
1120 | some way out of it? | 1120 | some way out of it? |
1121 | A: Yes, that was some recognition problem of the correct SCSI-adapter | 1121 | A: Yes, that was some recognition problem of the correct SCSI-adapter |
@@ -1172,7 +1172,7 @@ | |||
1172 | recommended version is 3.2 or later. Here, the F/W support is in | 1172 | recommended version is 3.2 or later. Here, the F/W support is in |
1173 | a stable and reliable condition. Wide-addressing is in addition | 1173 | a stable and reliable condition. Wide-addressing is in addition |
1174 | supported. | 1174 | supported. |
1175 | Q: I get a Ooops message and something like "killing interrupt". | 1175 | Q: I get an Oops message and something like "killing interrupt". |
1176 | A: The reason for this is that the IBM SCSI-subsystem only sends a | 1176 | A: The reason for this is that the IBM SCSI-subsystem only sends a |
1177 | termination status back, if some error appeared. In former releases | 1177 | termination status back, if some error appeared. In former releases |
1178 | of the driver, it was not checked, if the termination status block | 1178 | of the driver, it was not checked, if the termination status block |
@@ -1213,21 +1213,21 @@ | |||
1213 | problem. Not yet tried, but guessing that it could work. To get this, | 1213 | problem. Not yet tried, but guessing that it could work. To get this, |
1214 | set unchecked_isa_dma argument of ibmmca.h from 0 to 1. | 1214 | set unchecked_isa_dma argument of ibmmca.h from 0 to 1. |
1215 | 1215 | ||
1216 | 5.3 Bugreports | 1216 | 5.3 Bug reports |
1217 | -------------- | 1217 | -------------- |
1218 | If you really find bugs in the sourcecode or the driver will successfully | 1218 | If you really find bugs in the source code or the driver will successfully |
1219 | refuse to work on your machine, you should send a bug report to me. The | 1219 | refuse to work on your machine, you should send a bug report to me. The |
1220 | best for this is to follow the instructions on the WWW-page for this | 1220 | best for this is to follow the instructions on the WWW-page for this |
1221 | driver. Fill out the bug-report form, placed on the WWW-page and ship it, | 1221 | driver. Fill out the bug-report form, placed on the WWW-page and ship it, |
1222 | so the bugs can be taken into account with maximum efforts. But, please | 1222 | so the bugs can be taken into account with maximum efforts. But, please |
1223 | do not send bug reports about this driver to Linus Torvalds or Leonard | 1223 | do not send bug reports about this driver to Linus Torvalds or Leonard |
1224 | Zubkoff, as Linus is burried in E-Mail and Leonard is supervising all | 1224 | Zubkoff, as Linus is buried in E-Mail and Leonard is supervising all |
1225 | SCSI-drivers and won't have the time left to look inside every single | 1225 | SCSI-drivers and won't have the time left to look inside every single |
1226 | driver to fix a bug and especially DO NOT send modified code to Linus | 1226 | driver to fix a bug and especially DO NOT send modified code to Linus |
1227 | Torvalds or Alan J. Cox which has not been checked here!!! They are both | 1227 | Torvalds or Alan J. Cox which has not been checked here!!! They are both |
1228 | quite burried in E-mail (as me, sometimes, too) and one should first check | 1228 | quite buried in E-mail (as me, sometimes, too) and one should first check |
1229 | for problems on my local teststand. Recently, I got a lot of | 1229 | for problems on my local teststand. Recently, I got a lot of |
1230 | bugreports for errors in the ibmmca.c code, which I could not imagine, but | 1230 | bug reports for errors in the ibmmca.c code, which I could not imagine, but |
1231 | a look inside some Linux-distribution showed me quite often some modified | 1231 | a look inside some Linux-distribution showed me quite often some modified |
1232 | code, which did no longer work on most other machines than the one of the | 1232 | code, which did no longer work on most other machines than the one of the |
1233 | modifier. Ok, so now that there is maintenance service available for this | 1233 | modifier. Ok, so now that there is maintenance service available for this |
@@ -1261,7 +1261,7 @@ | |||
1261 | some e-mail directly, but at least with the same information as required by | 1261 | some e-mail directly, but at least with the same information as required by |
1262 | the formular. | 1262 | the formular. |
1263 | 1263 | ||
1264 | If you have extensive bugreports, including Ooops messages and | 1264 | If you have extensive bug reports, including Oops messages and |
1265 | screen-shots, please feel free to send it directly to the address | 1265 | screen-shots, please feel free to send it directly to the address |
1266 | of the maintainer, too. The current address of the maintainer is: | 1266 | of the maintainer, too. The current address of the maintainer is: |
1267 | 1267 | ||
@@ -1318,7 +1318,7 @@ | |||
1318 | detailed bug reports and ideas for this driver (and his | 1318 | detailed bug reports and ideas for this driver (and his |
1319 | patience ;-)). | 1319 | patience ;-)). |
1320 | Alan J. Cox | 1320 | Alan J. Cox |
1321 | for his bugreports and his bold activities in cross-checking | 1321 | for his bug reports and his bold activities in cross-checking |
1322 | the driver-code with his teststand. | 1322 | the driver-code with his teststand. |
1323 | 1323 | ||
1324 | 7.2 Sponsors & Supporters | 1324 | 7.2 Sponsors & Supporters |
diff --git a/Documentation/sharedsubtree.txt b/Documentation/sharedsubtree.txt index ccf1cebe744f..736540045dc7 100644 --- a/Documentation/sharedsubtree.txt +++ b/Documentation/sharedsubtree.txt | |||
@@ -153,6 +153,7 @@ replicas continue to be exactly same. | |||
153 | #include <stdio.h> | 153 | #include <stdio.h> |
154 | #include <stdlib.h> | 154 | #include <stdlib.h> |
155 | #include <unistd.h> | 155 | #include <unistd.h> |
156 | #include <string.h> | ||
156 | #include <sys/mount.h> | 157 | #include <sys/mount.h> |
157 | #include <sys/fsuid.h> | 158 | #include <sys/fsuid.h> |
158 | 159 | ||
diff --git a/Documentation/sound/alsa/soc/DAI.txt b/Documentation/sound/alsa/soc/DAI.txt index 58cbfd01ea8f..3feeb9ecdec4 100644 --- a/Documentation/sound/alsa/soc/DAI.txt +++ b/Documentation/sound/alsa/soc/DAI.txt | |||
@@ -20,12 +20,12 @@ I2S | |||
20 | === | 20 | === |
21 | 21 | ||
22 | I2S is a common 4 wire DAI used in HiFi, STB and portable devices. The Tx and | 22 | I2S is a common 4 wire DAI used in HiFi, STB and portable devices. The Tx and |
23 | Rx lines are used for audio transmision, whilst the bit clock (BCLK) and | 23 | Rx lines are used for audio transmission, whilst the bit clock (BCLK) and |
24 | left/right clock (LRC) synchronise the link. I2S is flexible in that either the | 24 | left/right clock (LRC) synchronise the link. I2S is flexible in that either the |
25 | controller or CODEC can drive (master) the BCLK and LRC clock lines. Bit clock | 25 | controller or CODEC can drive (master) the BCLK and LRC clock lines. Bit clock |
26 | usually varies depending on the sample rate and the master system clock | 26 | usually varies depending on the sample rate and the master system clock |
27 | (SYSCLK). LRCLK is the same as the sample rate. A few devices support separate | 27 | (SYSCLK). LRCLK is the same as the sample rate. A few devices support separate |
28 | ADC and DAC LRCLK's, this allows for similtanious capture and playback at | 28 | ADC and DAC LRCLK's, this allows for simultaneous capture and playback at |
29 | different sample rates. | 29 | different sample rates. |
30 | 30 | ||
31 | I2S has several different operating modes:- | 31 | I2S has several different operating modes:- |
@@ -41,12 +41,12 @@ I2S has several different operating modes:- | |||
41 | PCM | 41 | PCM |
42 | === | 42 | === |
43 | 43 | ||
44 | PCM is another 4 wire interface, very similar to I2S, that can support a more | 44 | PCM is another 4 wire interface, very similar to I2S, which can support a more |
45 | flexible protocol. It has bit clock (BCLK) and sync (SYNC) lines that are used | 45 | flexible protocol. It has bit clock (BCLK) and sync (SYNC) lines that are used |
46 | to synchronise the link whilst the Tx and Rx lines are used to transmit and | 46 | to synchronise the link whilst the Tx and Rx lines are used to transmit and |
47 | receive the audio data. Bit clock usually varies depending on sample rate | 47 | receive the audio data. Bit clock usually varies depending on sample rate |
48 | whilst sync runs at the sample rate. PCM also supports Time Division | 48 | whilst sync runs at the sample rate. PCM also supports Time Division |
49 | Multiplexing (TDM) in that several devices can use the bus similtaniuosly (This | 49 | Multiplexing (TDM) in that several devices can use the bus simultaneously (this |
50 | is sometimes referred to as network mode). | 50 | is sometimes referred to as network mode). |
51 | 51 | ||
52 | Common PCM operating modes:- | 52 | Common PCM operating modes:- |
diff --git a/Documentation/sound/alsa/soc/clocking.txt b/Documentation/sound/alsa/soc/clocking.txt index e93960d53a1e..14930887c25f 100644 --- a/Documentation/sound/alsa/soc/clocking.txt +++ b/Documentation/sound/alsa/soc/clocking.txt | |||
@@ -2,20 +2,20 @@ Audio Clocking | |||
2 | ============== | 2 | ============== |
3 | 3 | ||
4 | This text describes the audio clocking terms in ASoC and digital audio in | 4 | This text describes the audio clocking terms in ASoC and digital audio in |
5 | general. Note: Audio clocking can be complex ! | 5 | general. Note: Audio clocking can be complex! |
6 | 6 | ||
7 | 7 | ||
8 | Master Clock | 8 | Master Clock |
9 | ------------ | 9 | ------------ |
10 | 10 | ||
11 | Every audio subsystem is driven by a master clock (sometimes refered to as MCLK | 11 | Every audio subsystem is driven by a master clock (sometimes referred to as MCLK |
12 | or SYSCLK). This audio master clock can be derived from a number of sources | 12 | or SYSCLK). This audio master clock can be derived from a number of sources |
13 | (e.g. crystal, PLL, CPU clock) and is responsible for producing the correct | 13 | (e.g. crystal, PLL, CPU clock) and is responsible for producing the correct |
14 | audio playback and capture sample rates. | 14 | audio playback and capture sample rates. |
15 | 15 | ||
16 | Some master clocks (e.g. PLL's and CPU based clocks) are configuarble in that | 16 | Some master clocks (e.g. PLL's and CPU based clocks) are configurable in that |
17 | their speed can be altered by software (depending on the system use and to save | 17 | their speed can be altered by software (depending on the system use and to save |
18 | power). Other master clocks are fixed at at set frequency (i.e. crystals). | 18 | power). Other master clocks are fixed at a set frequency (i.e. crystals). |
19 | 19 | ||
20 | 20 | ||
21 | DAI Clocks | 21 | DAI Clocks |
@@ -44,7 +44,7 @@ This relationship depends on the codec or SoC CPU in particular. In general | |||
44 | it's best to configure BCLK to the lowest possible speed (depending on your | 44 | it's best to configure BCLK to the lowest possible speed (depending on your |
45 | rate, number of channels and wordsize) to save on power. | 45 | rate, number of channels and wordsize) to save on power. |
46 | 46 | ||
47 | It's also desireable to use the codec (if possible) to drive (or master) the | 47 | It's also desirable to use the codec (if possible) to drive (or master) the |
48 | audio clocks as it's usually gives more accurate sample rates than the CPU. | 48 | audio clocks as it's usually gives more accurate sample rates than the CPU. |
49 | 49 | ||
50 | 50 | ||
diff --git a/Documentation/sound/alsa/soc/codec.txt b/Documentation/sound/alsa/soc/codec.txt index 48983c75aad9..1e766ad0ebd1 100644 --- a/Documentation/sound/alsa/soc/codec.txt +++ b/Documentation/sound/alsa/soc/codec.txt | |||
@@ -19,7 +19,7 @@ Optionally, codec drivers can also provide:- | |||
19 | 6) DAPM event handler. | 19 | 6) DAPM event handler. |
20 | 7) DAC Digital mute control. | 20 | 7) DAC Digital mute control. |
21 | 21 | ||
22 | It's probably best to use this guide in conjuction with the existing codec | 22 | It's probably best to use this guide in conjunction with the existing codec |
23 | driver code in sound/soc/codecs/ | 23 | driver code in sound/soc/codecs/ |
24 | 24 | ||
25 | ASoC Codec driver breakdown | 25 | ASoC Codec driver breakdown |
@@ -28,7 +28,7 @@ ASoC Codec driver breakdown | |||
28 | 1 - Codec DAI and PCM configuration | 28 | 1 - Codec DAI and PCM configuration |
29 | ----------------------------------- | 29 | ----------------------------------- |
30 | Each codec driver must have a struct snd_soc_codec_dai to define it's DAI and | 30 | Each codec driver must have a struct snd_soc_codec_dai to define it's DAI and |
31 | PCM's capablities and operations. This struct is exported so that it can be | 31 | PCM's capabilities and operations. This struct is exported so that it can be |
32 | registered with the core by your machine driver. | 32 | registered with the core by your machine driver. |
33 | 33 | ||
34 | e.g. | 34 | e.g. |
@@ -67,7 +67,7 @@ EXPORT_SYMBOL_GPL(wm8731_dai); | |||
67 | 67 | ||
68 | 2 - Codec control IO | 68 | 2 - Codec control IO |
69 | -------------------- | 69 | -------------------- |
70 | The codec can ususally be controlled via an I2C or SPI style interface (AC97 | 70 | The codec can usually be controlled via an I2C or SPI style interface (AC97 |
71 | combines control with data in the DAI). The codec drivers will have to provide | 71 | combines control with data in the DAI). The codec drivers will have to provide |
72 | functions to read and write the codec registers along with supplying a register | 72 | functions to read and write the codec registers along with supplying a register |
73 | cache:- | 73 | cache:- |
diff --git a/Documentation/sound/alsa/soc/dapm.txt b/Documentation/sound/alsa/soc/dapm.txt index c11877f5b4a1..ab0766fd7869 100644 --- a/Documentation/sound/alsa/soc/dapm.txt +++ b/Documentation/sound/alsa/soc/dapm.txt | |||
@@ -11,7 +11,7 @@ other PM systems. | |||
11 | 11 | ||
12 | DAPM is also completely transparent to all user space applications as all power | 12 | DAPM is also completely transparent to all user space applications as all power |
13 | switching is done within the ASoC core. No code changes or recompiling are | 13 | switching is done within the ASoC core. No code changes or recompiling are |
14 | required for user space applications. DAPM makes power switching descisions based | 14 | required for user space applications. DAPM makes power switching decisions based |
15 | upon any audio stream (capture/playback) activity and audio mixer settings | 15 | upon any audio stream (capture/playback) activity and audio mixer settings |
16 | within the device. | 16 | within the device. |
17 | 17 | ||
@@ -38,7 +38,7 @@ There are 4 power domains within DAPM | |||
38 | Enabled and disabled when stream playback/capture is started and | 38 | Enabled and disabled when stream playback/capture is started and |
39 | stopped respectively. e.g. aplay, arecord. | 39 | stopped respectively. e.g. aplay, arecord. |
40 | 40 | ||
41 | All DAPM power switching descisons are made automatically by consulting an audio | 41 | All DAPM power switching decisions are made automatically by consulting an audio |
42 | routing map of the whole machine. This map is specific to each machine and | 42 | routing map of the whole machine. This map is specific to each machine and |
43 | consists of the interconnections between every audio component (including | 43 | consists of the interconnections between every audio component (including |
44 | internal codec components). All audio components that effect power are called | 44 | internal codec components). All audio components that effect power are called |
diff --git a/Documentation/sound/alsa/soc/overview.txt b/Documentation/sound/alsa/soc/overview.txt index 753c5cc5984a..c47ce9530677 100644 --- a/Documentation/sound/alsa/soc/overview.txt +++ b/Documentation/sound/alsa/soc/overview.txt | |||
@@ -2,18 +2,19 @@ ALSA SoC Layer | |||
2 | ============== | 2 | ============== |
3 | 3 | ||
4 | The overall project goal of the ALSA System on Chip (ASoC) layer is to provide | 4 | The overall project goal of the ALSA System on Chip (ASoC) layer is to provide |
5 | better ALSA support for embedded system on chip procesors (e.g. pxa2xx, au1x00, | 5 | better ALSA support for embedded system-on-chip processors (e.g. pxa2xx, au1x00, |
6 | iMX, etc) and portable audio codecs. Currently there is some support in the | 6 | iMX, etc) and portable audio codecs. Currently there is some support in the |
7 | kernel for SoC audio, however it has some limitations:- | 7 | kernel for SoC audio, however it has some limitations:- |
8 | 8 | ||
9 | * Currently, codec drivers are often tightly coupled to the underlying SoC | 9 | * Currently, codec drivers are often tightly coupled to the underlying SoC |
10 | cpu. This is not ideal and leads to code duplication i.e. Linux now has 4 | 10 | CPU. This is not ideal and leads to code duplication i.e. Linux now has 4 |
11 | different wm8731 drivers for 4 different SoC platforms. | 11 | different wm8731 drivers for 4 different SoC platforms. |
12 | 12 | ||
13 | * There is no standard method to signal user initiated audio events. | 13 | * There is no standard method to signal user initiated audio events (e.g. |
14 | e.g. Headphone/Mic insertion, Headphone/Mic detection after an insertion | 14 | Headphone/Mic insertion, Headphone/Mic detection after an insertion |
15 | event. These are quite common events on portable devices and ofter require | 15 | event). These are quite common events on portable devices and often require |
16 | machine specific code to re route audio, enable amps etc after such an event. | 16 | machine specific code to re-route audio, enable amps, etc., after such an |
17 | event. | ||
17 | 18 | ||
18 | * Current drivers tend to power up the entire codec when playing | 19 | * Current drivers tend to power up the entire codec when playing |
19 | (or recording) audio. This is fine for a PC, but tends to waste a lot of | 20 | (or recording) audio. This is fine for a PC, but tends to waste a lot of |
@@ -44,7 +45,7 @@ features :- | |||
44 | signals the codec when to change power states. | 45 | signals the codec when to change power states. |
45 | 46 | ||
46 | * Machine specific controls: Allow machines to add controls to the sound card | 47 | * Machine specific controls: Allow machines to add controls to the sound card |
47 | e.g. volume control for speaker amp. | 48 | (e.g. volume control for speaker amp). |
48 | 49 | ||
49 | To achieve all this, ASoC basically splits an embedded audio system into 3 | 50 | To achieve all this, ASoC basically splits an embedded audio system into 3 |
50 | components :- | 51 | components :- |
@@ -57,7 +58,7 @@ components :- | |||
57 | interface drivers (e.g. I2S, AC97, PCM) for that platform. | 58 | interface drivers (e.g. I2S, AC97, PCM) for that platform. |
58 | 59 | ||
59 | * Machine driver: The machine driver handles any machine specific controls and | 60 | * Machine driver: The machine driver handles any machine specific controls and |
60 | audio events. i.e. turing on an amp at start of playback. | 61 | audio events (e.g. turning on an amp at start of playback). |
61 | 62 | ||
62 | 63 | ||
63 | Documentation | 64 | Documentation |
diff --git a/Documentation/sound/alsa/soc/platform.txt b/Documentation/sound/alsa/soc/platform.txt index e95b16d5a53b..d4678b4dc6c6 100644 --- a/Documentation/sound/alsa/soc/platform.txt +++ b/Documentation/sound/alsa/soc/platform.txt | |||
@@ -20,7 +20,7 @@ struct snd_soc_ops { | |||
20 | int (*trigger)(struct snd_pcm_substream *, int); | 20 | int (*trigger)(struct snd_pcm_substream *, int); |
21 | }; | 21 | }; |
22 | 22 | ||
23 | The platform driver exports it's DMA functionailty via struct snd_soc_platform:- | 23 | The platform driver exports its DMA functionality via struct snd_soc_platform:- |
24 | 24 | ||
25 | struct snd_soc_platform { | 25 | struct snd_soc_platform { |
26 | char *name; | 26 | char *name; |
diff --git a/Documentation/sound/alsa/soc/pops_clicks.txt b/Documentation/sound/alsa/soc/pops_clicks.txt index 2cf7ee5b3d74..3371bd9d7cfa 100644 --- a/Documentation/sound/alsa/soc/pops_clicks.txt +++ b/Documentation/sound/alsa/soc/pops_clicks.txt | |||
@@ -2,7 +2,7 @@ Audio Pops and Clicks | |||
2 | ===================== | 2 | ===================== |
3 | 3 | ||
4 | Pops and clicks are unwanted audio artifacts caused by the powering up and down | 4 | Pops and clicks are unwanted audio artifacts caused by the powering up and down |
5 | of components within the audio subsystem. This is noticable on PC's when an | 5 | of components within the audio subsystem. This is noticeable on PCs when an |
6 | audio module is either loaded or unloaded (at module load time the sound card is | 6 | audio module is either loaded or unloaded (at module load time the sound card is |
7 | powered up and causes a popping noise on the speakers). | 7 | powered up and causes a popping noise on the speakers). |
8 | 8 | ||
@@ -16,7 +16,7 @@ Minimising Playback Pops and Clicks | |||
16 | =================================== | 16 | =================================== |
17 | 17 | ||
18 | Playback pops in portable audio subsystems cannot be completely eliminated atm, | 18 | Playback pops in portable audio subsystems cannot be completely eliminated atm, |
19 | however future audio codec hardware will have better pop and click supression. | 19 | however future audio codec hardware will have better pop and click suppression. |
20 | Pops can be reduced within playback by powering the audio components in a | 20 | Pops can be reduced within playback by powering the audio components in a |
21 | specific order. This order is different for startup and shutdown and follows | 21 | specific order. This order is different for startup and shutdown and follows |
22 | some basic rules:- | 22 | some basic rules:- |
@@ -33,7 +33,7 @@ Minimising Capture Pops and Clicks | |||
33 | ================================== | 33 | ================================== |
34 | 34 | ||
35 | Capture artifacts are somewhat easier to get rid as we can delay activating the | 35 | Capture artifacts are somewhat easier to get rid as we can delay activating the |
36 | ADC until all the pops have occured. This follows similar power rules to | 36 | ADC until all the pops have occurred. This follows similar power rules to |
37 | playback in that components are powered in a sequence depending upon stream | 37 | playback in that components are powered in a sequence depending upon stream |
38 | startup or shutdown. | 38 | startup or shutdown. |
39 | 39 | ||
diff --git a/Documentation/spi/pxa2xx b/Documentation/spi/pxa2xx index 215e3b8e7266..f3853cc37bde 100644 --- a/Documentation/spi/pxa2xx +++ b/Documentation/spi/pxa2xx | |||
@@ -1,4 +1,4 @@ | |||
1 | PXA2xx SPI on SSP driver HOWTO | 1 | PXA2xx SPI on SSP driver HOWTO |
2 | =================================================== | 2 | =================================================== |
3 | This a mini howto on the pxa2xx_spi driver. The driver turns a PXA2xx | 3 | This a mini howto on the pxa2xx_spi driver. The driver turns a PXA2xx |
4 | synchronous serial port into a SPI master controller | 4 | synchronous serial port into a SPI master controller |
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt index 3b95bbacc775..ec499265deca 100644 --- a/Documentation/thinkpad-acpi.txt +++ b/Documentation/thinkpad-acpi.txt | |||
@@ -1035,7 +1035,7 @@ enable it if necessary to avoid overheating. | |||
1035 | 1035 | ||
1036 | An enabled fan in level "auto" may stop spinning if the EC decides the | 1036 | An enabled fan in level "auto" may stop spinning if the EC decides the |
1037 | ThinkPad is cool enough and doesn't need the extra airflow. This is | 1037 | ThinkPad is cool enough and doesn't need the extra airflow. This is |
1038 | normal, and the EC will spin the fan up if the varios thermal readings | 1038 | normal, and the EC will spin the fan up if the various thermal readings |
1039 | rise too much. | 1039 | rise too much. |
1040 | 1040 | ||
1041 | On the X40, this seems to depend on the CPU and HDD temperatures. | 1041 | On the X40, this seems to depend on the CPU and HDD temperatures. |
@@ -1203,7 +1203,7 @@ for example: | |||
1203 | Enabling debugging output | 1203 | Enabling debugging output |
1204 | ------------------------- | 1204 | ------------------------- |
1205 | 1205 | ||
1206 | The module takes a debug paramater which can be used to selectively | 1206 | The module takes a debug parameter which can be used to selectively |
1207 | enable various classes of debugging output, for example: | 1207 | enable various classes of debugging output, for example: |
1208 | 1208 | ||
1209 | modprobe ibm_acpi debug=0xffff | 1209 | modprobe ibm_acpi debug=0xffff |
diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt index 4e0b62b8566f..8b077e43eee7 100644 --- a/Documentation/usb/usb-serial.txt +++ b/Documentation/usb/usb-serial.txt | |||
@@ -338,7 +338,7 @@ MCT USB Single Port Serial Adapter U232 | |||
338 | This driver is for the MCT USB-RS232 Converter (25 pin, Model No. | 338 | This driver is for the MCT USB-RS232 Converter (25 pin, Model No. |
339 | U232-P25) from Magic Control Technology Corp. (there is also a 9 pin | 339 | U232-P25) from Magic Control Technology Corp. (there is also a 9 pin |
340 | Model No. U232-P9). More information about this device can be found at | 340 | Model No. U232-P9). More information about this device can be found at |
341 | the manufacture's web-site: http://www.mct.com.tw. | 341 | the manufacturer's web-site: http://www.mct.com.tw. |
342 | 342 | ||
343 | The driver is generally working, though it still needs some more testing. | 343 | The driver is generally working, though it still needs some more testing. |
344 | It is derived from the Belkin USB Serial Adapter F5U103 driver and its | 344 | It is derived from the Belkin USB Serial Adapter F5U103 driver and its |
diff --git a/MAINTAINERS b/MAINTAINERS index 2534dc4aa95a..4ed41394e492 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2178,7 +2178,7 @@ S: Maintained | |||
2178 | KCONFIG | 2178 | KCONFIG |
2179 | P: Roman Zippel | 2179 | P: Roman Zippel |
2180 | M: zippel@linux-m68k.org | 2180 | M: zippel@linux-m68k.org |
2181 | L: kbuild-devel@lists.sourceforge.net | 2181 | L: linux-kbuild@vger.kernel.org |
2182 | S: Maintained | 2182 | S: Maintained |
2183 | 2183 | ||
2184 | KDUMP | 2184 | KDUMP |
@@ -2207,6 +2207,7 @@ KERNEL BUILD (kbuild: Makefile, scripts/Makefile.*) | |||
2207 | P: Sam Ravnborg | 2207 | P: Sam Ravnborg |
2208 | M: sam@ravnborg.org | 2208 | M: sam@ravnborg.org |
2209 | T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git | 2209 | T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git |
2210 | L: linux-kbuild@vger.kernel.org | ||
2210 | S: Maintained | 2211 | S: Maintained |
2211 | 2212 | ||
2212 | KERNEL JANITORS | 2213 | KERNEL JANITORS |
@@ -887,10 +887,7 @@ prepare2: prepare3 outputmakefile | |||
887 | 887 | ||
888 | prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \ | 888 | prepare1: prepare2 include/linux/version.h include/linux/utsrelease.h \ |
889 | include/asm include/config/auto.conf | 889 | include/asm include/config/auto.conf |
890 | ifneq ($(KBUILD_MODULES),) | 890 | $(cmd_crmodverdir) |
891 | $(Q)mkdir -p $(MODVERDIR) | ||
892 | $(Q)rm -f $(MODVERDIR)/* | ||
893 | endif | ||
894 | 891 | ||
895 | archprepare: prepare1 scripts_basic | 892 | archprepare: prepare1 scripts_basic |
896 | 893 | ||
@@ -906,14 +903,24 @@ prepare: prepare0 | |||
906 | 903 | ||
907 | export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) | 904 | export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) |
908 | 905 | ||
909 | # FIXME: The asm symlink changes when $(ARCH) changes. That's | 906 | # The asm symlink changes when $(ARCH) changes. |
910 | # hard to detect, but I suppose "make mrproper" is a good idea | 907 | # Detect this and ask user to run make mrproper |
911 | # before switching between archs anyway. | 908 | |
912 | 909 | include/asm: FORCE | |
913 | include/asm: | 910 | $(Q)set -e; asmlink=`readlink include/asm | cut -d '-' -f 2`; \ |
914 | @echo ' SYMLINK $@ -> include/asm-$(SRCARCH)' | 911 | if [ -L include/asm ]; then \ |
915 | $(Q)if [ ! -d include ]; then mkdir -p include; fi; | 912 | if [ "$$asmlink" != "$(SRCARCH)" ]; then \ |
916 | @ln -fsn asm-$(SRCARCH) $@ | 913 | echo "ERROR: the symlink $@ points to asm-$$asmlink but asm-$(SRCARCH) was expected"; \ |
914 | echo " set ARCH or save .config and run 'make mrproper' to fix it"; \ | ||
915 | exit 1; \ | ||
916 | fi; \ | ||
917 | else \ | ||
918 | echo ' SYMLINK $@ -> include/asm-$(SRCARCH)'; \ | ||
919 | if [ ! -d include ]; then \ | ||
920 | mkdir -p include; \ | ||
921 | fi; \ | ||
922 | ln -fsn asm-$(SRCARCH) $@; \ | ||
923 | fi | ||
917 | 924 | ||
918 | # Generate some files | 925 | # Generate some files |
919 | # --------------------------------------------------------------------------- | 926 | # --------------------------------------------------------------------------- |
@@ -1023,19 +1030,12 @@ _modinst_: | |||
1023 | fi | 1030 | fi |
1024 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst | 1031 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst |
1025 | 1032 | ||
1026 | # If System.map exists, run depmod. This deliberately does not have a | 1033 | # This depmod is only for convenience to give the initial |
1027 | # dependency on System.map since that would run the dependency tree on | ||
1028 | # vmlinux. This depmod is only for convenience to give the initial | ||
1029 | # boot a modules.dep even before / is mounted read-write. However the | 1034 | # boot a modules.dep even before / is mounted read-write. However the |
1030 | # boot script depmod is the master version. | 1035 | # boot script depmod is the master version. |
1031 | ifeq "$(strip $(INSTALL_MOD_PATH))" "" | ||
1032 | depmod_opts := | ||
1033 | else | ||
1034 | depmod_opts := -b $(INSTALL_MOD_PATH) -r | ||
1035 | endif | ||
1036 | PHONY += _modinst_post | 1036 | PHONY += _modinst_post |
1037 | _modinst_post: _modinst_ | 1037 | _modinst_post: _modinst_ |
1038 | if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi | 1038 | $(call cmd,depmod) |
1039 | 1039 | ||
1040 | else # CONFIG_MODULES | 1040 | else # CONFIG_MODULES |
1041 | 1041 | ||
@@ -1223,8 +1223,7 @@ else # KBUILD_EXTMOD | |||
1223 | KBUILD_MODULES := 1 | 1223 | KBUILD_MODULES := 1 |
1224 | PHONY += crmodverdir | 1224 | PHONY += crmodverdir |
1225 | crmodverdir: | 1225 | crmodverdir: |
1226 | $(Q)mkdir -p $(MODVERDIR) | 1226 | $(cmd_crmodverdir) |
1227 | $(Q)rm -f $(MODVERDIR)/* | ||
1228 | 1227 | ||
1229 | PHONY += $(objtree)/Module.symvers | 1228 | PHONY += $(objtree)/Module.symvers |
1230 | $(objtree)/Module.symvers: | 1229 | $(objtree)/Module.symvers: |
@@ -1252,15 +1251,6 @@ _emodinst_: | |||
1252 | $(Q)mkdir -p $(MODLIB)/$(install-dir) | 1251 | $(Q)mkdir -p $(MODLIB)/$(install-dir) |
1253 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst | 1252 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst |
1254 | 1253 | ||
1255 | # Run depmod only is we have System.map and depmod is executable | ||
1256 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) | ||
1257 | cmd_depmod = if [ -r System.map -a -x $(DEPMOD) ]; then \ | ||
1258 | $(DEPMOD) -ae -F System.map \ | ||
1259 | $(if $(strip $(INSTALL_MOD_PATH)), \ | ||
1260 | -b $(INSTALL_MOD_PATH) -r) \ | ||
1261 | $(KERNELRELEASE); \ | ||
1262 | fi | ||
1263 | |||
1264 | PHONY += _emodinst_post | 1254 | PHONY += _emodinst_post |
1265 | _emodinst_post: _emodinst_ | 1255 | _emodinst_post: _emodinst_ |
1266 | $(call cmd,depmod) | 1256 | $(call cmd,depmod) |
@@ -1344,7 +1334,7 @@ define find-sources | |||
1344 | find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ | 1334 | find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ |
1345 | -name $1 -print; \ | 1335 | -name $1 -print; \ |
1346 | find $(__srctree) $(RCS_FIND_IGNORE) \ | 1336 | find $(__srctree) $(RCS_FIND_IGNORE) \ |
1347 | \( -name include -o -name arch \) -prune -o \ | 1337 | \( -name include -o -name arch -o -name '.tmp_*' \) -prune -o \ |
1348 | -name $1 -print; \ | 1338 | -name $1 -print; \ |
1349 | ) | 1339 | ) |
1350 | endef | 1340 | endef |
@@ -1493,9 +1483,11 @@ endif | |||
1493 | 1483 | ||
1494 | # Modules | 1484 | # Modules |
1495 | / %/: prepare scripts FORCE | 1485 | / %/: prepare scripts FORCE |
1486 | $(cmd_crmodverdir) | ||
1496 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ | 1487 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ |
1497 | $(build)=$(build-dir) | 1488 | $(build)=$(build-dir) |
1498 | %.ko: prepare scripts FORCE | 1489 | %.ko: prepare scripts FORCE |
1490 | $(cmd_crmodverdir) | ||
1499 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ | 1491 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ |
1500 | $(build)=$(build-dir) $(@:.ko=.o) | 1492 | $(build)=$(build-dir) $(@:.ko=.o) |
1501 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost | 1493 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost |
@@ -1509,6 +1501,19 @@ quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) | |||
1509 | quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) | 1501 | quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) |
1510 | cmd_rmfiles = rm -f $(rm-files) | 1502 | cmd_rmfiles = rm -f $(rm-files) |
1511 | 1503 | ||
1504 | # Run depmod only is we have System.map and depmod is executable | ||
1505 | # and we build for the host arch | ||
1506 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) | ||
1507 | cmd_depmod = \ | ||
1508 | if [ -r System.map -a -x $(DEPMOD) -a "$(SUBARCH)" == "$(ARCH)" ]; then \ | ||
1509 | $(DEPMOD) -ae -F System.map \ | ||
1510 | $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) -r) \ | ||
1511 | $(KERNELRELEASE); \ | ||
1512 | fi | ||
1513 | |||
1514 | # Create temporary dir for module support files | ||
1515 | cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR); rm -f $(MODVERDIR)/* | ||
1516 | |||
1512 | 1517 | ||
1513 | a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ | 1518 | a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ |
1514 | $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ | 1519 | $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \ |
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c index f2956ac8dccc..497877bf2012 100644 --- a/arch/alpha/kernel/err_marvel.c +++ b/arch/alpha/kernel/err_marvel.c | |||
@@ -1082,7 +1082,7 @@ marvel_machine_check(u64 vector, u64 la_ptr) | |||
1082 | } | 1082 | } |
1083 | 1083 | ||
1084 | /* | 1084 | /* |
1085 | * A system event or error has occured, handle it here. | 1085 | * A system event or error has occurred, handle it here. |
1086 | * | 1086 | * |
1087 | * Any errors in the logout frame have already been cleared by the | 1087 | * Any errors in the logout frame have already been cleared by the |
1088 | * PALcode, so just parse it. | 1088 | * PALcode, so just parse it. |
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c index 543d96d7fa2b..6f3867877d9e 100644 --- a/arch/alpha/kernel/err_titan.c +++ b/arch/alpha/kernel/err_titan.c | |||
@@ -591,7 +591,7 @@ privateer_process_680_frame(struct el_common *mchk_header, int print) | |||
591 | (struct el_PRIVATEER_envdata_mcheck *) | 591 | (struct el_PRIVATEER_envdata_mcheck *) |
592 | ((unsigned long)mchk_header + mchk_header->sys_offset); | 592 | ((unsigned long)mchk_header + mchk_header->sys_offset); |
593 | 593 | ||
594 | /* TODO - catagorize errors, for now, no error */ | 594 | /* TODO - categorize errors, for now, no error */ |
595 | 595 | ||
596 | if (!print) | 596 | if (!print) |
597 | return status; | 597 | return status; |
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index ce857158c1ea..6413c5f23226 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c | |||
@@ -715,7 +715,7 @@ osf_setsysinfo(unsigned long op, void __user *buffer, unsigned long nbytes, | |||
715 | /* | 715 | /* |
716 | * Alpha Architecture Handbook 4.7.7.3: | 716 | * Alpha Architecture Handbook 4.7.7.3: |
717 | * To be fully IEEE compiant, we must track the current IEEE | 717 | * To be fully IEEE compiant, we must track the current IEEE |
718 | * exception state in software, because spurrious bits can be | 718 | * exception state in software, because spurious bits can be |
719 | * set in the trap shadow of a software-complete insn. | 719 | * set in the trap shadow of a software-complete insn. |
720 | */ | 720 | */ |
721 | 721 | ||
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index ad176441be55..f4ab233201b2 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -439,7 +439,6 @@ setup_smp(void) | |||
439 | ((char *)cpubase + i*hwrpb->processor_size); | 439 | ((char *)cpubase + i*hwrpb->processor_size); |
440 | if ((cpu->flags & 0x1cc) == 0x1cc) { | 440 | if ((cpu->flags & 0x1cc) == 0x1cc) { |
441 | smp_num_probed++; | 441 | smp_num_probed++; |
442 | /* Assume here that "whami" == index */ | ||
443 | cpu_set(i, cpu_present_map); | 442 | cpu_set(i, cpu_present_map); |
444 | cpu->pal_revision = boot_cpu_palrev; | 443 | cpu->pal_revision = boot_cpu_palrev; |
445 | } | 444 | } |
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c index 49bedfbbd31b..d187d01d2a17 100644 --- a/arch/alpha/kernel/sys_alcor.c +++ b/arch/alpha/kernel/sys_alcor.c | |||
@@ -138,7 +138,7 @@ alcor_init_irq(void) | |||
138 | 138 | ||
139 | for (i = 16; i < 48; ++i) { | 139 | for (i = 16; i < 48; ++i) { |
140 | /* On Alcor, at least, lines 20..30 are not connected | 140 | /* On Alcor, at least, lines 20..30 are not connected |
141 | and can generate spurrious interrupts if we turn them | 141 | and can generate spurious interrupts if we turn them |
142 | on while IRQ probing. */ | 142 | on while IRQ probing. */ |
143 | if (i >= 16+20 && i <= 16+30) | 143 | if (i >= 16+20 && i <= 16+30) |
144 | continue; | 144 | continue; |
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c index 14b5a753aba5..ee7b9009ebb4 100644 --- a/arch/alpha/kernel/sys_sio.c +++ b/arch/alpha/kernel/sys_sio.c | |||
@@ -78,7 +78,7 @@ alphabook1_init_arch(void) | |||
78 | * example, sound boards seem to like using IRQ 9. | 78 | * example, sound boards seem to like using IRQ 9. |
79 | * | 79 | * |
80 | * This is NOT how we should do it. PIRQ0-X should have | 80 | * This is NOT how we should do it. PIRQ0-X should have |
81 | * their own IRQ's, the way intel uses the IO-APIC irq's. | 81 | * their own IRQs, the way intel uses the IO-APIC IRQs. |
82 | */ | 82 | */ |
83 | 83 | ||
84 | static void __init | 84 | static void __init |
diff --git a/arch/alpha/lib/checksum.c b/arch/alpha/lib/checksum.c index 8698e0746f9f..199f6efa83fa 100644 --- a/arch/alpha/lib/checksum.c +++ b/arch/alpha/lib/checksum.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * in an architecture-specific manner due to speed.. | 5 | * in an architecture-specific manner due to speed.. |
6 | * Comments in other versions indicate that the algorithms are from RFC1071 | 6 | * Comments in other versions indicate that the algorithms are from RFC1071 |
7 | * | 7 | * |
8 | * accellerated versions (and 21264 assembly versions ) contributed by | 8 | * accelerated versions (and 21264 assembly versions ) contributed by |
9 | * Rick Gorton <rick.gorton@alpha-processor.com> | 9 | * Rick Gorton <rick.gorton@alpha-processor.com> |
10 | */ | 10 | */ |
11 | 11 | ||
diff --git a/arch/alpha/lib/csum_partial_copy.c b/arch/alpha/lib/csum_partial_copy.c index 4ca75c74ce90..40736da9bea8 100644 --- a/arch/alpha/lib/csum_partial_copy.c +++ b/arch/alpha/lib/csum_partial_copy.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * csum_partial_copy - do IP checksumming and copy | 2 | * csum_partial_copy - do IP checksumming and copy |
3 | * | 3 | * |
4 | * (C) Copyright 1996 Linus Torvalds | 4 | * (C) Copyright 1996 Linus Torvalds |
5 | * accellerated versions (and 21264 assembly versions ) contributed by | 5 | * accelerated versions (and 21264 assembly versions ) contributed by |
6 | * Rick Gorton <rick.gorton@alpha-processor.com> | 6 | * Rick Gorton <rick.gorton@alpha-processor.com> |
7 | * | 7 | * |
8 | * Don't look at this too closely - you'll go mad. The things | 8 | * Don't look at this too closely - you'll go mad. The things |
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index 5e6da47779a4..40c15e7301de 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c | |||
@@ -235,7 +235,7 @@ callback_init(void * kernel_end) | |||
235 | unsigned long pfn = crb->map[i].pa >> PAGE_SHIFT; | 235 | unsigned long pfn = crb->map[i].pa >> PAGE_SHIFT; |
236 | crb->map[i].va = vaddr; | 236 | crb->map[i].va = vaddr; |
237 | for (j = 0; j < crb->map[i].count; ++j) { | 237 | for (j = 0; j < crb->map[i].count; ++j) { |
238 | /* Newer console's (especially on larger | 238 | /* Newer consoles (especially on larger |
239 | systems) may require more pages of | 239 | systems) may require more pages of |
240 | PTEs. Grab additional pages as needed. */ | 240 | PTEs. Grab additional pages as needed. */ |
241 | if (pmd != pmd_offset(pgd, vaddr)) { | 241 | if (pmd != pmd_offset(pgd, vaddr)) { |
diff --git a/arch/alpha/oprofile/op_impl.h b/arch/alpha/oprofile/op_impl.h index 6b97893c1a80..b2b87ae9a353 100644 --- a/arch/alpha/oprofile/op_impl.h +++ b/arch/alpha/oprofile/op_impl.h | |||
@@ -38,7 +38,7 @@ struct op_register_config { | |||
38 | unsigned long need_reset; | 38 | unsigned long need_reset; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* Per-architecture configury and hooks. */ | 41 | /* Per-architecture configuration and hooks. */ |
42 | struct op_axp_model { | 42 | struct op_axp_model { |
43 | void (*reg_setup) (struct op_register_config *, | 43 | void (*reg_setup) (struct op_register_config *, |
44 | struct op_counter_config *, | 44 | struct op_counter_config *, |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4cee938df01e..a0cdaafa115b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -851,7 +851,7 @@ config KEXEC | |||
851 | help | 851 | help |
852 | kexec is a system call that implements the ability to shutdown your | 852 | kexec is a system call that implements the ability to shutdown your |
853 | current kernel, and to start another kernel. It is like a reboot | 853 | current kernel, and to start another kernel. It is like a reboot |
854 | but it is indepedent of the system firmware. And like a reboot | 854 | but it is independent of the system firmware. And like a reboot |
855 | you can start any kernel with it, not just Linux. | 855 | you can start any kernel with it, not just Linux. |
856 | 856 | ||
857 | It is an ongoing process to be certain the hardware in a machine | 857 | It is an ongoing process to be certain the hardware in a machine |
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index ba4a1bb3ee40..aa2d365c93fb 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -439,7 +439,7 @@ void __init at91_gpio_irq_setup(void) | |||
439 | for (i = 0; i < 32; i++, pin++) { | 439 | for (i = 0; i < 32; i++, pin++) { |
440 | /* | 440 | /* |
441 | * Can use the "simple" and not "edge" handler since it's | 441 | * Can use the "simple" and not "edge" handler since it's |
442 | * shorter, and the AIC handles interupts sanely. | 442 | * shorter, and the AIC handles interrupts sanely. |
443 | */ | 443 | */ |
444 | set_irq_chip(pin, &gpio_irqchip); | 444 | set_irq_chip(pin, &gpio_irqchip); |
445 | set_irq_handler(pin, handle_simple_irq); | 445 | set_irq_handler(pin, handle_simple_irq); |
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c index 0733078940fa..1da9d59a0347 100644 --- a/arch/arm/mach-omap1/irq.c +++ b/arch/arm/mach-omap1/irq.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2004 Nokia Corporation | 6 | * Copyright (C) 2004 Nokia Corporation |
7 | * Written by Tony Lindgren <tony@atomide.com> | 7 | * Written by Tony Lindgren <tony@atomide.com> |
8 | * Major cleanups by Juha Yrjölä <juha.yrjola@nokia.com> | 8 | * Major cleanups by Juha Yrjölä <juha.yrjola@nokia.com> |
9 | * | 9 | * |
10 | * Completely re-written to support various OMAP chips with bank specific | 10 | * Completely re-written to support various OMAP chips with bank specific |
11 | * interrupt handlers. | 11 | * interrupt handlers. |
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 62e801ef9ad9..8d322c20ccae 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2005 Nokia Corporation | 6 | * Copyright (C) 2005 Nokia Corporation |
7 | * Author: Paul Mundt <paul.mundt@nokia.com> | 7 | * Author: Paul Mundt <paul.mundt@nokia.com> |
8 | * Juha Yrjölä <juha.yrjola@nokia.com> | 8 | * Juha Yrjölä <juha.yrjola@nokia.com> |
9 | * OMAP Dual-mode timer framework support by Timo Teras | 9 | * OMAP Dual-mode timer framework support by Timo Teras |
10 | * | 10 | * |
11 | * Some parts based off of TI's 24xx code: | 11 | * Some parts based off of TI's 24xx code: |
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index cab9d6265e9e..2bfaa6102025 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c | |||
@@ -238,7 +238,7 @@ int __init s3c2410_baseclk_add(void) | |||
238 | } | 238 | } |
239 | 239 | ||
240 | /* We must be careful disabling the clocks we are not intending to | 240 | /* We must be careful disabling the clocks we are not intending to |
241 | * be using at boot time, as subsytems such as the LCD which do | 241 | * be using at boot time, as subsystems such as the LCD which do |
242 | * their own DMA requests to the bus can cause the system to lockup | 242 | * their own DMA requests to the bus can cause the system to lockup |
243 | * if they where in the middle of requesting bus access. | 243 | * if they where in the middle of requesting bus access. |
244 | * | 244 | * |
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c index 8543dd6df391..458993601897 100644 --- a/arch/arm/mach-s3c2412/clock.c +++ b/arch/arm/mach-s3c2412/clock.c | |||
@@ -689,7 +689,7 @@ int __init s3c2412_baseclk_add(void) | |||
689 | } | 689 | } |
690 | 690 | ||
691 | /* We must be careful disabling the clocks we are not intending to | 691 | /* We must be careful disabling the clocks we are not intending to |
692 | * be using at boot time, as subsytems such as the LCD which do | 692 | * be using at boot time, as subsystems such as the LCD which do |
693 | * their own DMA requests to the bus can cause the system to lockup | 693 | * their own DMA requests to the bus can cause the system to lockup |
694 | * if they where in the middle of requesting bus access. | 694 | * if they where in the middle of requesting bus access. |
695 | * | 695 | * |
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index 58402948c47c..b42f956738d0 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c | |||
@@ -1005,7 +1005,7 @@ void __init s3c2443_init_clocks(int xtal) | |||
1005 | } | 1005 | } |
1006 | 1006 | ||
1007 | /* We must be careful disabling the clocks we are not intending to | 1007 | /* We must be careful disabling the clocks we are not intending to |
1008 | * be using at boot time, as subsytems such as the LCD which do | 1008 | * be using at boot time, as subsystems such as the LCD which do |
1009 | * their own DMA requests to the bus can cause the system to lockup | 1009 | * their own DMA requests to the bus can cause the system to lockup |
1010 | * if they where in the middle of requesting bus access. | 1010 | * if they where in the middle of requesting bus access. |
1011 | * | 1011 | * |
diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h index 0090b19bbe61..786e4c96156d 100644 --- a/arch/arm/nwfpe/fpopcode.h +++ b/arch/arm/nwfpe/fpopcode.h | |||
@@ -78,11 +78,11 @@ TABLE 1 | |||
78 | +-------------------------+---+---+---------+---------+ | 78 | +-------------------------+---+---+---------+---------+ |
79 | | Precision | u | v | FPSR.EP | length | | 79 | | Precision | u | v | FPSR.EP | length | |
80 | +-------------------------+---+---+---------+---------+ | 80 | +-------------------------+---+---+---------+---------+ |
81 | | Single | 0 ü 0 | x | 1 words | | 81 | | Single | 0 | 0 | x | 1 words | |
82 | | Double | 1 ü 1 | x | 2 words | | 82 | | Double | 1 | 1 | x | 2 words | |
83 | | Extended | 1 ü 1 | x | 3 words | | 83 | | Extended | 1 | 1 | x | 3 words | |
84 | | Packed decimal | 1 ü 1 | 0 | 3 words | | 84 | | Packed decimal | 1 | 1 | 0 | 3 words | |
85 | | Expanded packed decimal | 1 ü 1 | 1 | 4 words | | 85 | | Expanded packed decimal | 1 | 1 | 1 | 4 words | |
86 | +-------------------------+---+---+---------+---------+ | 86 | +-------------------------+---+---+---------+---------+ |
87 | Note: x = don't care | 87 | Note: x = don't care |
88 | */ | 88 | */ |
@@ -92,10 +92,10 @@ TABLE 2 | |||
92 | +---+---+---------------------------------+ | 92 | +---+---+---------------------------------+ |
93 | | w | x | Number of registers to transfer | | 93 | | w | x | Number of registers to transfer | |
94 | +---+---+---------------------------------+ | 94 | +---+---+---------------------------------+ |
95 | | 0 ü 1 | 1 | | 95 | | 0 | 1 | 1 | |
96 | | 1 ü 0 | 2 | | 96 | | 1 | 0 | 2 | |
97 | | 1 ü 1 | 3 | | 97 | | 1 | 1 | 3 | |
98 | | 0 ü 0 | 4 | | 98 | | 0 | 0 | 4 | |
99 | +---+---+---------------------------------+ | 99 | +---+---+---------------------------------+ |
100 | */ | 100 | */ |
101 | 101 | ||
@@ -156,10 +156,10 @@ TABLE 5 | |||
156 | +-------------------------+---+---+ | 156 | +-------------------------+---+---+ |
157 | | Rounding Precision | e | f | | 157 | | Rounding Precision | e | f | |
158 | +-------------------------+---+---+ | 158 | +-------------------------+---+---+ |
159 | | IEEE Single precision | 0 ü 0 | | 159 | | IEEE Single precision | 0 | 0 | |
160 | | IEEE Double precision | 0 ü 1 | | 160 | | IEEE Double precision | 0 | 1 | |
161 | | IEEE Extended precision | 1 ü 0 | | 161 | | IEEE Extended precision | 1 | 0 | |
162 | | undefined (trap) | 1 ü 1 | | 162 | | undefined (trap) | 1 | 1 | |
163 | +-------------------------+---+---+ | 163 | +-------------------------+---+---+ |
164 | */ | 164 | */ |
165 | 165 | ||
@@ -168,10 +168,10 @@ TABLE 5 | |||
168 | +---------------------------------+---+---+ | 168 | +---------------------------------+---+---+ |
169 | | Rounding Mode | g | h | | 169 | | Rounding Mode | g | h | |
170 | +---------------------------------+---+---+ | 170 | +---------------------------------+---+---+ |
171 | | Round to nearest (default) | 0 ü 0 | | 171 | | Round to nearest (default) | 0 | 0 | |
172 | | Round toward plus infinity | 0 ü 1 | | 172 | | Round toward plus infinity | 0 | 1 | |
173 | | Round toward negative infinity | 1 ü 0 | | 173 | | Round toward negative infinity | 1 | 0 | |
174 | | Round toward zero | 1 ü 1 | | 174 | | Round toward zero | 1 | 1 | |
175 | +---------------------------------+---+---+ | 175 | +---------------------------------+---+---+ |
176 | */ | 176 | */ |
177 | 177 | ||
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 05a38498cbe0..dcbba07cf98a 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/arch/arm/plat-omap/dma.c | 2 | * linux/arch/arm/plat-omap/dma.c |
3 | * | 3 | * |
4 | * Copyright (C) 2003 Nokia Corporation | 4 | * Copyright (C) 2003 Nokia Corporation |
5 | * Author: Juha Yrjölä <juha.yrjola@nokia.com> | 5 | * Author: Juha Yrjölä <juha.yrjola@nokia.com> |
6 | * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@nokia.com> | 6 | * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@nokia.com> |
7 | * Graphics DMA and LCD DMA graphics tranformations | 7 | * Graphics DMA and LCD DMA graphics tranformations |
8 | * by Imre Deak <imre.deak@nokia.com> | 8 | * by Imre Deak <imre.deak@nokia.com> |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 337455dfe64d..6097753394ad 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Support functions for OMAP GPIO | 4 | * Support functions for OMAP GPIO |
5 | * | 5 | * |
6 | * Copyright (C) 2003-2005 Nokia Corporation | 6 | * Copyright (C) 2003-2005 Nokia Corporation |
7 | * Written by Juha Yrjölä <juha.yrjola@nokia.com> | 7 | * Written by Juha Yrjölä <juha.yrjola@nokia.com> |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index d12346aaa88b..bbecbd8469b5 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -189,7 +189,7 @@ config CMDLINE | |||
189 | 189 | ||
190 | endmenu | 190 | endmenu |
191 | 191 | ||
192 | menu "Power managment options" | 192 | menu "Power management options" |
193 | 193 | ||
194 | menu "CPU Frequency scaling" | 194 | menu "CPU Frequency scaling" |
195 | 195 | ||
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 4c5ca9d5e40f..ad28dc76fc97 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -613,85 +613,86 @@ config I_ENTRY_L1 | |||
613 | bool "Locate interrupt entry code in L1 Memory" | 613 | bool "Locate interrupt entry code in L1 Memory" |
614 | default y | 614 | default y |
615 | help | 615 | help |
616 | If enabled interrupt entry code (STORE/RESTORE CONTEXT) is linked | 616 | If enabled, interrupt entry code (STORE/RESTORE CONTEXT) is linked |
617 | into L1 instruction memory.(less latency) | 617 | into L1 instruction memory. (less latency) |
618 | 618 | ||
619 | config EXCPT_IRQ_SYSC_L1 | 619 | config EXCPT_IRQ_SYSC_L1 |
620 | bool "Locate entire ASM lowlevel excepetion / interrupt - Syscall and CPLB handler code in L1 Memory" | 620 | bool "Locate entire ASM lowlevel exception / interrupt - Syscall and CPLB handler code in L1 Memory" |
621 | default y | 621 | default y |
622 | help | 622 | help |
623 | If enabled entire ASM lowlevel exception and interrupt entry code (STORE/RESTORE CONTEXT) is linked | 623 | If enabled, the entire ASM lowlevel exception and interrupt entry code |
624 | into L1 instruction memory.(less latency) | 624 | (STORE/RESTORE CONTEXT) is linked into L1 instruction memory. |
625 | (less latency) | ||
625 | 626 | ||
626 | config DO_IRQ_L1 | 627 | config DO_IRQ_L1 |
627 | bool "Locate frequently called do_irq dispatcher function in L1 Memory" | 628 | bool "Locate frequently called do_irq dispatcher function in L1 Memory" |
628 | default y | 629 | default y |
629 | help | 630 | help |
630 | If enabled frequently called do_irq dispatcher function is linked | 631 | If enabled, the frequently called do_irq dispatcher function is linked |
631 | into L1 instruction memory.(less latency) | 632 | into L1 instruction memory. (less latency) |
632 | 633 | ||
633 | config CORE_TIMER_IRQ_L1 | 634 | config CORE_TIMER_IRQ_L1 |
634 | bool "Locate frequently called timer_interrupt() function in L1 Memory" | 635 | bool "Locate frequently called timer_interrupt() function in L1 Memory" |
635 | default y | 636 | default y |
636 | help | 637 | help |
637 | If enabled frequently called timer_interrupt() function is linked | 638 | If enabled, the frequently called timer_interrupt() function is linked |
638 | into L1 instruction memory.(less latency) | 639 | into L1 instruction memory. (less latency) |
639 | 640 | ||
640 | config IDLE_L1 | 641 | config IDLE_L1 |
641 | bool "Locate frequently idle function in L1 Memory" | 642 | bool "Locate frequently idle function in L1 Memory" |
642 | default y | 643 | default y |
643 | help | 644 | help |
644 | If enabled frequently called idle function is linked | 645 | If enabled, the frequently called idle function is linked |
645 | into L1 instruction memory.(less latency) | 646 | into L1 instruction memory. (less latency) |
646 | 647 | ||
647 | config SCHEDULE_L1 | 648 | config SCHEDULE_L1 |
648 | bool "Locate kernel schedule function in L1 Memory" | 649 | bool "Locate kernel schedule function in L1 Memory" |
649 | default y | 650 | default y |
650 | help | 651 | help |
651 | If enabled frequently called kernel schedule is linked | 652 | If enabled, the frequently called kernel schedule is linked |
652 | into L1 instruction memory.(less latency) | 653 | into L1 instruction memory. (less latency) |
653 | 654 | ||
654 | config ARITHMETIC_OPS_L1 | 655 | config ARITHMETIC_OPS_L1 |
655 | bool "Locate kernel owned arithmetic functions in L1 Memory" | 656 | bool "Locate kernel owned arithmetic functions in L1 Memory" |
656 | default y | 657 | default y |
657 | help | 658 | help |
658 | If enabled arithmetic functions are linked | 659 | If enabled, arithmetic functions are linked |
659 | into L1 instruction memory.(less latency) | 660 | into L1 instruction memory. (less latency) |
660 | 661 | ||
661 | config ACCESS_OK_L1 | 662 | config ACCESS_OK_L1 |
662 | bool "Locate access_ok function in L1 Memory" | 663 | bool "Locate access_ok function in L1 Memory" |
663 | default y | 664 | default y |
664 | help | 665 | help |
665 | If enabled access_ok function is linked | 666 | If enabled, the access_ok function is linked |
666 | into L1 instruction memory.(less latency) | 667 | into L1 instruction memory. (less latency) |
667 | 668 | ||
668 | config MEMSET_L1 | 669 | config MEMSET_L1 |
669 | bool "Locate memset function in L1 Memory" | 670 | bool "Locate memset function in L1 Memory" |
670 | default y | 671 | default y |
671 | help | 672 | help |
672 | If enabled memset function is linked | 673 | If enabled, the memset function is linked |
673 | into L1 instruction memory.(less latency) | 674 | into L1 instruction memory. (less latency) |
674 | 675 | ||
675 | config MEMCPY_L1 | 676 | config MEMCPY_L1 |
676 | bool "Locate memcpy function in L1 Memory" | 677 | bool "Locate memcpy function in L1 Memory" |
677 | default y | 678 | default y |
678 | help | 679 | help |
679 | If enabled memcpy function is linked | 680 | If enabled, the memcpy function is linked |
680 | into L1 instruction memory.(less latency) | 681 | into L1 instruction memory. (less latency) |
681 | 682 | ||
682 | config SYS_BFIN_SPINLOCK_L1 | 683 | config SYS_BFIN_SPINLOCK_L1 |
683 | bool "Locate sys_bfin_spinlock function in L1 Memory" | 684 | bool "Locate sys_bfin_spinlock function in L1 Memory" |
684 | default y | 685 | default y |
685 | help | 686 | help |
686 | If enabled sys_bfin_spinlock function is linked | 687 | If enabled, sys_bfin_spinlock function is linked |
687 | into L1 instruction memory.(less latency) | 688 | into L1 instruction memory. (less latency) |
688 | 689 | ||
689 | config IP_CHECKSUM_L1 | 690 | config IP_CHECKSUM_L1 |
690 | bool "Locate IP Checksum function in L1 Memory" | 691 | bool "Locate IP Checksum function in L1 Memory" |
691 | default n | 692 | default n |
692 | help | 693 | help |
693 | If enabled IP Checksum function is linked | 694 | If enabled, the IP Checksum function is linked |
694 | into L1 instruction memory.(less latency) | 695 | into L1 instruction memory. (less latency) |
695 | 696 | ||
696 | config CACHELINE_ALIGNED_L1 | 697 | config CACHELINE_ALIGNED_L1 |
697 | bool "Locate cacheline_aligned data to L1 Data Memory" | 698 | bool "Locate cacheline_aligned data to L1 Data Memory" |
@@ -699,24 +700,24 @@ config CACHELINE_ALIGNED_L1 | |||
699 | default n if BF54x | 700 | default n if BF54x |
700 | depends on !BF531 | 701 | depends on !BF531 |
701 | help | 702 | help |
702 | If enabled cacheline_anligned data is linked | 703 | If enabled, cacheline_anligned data is linked |
703 | into L1 data memory.(less latency) | 704 | into L1 data memory. (less latency) |
704 | 705 | ||
705 | config SYSCALL_TAB_L1 | 706 | config SYSCALL_TAB_L1 |
706 | bool "Locate Syscall Table L1 Data Memory" | 707 | bool "Locate Syscall Table L1 Data Memory" |
707 | default n | 708 | default n |
708 | depends on !BF531 | 709 | depends on !BF531 |
709 | help | 710 | help |
710 | If enabled the Syscall LUT is linked | 711 | If enabled, the Syscall LUT is linked |
711 | into L1 data memory.(less latency) | 712 | into L1 data memory. (less latency) |
712 | 713 | ||
713 | config CPLB_SWITCH_TAB_L1 | 714 | config CPLB_SWITCH_TAB_L1 |
714 | bool "Locate CPLB Switch Tables L1 Data Memory" | 715 | bool "Locate CPLB Switch Tables L1 Data Memory" |
715 | default n | 716 | default n |
716 | depends on !BF531 | 717 | depends on !BF531 |
717 | help | 718 | help |
718 | If enabled the CPLB Switch Tables are linked | 719 | If enabled, the CPLB Switch Tables are linked |
719 | into L1 data memory.(less latency) | 720 | into L1 data memory. (less latency) |
720 | 721 | ||
721 | endmenu | 722 | endmenu |
722 | 723 | ||
@@ -1029,13 +1030,13 @@ config DEBUG_HWERR | |||
1029 | from. | 1030 | from. |
1030 | 1031 | ||
1031 | config DEBUG_ICACHE_CHECK | 1032 | config DEBUG_ICACHE_CHECK |
1032 | bool "Check Instruction cache coherancy" | 1033 | bool "Check Instruction cache coherency" |
1033 | depends on DEBUG_KERNEL | 1034 | depends on DEBUG_KERNEL |
1034 | depends on DEBUG_HWERR | 1035 | depends on DEBUG_HWERR |
1035 | help | 1036 | help |
1036 | Say Y here if you are getting wierd unexplained errors. This will | 1037 | Say Y here if you are getting weird unexplained errors. This will |
1037 | ensure that icache is what SDRAM says it should be, by doing a | 1038 | ensure that icache is what SDRAM says it should be by doing a |
1038 | byte wise comparision between SDRAM and instruction cache. This | 1039 | byte wise comparison between SDRAM and instruction cache. This |
1039 | also relocates the irq_panic() function to L1 memory, (which is | 1040 | also relocates the irq_panic() function to L1 memory, (which is |
1040 | un-cached). | 1041 | un-cached). |
1041 | 1042 | ||
diff --git a/arch/cris/arch-v10/Kconfig b/arch/cris/arch-v10/Kconfig index c7ea9efd0104..f1ce6f64401d 100644 --- a/arch/cris/arch-v10/Kconfig +++ b/arch/cris/arch-v10/Kconfig | |||
@@ -182,7 +182,7 @@ config ETRAX_LED7G | |||
182 | set this to same as CONFIG_ETRAX_LED1G (normally 2). | 182 | set this to same as CONFIG_ETRAX_LED1G (normally 2). |
183 | 183 | ||
184 | config ETRAX_LED8Y | 184 | config ETRAX_LED8Y |
185 | int "Eigth yellow LED bit" | 185 | int "Eighth yellow LED bit" |
186 | depends on ETRAX_CSP0_LEDS | 186 | depends on ETRAX_CSP0_LEDS |
187 | default "2" | 187 | default "2" |
188 | help | 188 | help |
diff --git a/arch/cris/arch-v10/boot/compressed/misc.c b/arch/cris/arch-v10/boot/compressed/misc.c index ffb8d21b2f83..e205d2e7e089 100644 --- a/arch/cris/arch-v10/boot/compressed/misc.c +++ b/arch/cris/arch-v10/boot/compressed/misc.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 | 9 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 |
10 | * puts by Nick Holloway 1993, better puts by Martin Mares 1995 | 10 | * puts by Nick Holloway 1993, better puts by Martin Mares 1995 |
11 | * adoptation for Linux/CRIS Axis Communications AB, 1999 | 11 | * adaptation for Linux/CRIS Axis Communications AB, 1999 |
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index 1de0026bb94e..c263b8232dbc 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * From Phillips' datasheet: | 4 | * From Phillips' datasheet: |
5 | * | 5 | * |
6 | * The PCF8563 is a CMOS real-time clock/calendar optimized for low power | 6 | * The PCF8563 is a CMOS real-time clock/calendar optimized for low power |
7 | * consumption. A programmable clock output, interupt output and voltage | 7 | * consumption. A programmable clock output, interrupt output and voltage |
8 | * low detector are also provided. All address and data are transferred | 8 | * low detector are also provided. All address and data are transferred |
9 | * serially via two-line bidirectional I2C-bus. Maximum bus speed is | 9 | * serially via two-line bidirectional I2C-bus. Maximum bus speed is |
10 | * 400 kbits/s. The built-in word address register is incremented | 10 | * 400 kbits/s. The built-in word address register is incremented |
diff --git a/arch/cris/arch-v10/kernel/debugport.c b/arch/cris/arch-v10/kernel/debugport.c index 2b536ca6f444..93679a48c791 100644 --- a/arch/cris/arch-v10/kernel/debugport.c +++ b/arch/cris/arch-v10/kernel/debugport.c | |||
@@ -83,7 +83,7 @@ | |||
83 | * | 83 | * |
84 | * Revision 1.4 2002/11/19 14:35:24 starvik | 84 | * Revision 1.4 2002/11/19 14:35:24 starvik |
85 | * Changes from linux 2.4 | 85 | * Changes from linux 2.4 |
86 | * Changed struct initializer syntax to the currently prefered notation | 86 | * Changed struct initializer syntax to the currently preferred notation |
87 | * | 87 | * |
88 | * Revision 1.3 2002/11/06 09:47:03 starvik | 88 | * Revision 1.3 2002/11/06 09:47:03 starvik |
89 | * Modified for new interrupt macros | 89 | * Modified for new interrupt macros |
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index ae45d4522e65..c5844cb70f09 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S | |||
@@ -97,7 +97,7 @@ | |||
97 | * | 97 | * |
98 | * Revision 1.36 2001/11/22 13:36:36 bjornw | 98 | * Revision 1.36 2001/11/22 13:36:36 bjornw |
99 | * * In ret_from_intr, check regs->dccr for usermode reentrance instead of | 99 | * * In ret_from_intr, check regs->dccr for usermode reentrance instead of |
100 | * DCCR explicitely (because the latter might not reflect current reality) | 100 | * DCCR explicitly (because the latter might not reflect current reality) |
101 | * * In mmu_bus_fault, set $r9 _after_ calling the C-code instead of before | 101 | * * In mmu_bus_fault, set $r9 _after_ calling the C-code instead of before |
102 | * since $r9 is call-clobbered and is potentially needed afterwards | 102 | * since $r9 is call-clobbered and is potentially needed afterwards |
103 | * | 103 | * |
diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c index 8cbdf594b369..d3ea052e5ee1 100644 --- a/arch/cris/arch-v10/kernel/fasttimer.c +++ b/arch/cris/arch-v10/kernel/fasttimer.c | |||
@@ -84,7 +84,7 @@ | |||
84 | * with time based on jiffies and *R_TIMER0_DATA, uses a table | 84 | * with time based on jiffies and *R_TIMER0_DATA, uses a table |
85 | * for fast conversion of timer value to microseconds. | 85 | * for fast conversion of timer value to microseconds. |
86 | * (Much faster the standard do_gettimeofday() and we don't really | 86 | * (Much faster the standard do_gettimeofday() and we don't really |
87 | * wan't to use the true time - we wan't the "uptime" so timers don't screw up | 87 | * want to use the true time - we want the "uptime" so timers don't screw up |
88 | * when we change the time. | 88 | * when we change the time. |
89 | * TODO: Add efficient support for continuous timers as well. | 89 | * TODO: Add efficient support for continuous timers as well. |
90 | * | 90 | * |
diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c index 96094cbf1255..845c95f6e871 100644 --- a/arch/cris/arch-v10/kernel/irq.c +++ b/arch/cris/arch-v10/kernel/irq.c | |||
@@ -169,7 +169,7 @@ init_IRQ(void) | |||
169 | for (i = 0; i < 256; i++) | 169 | for (i = 0; i < 256; i++) |
170 | etrax_irv->v[i] = weird_irq; | 170 | etrax_irv->v[i] = weird_irq; |
171 | 171 | ||
172 | /* Initialize IRQ handler descriptiors. */ | 172 | /* Initialize IRQ handler descriptors. */ |
173 | for(i = 2; i < NR_IRQS; i++) { | 173 | for(i = 2; i < NR_IRQS; i++) { |
174 | irq_desc[i].chip = &crisv10_irq_type; | 174 | irq_desc[i].chip = &crisv10_irq_type; |
175 | set_int_vector(i, interrupt[i]); | 175 | set_int_vector(i, interrupt[i]); |
diff --git a/arch/cris/arch-v10/kernel/kgdb.c b/arch/cris/arch-v10/kernel/kgdb.c index 07628a13c6c4..77f4b1423725 100644 --- a/arch/cris/arch-v10/kernel/kgdb.c +++ b/arch/cris/arch-v10/kernel/kgdb.c | |||
@@ -959,7 +959,7 @@ stub_is_stopped(int sigval) | |||
959 | 959 | ||
960 | /* Send register contents. We probably only need to send the | 960 | /* Send register contents. We probably only need to send the |
961 | * PC, frame pointer and stack pointer here. Other registers will be | 961 | * PC, frame pointer and stack pointer here. Other registers will be |
962 | * explicitely asked for. But for now, send all. | 962 | * explicitly asked for. But for now, send all. |
963 | */ | 963 | */ |
964 | 964 | ||
965 | for (regno = R0; regno <= USP; regno++) { | 965 | for (regno = R0; regno <= USP; regno++) { |
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index b6831ceb6a62..1a3760c94f85 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c | |||
@@ -64,7 +64,7 @@ void hard_reset_now (void) | |||
64 | #if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM) | 64 | #if defined(CONFIG_ETRAX_WATCHDOG) && !defined(CONFIG_SVINTO_SIM) |
65 | cause_of_death = 0xbedead; | 65 | cause_of_death = 0xbedead; |
66 | #else | 66 | #else |
67 | /* Since we dont plan to keep on reseting the watchdog, | 67 | /* Since we dont plan to keep on resetting the watchdog, |
68 | the key can be arbitrary hence three */ | 68 | the key can be arbitrary hence three */ |
69 | *R_WATCHDOG = IO_FIELD(R_WATCHDOG, key, 3) | | 69 | *R_WATCHDOG = IO_FIELD(R_WATCHDOG, key, 3) | |
70 | IO_STATE(R_WATCHDOG, enable, start); | 70 | IO_STATE(R_WATCHDOG, enable, start); |
diff --git a/arch/cris/arch-v10/kernel/shadows.c b/arch/cris/arch-v10/kernel/shadows.c index 38fd44dfbc5b..326178aef6ee 100644 --- a/arch/cris/arch-v10/kernel/shadows.c +++ b/arch/cris/arch-v10/kernel/shadows.c | |||
@@ -20,7 +20,7 @@ unsigned long r_timer_ctrl_shadow; | |||
20 | * These are only usable if there actually IS a latch connected | 20 | * These are only usable if there actually IS a latch connected |
21 | * to the corresponding external chip-select pin. | 21 | * to the corresponding external chip-select pin. |
22 | * | 22 | * |
23 | * A common usage is that CSP0 controls LED's and CSP4 video chips. | 23 | * A common usage is that CSP0 controls LEDs and CSP4 video chips. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | unsigned long port_cse1_shadow; | 26 | unsigned long port_cse1_shadow; |
diff --git a/arch/cris/arch-v10/lib/dram_init.S b/arch/cris/arch-v10/lib/dram_init.S index 9cf83932cd5d..6a6bdfd6984d 100644 --- a/arch/cris/arch-v10/lib/dram_init.S +++ b/arch/cris/arch-v10/lib/dram_init.S | |||
@@ -40,7 +40,7 @@ | |||
40 | * Copy warning from head.S about r8 and r9 | 40 | * Copy warning from head.S about r8 and r9 |
41 | * | 41 | * |
42 | * Revision 1.7 2001/04/18 12:05:39 bjornw | 42 | * Revision 1.7 2001/04/18 12:05:39 bjornw |
43 | * Fixed comments, and explicitely include config.h to be sure its there | 43 | * Fixed comments, and explicitly include config.h to be sure its there |
44 | * | 44 | * |
45 | * Revision 1.6 2001/04/10 06:20:16 starvik | 45 | * Revision 1.6 2001/04/10 06:20:16 starvik |
46 | * Delay should be 200us, not 200ns | 46 | * Delay should be 200us, not 200ns |
@@ -66,7 +66,7 @@ | |||
66 | */ | 66 | */ |
67 | 67 | ||
68 | /* Just to be certain the config file is included, we include it here | 68 | /* Just to be certain the config file is included, we include it here |
69 | * explicitely instead of depending on it being included in the file that | 69 | * explicitly instead of depending on it being included in the file that |
70 | * uses this code. | 70 | * uses this code. |
71 | */ | 71 | */ |
72 | 72 | ||
diff --git a/arch/cris/arch-v10/lib/string.c b/arch/cris/arch-v10/lib/string.c index 8ffde4901b57..15d6662b03b1 100644 --- a/arch/cris/arch-v10/lib/string.c +++ b/arch/cris/arch-v10/lib/string.c | |||
@@ -41,7 +41,7 @@ void *memcpy(void *pdst, | |||
41 | Make sure the compiler is able to make something useful of this. | 41 | Make sure the compiler is able to make something useful of this. |
42 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 42 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
43 | 43 | ||
44 | If gcc was allright, it really would need no temporaries, and no | 44 | If gcc was alright, it really would need no temporaries, and no |
45 | stack space to save stuff on. */ | 45 | stack space to save stuff on. */ |
46 | 46 | ||
47 | register void *return_dst __asm__ ("r10") = pdst; | 47 | register void *return_dst __asm__ ("r10") = pdst; |
diff --git a/arch/cris/arch-v10/lib/usercopy.c b/arch/cris/arch-v10/lib/usercopy.c index 43778d53c254..a12c708afc9a 100644 --- a/arch/cris/arch-v10/lib/usercopy.c +++ b/arch/cris/arch-v10/lib/usercopy.c | |||
@@ -38,7 +38,7 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn) | |||
38 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 38 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
39 | 39 | ||
40 | FIXME: Comment for old gcc version. Check. | 40 | FIXME: Comment for old gcc version. Check. |
41 | If gcc was allright, it really would need no temporaries, and no | 41 | If gcc was alright, it really would need no temporaries, and no |
42 | stack space to save stuff on. */ | 42 | stack space to save stuff on. */ |
43 | 43 | ||
44 | register char *dst __asm__ ("r13") = pdst; | 44 | register char *dst __asm__ ("r13") = pdst; |
@@ -200,7 +200,7 @@ __copy_user_zeroing (void __user *pdst, const void *psrc, unsigned long pn) | |||
200 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 200 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
201 | 201 | ||
202 | FIXME: Comment for old gcc version. Check. | 202 | FIXME: Comment for old gcc version. Check. |
203 | If gcc was allright, it really would need no temporaries, and no | 203 | If gcc was alright, it really would need no temporaries, and no |
204 | stack space to save stuff on. */ | 204 | stack space to save stuff on. */ |
205 | 205 | ||
206 | register char *dst __asm__ ("r13") = pdst; | 206 | register char *dst __asm__ ("r13") = pdst; |
@@ -380,7 +380,7 @@ __do_clear_user (void __user *pto, unsigned long pn) | |||
380 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 380 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
381 | 381 | ||
382 | FIXME: Comment for old gcc version. Check. | 382 | FIXME: Comment for old gcc version. Check. |
383 | If gcc was allright, it really would need no temporaries, and no | 383 | If gcc was alright, it really would need no temporaries, and no |
384 | stack space to save stuff on. */ | 384 | stack space to save stuff on. */ |
385 | 385 | ||
386 | register char *dst __asm__ ("r13") = pto; | 386 | register char *dst __asm__ ("r13") = pto; |
diff --git a/arch/cris/arch-v32/boot/compressed/misc.c b/arch/cris/arch-v32/boot/compressed/misc.c index 11902697196d..0169ba1ca9c9 100644 --- a/arch/cris/arch-v32/boot/compressed/misc.c +++ b/arch/cris/arch-v32/boot/compressed/misc.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 | 9 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 |
10 | * puts by Nick Holloway 1993, better puts by Martin Mares 1995 | 10 | * puts by Nick Holloway 1993, better puts by Martin Mares 1995 |
11 | * adoptation for Linux/CRIS Axis Communications AB, 1999 | 11 | * adaptation for Linux/CRIS Axis Communications AB, 1999 |
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | 14 | ||
@@ -151,7 +151,7 @@ serout(const char *s, reg_scope_instances regi_ser) | |||
151 | do { | 151 | do { |
152 | rs = REG_RD(ser, regi_ser, rs_stat_din); | 152 | rs = REG_RD(ser, regi_ser, rs_stat_din); |
153 | } | 153 | } |
154 | while (!rs.tr_rdy);/* Wait for tranceiver. */ | 154 | while (!rs.tr_rdy);/* Wait for transceiver. */ |
155 | 155 | ||
156 | REG_WR(ser, regi_ser, rw_dout, dout); | 156 | REG_WR(ser, regi_ser, rw_dout, dout); |
157 | } | 157 | } |
@@ -264,7 +264,7 @@ serial_setup(reg_scope_instances regi_ser) | |||
264 | tr_ctrl.stop_bits = 1; /* 2 stop bits. */ | 264 | tr_ctrl.stop_bits = 1; /* 2 stop bits. */ |
265 | 265 | ||
266 | /* | 266 | /* |
267 | * The baudrate setup is a bit fishy, but in the end the tranceiver is | 267 | * The baudrate setup is a bit fishy, but in the end the transceiver is |
268 | * set to 4800 and the receiver to 115200. The magic value is | 268 | * set to 4800 and the receiver to 115200. The magic value is |
269 | * 29.493 MHz. | 269 | * 29.493 MHz. |
270 | */ | 270 | */ |
diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c index 5180d45412fc..3ec12ea44e8e 100644 --- a/arch/cris/arch-v32/drivers/axisflashmap.c +++ b/arch/cris/arch-v32/drivers/axisflashmap.c | |||
@@ -205,7 +205,7 @@ static struct mtd_info *probe_cs(struct map_info *map_cs) | |||
205 | /* | 205 | /* |
206 | * Probe each chip select individually for flash chips. If there are chips on | 206 | * Probe each chip select individually for flash chips. If there are chips on |
207 | * both cse0 and cse1, the mtd_info structs will be concatenated to one struct | 207 | * both cse0 and cse1, the mtd_info structs will be concatenated to one struct |
208 | * so that MTD partitions can cross chip boundries. | 208 | * so that MTD partitions can cross chip boundaries. |
209 | * | 209 | * |
210 | * The only known restriction to how you can mount your chips is that each | 210 | * The only known restriction to how you can mount your chips is that each |
211 | * chip select must hold similar flash chips. But you need external hardware | 211 | * chip select must hold similar flash chips. But you need external hardware |
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c index e12f6cc6f4a2..f1edd2e359b2 100644 --- a/arch/cris/arch-v32/drivers/i2c.c +++ b/arch/cris/arch-v32/drivers/i2c.c | |||
@@ -275,7 +275,7 @@ i2c_getack(void) | |||
275 | ack = 0; | 275 | ack = 0; |
276 | i2c_delay(CLOCK_HIGH_TIME/2); | 276 | i2c_delay(CLOCK_HIGH_TIME/2); |
277 | if(!ack){ | 277 | if(!ack){ |
278 | if(!i2c_getbit()) /* receiver pulld SDA low */ | 278 | if(!i2c_getbit()) /* receiver pulled SDA low */ |
279 | ack = 1; | 279 | ack = 1; |
280 | i2c_delay(CLOCK_HIGH_TIME/2); | 280 | i2c_delay(CLOCK_HIGH_TIME/2); |
281 | } | 281 | } |
diff --git a/arch/cris/arch-v32/drivers/nandflash.c b/arch/cris/arch-v32/drivers/nandflash.c index 93ddea4d9564..5ce015c6bb0d 100644 --- a/arch/cris/arch-v32/drivers/nandflash.c +++ b/arch/cris/arch-v32/drivers/nandflash.c | |||
@@ -138,7 +138,7 @@ struct mtd_info* __init crisv32_nand_flash_probe (void) | |||
138 | /* Enable the following for a flash based bad block table */ | 138 | /* Enable the following for a flash based bad block table */ |
139 | this->options = NAND_USE_FLASH_BBT; | 139 | this->options = NAND_USE_FLASH_BBT; |
140 | 140 | ||
141 | /* Scan to find existance of the device */ | 141 | /* Scan to find existence of the device */ |
142 | if (nand_scan (crisv32_mtd, 1)) { | 142 | if (nand_scan (crisv32_mtd, 1)) { |
143 | err = -ENXIO; | 143 | err = -ENXIO; |
144 | goto out_ior; | 144 | goto out_ior; |
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c index da479a14f836..6dbd700d3d66 100644 --- a/arch/cris/arch-v32/drivers/pcf8563.c +++ b/arch/cris/arch-v32/drivers/pcf8563.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * From Phillips' datasheet: | 4 | * From Phillips' datasheet: |
5 | * | 5 | * |
6 | * The PCF8563 is a CMOS real-time clock/calendar optimized for low power | 6 | * The PCF8563 is a CMOS real-time clock/calendar optimized for low power |
7 | * consumption. A programmable clock output, interupt output and voltage | 7 | * consumption. A programmable clock output, interrupt output and voltage |
8 | * low detector are also provided. All address and data are transferred | 8 | * low detector are also provided. All address and data are transferred |
9 | * serially via two-line bidirectional I2C-bus. Maximum bus speed is | 9 | * serially via two-line bidirectional I2C-bus. Maximum bus speed is |
10 | * 400 kbits/s. The built-in word address register is incremented | 10 | * 400 kbits/s. The built-in word address register is incremented |
diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c index 79e1e4c2ca1d..b40551f9f40d 100644 --- a/arch/cris/arch-v32/kernel/fasttimer.c +++ b/arch/cris/arch-v32/kernel/fasttimer.c | |||
@@ -97,7 +97,7 @@ | |||
97 | * with time based on jiffies and *R_TIMER0_DATA, uses a table | 97 | * with time based on jiffies and *R_TIMER0_DATA, uses a table |
98 | * for fast conversion of timer value to microseconds. | 98 | * for fast conversion of timer value to microseconds. |
99 | * (Much faster the standard do_gettimeofday() and we don't really | 99 | * (Much faster the standard do_gettimeofday() and we don't really |
100 | * wan't to use the true time - we wan't the "uptime" so timers don't screw up | 100 | * want to use the true time - we want the "uptime" so timers don't screw up |
101 | * when we change the time. | 101 | * when we change the time. |
102 | * TODO: Add efficient support for continuous timers as well. | 102 | * TODO: Add efficient support for continuous timers as well. |
103 | * | 103 | * |
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index cc361bf578ae..a9acaa270243 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c | |||
@@ -140,7 +140,7 @@ block_irq(int irq, int cpu) | |||
140 | spin_lock_irqsave(&irq_lock, flags); | 140 | spin_lock_irqsave(&irq_lock, flags); |
141 | intr_mask = REG_RD_INT(intr_vect, irq_regs[cpu], rw_mask); | 141 | intr_mask = REG_RD_INT(intr_vect, irq_regs[cpu], rw_mask); |
142 | 142 | ||
143 | /* Remember; 1 let thru, 0 block. */ | 143 | /* Remember; 1 let through, 0 block. */ |
144 | intr_mask &= ~(1 << (irq - FIRST_IRQ)); | 144 | intr_mask &= ~(1 << (irq - FIRST_IRQ)); |
145 | 145 | ||
146 | REG_WR_INT(intr_vect, irq_regs[cpu], rw_mask, intr_mask); | 146 | REG_WR_INT(intr_vect, irq_regs[cpu], rw_mask, intr_mask); |
@@ -156,7 +156,7 @@ unblock_irq(int irq, int cpu) | |||
156 | spin_lock_irqsave(&irq_lock, flags); | 156 | spin_lock_irqsave(&irq_lock, flags); |
157 | intr_mask = REG_RD_INT(intr_vect, irq_regs[cpu], rw_mask); | 157 | intr_mask = REG_RD_INT(intr_vect, irq_regs[cpu], rw_mask); |
158 | 158 | ||
159 | /* Remember; 1 let thru, 0 block. */ | 159 | /* Remember; 1 let through, 0 block. */ |
160 | intr_mask |= (1 << (irq - FIRST_IRQ)); | 160 | intr_mask |= (1 << (irq - FIRST_IRQ)); |
161 | 161 | ||
162 | REG_WR_INT(intr_vect, irq_regs[cpu], rw_mask, intr_mask); | 162 | REG_WR_INT(intr_vect, irq_regs[cpu], rw_mask, intr_mask); |
@@ -308,7 +308,7 @@ crisv32_do_multiple(struct pt_regs* regs) | |||
308 | */ | 308 | */ |
309 | irq_enter(); | 309 | irq_enter(); |
310 | 310 | ||
311 | /* Get which IRQs that happend. */ | 311 | /* Get which IRQs that happened. */ |
312 | masked = REG_RD_INT(intr_vect, irq_regs[cpu], r_masked_vect); | 312 | masked = REG_RD_INT(intr_vect, irq_regs[cpu], r_masked_vect); |
313 | 313 | ||
314 | /* Calculate new IRQ mask with these IRQs disabled. */ | 314 | /* Calculate new IRQ mask with these IRQs disabled. */ |
@@ -366,7 +366,7 @@ init_IRQ(void) | |||
366 | for (i = 0; i < 256; i++) | 366 | for (i = 0; i < 256; i++) |
367 | etrax_irv->v[i] = weird_irq; | 367 | etrax_irv->v[i] = weird_irq; |
368 | 368 | ||
369 | /* Point all IRQ's to bad handlers. */ | 369 | /* Point all IRQs to bad handlers. */ |
370 | for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { | 370 | for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { |
371 | irq_desc[j].chip = &crisv32_irq_type; | 371 | irq_desc[j].chip = &crisv32_irq_type; |
372 | set_exception_vector(i, interrupt[j]); | 372 | set_exception_vector(i, interrupt[j]); |
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c index 6326351af252..b72a15580dc7 100644 --- a/arch/cris/arch-v32/kernel/process.c +++ b/arch/cris/arch-v32/kernel/process.c | |||
@@ -162,7 +162,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
162 | /* Put the switch stack right below the pt_regs. */ | 162 | /* Put the switch stack right below the pt_regs. */ |
163 | swstack = ((struct switch_stack *) childregs) - 1; | 163 | swstack = ((struct switch_stack *) childregs) - 1; |
164 | 164 | ||
165 | /* Paramater to ret_from_sys_call. 0 is don't restart the syscall. */ | 165 | /* Parameter to ret_from_sys_call. 0 is don't restart the syscall. */ |
166 | swstack->r9 = 0; | 166 | swstack->r9 = 0; |
167 | 167 | ||
168 | /* | 168 | /* |
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index 7cd6ac803409..024cc6901974 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c | |||
@@ -347,7 +347,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size) | |||
347 | /* Grab and setup a signal frame. | 347 | /* Grab and setup a signal frame. |
348 | * | 348 | * |
349 | * Basically a lot of state-info is stacked, and arranged for the | 349 | * Basically a lot of state-info is stacked, and arranged for the |
350 | * user-mode program to return to the kernel using either a trampiline | 350 | * user-mode program to return to the kernel using either a trampoline |
351 | * which performs the syscall sigreturn(), or a provided user-mode | 351 | * which performs the syscall sigreturn(), or a provided user-mode |
352 | * trampoline. | 352 | * trampoline. |
353 | */ | 353 | */ |
@@ -641,7 +641,7 @@ ugdb_trap_user(struct thread_info *ti, int sig) | |||
641 | user_regs(ti)->spc = 0; | 641 | user_regs(ti)->spc = 0; |
642 | } | 642 | } |
643 | /* FIXME: Filter out false h/w breakpoint hits (i.e. EDA | 643 | /* FIXME: Filter out false h/w breakpoint hits (i.e. EDA |
644 | not withing any configured h/w breakpoint range). Synchronize with | 644 | not within any configured h/w breakpoint range). Synchronize with |
645 | what already exists for kernel debugging. */ | 645 | what already exists for kernel debugging. */ |
646 | if (((user_regs(ti)->exs & 0xff00) >> 8) == BREAK_8_INTR_VECT) { | 646 | if (((user_regs(ti)->exs & 0xff00) >> 8) == BREAK_8_INTR_VECT) { |
647 | /* Break 8: subtract 2 from ERP unless in a delay slot. */ | 647 | /* Break 8: subtract 2 from ERP unless in a delay slot. */ |
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index 697494bc2de1..171c96e0a5d3 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
@@ -142,7 +142,7 @@ smp_boot_one_cpu(int cpuid) | |||
142 | return -1; | 142 | return -1; |
143 | } | 143 | } |
144 | 144 | ||
145 | /* Secondary CPUs starts uing C here. Here we need to setup CPU | 145 | /* Secondary CPUs starts using C here. Here we need to setup CPU |
146 | * specific stuff such as the local timer and the MMU. */ | 146 | * specific stuff such as the local timer and the MMU. */ |
147 | void __init smp_callin(void) | 147 | void __init smp_callin(void) |
148 | { | 148 | { |
diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c index be0a01657d4f..2f7e8e200f2c 100644 --- a/arch/cris/arch-v32/kernel/time.c +++ b/arch/cris/arch-v32/kernel/time.c | |||
@@ -99,7 +99,7 @@ unsigned long do_slow_gettimeoffset(void) | |||
99 | /* From timer MDS describing the hardware watchdog: | 99 | /* From timer MDS describing the hardware watchdog: |
100 | * 4.3.1 Watchdog Operation | 100 | * 4.3.1 Watchdog Operation |
101 | * The watchdog timer is an 8-bit timer with a configurable start value. | 101 | * The watchdog timer is an 8-bit timer with a configurable start value. |
102 | * Once started the whatchdog counts downwards with a frequency of 763 Hz | 102 | * Once started the watchdog counts downwards with a frequency of 763 Hz |
103 | * (100/131072 MHz). When the watchdog counts down to 1, it generates an | 103 | * (100/131072 MHz). When the watchdog counts down to 1, it generates an |
104 | * NMI (Non Maskable Interrupt), and when it counts down to 0, it resets the | 104 | * NMI (Non Maskable Interrupt), and when it counts down to 0, it resets the |
105 | * chip. | 105 | * chip. |
diff --git a/arch/cris/arch-v32/kernel/traps.c b/arch/cris/arch-v32/kernel/traps.c index 2462b1ef1fbb..17fd3dbd1c80 100644 --- a/arch/cris/arch-v32/kernel/traps.c +++ b/arch/cris/arch-v32/kernel/traps.c | |||
@@ -105,7 +105,7 @@ bad_value: | |||
105 | 105 | ||
106 | /* | 106 | /* |
107 | * This gets called from entry.S when the watchdog has bitten. Show something | 107 | * This gets called from entry.S when the watchdog has bitten. Show something |
108 | * similiar to an Oops dump, and if the kernel if configured to be a nice doggy; | 108 | * similar to an Oops dump, and if the kernel is configured to be a nice doggy; |
109 | * halt instead of reboot. | 109 | * halt instead of reboot. |
110 | */ | 110 | */ |
111 | void | 111 | void |
diff --git a/arch/cris/arch-v32/lib/dram_init.S b/arch/cris/arch-v32/lib/dram_init.S index 158b3dbb4d9d..218fbe259ee5 100644 --- a/arch/cris/arch-v32/lib/dram_init.S +++ b/arch/cris/arch-v32/lib/dram_init.S | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* Just to be certain the config file is included, we include it here | 14 | /* Just to be certain the config file is included, we include it here |
15 | * explicitely instead of depending on it being included in the file that | 15 | * explicitly instead of depending on it being included in the file that |
16 | * uses this code. | 16 | * uses this code. |
17 | */ | 17 | */ |
18 | 18 | ||
diff --git a/arch/cris/arch-v32/lib/string.c b/arch/cris/arch-v32/lib/string.c index 98e282ac824a..6740b2cebae5 100644 --- a/arch/cris/arch-v32/lib/string.c +++ b/arch/cris/arch-v32/lib/string.c | |||
@@ -41,7 +41,7 @@ void *memcpy(void *pdst, | |||
41 | Make sure the compiler is able to make something useful of this. | 41 | Make sure the compiler is able to make something useful of this. |
42 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 42 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
43 | 43 | ||
44 | If gcc was allright, it really would need no temporaries, and no | 44 | If gcc was alright, it really would need no temporaries, and no |
45 | stack space to save stuff on. */ | 45 | stack space to save stuff on. */ |
46 | 46 | ||
47 | register void *return_dst __asm__ ("r10") = pdst; | 47 | register void *return_dst __asm__ ("r10") = pdst; |
diff --git a/arch/cris/arch-v32/lib/usercopy.c b/arch/cris/arch-v32/lib/usercopy.c index f0b08460c1be..04d0cf35a276 100644 --- a/arch/cris/arch-v32/lib/usercopy.c +++ b/arch/cris/arch-v32/lib/usercopy.c | |||
@@ -34,7 +34,7 @@ __copy_user (void __user *pdst, const void *psrc, unsigned long pn) | |||
34 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 34 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
35 | 35 | ||
36 | FIXME: Comment for old gcc version. Check. | 36 | FIXME: Comment for old gcc version. Check. |
37 | If gcc was allright, it really would need no temporaries, and no | 37 | If gcc was alright, it really would need no temporaries, and no |
38 | stack space to save stuff on. */ | 38 | stack space to save stuff on. */ |
39 | 39 | ||
40 | register char *dst __asm__ ("r13") = pdst; | 40 | register char *dst __asm__ ("r13") = pdst; |
@@ -168,7 +168,7 @@ __copy_user_zeroing (void __user *pdst, const void *psrc, unsigned long pn) | |||
168 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 168 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
169 | 169 | ||
170 | FIXME: Comment for old gcc version. Check. | 170 | FIXME: Comment for old gcc version. Check. |
171 | If gcc was allright, it really would need no temporaries, and no | 171 | If gcc was alright, it really would need no temporaries, and no |
172 | stack space to save stuff on. */ | 172 | stack space to save stuff on. */ |
173 | 173 | ||
174 | register char *dst __asm__ ("r13") = pdst; | 174 | register char *dst __asm__ ("r13") = pdst; |
@@ -332,7 +332,7 @@ __do_clear_user (void __user *pto, unsigned long pn) | |||
332 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). | 332 | As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop). |
333 | 333 | ||
334 | FIXME: Comment for old gcc version. Check. | 334 | FIXME: Comment for old gcc version. Check. |
335 | If gcc was allright, it really would need no temporaries, and no | 335 | If gcc was alright, it really would need no temporaries, and no |
336 | stack space to save stuff on. */ | 336 | stack space to save stuff on. */ |
337 | 337 | ||
338 | register char *dst __asm__ ("r13") = pto; | 338 | register char *dst __asm__ ("r13") = pto; |
diff --git a/arch/cris/arch-v32/mm/tlb.c b/arch/cris/arch-v32/mm/tlb.c index c2d12e9c40d7..a076ef6e9389 100644 --- a/arch/cris/arch-v32/mm/tlb.c +++ b/arch/cris/arch-v32/mm/tlb.c | |||
@@ -30,8 +30,8 @@ do { \ | |||
30 | * The TLB can host up to 256 different mm contexts at the same time. The running | 30 | * The TLB can host up to 256 different mm contexts at the same time. The running |
31 | * context is found in the PID register. Each TLB entry contains a page_id that | 31 | * context is found in the PID register. Each TLB entry contains a page_id that |
32 | * has to match the PID register to give a hit. page_id_map keeps track of which | 32 | * has to match the PID register to give a hit. page_id_map keeps track of which |
33 | * mm's is assigned to which page_id's, making sure it's known when to | 33 | * mm is assigned to which page_id, making sure it's known when to invalidate TLB |
34 | * invalidate TLB entries. | 34 | * entries. |
35 | * | 35 | * |
36 | * The last page_id is never running, it is used as an invalid page_id so that | 36 | * The last page_id is never running, it is used as an invalid page_id so that |
37 | * it's possible to make TLB entries that will nerver match. | 37 | * it's possible to make TLB entries that will nerver match. |
@@ -188,7 +188,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
188 | spin_unlock(&mmu_context_lock); | 188 | spin_unlock(&mmu_context_lock); |
189 | 189 | ||
190 | /* | 190 | /* |
191 | * Remember the pgd for the fault handlers. Keep a seperate copy of it | 191 | * Remember the pgd for the fault handlers. Keep a separate copy of it |
192 | * because current and active_mm might be invalid at points where | 192 | * because current and active_mm might be invalid at points where |
193 | * there's still a need to derefer the pgd. | 193 | * there's still a need to derefer the pgd. |
194 | */ | 194 | */ |
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 903ea62c6e21..5c27ff86121b 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Authors: Bjorn Wesen (bjornw@axis.com) | 7 | * Authors: Bjorn Wesen (bjornw@axis.com) |
8 | * | 8 | * |
9 | * This file contains the code used by various IRQ handling routines: | 9 | * This file contains the code used by various IRQ handling routines: |
10 | * asking for different IRQ's should be done through these routines | 10 | * asking for different IRQs should be done through these routines |
11 | * instead of just grabbing them. Thus setups with different IRQ numbers | 11 | * instead of just grabbing them. Thus setups with different IRQ numbers |
12 | * shouldn't result in any weird surprises, and installing new handlers | 12 | * shouldn't result in any weird surprises, and installing new handlers |
13 | * should be easier. | 13 | * should be easier. |
@@ -15,7 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * IRQ's are in fact implemented a bit like signal handlers for the kernel. | 18 | * IRQs are in fact implemented a bit like signal handlers for the kernel. |
19 | * Naturally it's not a 1:1 relation, but there are similarities. | 19 | * Naturally it's not a 1:1 relation, but there are similarities. |
20 | */ | 20 | */ |
21 | 21 | ||
@@ -83,9 +83,9 @@ skip: | |||
83 | 83 | ||
84 | 84 | ||
85 | /* called by the assembler IRQ entry functions defined in irq.h | 85 | /* called by the assembler IRQ entry functions defined in irq.h |
86 | * to dispatch the interrupts to registred handlers | 86 | * to dispatch the interrupts to registered handlers |
87 | * interrupts are disabled upon entry - depending on if the | 87 | * interrupts are disabled upon entry - depending on if the |
88 | * interrupt was registred with IRQF_DISABLED or not, interrupts | 88 | * interrupt was registered with IRQF_DISABLED or not, interrupts |
89 | * are re-enabled or not. | 89 | * are re-enabled or not. |
90 | */ | 90 | */ |
91 | 91 | ||
diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c index 8aab81430695..3034f3ff950c 100644 --- a/arch/cris/mm/fault.c +++ b/arch/cris/mm/fault.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * Fixed warning. | 13 | * Fixed warning. |
14 | * | 14 | * |
15 | * Revision 1.18 2005/01/12 08:10:14 starvik | 15 | * Revision 1.18 2005/01/12 08:10:14 starvik |
16 | * Readded the change of frametype when handling kernel page fault fixup | 16 | * Re-added the change of frametype when handling kernel page fault fixup |
17 | * for v10. This is necessary to avoid that the CPU remakes the faulting | 17 | * for v10. This is necessary to avoid that the CPU remakes the faulting |
18 | * access. | 18 | * access. |
19 | * | 19 | * |
@@ -49,7 +49,7 @@ | |||
49 | * | 49 | * |
50 | * Revision 1.8 2003/07/04 13:02:48 tobiasa | 50 | * Revision 1.8 2003/07/04 13:02:48 tobiasa |
51 | * Moved code snippet from arch/cris/mm/fault.c that searches for fixup code | 51 | * Moved code snippet from arch/cris/mm/fault.c that searches for fixup code |
52 | * to seperate function in arch-specific files. | 52 | * to separate function in arch-specific files. |
53 | * | 53 | * |
54 | * Revision 1.7 2003/01/22 06:48:38 starvik | 54 | * Revision 1.7 2003/01/22 06:48:38 starvik |
55 | * Fixed warnings issued by GCC 3.2.1 | 55 | * Fixed warnings issued by GCC 3.2.1 |
diff --git a/arch/cris/mm/init.c b/arch/cris/mm/init.c index b7842ff213a6..0c833d176226 100644 --- a/arch/cris/mm/init.c +++ b/arch/cris/mm/init.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * $Log: init.c,v $ | 9 | * $Log: init.c,v $ |
10 | * Revision 1.11 2004/05/28 09:28:56 starvik | 10 | * Revision 1.11 2004/05/28 09:28:56 starvik |
11 | * Calculation of loops_per_usec moved because initalization order has changed | 11 | * Calculation of loops_per_usec moved because initialization order has changed |
12 | * in Linux 2.6. | 12 | * in Linux 2.6. |
13 | * | 13 | * |
14 | * Revision 1.10 2004/05/14 07:58:05 starvik | 14 | * Revision 1.10 2004/05/14 07:58:05 starvik |
diff --git a/arch/cris/mm/tlb.c b/arch/cris/mm/tlb.c index c4a98e2e529e..b7f8de576777 100644 --- a/arch/cris/mm/tlb.c +++ b/arch/cris/mm/tlb.c | |||
@@ -16,7 +16,7 @@ | |||
16 | /* The TLB can host up to 64 different mm contexts at the same time. | 16 | /* The TLB can host up to 64 different mm contexts at the same time. |
17 | * The running context is R_MMU_CONTEXT, and each TLB entry contains a | 17 | * The running context is R_MMU_CONTEXT, and each TLB entry contains a |
18 | * page_id that has to match to give a hit. In page_id_map, we keep track | 18 | * page_id that has to match to give a hit. In page_id_map, we keep track |
19 | * of which mm's we have assigned which page_id's, so that we know when | 19 | * of which mm we have assigned to which page_id, so that we know when |
20 | * to invalidate TLB entries. | 20 | * to invalidate TLB entries. |
21 | * | 21 | * |
22 | * The last page_id is never running - it is used as an invalid page_id | 22 | * The last page_id is never running - it is used as an invalid page_id |
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c index 7ddb69089ed4..73abae767fdc 100644 --- a/arch/frv/kernel/irq.c +++ b/arch/frv/kernel/irq.c | |||
@@ -134,7 +134,7 @@ static struct irq_chip frv_cpu_pic = { | |||
134 | }; | 134 | }; |
135 | 135 | ||
136 | /* | 136 | /* |
137 | * handles all normal device IRQ's | 137 | * handles all normal device IRQs |
138 | * - registers are referred to by the __frame variable (GR28) | 138 | * - registers are referred to by the __frame variable (GR28) |
139 | * - IRQ distribution is complicated in this arch because of the many PICs, the | 139 | * - IRQ distribution is complicated in this arch because of the many PICs, the |
140 | * way they work and the way they cascade | 140 | * way they work and the way they cascade |
diff --git a/arch/frv/kernel/semaphore.c b/arch/frv/kernel/semaphore.c index 8e182ced1a0f..7ee3a147b471 100644 --- a/arch/frv/kernel/semaphore.c +++ b/arch/frv/kernel/semaphore.c | |||
@@ -139,7 +139,7 @@ void __up(struct semaphore *sem) | |||
139 | waiter = list_entry(sem->wait_list.next, struct sem_waiter, list); | 139 | waiter = list_entry(sem->wait_list.next, struct sem_waiter, list); |
140 | 140 | ||
141 | /* We must be careful not to touch 'waiter' after we set ->task = NULL. | 141 | /* We must be careful not to touch 'waiter' after we set ->task = NULL. |
142 | * It is an allocated on the waiter's stack and may become invalid at | 142 | * It is allocated on the waiter's stack and may become invalid at |
143 | * any time after that point (due to a wakeup from another source). | 143 | * any time after that point (due to a wakeup from another source). |
144 | */ | 144 | */ |
145 | list_del_init(&waiter->list); | 145 | list_del_init(&waiter->list); |
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c index e83e0bccfab9..925fb0199a0f 100644 --- a/arch/frv/kernel/time.c +++ b/arch/frv/kernel/time.c | |||
@@ -66,7 +66,7 @@ static irqreturn_t timer_interrupt(int irq, void *dummy) | |||
66 | /* | 66 | /* |
67 | * Here we are in the timer irq handler. We just have irqs locally | 67 | * Here we are in the timer irq handler. We just have irqs locally |
68 | * disabled but we don't know if the timer_bh is running on the other | 68 | * disabled but we don't know if the timer_bh is running on the other |
69 | * CPU. We need to avoid to SMP race with it. NOTE: we don' t need | 69 | * CPU. We need to avoid to SMP race with it. NOTE: we don't need |
70 | * the irq version of write_lock because as just said we have irq | 70 | * the irq version of write_lock because as just said we have irq |
71 | * locally disabled. -arca | 71 | * locally disabled. -arca |
72 | */ | 72 | */ |
@@ -126,7 +126,7 @@ void time_init(void) | |||
126 | 126 | ||
127 | /* FIX by dqg : Set to zero for platforms that don't have tod */ | 127 | /* FIX by dqg : Set to zero for platforms that don't have tod */ |
128 | /* without this time is undefined and can overflow time_t, causing */ | 128 | /* without this time is undefined and can overflow time_t, causing */ |
129 | /* very stange errors */ | 129 | /* very strange errors */ |
130 | year = 1980; | 130 | year = 1980; |
131 | mon = day = 1; | 131 | mon = day = 1; |
132 | hour = min = sec = 0; | 132 | hour = min = sec = 0; |
diff --git a/arch/h8300/Kconfig.debug b/arch/h8300/Kconfig.debug index 996d97e953b0..ee671c3f2c74 100644 --- a/arch/h8300/Kconfig.debug +++ b/arch/h8300/Kconfig.debug | |||
@@ -42,16 +42,16 @@ config SH_STANDARD_BIOS | |||
42 | Require eCos/RedBoot | 42 | Require eCos/RedBoot |
43 | 43 | ||
44 | config DEFAULT_CMDLINE | 44 | config DEFAULT_CMDLINE |
45 | bool "Use buildin commandline" | 45 | bool "Use builtin commandline" |
46 | default n | 46 | default n |
47 | help | 47 | help |
48 | buildin kernel commandline enabled. | 48 | builtin kernel commandline enabled. |
49 | 49 | ||
50 | config KERNEL_COMMAND | 50 | config KERNEL_COMMAND |
51 | string "Buildin commmand string" | 51 | string "Buildin commmand string" |
52 | depends on DEFAULT_CMDLINE | 52 | depends on DEFAULT_CMDLINE |
53 | help | 53 | help |
54 | buildin kernel commandline strings. | 54 | builtin kernel commandline strings. |
55 | 55 | ||
56 | config BLKDEV_RESERVE | 56 | config BLKDEV_RESERVE |
57 | bool "BLKDEV Reserved Memory" | 57 | bool "BLKDEV Reserved Memory" |
diff --git a/arch/h8300/kernel/irq.c b/arch/h8300/kernel/irq.c index 43d21e93f41f..8dec4dd57b4e 100644 --- a/arch/h8300/kernel/irq.c +++ b/arch/h8300/kernel/irq.c | |||
@@ -68,7 +68,7 @@ static void h8300_shutdown_irq(unsigned int irq) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * h8300 interrupt controler implementation | 71 | * h8300 interrupt controller implementation |
72 | */ | 72 | */ |
73 | struct irq_chip h8300irq_chip = { | 73 | struct irq_chip h8300irq_chip = { |
74 | .name = "H8300-INTC", | 74 | .name = "H8300-INTC", |
diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index 330638220a2e..e37c835e67cf 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c | |||
@@ -53,7 +53,7 @@ void time_init(void) | |||
53 | 53 | ||
54 | /* FIX by dqg : Set to zero for platforms that don't have tod */ | 54 | /* FIX by dqg : Set to zero for platforms that don't have tod */ |
55 | /* without this time is undefined and can overflow time_t, causing */ | 55 | /* without this time is undefined and can overflow time_t, causing */ |
56 | /* very stange errors */ | 56 | /* very strange errors */ |
57 | year = 1980; | 57 | year = 1980; |
58 | mon = day = 1; | 58 | mon = day = 1; |
59 | hour = min = sec = 0; | 59 | hour = min = sec = 0; |
diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c index f97183011c2c..f8f7d7ea97f1 100644 --- a/arch/h8300/kernel/traps.c +++ b/arch/h8300/kernel/traps.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Cloned from Linux/m68k. | 5 | * Cloned from Linux/m68k. |
6 | * | 6 | * |
7 | * No original Copyright holder listed, | 7 | * No original Copyright holder listed, |
8 | * Probabily original (C) Roman Zippel (assigned DJD, 1999) | 8 | * Probable original (C) Roman Zippel (assigned DJD, 1999) |
9 | * | 9 | * |
10 | * Copyright 1999-2000 D. Jeff Dionne, <jeff@rt-control.com> | 10 | * Copyright 1999-2000 D. Jeff Dionne, <jeff@rt-control.com> |
11 | * | 11 | * |
diff --git a/arch/h8300/platform/h8s/ints.c b/arch/h8300/platform/h8s/ints.c index a71d6e2a3919..551fd5f30d82 100644 --- a/arch/h8300/platform/h8s/ints.c +++ b/arch/h8300/platform/h8s/ints.c | |||
@@ -179,7 +179,7 @@ int request_irq(unsigned int irq, | |||
179 | if (use_kmalloc) | 179 | if (use_kmalloc) |
180 | irq_handle = kmalloc(sizeof(irq_handler_t), GFP_ATOMIC); | 180 | irq_handle = kmalloc(sizeof(irq_handler_t), GFP_ATOMIC); |
181 | else { | 181 | else { |
182 | /* use bootmem allocater */ | 182 | /* use bootmem allocator */ |
183 | irq_handle = (irq_handler_t *)alloc_bootmem(sizeof(irq_handler_t)); | 183 | irq_handle = (irq_handler_t *)alloc_bootmem(sizeof(irq_handler_t)); |
184 | irq_handle = (irq_handler_t *)((unsigned long)irq_handle | 0x80000000); | 184 | irq_handle = (irq_handler_t *)((unsigned long)irq_handle | 0x80000000); |
185 | } | 185 | } |
diff --git a/arch/h8300/platform/h8s/ints_h8s.c b/arch/h8300/platform/h8s/ints_h8s.c index 93395d2a8a07..faa8a459d952 100644 --- a/arch/h8300/platform/h8s/ints_h8s.c +++ b/arch/h8300/platform/h8s/ints_h8s.c | |||
@@ -63,7 +63,7 @@ static const struct irq_pins irq_assign_table1[16]={ | |||
63 | {H8300_GPIO_P2,H8300_GPIO_B6},{H8300_GPIO_P2,H8300_GPIO_B7}, | 63 | {H8300_GPIO_P2,H8300_GPIO_B6},{H8300_GPIO_P2,H8300_GPIO_B7}, |
64 | }; | 64 | }; |
65 | 65 | ||
66 | /* IRQ to GPIO pinno transrate */ | 66 | /* IRQ to GPIO pin translation */ |
67 | #define IRQ_GPIO_MAP(irqbit,irq,port,bit) \ | 67 | #define IRQ_GPIO_MAP(irqbit,irq,port,bit) \ |
68 | do { \ | 68 | do { \ |
69 | if (*(volatile unsigned short *)ITSR & irqbit) { \ | 69 | if (*(volatile unsigned short *)ITSR & irqbit) { \ |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index d0a4ea1ba14d..f6e44fc5283c 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -392,7 +392,7 @@ config X86_MCE_NONFATAL | |||
392 | will look at the machine check registers to see if anything happened. | 392 | will look at the machine check registers to see if anything happened. |
393 | Non-fatal problems automatically get corrected (but still logged). | 393 | Non-fatal problems automatically get corrected (but still logged). |
394 | Disable this if you don't want to see these messages. | 394 | Disable this if you don't want to see these messages. |
395 | Seeing the messages this option prints out may be indicative of dying hardware, | 395 | Seeing the messages this option prints out may be indicative of dying |
396 | or out-of-spec (ie, overclocked) hardware. | 396 | or out-of-spec (ie, overclocked) hardware. |
397 | This option only does something on certain CPUs. | 397 | This option only does something on certain CPUs. |
398 | (AMD Athlon/Duron and Intel Pentium 4) | 398 | (AMD Athlon/Duron and Intel Pentium 4) |
@@ -631,7 +631,7 @@ config NUMA | |||
631 | default n if X86_PC | 631 | default n if X86_PC |
632 | default y if (X86_NUMAQ || X86_SUMMIT) | 632 | default y if (X86_NUMAQ || X86_SUMMIT) |
633 | help | 633 | help |
634 | NUMA support for i386. This is currently high experimental | 634 | NUMA support for i386. This is currently highly experimental |
635 | and should be only used for kernel development. It might also | 635 | and should be only used for kernel development. It might also |
636 | cause boot failures. | 636 | cause boot failures. |
637 | 637 | ||
@@ -1080,7 +1080,7 @@ config APM_REAL_MODE_POWER_OFF | |||
1080 | 1080 | ||
1081 | endif # APM | 1081 | endif # APM |
1082 | 1082 | ||
1083 | source "arch/x86/kernel/cpu/cpufreq/Kconfig" | 1083 | source "arch/x86/kernel/cpu/cpufreq/Kconfig_32" |
1084 | 1084 | ||
1085 | source "drivers/cpuidle/Kconfig" | 1085 | source "drivers/cpuidle/Kconfig" |
1086 | 1086 | ||
diff --git a/arch/i386/Makefile b/arch/i386/Makefile index f036d2dee3de..b88e47ca3032 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile | |||
@@ -102,7 +102,7 @@ core-$(CONFIG_XEN) += arch/x86/xen/ | |||
102 | # default subarch .h files | 102 | # default subarch .h files |
103 | mflags-y += -Iinclude/asm-x86/mach-default | 103 | mflags-y += -Iinclude/asm-x86/mach-default |
104 | 104 | ||
105 | head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task_32.o | 105 | head-y := arch/x86/kernel/head_32.o arch/x86/kernel/init_task.o |
106 | 106 | ||
107 | libs-y += arch/x86/lib/ | 107 | libs-y += arch/x86/lib/ |
108 | core-y += arch/x86/kernel/ \ | 108 | core-y += arch/x86/kernel/ \ |
@@ -131,9 +131,9 @@ all: bzImage | |||
131 | zImage zlilo zdisk: KBUILD_IMAGE := arch/x86/boot/zImage | 131 | zImage zlilo zdisk: KBUILD_IMAGE := arch/x86/boot/zImage |
132 | 132 | ||
133 | zImage bzImage: vmlinux | 133 | zImage bzImage: vmlinux |
134 | $(Q)mkdir -p $(objtree)/arch/i386/boot | ||
135 | $(Q)ln -fsn $(objtree)/arch/x86/boot/bzImage $(objtree)/arch/i386/boot/bzImage | ||
136 | $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) | 134 | $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE) |
135 | $(Q)mkdir -p $(objtree)/arch/i386/boot | ||
136 | $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/i386/boot/bzImage | ||
137 | 137 | ||
138 | compressed: zImage | 138 | compressed: zImage |
139 | 139 | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index c89108e9770d..bef47725d4ad 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -452,9 +452,9 @@ config IA64_PALINFO | |||
452 | config IA64_MC_ERR_INJECT | 452 | config IA64_MC_ERR_INJECT |
453 | tristate "MC error injection support" | 453 | tristate "MC error injection support" |
454 | help | 454 | help |
455 | Selets whether support for MC error injection. By enabling the | 455 | Adds support for MC error injection. If enabled, the kernel |
456 | support, kernel provide sysfs interface for user application to | 456 | will provide a sysfs interface for user applications to |
457 | call MC error injection PAL procedure to inject various errors. | 457 | call MC error injection PAL procedures to inject various errors. |
458 | This is a useful tool for MCA testing. | 458 | This is a useful tool for MCA testing. |
459 | 459 | ||
460 | If you're unsure, do not select this option. | 460 | If you're unsure, do not select this option. |
@@ -491,7 +491,7 @@ config KEXEC | |||
491 | but it is independent of the system firmware. And like a reboot | 491 | but it is independent of the system firmware. And like a reboot |
492 | you can start any kernel with it, not just Linux. | 492 | you can start any kernel with it, not just Linux. |
493 | 493 | ||
494 | The name comes from the similiarity to the exec system call. | 494 | The name comes from the similarity to the exec system call. |
495 | 495 | ||
496 | It is an ongoing process to be certain the hardware in a machine | 496 | It is an ongoing process to be certain the hardware in a machine |
497 | is properly shutdown, so do not be surprised if this code does not | 497 | is properly shutdown, so do not be surprised if this code does not |
diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c index f8d8650383e0..d0c5b0b7da2f 100644 --- a/arch/m32r/kernel/irq.c +++ b/arch/m32r/kernel/irq.c | |||
@@ -71,7 +71,7 @@ skip: | |||
71 | } | 71 | } |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * do_IRQ handles all normal device IRQ's (the special | 74 | * do_IRQ handles all normal device IRQs (the special |
75 | * SMP cross-CPU interrupts have their own specific | 75 | * SMP cross-CPU interrupts have their own specific |
76 | * handlers). | 76 | * handlers). |
77 | */ | 77 | */ |
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c index 916faf6070af..a753d79c4e89 100644 --- a/arch/m32r/kernel/signal.c +++ b/arch/m32r/kernel/signal.c | |||
@@ -358,7 +358,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
358 | 358 | ||
359 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 359 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
360 | if (signr > 0) { | 360 | if (signr > 0) { |
361 | /* Reenable any watchpoints before delivering the | 361 | /* Re-enable any watchpoints before delivering the |
362 | * signal to user space. The processor register will | 362 | * signal to user space. The processor register will |
363 | * have been cleared if the watchpoint triggered | 363 | * have been cleared if the watchpoint triggered |
364 | * inside the kernel. | 364 | * inside the kernel. |
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c index 360129174b2b..c837bc13b015 100644 --- a/arch/m32r/kernel/smp.c +++ b/arch/m32r/kernel/smp.c | |||
@@ -202,7 +202,7 @@ void smp_flush_cache_all_interrupt(void) | |||
202 | } | 202 | } |
203 | 203 | ||
204 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 204 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
205 | /* TLB flush request Routins */ | 205 | /* TLB flush request Routines */ |
206 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 206 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
207 | 207 | ||
208 | /*==========================================================================* | 208 | /*==========================================================================* |
@@ -378,7 +378,7 @@ void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va) | |||
378 | * Name: flush_tlb_others | 378 | * Name: flush_tlb_others |
379 | * | 379 | * |
380 | * Description: This routine requests other CPU to execute flush TLB. | 380 | * Description: This routine requests other CPU to execute flush TLB. |
381 | * 1.Setup parmeters. | 381 | * 1.Setup parameters. |
382 | * 2.Send 'INVALIDATE_TLB_IPI' to other CPU. | 382 | * 2.Send 'INVALIDATE_TLB_IPI' to other CPU. |
383 | * Request other CPU to execute 'smp_invalidate_interrupt()'. | 383 | * Request other CPU to execute 'smp_invalidate_interrupt()'. |
384 | * 3.Wait for other CPUs operation finished. | 384 | * 3.Wait for other CPUs operation finished. |
@@ -502,7 +502,7 @@ void smp_invalidate_interrupt(void) | |||
502 | } | 502 | } |
503 | 503 | ||
504 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 504 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
505 | /* Stop CPU request Routins */ | 505 | /* Stop CPU request Routines */ |
506 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 506 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
507 | 507 | ||
508 | /*==========================================================================* | 508 | /*==========================================================================* |
@@ -566,7 +566,7 @@ static void stop_this_cpu(void *dummy) | |||
566 | } | 566 | } |
567 | 567 | ||
568 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 568 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
569 | /* Call function Routins */ | 569 | /* Call function Routines */ |
570 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 570 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
571 | 571 | ||
572 | /*==========================================================================* | 572 | /*==========================================================================* |
@@ -690,7 +690,7 @@ void smp_call_function_interrupt(void) | |||
690 | } | 690 | } |
691 | 691 | ||
692 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 692 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
693 | /* Timer Routins */ | 693 | /* Timer Routines */ |
694 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 694 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
695 | 695 | ||
696 | /*==========================================================================* | 696 | /*==========================================================================* |
@@ -802,7 +802,7 @@ void smp_local_timer_interrupt(void) | |||
802 | } | 802 | } |
803 | 803 | ||
804 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 804 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
805 | /* Send IPI Routins */ | 805 | /* Send IPI Routines */ |
806 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 806 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
807 | 807 | ||
808 | /*==========================================================================* | 808 | /*==========================================================================* |
@@ -814,7 +814,7 @@ void smp_local_timer_interrupt(void) | |||
814 | * | 814 | * |
815 | * Arguments: ipi_num - Number of IPI | 815 | * Arguments: ipi_num - Number of IPI |
816 | * try - 0 : Send IPI certainly. | 816 | * try - 0 : Send IPI certainly. |
817 | * !0 : The following IPI is not sended when Target CPU | 817 | * !0 : The following IPI is not sent when Target CPU |
818 | * has not received the before IPI. | 818 | * has not received the before IPI. |
819 | * | 819 | * |
820 | * Returns: void (cannot fail) | 820 | * Returns: void (cannot fail) |
@@ -844,7 +844,7 @@ void send_IPI_allbutself(int ipi_num, int try) | |||
844 | * Arguments: cpu_mask - Bitmap of target CPUs logical ID | 844 | * Arguments: cpu_mask - Bitmap of target CPUs logical ID |
845 | * ipi_num - Number of IPI | 845 | * ipi_num - Number of IPI |
846 | * try - 0 : Send IPI certainly. | 846 | * try - 0 : Send IPI certainly. |
847 | * !0 : The following IPI is not sended when Target CPU | 847 | * !0 : The following IPI is not sent when Target CPU |
848 | * has not received the before IPI. | 848 | * has not received the before IPI. |
849 | * | 849 | * |
850 | * Returns: void (cannot fail) | 850 | * Returns: void (cannot fail) |
@@ -885,7 +885,7 @@ static void send_IPI_mask(cpumask_t cpumask, int ipi_num, int try) | |||
885 | * Arguments: cpu_mask - Bitmap of target CPUs physical ID | 885 | * Arguments: cpu_mask - Bitmap of target CPUs physical ID |
886 | * ipi_num - Number of IPI | 886 | * ipi_num - Number of IPI |
887 | * try - 0 : Send IPI certainly. | 887 | * try - 0 : Send IPI certainly. |
888 | * !0 : The following IPI is not sended when Target CPU | 888 | * !0 : The following IPI is not sent when Target CPU |
889 | * has not received the before IPI. | 889 | * has not received the before IPI. |
890 | * | 890 | * |
891 | * Returns: IPICRi regster value. | 891 | * Returns: IPICRi regster value. |
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index 9dae410014d8..0e383da158e9 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -133,7 +133,7 @@ static void map_cpu_to_physid(int, int); | |||
133 | static void unmap_cpu_to_physid(int, int); | 133 | static void unmap_cpu_to_physid(int, int); |
134 | 134 | ||
135 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 135 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
136 | /* Boot up APs Routins : BSP */ | 136 | /* Boot up APs Routines : BSP */ |
137 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 137 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
138 | void __devinit smp_prepare_boot_cpu(void) | 138 | void __devinit smp_prepare_boot_cpu(void) |
139 | { | 139 | { |
@@ -404,7 +404,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
404 | } | 404 | } |
405 | 405 | ||
406 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 406 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
407 | /* Activate a secondary processor Routins */ | 407 | /* Activate a secondary processor Routines */ |
408 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 408 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
409 | 409 | ||
410 | /*==========================================================================* | 410 | /*==========================================================================* |
@@ -509,7 +509,7 @@ static void __init smp_online(void) | |||
509 | } | 509 | } |
510 | 510 | ||
511 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 511 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
512 | /* Boot up CPUs common Routins */ | 512 | /* Boot up CPUs common Routines */ |
513 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ | 513 | /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ |
514 | static void __init show_mp_info(int nr_cpu) | 514 | static void __init show_mp_info(int nr_cpu) |
515 | { | 515 | { |
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index 0fc2efec18f6..6d7a80fdad48 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c | |||
@@ -214,7 +214,7 @@ asmlinkage int sys_uname(struct old_utsname __user * name) | |||
214 | 214 | ||
215 | asmlinkage int sys_cacheflush(void *addr, int bytes, int cache) | 215 | asmlinkage int sys_cacheflush(void *addr, int bytes, int cache) |
216 | { | 216 | { |
217 | /* This should flush more selectivly ... */ | 217 | /* This should flush more selectively ... */ |
218 | _flush_cache_all(); | 218 | _flush_cache_all(); |
219 | return 0; | 219 | return 0; |
220 | } | 220 | } |
diff --git a/arch/m68k/amiga/pcmcia.c b/arch/m68k/amiga/pcmcia.c index fc57c6e72acf..186662ca1a89 100644 --- a/arch/m68k/amiga/pcmcia.c +++ b/arch/m68k/amiga/pcmcia.c | |||
@@ -33,7 +33,7 @@ void pcmcia_reset(void) | |||
33 | 33 | ||
34 | 34 | ||
35 | /* copy a tuple, including tuple header. return nb bytes copied */ | 35 | /* copy a tuple, including tuple header. return nb bytes copied */ |
36 | /* be carefull as this may trigger a GAYLE_IRQ_WR interrupt ! */ | 36 | /* be careful as this may trigger a GAYLE_IRQ_WR interrupt ! */ |
37 | 37 | ||
38 | int pcmcia_copy_tuple(unsigned char tuple_id, void *tuple, int max_len) | 38 | int pcmcia_copy_tuple(unsigned char tuple_id, void *tuple, int max_len) |
39 | { | 39 | { |
diff --git a/arch/m68k/ifpsp060/CHANGES b/arch/m68k/ifpsp060/CHANGES index c1e712dfc2e7..ba96596910fd 100644 --- a/arch/m68k/ifpsp060/CHANGES +++ b/arch/m68k/ifpsp060/CHANGES | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/MISC b/arch/m68k/ifpsp060/MISC index b7e644b94ae2..1a63913daa16 100644 --- a/arch/m68k/ifpsp060/MISC +++ b/arch/m68k/ifpsp060/MISC | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/README b/arch/m68k/ifpsp060/README index e3bced429bd3..f6f8f5c59419 100644 --- a/arch/m68k/ifpsp060/README +++ b/arch/m68k/ifpsp060/README | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/TEST.DOC b/arch/m68k/ifpsp060/TEST.DOC index 5e5900cb2dc4..1ba3aef1500f 100644 --- a/arch/m68k/ifpsp060/TEST.DOC +++ b/arch/m68k/ifpsp060/TEST.DOC | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/fplsp.doc b/arch/m68k/ifpsp060/fplsp.doc index fb637c436762..89730a934c5e 100644 --- a/arch/m68k/ifpsp060/fplsp.doc +++ b/arch/m68k/ifpsp060/fplsp.doc | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/fpsp.doc b/arch/m68k/ifpsp060/fpsp.doc index 408315209e62..23d513f72ed9 100644 --- a/arch/m68k/ifpsp060/fpsp.doc +++ b/arch/m68k/ifpsp060/fpsp.doc | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/fskeleton.S b/arch/m68k/ifpsp060/fskeleton.S index a45a4ff9d2af..0a1ae4f44130 100644 --- a/arch/m68k/ifpsp060/fskeleton.S +++ b/arch/m68k/ifpsp060/fskeleton.S | |||
@@ -4,7 +4,7 @@ | |||
4 | |M68060 Software Package | 4 | |M68060 Software Package |
5 | |Production Release P1.00 -- October 10, 1994 | 5 | |Production Release P1.00 -- October 10, 1994 |
6 | | | 6 | | |
7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | | | 8 | | |
9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | |To the maximum extent permitted by applicable law, | 10 | |To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/ilsp.doc b/arch/m68k/ifpsp060/ilsp.doc index f6fae6d900ae..4e6292f095aa 100644 --- a/arch/m68k/ifpsp060/ilsp.doc +++ b/arch/m68k/ifpsp060/ilsp.doc | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/iskeleton.S b/arch/m68k/ifpsp060/iskeleton.S index b2dbdf5ee309..91a9c65fee8a 100644 --- a/arch/m68k/ifpsp060/iskeleton.S +++ b/arch/m68k/ifpsp060/iskeleton.S | |||
@@ -4,7 +4,7 @@ | |||
4 | |M68060 Software Package | 4 | |M68060 Software Package |
5 | |Production Release P1.00 -- October 10, 1994 | 5 | |Production Release P1.00 -- October 10, 1994 |
6 | | | 6 | | |
7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | | | 8 | | |
9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | |To the maximum extent permitted by applicable law, | 10 | |To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/isp.doc b/arch/m68k/ifpsp060/isp.doc index 5a90fded3f0b..9dadd727fc50 100644 --- a/arch/m68k/ifpsp060/isp.doc +++ b/arch/m68k/ifpsp060/isp.doc | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/os.S b/arch/m68k/ifpsp060/os.S index aa4df87a6c42..7a0d6e428066 100644 --- a/arch/m68k/ifpsp060/os.S +++ b/arch/m68k/ifpsp060/os.S | |||
@@ -4,7 +4,7 @@ | |||
4 | |M68060 Software Package | 4 | |M68060 Software Package |
5 | |Production Release P1.00 -- October 10, 1994 | 5 | |Production Release P1.00 -- October 10, 1994 |
6 | | | 6 | | |
7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | |M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | | | 8 | | |
9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | |THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | |To the maximum extent permitted by applicable law, | 10 | |To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/fplsp.S b/arch/m68k/ifpsp060/src/fplsp.S index fdb79b927ef1..3b7ea2dc9f1b 100644 --- a/arch/m68k/ifpsp060/src/fplsp.S +++ b/arch/m68k/ifpsp060/src/fplsp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/fpsp.S b/arch/m68k/ifpsp060/src/fpsp.S index 3b597a9bbf43..6c1a9a217887 100644 --- a/arch/m68k/ifpsp060/src/fpsp.S +++ b/arch/m68k/ifpsp060/src/fpsp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/ftest.S b/arch/m68k/ifpsp060/src/ftest.S index 2edcbae0fd53..1f947915d81e 100644 --- a/arch/m68k/ifpsp060/src/ftest.S +++ b/arch/m68k/ifpsp060/src/ftest.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/ilsp.S b/arch/m68k/ifpsp060/src/ilsp.S index afa7422cddb5..970abaf3303e 100644 --- a/arch/m68k/ifpsp060/src/ilsp.S +++ b/arch/m68k/ifpsp060/src/ilsp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/isp.S b/arch/m68k/ifpsp060/src/isp.S index b269091d9df6..6dccda766e22 100644 --- a/arch/m68k/ifpsp060/src/isp.S +++ b/arch/m68k/ifpsp060/src/isp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/itest.S b/arch/m68k/ifpsp060/src/itest.S index ba4a30cbcbea..beca47e7d514 100644 --- a/arch/m68k/ifpsp060/src/itest.S +++ b/arch/m68k/ifpsp060/src/itest.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/ifpsp060/src/pfpsp.S b/arch/m68k/ifpsp060/src/pfpsp.S index 0c997c436beb..51b9f7d879dd 100644 --- a/arch/m68k/ifpsp060/src/pfpsp.S +++ b/arch/m68k/ifpsp060/src/pfpsp.S | |||
@@ -4,7 +4,7 @@ M68000 Hi-Performance Microprocessor Division | |||
4 | M68060 Software Package | 4 | M68060 Software Package |
5 | Production Release P1.00 -- October 10, 1994 | 5 | Production Release P1.00 -- October 10, 1994 |
6 | 6 | ||
7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. | 7 | M68060 Software Package Copyright © 1993, 1994 Motorola Inc. All rights reserved. |
8 | 8 | ||
9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. | 9 | THE SOFTWARE is provided on an "AS IS" basis and without warranty. |
10 | To the maximum extent permitted by applicable law, | 10 | To the maximum extent permitted by applicable law, |
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 8547dbc5e8d7..01b468b9392e 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c | |||
@@ -284,7 +284,7 @@ static struct mac_model mac_data_table[] = { | |||
284 | }, | 284 | }, |
285 | 285 | ||
286 | /* | 286 | /* |
287 | * Weirdified MacII hardware - all subtley different. Gee thanks | 287 | * Weirdified MacII hardware - all subtly different. Gee thanks |
288 | * Apple. All these boxes seem to have VIA2 in a different place to | 288 | * Apple. All these boxes seem to have VIA2 in a different place to |
289 | * the MacII (+1A000 rather than +4000) | 289 | * the MacII (+1A000 rather than +4000) |
290 | * CSA: see http://developer.apple.com/technotes/hw/hw_09.html | 290 | * CSA: see http://developer.apple.com/technotes/hw/hw_09.html |
@@ -707,7 +707,7 @@ static struct mac_model mac_data_table[] = { | |||
707 | * All of these probably have onboard SONIC in the Dock which | 707 | * All of these probably have onboard SONIC in the Dock which |
708 | * means we'll have to probe for it eventually. | 708 | * means we'll have to probe for it eventually. |
709 | * | 709 | * |
710 | * Are these reallly MAC_VIA_IIci? The developer notes for the | 710 | * Are these really MAC_VIA_IIci? The developer notes for the |
711 | * Duos show pretty much the same custom parts as in most of | 711 | * Duos show pretty much the same custom parts as in most of |
712 | * the other PowerBooks which would imply MAC_VIA_QUADRA. | 712 | * the other PowerBooks which would imply MAC_VIA_QUADRA. |
713 | */ | 713 | */ |
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index 0cea21f58192..5b2799eb96a6 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c | |||
@@ -100,7 +100,7 @@ | |||
100 | * finished; this function moves the message state to MSG_COMPLETE and signals | 100 | * finished; this function moves the message state to MSG_COMPLETE and signals |
101 | * the IOP. This two-step process is provided to allow the handler to defer | 101 | * the IOP. This two-step process is provided to allow the handler to defer |
102 | * message processing to a bottom-half handler if the processing will take | 102 | * message processing to a bottom-half handler if the processing will take |
103 | * a signifigant amount of time (handlers are called at interrupt time so they | 103 | * a significant amount of time (handlers are called at interrupt time so they |
104 | * should execute quickly.) | 104 | * should execute quickly.) |
105 | */ | 105 | */ |
106 | 106 | ||
@@ -120,7 +120,7 @@ | |||
120 | 120 | ||
121 | /*#define DEBUG_IOP*/ | 121 | /*#define DEBUG_IOP*/ |
122 | 122 | ||
123 | /* Set to nonezero if the IOPs are present. Set by iop_init() */ | 123 | /* Set to non-zero if the IOPs are present. Set by iop_init() */ |
124 | 124 | ||
125 | int iop_scc_present,iop_ism_present; | 125 | int iop_scc_present,iop_ism_present; |
126 | 126 | ||
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index d7be16917efd..50603d3dce84 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * 990502 (jmt) - Major rewrite for new interrupt architecture as well as some | 9 | * 990502 (jmt) - Major rewrite for new interrupt architecture as well as some |
10 | * recent insights into OSS operational details. | 10 | * recent insights into OSS operational details. |
11 | * 990610 (jmt) - Now taking fulll advantage of the OSS. Interrupts are mapped | 11 | * 990610 (jmt) - Now taking full advantage of the OSS. Interrupts are mapped |
12 | * to mostly match the A/UX interrupt scheme supported on the | 12 | * to mostly match the A/UX interrupt scheme supported on the |
13 | * VIA side. Also added support for enabling the ISM irq again | 13 | * VIA side. Also added support for enabling the ISM irq again |
14 | * since we now have a functional IOP manager. | 14 | * since we now have a functional IOP manager. |
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index d5cac72eb3db..8df270e950fa 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * 6522 Versatile Interface Adapter (VIA) | 2 | * 6522 Versatile Interface Adapter (VIA) |
3 | * | 3 | * |
4 | * There are two of these on the Mac II. Some IRQ's are vectored | 4 | * There are two of these on the Mac II. Some IRQs are vectored |
5 | * via them as are assorted bits and bobs - eg RTC, ADB. | 5 | * via them as are assorted bits and bobs - eg RTC, ADB. |
6 | * | 6 | * |
7 | * CSA: Motorola seems to have removed documentation on the 6522 from | 7 | * CSA: Motorola seems to have removed documentation on the 6522 from |
diff --git a/arch/m68k/math-emu/fp_log.c b/arch/m68k/math-emu/fp_log.c index 87b4f0158560..b1033ae0d6f0 100644 --- a/arch/m68k/math-emu/fp_log.c +++ b/arch/m68k/math-emu/fp_log.c | |||
@@ -65,7 +65,7 @@ fp_fsqrt(struct fp_ext *dest, struct fp_ext *src) | |||
65 | fp_copy_ext(&src2, dest); | 65 | fp_copy_ext(&src2, dest); |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * The taylor row arround a for sqrt(x) is: | 68 | * The taylor row around a for sqrt(x) is: |
69 | * sqrt(x) = sqrt(a) + 1/(2*sqrt(a))*(x-a) + R | 69 | * sqrt(x) = sqrt(a) + 1/(2*sqrt(a))*(x-a) + R |
70 | * With a=1 this gives: | 70 | * With a=1 this gives: |
71 | * sqrt(x) = 1 + 1/2*(x-1) | 71 | * sqrt(x) = 1 + 1/2*(x-1) |
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index ad3ed1fb8879..46161cef08b9 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c | |||
@@ -184,7 +184,7 @@ static struct IRQ_TABLE eirqs[] = { | |||
184 | }; | 184 | }; |
185 | 185 | ||
186 | /* complain only this many times about spurious ints : */ | 186 | /* complain only this many times about spurious ints : */ |
187 | static int ccleirq=60; /* ISA dev IRQ's*/ | 187 | static int ccleirq=60; /* ISA dev IRQs*/ |
188 | /*static int cclirq=60;*/ /* internal */ | 188 | /*static int cclirq=60;*/ /* internal */ |
189 | 189 | ||
190 | /* FIXME: add shared ints,mask,unmask,probing.... */ | 190 | /* FIXME: add shared ints,mask,unmask,probing.... */ |
@@ -234,7 +234,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp) | |||
234 | * There is a little mess wrt which IRQ really caused this irq request. The | 234 | * There is a little mess wrt which IRQ really caused this irq request. The |
235 | * main problem is that IIRQ_REG and EIRQ_REG reflect the state when they | 235 | * main problem is that IIRQ_REG and EIRQ_REG reflect the state when they |
236 | * are read - which is long after the request came in. In theory IRQs should | 236 | * are read - which is long after the request came in. In theory IRQs should |
237 | * not just go away but they occassionally do | 237 | * not just go away but they occasionally do |
238 | */ | 238 | */ |
239 | if (irq > 4 && irq <= 15 && mext_disabled) { | 239 | if (irq > 4 && irq <= 15 && mext_disabled) { |
240 | /*aliased_irq++;*/ | 240 | /*aliased_irq++;*/ |
diff --git a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c index 7a0e3a220687..fb0f6a20cc3c 100644 --- a/arch/m68k/sun3/mmu_emu.c +++ b/arch/m68k/sun3/mmu_emu.c | |||
@@ -239,7 +239,7 @@ void clear_context(unsigned long context) | |||
239 | /* gets an empty context. if full, kills the next context listed to | 239 | /* gets an empty context. if full, kills the next context listed to |
240 | die first */ | 240 | die first */ |
241 | /* This context invalidation scheme is, well, totally arbitrary, I'm | 241 | /* This context invalidation scheme is, well, totally arbitrary, I'm |
242 | sure it could be much more intellegent... but it gets the job done | 242 | sure it could be much more intelligent... but it gets the job done |
243 | for now without much overhead in making it's decision. */ | 243 | for now without much overhead in making it's decision. */ |
244 | /* todo: come up with optimized scheme for flushing contexts */ | 244 | /* todo: come up with optimized scheme for flushing contexts */ |
245 | unsigned long get_free_context(struct mm_struct *mm) | 245 | unsigned long get_free_context(struct mm_struct *mm) |
diff --git a/arch/m68k/tools/amiga/dmesg.c b/arch/m68k/tools/amiga/dmesg.c index e892748e7386..7340f5b6cf6d 100644 --- a/arch/m68k/tools/amiga/dmesg.c +++ b/arch/m68k/tools/amiga/dmesg.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * in Chip RAM with the kernel command | 3 | * in Chip RAM with the kernel command |
4 | * line option `debug=mem'. | 4 | * line option `debug=mem'. |
5 | * | 5 | * |
6 | * © Copyright 1996 by Geert Uytterhoeven <geert@linux-m68k.org> | 6 | * © Copyright 1996 by Geert Uytterhoeven <geert@linux-m68k.org> |
7 | * | 7 | * |
8 | * | 8 | * |
9 | * Usage: | 9 | * Usage: |
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c index e53c446d10e4..f18352fa35a6 100644 --- a/arch/m68knommu/platform/5307/pit.c +++ b/arch/m68knommu/platform/5307/pit.c | |||
@@ -83,7 +83,7 @@ unsigned long coldfire_pit_offset(void) | |||
83 | 83 | ||
84 | /* | 84 | /* |
85 | * If we are still in the first half of the upcount and a | 85 | * If we are still in the first half of the upcount and a |
86 | * timer interupt is pending, then add on a ticks worth of time. | 86 | * timer interrupt is pending, then add on a ticks worth of time. |
87 | */ | 87 | */ |
88 | offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr; | 88 | offset = ((pmr - pcntr) * (1000000 / HZ)) / pmr; |
89 | if ((offset < (1000000 / HZ / 2)) && (*ipr & MCFPIT_IMR_IBIT)) | 89 | if ((offset < (1000000 / HZ / 2)) && (*ipr & MCFPIT_IMR_IBIT)) |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 4dc142d394a3..3ecff5e9e4f3 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1812,7 +1812,7 @@ config KEXEC | |||
1812 | but it is independent of the system firmware. And like a reboot | 1812 | but it is independent of the system firmware. And like a reboot |
1813 | you can start any kernel with it, not just Linux. | 1813 | you can start any kernel with it, not just Linux. |
1814 | 1814 | ||
1815 | The name comes from the similiarity to the exec system call. | 1815 | The name comes from the similarity to the exec system call. |
1816 | 1816 | ||
1817 | It is an ongoing process to be certain the hardware in a machine | 1817 | It is an ongoing process to be certain the hardware in a machine |
1818 | is properly shutdown, so do not be surprised if this code does not | 1818 | is properly shutdown, so do not be surprised if this code does not |
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c index cb0801437b66..e7ed0ac48537 100644 --- a/arch/mips/kernel/module.c +++ b/arch/mips/kernel/module.c | |||
@@ -381,7 +381,7 @@ const struct exception_table_entry *search_module_dbetables(unsigned long addr) | |||
381 | return e; | 381 | return e; |
382 | } | 382 | } |
383 | 383 | ||
384 | /* Put in dbe list if neccessary. */ | 384 | /* Put in dbe list if necessary. */ |
385 | int module_finalize(const Elf_Ehdr *hdr, | 385 | int module_finalize(const Elf_Ehdr *hdr, |
386 | const Elf_Shdr *sechdrs, | 386 | const Elf_Shdr *sechdrs, |
387 | struct module *me) | 387 | struct module *me) |
diff --git a/arch/mips/pci/pci-excite.c b/arch/mips/pci/pci-excite.c index 3c86c77cb74f..8a56876afcc6 100644 --- a/arch/mips/pci/pci-excite.c +++ b/arch/mips/pci/pci-excite.c | |||
@@ -131,7 +131,7 @@ static int __init basler_excite_pci_setup(void) | |||
131 | ocd_writel(0x00000000, bar + 0x100); | 131 | ocd_writel(0x00000000, bar + 0x100); |
132 | } | 132 | } |
133 | 133 | ||
134 | /* Finally, enable the PCI interupt */ | 134 | /* Finally, enable the PCI interrupt */ |
135 | #if USB_IRQ > 7 | 135 | #if USB_IRQ > 7 |
136 | set_c0_intcontrol(1 << USB_IRQ); | 136 | set_c0_intcontrol(1 << USB_IRQ); |
137 | #else | 137 | #else |
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c index 39bb15f1f2a6..4df070f2ff5d 100644 --- a/arch/mips/sni/pcimt.c +++ b/arch/mips/sni/pcimt.c | |||
@@ -246,7 +246,7 @@ static void pcimt_hwint1(void) | |||
246 | /* | 246 | /* |
247 | * Note: ASIC PCI's builtin interrupt achknowledge feature is | 247 | * Note: ASIC PCI's builtin interrupt achknowledge feature is |
248 | * broken. Using it may result in loss of some or all i8259 | 248 | * broken. Using it may result in loss of some or all i8259 |
249 | * interupts, so don't use PCIMT_INT_ACKNOWLEDGE ... | 249 | * interrupts, so don't use PCIMT_INT_ACKNOWLEDGE ... |
250 | */ | 250 | */ |
251 | irq = i8259_irq(); | 251 | irq = i8259_irq(); |
252 | if (unlikely(irq < 0)) | 252 | if (unlikely(irq < 0)) |
diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S index 8b4a4ee85eca..f1ee0b3f78f2 100644 --- a/arch/powerpc/kernel/cpu_setup_6xx.S +++ b/arch/powerpc/kernel/cpu_setup_6xx.S | |||
@@ -113,7 +113,7 @@ setup_604_hid0: | |||
113 | * around #3 and with the same fix we use. We may want to | 113 | * around #3 and with the same fix we use. We may want to |
114 | * check if the CPU is using 60x bus mode in which case | 114 | * check if the CPU is using 60x bus mode in which case |
115 | * the workaround for errata #4 is useless. Also, we may | 115 | * the workaround for errata #4 is useless. Also, we may |
116 | * want to explicitely clear HID0_NOPDST as this is not | 116 | * want to explicitly clear HID0_NOPDST as this is not |
117 | * needed once we have applied workaround #5 (though it's | 117 | * needed once we have applied workaround #5 (though it's |
118 | * not set by Apple's firmware at least). | 118 | * not set by Apple's firmware at least). |
119 | */ | 119 | */ |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 2250f9e6c5ca..b0e5deb4274f 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -491,7 +491,7 @@ struct irq_host *irq_alloc_host(struct device_node *of_node, | |||
491 | 491 | ||
492 | /* Legacy flags are left to default at this point, | 492 | /* Legacy flags are left to default at this point, |
493 | * one can then use irq_create_mapping() to | 493 | * one can then use irq_create_mapping() to |
494 | * explicitely change them | 494 | * explicitly change them |
495 | */ | 495 | */ |
496 | ops->map(host, i, i); | 496 | ops->map(host, i, i); |
497 | } | 497 | } |
diff --git a/arch/powerpc/kernel/l2cr_6xx.S b/arch/powerpc/kernel/l2cr_6xx.S index 858f28ac8a06..2a2f3c3f6d80 100644 --- a/arch/powerpc/kernel/l2cr_6xx.S +++ b/arch/powerpc/kernel/l2cr_6xx.S | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | L2CR functions | 2 | L2CR functions |
3 | Copyright © 1997-1998 by PowerLogix R & D, Inc. | 3 | Copyright © 1997-1998 by PowerLogix R & D, Inc. |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 229d355ed86a..ea22cad2cd0a 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -120,7 +120,7 @@ config PPC_PMI | |||
120 | depends on PPC_IBM_CELL_BLADE | 120 | depends on PPC_IBM_CELL_BLADE |
121 | help | 121 | help |
122 | PMI (Platform Management Interrupt) is a way to | 122 | PMI (Platform Management Interrupt) is a way to |
123 | communicate with the BMC (Baseboard Mangement Controller). | 123 | communicate with the BMC (Baseboard Management Controller). |
124 | It is used in some IBM Cell blades. | 124 | It is used in some IBM Cell blades. |
125 | default m | 125 | default m |
126 | 126 | ||
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index d72b16d6816e..d9e56a503795 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -748,7 +748,7 @@ static ssize_t spufs_wbox_write(struct file *file, const char __user *buf, | |||
748 | if (count) | 748 | if (count) |
749 | goto out; | 749 | goto out; |
750 | 750 | ||
751 | /* write aѕ much as possible */ | 751 | /* write as much as possible */ |
752 | for (count = 4, udata++; (count + 4) <= len; count += 4, udata++) { | 752 | for (count = 4, udata++; (count + 4) <= len; count += 4, udata++) { |
753 | int ret; | 753 | int ret; |
754 | ret = __get_user(wbox_data, udata); | 754 | ret = __get_user(wbox_data, udata); |
diff --git a/arch/powerpc/platforms/celleb/scc_uhc.c b/arch/powerpc/platforms/celleb/scc_uhc.c index a7c548bde2e3..b59c38a06e3e 100644 --- a/arch/powerpc/platforms/celleb/scc_uhc.c +++ b/arch/powerpc/platforms/celleb/scc_uhc.c | |||
@@ -36,7 +36,7 @@ static inline int uhc_clkctrl_ready(u32 val) | |||
36 | } | 36 | } |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * UHC(usb host controler) enable function. | 39 | * UHC(usb host controller) enable function. |
40 | * affect to both of OHCI and EHCI core module. | 40 | * affect to both of OHCI and EHCI core module. |
41 | */ | 41 | */ |
42 | static void enable_scc_uhc(struct pci_dev *dev) | 42 | static void enable_scc_uhc(struct pci_dev *dev) |
diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c index 388bb711f1b0..b4d9534d2b0e 100644 --- a/arch/sh64/kernel/pci_sh5.c +++ b/arch/sh64/kernel/pci_sh5.c | |||
@@ -480,7 +480,7 @@ static int __init pcibios_init(void) | |||
480 | return -EINVAL; | 480 | return -EINVAL; |
481 | } | 481 | } |
482 | 482 | ||
483 | /* The pci subsytem needs to know where memory is and how much | 483 | /* The pci subsystem needs to know where memory is and how much |
484 | * of it there is. I've simply made these globals. A better mechanism | 484 | * of it there is. I've simply made these globals. A better mechanism |
485 | * is probably needed. | 485 | * is probably needed. |
486 | */ | 486 | */ |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index d8925d285573..dd1689b814cb 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -3,7 +3,7 @@ config DEFCONFIG_LIST | |||
3 | option defconfig_list | 3 | option defconfig_list |
4 | default "arch/$ARCH/defconfig" | 4 | default "arch/$ARCH/defconfig" |
5 | 5 | ||
6 | # UML uses the generic IRQ sugsystem | 6 | # UML uses the generic IRQ subsystem |
7 | config GENERIC_HARDIRQS | 7 | config GENERIC_HARDIRQS |
8 | bool | 8 | bool |
9 | default y | 9 | default y |
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 76fe0b0da996..83bf15a3dda8 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -35,7 +35,7 @@ static void line_timer_cb(struct work_struct *work) | |||
35 | /* | 35 | /* |
36 | * Returns the free space inside the ring buffer of this line. | 36 | * Returns the free space inside the ring buffer of this line. |
37 | * | 37 | * |
38 | * Should be called while holding line->lock (this does not modify datas). | 38 | * Should be called while holding line->lock (this does not modify data). |
39 | */ | 39 | */ |
40 | static int write_room(struct line *line) | 40 | static int write_room(struct line *line) |
41 | { | 41 | { |
diff --git a/arch/um/drivers/null.c b/arch/um/drivers/null.c index 21ad3d7932b3..2b45a1446c86 100644 --- a/arch/um/drivers/null.c +++ b/arch/um/drivers/null.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #include "chan_user.h" | 9 | #include "chan_user.h" |
10 | #include "os.h" | 10 | #include "os.h" |
11 | 11 | ||
12 | /* This address is used only as a unique identifer */ | 12 | /* This address is used only as a unique identifier */ |
13 | static int null_chan; | 13 | static int null_chan; |
14 | 14 | ||
15 | static void *null_init(char *str, int device, const struct chan_opts *opts) | 15 | static void *null_init(char *str, int device, const struct chan_opts *opts) |
diff --git a/arch/um/drivers/stderr_console.c b/arch/um/drivers/stderr_console.c index 4739dd527b43..d07a97f8b994 100644 --- a/arch/um/drivers/stderr_console.c +++ b/arch/um/drivers/stderr_console.c | |||
@@ -8,7 +8,7 @@ | |||
8 | /* trivial console driver -- simply dump everything to stderr */ | 8 | /* trivial console driver -- simply dump everything to stderr */ |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Don't register by default -- as this registeres very early in the | 11 | * Don't register by default -- as this registers very early in the |
12 | * boot process it becomes the default console. | 12 | * boot process it becomes the default console. |
13 | * | 13 | * |
14 | * Initialized at init time. | 14 | * Initialized at init time. |
diff --git a/arch/um/kernel/gmon_syms.c b/arch/um/kernel/gmon_syms.c index 13aa115cd1b4..734f873cab12 100644 --- a/arch/um/kernel/gmon_syms.c +++ b/arch/um/kernel/gmon_syms.c | |||
@@ -12,8 +12,8 @@ EXPORT_SYMBOL(__bb_init_func); | |||
12 | * versions in libgcov. | 12 | * versions in libgcov. |
13 | * | 13 | * |
14 | * Since SuSE backported the fix, we cannot handle it depending on GCC version. | 14 | * Since SuSE backported the fix, we cannot handle it depending on GCC version. |
15 | * So, unconditinally export it. But also give it a weak declaration, which will | 15 | * So, unconditionally export it. But also give it a weak declaration, which will |
16 | * be overriden by any other one. | 16 | * be overridden by any other one. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | extern void __gcov_init(void *) __attribute__((weak)); | 19 | extern void __gcov_init(void *) __attribute__((weak)); |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 277fce17b088..70c2d625b070 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -326,7 +326,7 @@ int deactivate_all_fds(void) | |||
326 | } | 326 | } |
327 | 327 | ||
328 | /* | 328 | /* |
329 | * do_IRQ handles all normal device IRQ's (the special | 329 | * do_IRQ handles all normal device IRQs (the special |
330 | * SMP cross-CPU interrupts have their own specific | 330 | * SMP cross-CPU interrupts have their own specific |
331 | * handlers). | 331 | * handlers). |
332 | */ | 332 | */ |
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index a0eba0833068..47b57b497d55 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
@@ -237,7 +237,7 @@ void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs, | |||
237 | /* User-mode eip? */ | 237 | /* User-mode eip? */ |
238 | info.si_addr = UPT_IS_USER(regs) ? (void __user *) UPT_IP(regs) : NULL; | 238 | info.si_addr = UPT_IS_USER(regs) ? (void __user *) UPT_IP(regs) : NULL; |
239 | 239 | ||
240 | /* Send us the fakey SIGTRAP */ | 240 | /* Send us the fake SIGTRAP */ |
241 | force_sig_info(SIGTRAP, &info, tsk); | 241 | force_sig_info(SIGTRAP, &info, tsk); |
242 | } | 242 | } |
243 | 243 | ||
diff --git a/arch/um/sys-i386/bug.c b/arch/um/sys-i386/bug.c index 200c8ba2879b..a4360b5207db 100644 --- a/arch/um/sys-i386/bug.c +++ b/arch/um/sys-i386/bug.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/uaccess.h> | 6 | #include <linux/uaccess.h> |
7 | 7 | ||
8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | 8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because |
9 | * that's not relevent in skas mode. | 9 | * that's not relevant in skas mode. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | int is_valid_bugaddr(unsigned long eip) | 12 | int is_valid_bugaddr(unsigned long eip) |
diff --git a/arch/um/sys-i386/tls.c b/arch/um/sys-i386/tls.c index b02266ab5c55..fcaff86b000c 100644 --- a/arch/um/sys-i386/tls.c +++ b/arch/um/sys-i386/tls.c | |||
@@ -45,7 +45,7 @@ int do_get_thread_area(struct user_desc *info) | |||
45 | * XXX: Consider leaving one free slot for glibc usage at first place. This must | 45 | * XXX: Consider leaving one free slot for glibc usage at first place. This must |
46 | * be done here (and by changing GDT_ENTRY_TLS_* macros) and nowhere else. | 46 | * be done here (and by changing GDT_ENTRY_TLS_* macros) and nowhere else. |
47 | * | 47 | * |
48 | * Also, this must be tested when compiling in SKAS mode with dinamic linking | 48 | * Also, this must be tested when compiling in SKAS mode with dynamic linking |
49 | * and running against NPTL. | 49 | * and running against NPTL. |
50 | */ | 50 | */ |
51 | static int get_free_idx(struct task_struct* task) | 51 | static int get_free_idx(struct task_struct* task) |
diff --git a/arch/um/sys-x86_64/bug.c b/arch/um/sys-x86_64/bug.c index 200c8ba2879b..a4360b5207db 100644 --- a/arch/um/sys-x86_64/bug.c +++ b/arch/um/sys-x86_64/bug.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/uaccess.h> | 6 | #include <linux/uaccess.h> |
7 | 7 | ||
8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because | 8 | /* Mostly copied from i386/x86_86 - eliminated the eip < PAGE_OFFSET because |
9 | * that's not relevent in skas mode. | 9 | * that's not relevant in skas mode. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | int is_valid_bugaddr(unsigned long eip) | 12 | int is_valid_bugaddr(unsigned long eip) |
diff --git a/arch/v850/kernel/me2.c b/arch/v850/kernel/me2.c index 38be5c194f6b..007115dc9ce0 100644 --- a/arch/v850/kernel/me2.c +++ b/arch/v850/kernel/me2.c | |||
@@ -58,13 +58,13 @@ void __init me2_init_irqs (void) | |||
58 | void me2_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) | 58 | void me2_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud) |
59 | { | 59 | { |
60 | if (chan == 0) { | 60 | if (chan == 0) { |
61 | /* Specify that the relevent pins on the chip should do | 61 | /* Specify that the relevant pins on the chip should do |
62 | serial I/O, not direct I/O. */ | 62 | serial I/O, not direct I/O. */ |
63 | ME2_PORT1_PMC |= 0xC; | 63 | ME2_PORT1_PMC |= 0xC; |
64 | /* Specify that we're using the UART, not the CSI device. */ | 64 | /* Specify that we're using the UART, not the CSI device. */ |
65 | ME2_PORT1_PFC |= 0xC; | 65 | ME2_PORT1_PFC |= 0xC; |
66 | } else if (chan == 1) { | 66 | } else if (chan == 1) { |
67 | /* Specify that the relevent pins on the chip should do | 67 | /* Specify that the relevant pins on the chip should do |
68 | serial I/O, not direct I/O. */ | 68 | serial I/O, not direct I/O. */ |
69 | ME2_PORT2_PMC |= 0x6; | 69 | ME2_PORT2_PMC |= 0x6; |
70 | /* Specify that we're using the UART, not the CSI device. */ | 70 | /* Specify that we're using the UART, not the CSI device. */ |
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c index 35a4bd5515cb..7165478824e7 100644 --- a/arch/v850/kernel/rte_mb_a_pci.c +++ b/arch/v850/kernel/rte_mb_a_pci.c | |||
@@ -179,7 +179,7 @@ static int __devinit pcibios_init (void) | |||
179 | default uses. */ | 179 | default uses. */ |
180 | 180 | ||
181 | /* Significant address bits used for decoding PCI GCS5 space | 181 | /* Significant address bits used for decoding PCI GCS5 space |
182 | accessess. */ | 182 | accesses. */ |
183 | MB_A_PCI_DMRR = ~(MB_A_PCI_MEM_SIZE - 1); | 183 | MB_A_PCI_DMRR = ~(MB_A_PCI_MEM_SIZE - 1); |
184 | 184 | ||
185 | /* I don't understand this, but the SolutionGear example code | 185 | /* I don't understand this, but the SolutionGear example code |
@@ -775,7 +775,7 @@ pci_alloc_consistent (struct pci_dev *pdev, size_t size, dma_addr_t *dma_addr) | |||
775 | /* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must | 775 | /* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must |
776 | be values that were returned from pci_alloc_consistent. SIZE must be | 776 | be values that were returned from pci_alloc_consistent. SIZE must be |
777 | the same as what as passed into pci_alloc_consistent. References to | 777 | the same as what as passed into pci_alloc_consistent. References to |
778 | the memory and mappings assosciated with CPU_ADDR or DMA_ADDR past | 778 | the memory and mappings associated with CPU_ADDR or DMA_ADDR past |
779 | this call are illegal. */ | 779 | this call are illegal. */ |
780 | void | 780 | void |
781 | pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr, | 781 | pci_free_consistent (struct pci_dev *pdev, size_t size, void *cpu_addr, |
diff --git a/arch/x86/boot/compressed/misc_32.c b/arch/x86/boot/compressed/misc_32.c index b28505c544c9..1dc1e19c0a9f 100644 --- a/arch/x86/boot/compressed/misc_32.c +++ b/arch/x86/boot/compressed/misc_32.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Getting to provable safe in place decompression is hard. | 27 | * Getting to provable safe in place decompression is hard. |
28 | * Worst case behaviours need to be analized. | 28 | * Worst case behaviours need to be analyzed. |
29 | * Background information: | 29 | * Background information: |
30 | * | 30 | * |
31 | * The file layout is: | 31 | * The file layout is: |
@@ -94,7 +94,7 @@ | |||
94 | * Adding 32768 instead of 32767 just makes for round numbers. | 94 | * Adding 32768 instead of 32767 just makes for round numbers. |
95 | * Adding the decompressor_size is necessary as it musht live after all | 95 | * Adding the decompressor_size is necessary as it musht live after all |
96 | * of the data as well. Last I measured the decompressor is about 14K. | 96 | * of the data as well. Last I measured the decompressor is about 14K. |
97 | * 10K of actuall data and 4K of bss. | 97 | * 10K of actual data and 4K of bss. |
98 | * | 98 | * |
99 | */ | 99 | */ |
100 | 100 | ||
diff --git a/arch/x86/boot/compressed/misc_64.c b/arch/x86/boot/compressed/misc_64.c index f932b0e89096..6ea015aa65e4 100644 --- a/arch/x86/boot/compressed/misc_64.c +++ b/arch/x86/boot/compressed/misc_64.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Getting to provable safe in place decompression is hard. | 27 | * Getting to provable safe in place decompression is hard. |
28 | * Worst case behaviours need to be analized. | 28 | * Worst case behaviours need to be analyzed. |
29 | * Background information: | 29 | * Background information: |
30 | * | 30 | * |
31 | * The file layout is: | 31 | * The file layout is: |
@@ -94,7 +94,7 @@ | |||
94 | * Adding 32768 instead of 32767 just makes for round numbers. | 94 | * Adding 32768 instead of 32767 just makes for round numbers. |
95 | * Adding the decompressor_size is necessary as it musht live after all | 95 | * Adding the decompressor_size is necessary as it musht live after all |
96 | * of the data as well. Last I measured the decompressor is about 14K. | 96 | * of the data as well. Last I measured the decompressor is about 14K. |
97 | * 10K of actuall data and 4K of bss. | 97 | * 10K of actual data and 4K of bss. |
98 | * | 98 | * |
99 | */ | 99 | */ |
100 | 100 | ||
diff --git a/arch/x86/ia32/ia32_binfmt.c b/arch/x86/ia32/ia32_binfmt.c index 5027650eb273..55822d2cf053 100644 --- a/arch/x86/ia32/ia32_binfmt.c +++ b/arch/x86/ia32/ia32_binfmt.c | |||
@@ -5,10 +5,6 @@ | |||
5 | * This tricks binfmt_elf.c into loading 32bit binaries using lots | 5 | * This tricks binfmt_elf.c into loading 32bit binaries using lots |
6 | * of ugly preprocessor tricks. Talk about very very poor man's inheritance. | 6 | * of ugly preprocessor tricks. Talk about very very poor man's inheritance. |
7 | */ | 7 | */ |
8 | #define __ASM_X86_64_ELF_H 1 | ||
9 | |||
10 | #undef ELF_CLASS | ||
11 | #define ELF_CLASS ELFCLASS32 | ||
12 | 8 | ||
13 | #include <linux/types.h> | 9 | #include <linux/types.h> |
14 | #include <linux/stddef.h> | 10 | #include <linux/stddef.h> |
@@ -19,6 +15,7 @@ | |||
19 | #include <linux/binfmts.h> | 15 | #include <linux/binfmts.h> |
20 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
21 | #include <linux/security.h> | 17 | #include <linux/security.h> |
18 | #include <linux/elfcore-compat.h> | ||
22 | 19 | ||
23 | #include <asm/segment.h> | 20 | #include <asm/segment.h> |
24 | #include <asm/ptrace.h> | 21 | #include <asm/ptrace.h> |
@@ -31,6 +28,20 @@ | |||
31 | #include <asm/ia32.h> | 28 | #include <asm/ia32.h> |
32 | #include <asm/vsyscall32.h> | 29 | #include <asm/vsyscall32.h> |
33 | 30 | ||
31 | #undef ELF_ARCH | ||
32 | #undef ELF_CLASS | ||
33 | #define ELF_CLASS ELFCLASS32 | ||
34 | #define ELF_ARCH EM_386 | ||
35 | |||
36 | #undef elfhdr | ||
37 | #undef elf_phdr | ||
38 | #undef elf_note | ||
39 | #undef elf_addr_t | ||
40 | #define elfhdr elf32_hdr | ||
41 | #define elf_phdr elf32_phdr | ||
42 | #define elf_note elf32_note | ||
43 | #define elf_addr_t Elf32_Off | ||
44 | |||
34 | #define ELF_NAME "elf/i386" | 45 | #define ELF_NAME "elf/i386" |
35 | 46 | ||
36 | #define AT_SYSINFO 32 | 47 | #define AT_SYSINFO 32 |
@@ -48,74 +59,20 @@ int sysctl_vsyscall32 = 1; | |||
48 | } while(0) | 59 | } while(0) |
49 | 60 | ||
50 | struct file; | 61 | struct file; |
51 | struct elf_phdr; | ||
52 | 62 | ||
53 | #define IA32_EMULATOR 1 | 63 | #define IA32_EMULATOR 1 |
54 | 64 | ||
55 | #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000) | 65 | #undef ELF_ET_DYN_BASE |
56 | |||
57 | #undef ELF_ARCH | ||
58 | #define ELF_ARCH EM_386 | ||
59 | |||
60 | #define ELF_DATA ELFDATA2LSB | ||
61 | 66 | ||
62 | #define USE_ELF_CORE_DUMP 1 | 67 | #define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000) |
63 | |||
64 | /* Override elfcore.h */ | ||
65 | #define _LINUX_ELFCORE_H 1 | ||
66 | typedef unsigned int elf_greg_t; | ||
67 | |||
68 | #define ELF_NGREG (sizeof (struct user_regs_struct32) / sizeof(elf_greg_t)) | ||
69 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
70 | |||
71 | struct elf_siginfo | ||
72 | { | ||
73 | int si_signo; /* signal number */ | ||
74 | int si_code; /* extra code */ | ||
75 | int si_errno; /* errno */ | ||
76 | }; | ||
77 | 68 | ||
78 | #define jiffies_to_timeval(a,b) do { (b)->tv_usec = 0; (b)->tv_sec = (a)/HZ; }while(0) | 69 | #define jiffies_to_timeval(a,b) do { (b)->tv_usec = 0; (b)->tv_sec = (a)/HZ; }while(0) |
79 | 70 | ||
80 | struct elf_prstatus | ||
81 | { | ||
82 | struct elf_siginfo pr_info; /* Info associated with signal */ | ||
83 | short pr_cursig; /* Current signal */ | ||
84 | unsigned int pr_sigpend; /* Set of pending signals */ | ||
85 | unsigned int pr_sighold; /* Set of held signals */ | ||
86 | pid_t pr_pid; | ||
87 | pid_t pr_ppid; | ||
88 | pid_t pr_pgrp; | ||
89 | pid_t pr_sid; | ||
90 | struct compat_timeval pr_utime; /* User time */ | ||
91 | struct compat_timeval pr_stime; /* System time */ | ||
92 | struct compat_timeval pr_cutime; /* Cumulative user time */ | ||
93 | struct compat_timeval pr_cstime; /* Cumulative system time */ | ||
94 | elf_gregset_t pr_reg; /* GP registers */ | ||
95 | int pr_fpvalid; /* True if math co-processor being used. */ | ||
96 | }; | ||
97 | |||
98 | #define ELF_PRARGSZ (80) /* Number of chars for args */ | ||
99 | |||
100 | struct elf_prpsinfo | ||
101 | { | ||
102 | char pr_state; /* numeric process state */ | ||
103 | char pr_sname; /* char for pr_state */ | ||
104 | char pr_zomb; /* zombie */ | ||
105 | char pr_nice; /* nice val */ | ||
106 | unsigned int pr_flag; /* flags */ | ||
107 | __u16 pr_uid; | ||
108 | __u16 pr_gid; | ||
109 | pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; | ||
110 | /* Lots missing */ | ||
111 | char pr_fname[16]; /* filename of executable */ | ||
112 | char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ | ||
113 | }; | ||
114 | |||
115 | #define _GET_SEG(x) \ | 71 | #define _GET_SEG(x) \ |
116 | ({ __u32 seg; asm("movl %%" __stringify(x) ",%0" : "=r"(seg)); seg; }) | 72 | ({ __u32 seg; asm("movl %%" __stringify(x) ",%0" : "=r"(seg)); seg; }) |
117 | 73 | ||
118 | /* Assumes current==process to be dumped */ | 74 | /* Assumes current==process to be dumped */ |
75 | #undef ELF_CORE_COPY_REGS | ||
119 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ | 76 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ |
120 | pr_reg[0] = regs->rbx; \ | 77 | pr_reg[0] = regs->rbx; \ |
121 | pr_reg[1] = regs->rcx; \ | 78 | pr_reg[1] = regs->rcx; \ |
@@ -135,36 +92,41 @@ struct elf_prpsinfo | |||
135 | pr_reg[15] = regs->rsp; \ | 92 | pr_reg[15] = regs->rsp; \ |
136 | pr_reg[16] = regs->ss; | 93 | pr_reg[16] = regs->ss; |
137 | 94 | ||
138 | #define user user32 | 95 | |
96 | #define elf_prstatus compat_elf_prstatus | ||
97 | #define elf_prpsinfo compat_elf_prpsinfo | ||
98 | #define elf_fpregset_t struct user_i387_ia32_struct | ||
99 | #define elf_fpxregset_t struct user32_fxsr_struct | ||
100 | #define user user32 | ||
139 | 101 | ||
140 | #undef elf_read_implies_exec | 102 | #undef elf_read_implies_exec |
141 | #define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) | 103 | #define elf_read_implies_exec(ex, executable_stack) (executable_stack != EXSTACK_DISABLE_X) |
142 | //#include <asm/ia32.h> | ||
143 | #include <linux/elf.h> | ||
144 | |||
145 | typedef struct user_i387_ia32_struct elf_fpregset_t; | ||
146 | typedef struct user32_fxsr_struct elf_fpxregset_t; | ||
147 | |||
148 | 104 | ||
149 | static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *regs) | 105 | #define elf_core_copy_regs elf32_core_copy_regs |
106 | static inline void elf32_core_copy_regs(compat_elf_gregset_t *elfregs, | ||
107 | struct pt_regs *regs) | ||
150 | { | 108 | { |
151 | ELF_CORE_COPY_REGS((*elfregs), regs) | 109 | ELF_CORE_COPY_REGS((&elfregs->ebx), regs) |
152 | } | 110 | } |
153 | 111 | ||
154 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) | 112 | #define elf_core_copy_task_regs elf32_core_copy_task_regs |
113 | static inline int elf32_core_copy_task_regs(struct task_struct *t, | ||
114 | compat_elf_gregset_t* elfregs) | ||
155 | { | 115 | { |
156 | struct pt_regs *pp = task_pt_regs(t); | 116 | struct pt_regs *pp = task_pt_regs(t); |
157 | ELF_CORE_COPY_REGS((*elfregs), pp); | 117 | ELF_CORE_COPY_REGS((&elfregs->ebx), pp); |
158 | /* fix wrong segments */ | 118 | /* fix wrong segments */ |
159 | (*elfregs)[7] = t->thread.ds; | 119 | elfregs->ds = t->thread.ds; |
160 | (*elfregs)[9] = t->thread.fsindex; | 120 | elfregs->fs = t->thread.fsindex; |
161 | (*elfregs)[10] = t->thread.gsindex; | 121 | elfregs->gs = t->thread.gsindex; |
162 | (*elfregs)[8] = t->thread.es; | 122 | elfregs->es = t->thread.es; |
163 | return 1; | 123 | return 1; |
164 | } | 124 | } |
165 | 125 | ||
126 | #define elf_core_copy_task_fpregs elf32_core_copy_task_fpregs | ||
166 | static inline int | 127 | static inline int |
167 | elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpregset_t *fpu) | 128 | elf32_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, |
129 | elf_fpregset_t *fpu) | ||
168 | { | 130 | { |
169 | struct _fpstate_ia32 *fpstate = (void*)fpu; | 131 | struct _fpstate_ia32 *fpstate = (void*)fpu; |
170 | mm_segment_t oldfs = get_fs(); | 132 | mm_segment_t oldfs = get_fs(); |
@@ -186,8 +148,9 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr | |||
186 | 148 | ||
187 | #define ELF_CORE_COPY_XFPREGS 1 | 149 | #define ELF_CORE_COPY_XFPREGS 1 |
188 | #define ELF_CORE_XFPREG_TYPE NT_PRXFPREG | 150 | #define ELF_CORE_XFPREG_TYPE NT_PRXFPREG |
151 | #define elf_core_copy_task_xfpregs elf32_core_copy_task_xfpregs | ||
189 | static inline int | 152 | static inline int |
190 | elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) | 153 | elf32_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) |
191 | { | 154 | { |
192 | struct pt_regs *regs = task_pt_regs(t); | 155 | struct pt_regs *regs = task_pt_regs(t); |
193 | if (!tsk_used_math(t)) | 156 | if (!tsk_used_math(t)) |
@@ -206,6 +169,10 @@ elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) | |||
206 | 169 | ||
207 | extern int force_personality32; | 170 | extern int force_personality32; |
208 | 171 | ||
172 | #undef ELF_EXEC_PAGESIZE | ||
173 | #undef ELF_HWCAP | ||
174 | #undef ELF_PLATFORM | ||
175 | #undef SET_PERSONALITY | ||
209 | #define ELF_EXEC_PAGESIZE PAGE_SIZE | 176 | #define ELF_EXEC_PAGESIZE PAGE_SIZE |
210 | #define ELF_HWCAP (boot_cpu_data.x86_capability[0]) | 177 | #define ELF_HWCAP (boot_cpu_data.x86_capability[0]) |
211 | #define ELF_PLATFORM ("i686") | 178 | #define ELF_PLATFORM ("i686") |
@@ -231,6 +198,7 @@ do { \ | |||
231 | 198 | ||
232 | #define load_elf_binary load_elf32_binary | 199 | #define load_elf_binary load_elf32_binary |
233 | 200 | ||
201 | #undef ELF_PLAT_INIT | ||
234 | #define ELF_PLAT_INIT(r, load_addr) elf32_init(r) | 202 | #define ELF_PLAT_INIT(r, load_addr) elf32_init(r) |
235 | 203 | ||
236 | #undef start_thread | 204 | #undef start_thread |
diff --git a/arch/x86/kernel/Makefile_32 b/arch/x86/kernel/Makefile_32 index a3fa11f8f460..ccea590bbb92 100644 --- a/arch/x86/kernel/Makefile_32 +++ b/arch/x86/kernel/Makefile_32 | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | extra-y := head_32.o init_task_32.o vmlinux.lds | 5 | extra-y := head_32.o init_task.o vmlinux.lds |
6 | 6 | ||
7 | obj-y := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \ | 7 | obj-y := process_32.o signal_32.o entry_32.o traps_32.o irq_32.o \ |
8 | ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \ | 8 | ptrace_32.o time_32.o ioport_32.o ldt_32.o setup_32.o i8259_32.o sys_i386_32.o \ |
@@ -17,6 +17,7 @@ obj-$(CONFIG_MCA) += mca_32.o | |||
17 | obj-$(CONFIG_X86_MSR) += msr.o | 17 | obj-$(CONFIG_X86_MSR) += msr.o |
18 | obj-$(CONFIG_X86_CPUID) += cpuid.o | 18 | obj-$(CONFIG_X86_CPUID) += cpuid.o |
19 | obj-$(CONFIG_MICROCODE) += microcode.o | 19 | obj-$(CONFIG_MICROCODE) += microcode.o |
20 | obj-$(CONFIG_PCI) += early-quirks.o | ||
20 | obj-$(CONFIG_APM) += apm_32.o | 21 | obj-$(CONFIG_APM) += apm_32.o |
21 | obj-$(CONFIG_X86_SMP) += smp_32.o smpboot_32.o tsc_sync.o | 22 | obj-$(CONFIG_X86_SMP) += smp_32.o smpboot_32.o tsc_sync.o |
22 | obj-$(CONFIG_SMP) += smpcommon_32.o | 23 | obj-$(CONFIG_SMP) += smpcommon_32.o |
diff --git a/arch/x86/kernel/Makefile_64 b/arch/x86/kernel/Makefile_64 index 43da66213a47..dec06e769281 100644 --- a/arch/x86/kernel/Makefile_64 +++ b/arch/x86/kernel/Makefile_64 | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | extra-y := head_64.o head64.o init_task_64.o vmlinux.lds | 5 | extra-y := head_64.o head64.o init_task.o vmlinux.lds |
6 | EXTRA_AFLAGS := -traditional | 6 | EXTRA_AFLAGS := -traditional |
7 | obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \ | 7 | obj-y := process_64.o signal_64.o entry_64.o traps_64.o irq_64.o \ |
8 | ptrace_64.o time_64.o ioport_64.o ldt_64.o setup_64.o i8259_64.o sys_x86_64.o \ | 8 | ptrace_64.o time_64.o ioport_64.o ldt_64.o setup_64.o i8259_64.o sys_x86_64.o \ |
@@ -39,7 +39,7 @@ obj-$(CONFIG_K8_NB) += k8.o | |||
39 | obj-$(CONFIG_AUDIT) += audit_64.o | 39 | obj-$(CONFIG_AUDIT) += audit_64.o |
40 | 40 | ||
41 | obj-$(CONFIG_MODULES) += module_64.o | 41 | obj-$(CONFIG_MODULES) += module_64.o |
42 | obj-$(CONFIG_PCI) += early-quirks_64.o | 42 | obj-$(CONFIG_PCI) += early-quirks.o |
43 | 43 | ||
44 | obj-y += topology.o | 44 | obj-y += topology.o |
45 | obj-y += intel_cacheinfo.o | 45 | obj-y += intel_cacheinfo.o |
diff --git a/arch/x86/kernel/acpi/Makefile_32 b/arch/x86/kernel/acpi/Makefile_32 index a4852a2e9190..045dd54b33e0 100644 --- a/arch/x86/kernel/acpi/Makefile_32 +++ b/arch/x86/kernel/acpi/Makefile_32 | |||
@@ -1,7 +1,4 @@ | |||
1 | obj-$(CONFIG_ACPI) += boot.o | 1 | obj-$(CONFIG_ACPI) += boot.o |
2 | ifneq ($(CONFIG_PCI),) | ||
3 | obj-$(CONFIG_X86_IO_APIC) += earlyquirk_32.o | ||
4 | endif | ||
5 | obj-$(CONFIG_ACPI_SLEEP) += sleep_32.o wakeup_32.o | 2 | obj-$(CONFIG_ACPI_SLEEP) += sleep_32.o wakeup_32.o |
6 | 3 | ||
7 | ifneq ($(CONFIG_ACPI_PROCESSOR),) | 4 | ifneq ($(CONFIG_ACPI_PROCESSOR),) |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index afd2afe9102d..289247d974c6 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -99,7 +99,7 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; | |||
99 | 99 | ||
100 | /* | 100 | /* |
101 | * The default interrupt routing model is PIC (8259). This gets | 101 | * The default interrupt routing model is PIC (8259). This gets |
102 | * overriden if IOAPICs are enumerated (below). | 102 | * overridden if IOAPICs are enumerated (below). |
103 | */ | 103 | */ |
104 | enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC; | 104 | enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC; |
105 | 105 | ||
@@ -414,8 +414,8 @@ acpi_parse_nmi_src(struct acpi_subtable_header * header, const unsigned long end | |||
414 | * | 414 | * |
415 | * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers | 415 | * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers |
416 | * for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge. | 416 | * for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge. |
417 | * ECLR1 is IRQ's 0-7 (IRQ 0, 1, 2 must be 0) | 417 | * ECLR1 is IRQs 0-7 (IRQ 0, 1, 2 must be 0) |
418 | * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0) | 418 | * ECLR2 is IRQs 8-15 (IRQ 8, 13 must be 0) |
419 | */ | 419 | */ |
420 | 420 | ||
421 | void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) | 421 | void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) |
@@ -427,7 +427,7 @@ void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger) | |||
427 | old = inb(0x4d0) | (inb(0x4d1) << 8); | 427 | old = inb(0x4d0) | (inb(0x4d1) << 8); |
428 | 428 | ||
429 | /* | 429 | /* |
430 | * If we use ACPI to set PCI irq's, then we should clear ELCR | 430 | * If we use ACPI to set PCI IRQs, then we should clear ELCR |
431 | * since we will set it correctly as we enable the PCI irq | 431 | * since we will set it correctly as we enable the PCI irq |
432 | * routing. | 432 | * routing. |
433 | */ | 433 | */ |
@@ -555,7 +555,7 @@ EXPORT_SYMBOL(acpi_map_lsapic); | |||
555 | 555 | ||
556 | int acpi_unmap_lsapic(int cpu) | 556 | int acpi_unmap_lsapic(int cpu) |
557 | { | 557 | { |
558 | x86_cpu_to_apicid[cpu] = -1; | 558 | per_cpu(x86_cpu_to_apicid, cpu) = -1; |
559 | cpu_clear(cpu, cpu_present_map); | 559 | cpu_clear(cpu, cpu_present_map); |
560 | num_processors--; | 560 | num_processors--; |
561 | 561 | ||
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index 2d39f55d29a8..10b67170b133 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
@@ -29,7 +29,7 @@ | |||
29 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | 29 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, |
30 | unsigned int cpu) | 30 | unsigned int cpu) |
31 | { | 31 | { |
32 | struct cpuinfo_x86 *c = cpu_data + cpu; | 32 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
33 | 33 | ||
34 | flags->bm_check = 0; | 34 | flags->bm_check = 0; |
35 | if (num_online_cpus() == 1) | 35 | if (num_online_cpus() == 1) |
@@ -72,7 +72,7 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | |||
72 | struct acpi_processor_cx *cx, struct acpi_power_register *reg) | 72 | struct acpi_processor_cx *cx, struct acpi_power_register *reg) |
73 | { | 73 | { |
74 | struct cstate_entry *percpu_entry; | 74 | struct cstate_entry *percpu_entry; |
75 | struct cpuinfo_x86 *c = cpu_data + cpu; | 75 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
76 | 76 | ||
77 | cpumask_t saved_mask; | 77 | cpumask_t saved_mask; |
78 | int retval; | 78 | int retval; |
diff --git a/arch/x86/kernel/acpi/earlyquirk_32.c b/arch/x86/kernel/acpi/earlyquirk_32.c deleted file mode 100644 index 23f78efc577d..000000000000 --- a/arch/x86/kernel/acpi/earlyquirk_32.c +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | /* | ||
2 | * Do early PCI probing for bug detection when the main PCI subsystem is | ||
3 | * not up yet. | ||
4 | */ | ||
5 | #include <linux/init.h> | ||
6 | #include <linux/kernel.h> | ||
7 | #include <linux/pci.h> | ||
8 | #include <linux/acpi.h> | ||
9 | |||
10 | #include <asm/pci-direct.h> | ||
11 | #include <asm/acpi.h> | ||
12 | #include <asm/apic.h> | ||
13 | |||
14 | #ifdef CONFIG_ACPI | ||
15 | |||
16 | static int __init nvidia_hpet_check(struct acpi_table_header *header) | ||
17 | { | ||
18 | return 0; | ||
19 | } | ||
20 | #endif | ||
21 | |||
22 | static int __init check_bridge(int vendor, int device) | ||
23 | { | ||
24 | #ifdef CONFIG_ACPI | ||
25 | static int warned; | ||
26 | /* According to Nvidia all timer overrides are bogus unless HPET | ||
27 | is enabled. */ | ||
28 | if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) { | ||
29 | if (!warned && acpi_table_parse(ACPI_SIG_HPET, | ||
30 | nvidia_hpet_check)) { | ||
31 | warned = 1; | ||
32 | acpi_skip_timer_override = 1; | ||
33 | printk(KERN_INFO "Nvidia board " | ||
34 | "detected. Ignoring ACPI " | ||
35 | "timer override.\n"); | ||
36 | printk(KERN_INFO "If you got timer trouble " | ||
37 | "try acpi_use_timer_override\n"); | ||
38 | |||
39 | } | ||
40 | } | ||
41 | #endif | ||
42 | if (vendor == PCI_VENDOR_ID_ATI && timer_over_8254 == 1) { | ||
43 | timer_over_8254 = 0; | ||
44 | printk(KERN_INFO "ATI board detected. Disabling timer routing " | ||
45 | "over 8254.\n"); | ||
46 | } | ||
47 | return 0; | ||
48 | } | ||
49 | |||
50 | void __init check_acpi_pci(void) | ||
51 | { | ||
52 | int num, slot, func; | ||
53 | |||
54 | /* Assume the machine supports type 1. If not it will | ||
55 | always read ffffffff and should not have any side effect. | ||
56 | Actually a few buggy systems can machine check. Allow the user | ||
57 | to disable it by command line option at least -AK */ | ||
58 | if (!early_pci_allowed()) | ||
59 | return; | ||
60 | |||
61 | /* Poor man's PCI discovery */ | ||
62 | for (num = 0; num < 32; num++) { | ||
63 | for (slot = 0; slot < 32; slot++) { | ||
64 | for (func = 0; func < 8; func++) { | ||
65 | u32 class; | ||
66 | u32 vendor; | ||
67 | class = read_pci_config(num, slot, func, | ||
68 | PCI_CLASS_REVISION); | ||
69 | if (class == 0xffffffff) | ||
70 | break; | ||
71 | |||
72 | if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) | ||
73 | continue; | ||
74 | |||
75 | vendor = read_pci_config(num, slot, func, | ||
76 | PCI_VENDOR_ID); | ||
77 | |||
78 | if (check_bridge(vendor & 0xffff, vendor >> 16)) | ||
79 | return; | ||
80 | } | ||
81 | |||
82 | } | ||
83 | } | ||
84 | } | ||
diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c index b54fded49834..2ed0a4ce62f0 100644 --- a/arch/x86/kernel/acpi/processor.c +++ b/arch/x86/kernel/acpi/processor.c | |||
@@ -63,7 +63,7 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) | |||
63 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) | 63 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr) |
64 | { | 64 | { |
65 | unsigned int cpu = pr->id; | 65 | unsigned int cpu = pr->id; |
66 | struct cpuinfo_x86 *c = cpu_data + cpu; | 66 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
67 | 67 | ||
68 | pr->pdc = NULL; | 68 | pr->pdc = NULL; |
69 | if (c->x86_vendor == X86_VENDOR_INTEL) | 69 | if (c->x86_vendor == X86_VENDOR_INTEL) |
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 3bd2688bd443..d6405e0842b5 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
@@ -357,14 +357,14 @@ void alternatives_smp_switch(int smp) | |||
357 | if (smp) { | 357 | if (smp) { |
358 | printk(KERN_INFO "SMP alternatives: switching to SMP code\n"); | 358 | printk(KERN_INFO "SMP alternatives: switching to SMP code\n"); |
359 | clear_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | 359 | clear_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); |
360 | clear_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | 360 | clear_bit(X86_FEATURE_UP, cpu_data(0).x86_capability); |
361 | list_for_each_entry(mod, &smp_alt_modules, next) | 361 | list_for_each_entry(mod, &smp_alt_modules, next) |
362 | alternatives_smp_lock(mod->locks, mod->locks_end, | 362 | alternatives_smp_lock(mod->locks, mod->locks_end, |
363 | mod->text, mod->text_end); | 363 | mod->text, mod->text_end); |
364 | } else { | 364 | } else { |
365 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); | 365 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); |
366 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | 366 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); |
367 | set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | 367 | set_bit(X86_FEATURE_UP, cpu_data(0).x86_capability); |
368 | list_for_each_entry(mod, &smp_alt_modules, next) | 368 | list_for_each_entry(mod, &smp_alt_modules, next) |
369 | alternatives_smp_unlock(mod->locks, mod->locks_end, | 369 | alternatives_smp_unlock(mod->locks, mod->locks_end, |
370 | mod->text, mod->text_end); | 370 | mod->text, mod->text_end); |
@@ -432,7 +432,7 @@ void __init alternative_instructions(void) | |||
432 | if (1 == num_possible_cpus()) { | 432 | if (1 == num_possible_cpus()) { |
433 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); | 433 | printk(KERN_INFO "SMP alternatives: switching to UP code\n"); |
434 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); | 434 | set_bit(X86_FEATURE_UP, boot_cpu_data.x86_capability); |
435 | set_bit(X86_FEATURE_UP, cpu_data[0].x86_capability); | 435 | set_bit(X86_FEATURE_UP, cpu_data(0).x86_capability); |
436 | alternatives_smp_unlock(__smp_locks, __smp_locks_end, | 436 | alternatives_smp_unlock(__smp_locks, __smp_locks_end, |
437 | _text, _etext); | 437 | _text, _etext); |
438 | } | 438 | } |
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index 793341fffc81..08b07c176962 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -947,7 +947,7 @@ void __devinit setup_local_APIC(void) | |||
947 | * Set up LVT0, LVT1: | 947 | * Set up LVT0, LVT1: |
948 | * | 948 | * |
949 | * set up through-local-APIC on the BP's LINT0. This is not | 949 | * set up through-local-APIC on the BP's LINT0. This is not |
950 | * strictly necessery in pure symmetric-IO mode, but sometimes | 950 | * strictly necessary in pure symmetric-IO mode, but sometimes |
951 | * we delegate interrupts to the 8259A. | 951 | * we delegate interrupts to the 8259A. |
952 | */ | 952 | */ |
953 | /* | 953 | /* |
@@ -998,7 +998,7 @@ void __devinit setup_local_APIC(void) | |||
998 | } else { | 998 | } else { |
999 | if (esr_disable) | 999 | if (esr_disable) |
1000 | /* | 1000 | /* |
1001 | * Something untraceble is creating bad interrupts on | 1001 | * Something untraceable is creating bad interrupts on |
1002 | * secondary quads ... for the moment, just leave the | 1002 | * secondary quads ... for the moment, just leave the |
1003 | * ESR disabled - we can't do anything useful with the | 1003 | * ESR disabled - we can't do anything useful with the |
1004 | * errors anyway - mbligh | 1004 | * errors anyway - mbligh |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 32f2365c26ed..17089a041028 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -57,7 +57,7 @@ | |||
57 | * screen-blanking and gpm (Stephen Rothwell); Linux 1.99.4 | 57 | * screen-blanking and gpm (Stephen Rothwell); Linux 1.99.4 |
58 | * 1.2a:Simple change to stop mysterious bug reports with SMP also added | 58 | * 1.2a:Simple change to stop mysterious bug reports with SMP also added |
59 | * levels to the printk calls. APM is not defined for SMP machines. | 59 | * levels to the printk calls. APM is not defined for SMP machines. |
60 | * The new replacment for it is, but Linux doesn't yet support this. | 60 | * The new replacement for it is, but Linux doesn't yet support this. |
61 | * Alan Cox Linux 2.1.55 | 61 | * Alan Cox Linux 2.1.55 |
62 | * 1.3: Set up a valid data descriptor 0x40 for buggy BIOS's | 62 | * 1.3: Set up a valid data descriptor 0x40 for buggy BIOS's |
63 | * 1.4: Upgraded to support APM 1.2. Integrated ThinkPad suspend patch by | 63 | * 1.4: Upgraded to support APM 1.2. Integrated ThinkPad suspend patch by |
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 5f8af875f457..1ff88c7f45cf 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -266,7 +266,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) | |||
266 | #ifdef CONFIG_X86_HT | 266 | #ifdef CONFIG_X86_HT |
267 | /* | 267 | /* |
268 | * On a AMD multi core setup the lower bits of the APIC id | 268 | * On a AMD multi core setup the lower bits of the APIC id |
269 | * distingush the cores. | 269 | * distinguish the cores. |
270 | */ | 270 | */ |
271 | if (c->x86_max_cores > 1) { | 271 | if (c->x86_max_cores > 1) { |
272 | int cpu = smp_processor_id(); | 272 | int cpu = smp_processor_id(); |
diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c index 473eac883c7b..9681fa15ddf0 100644 --- a/arch/x86/kernel/cpu/centaur.c +++ b/arch/x86/kernel/cpu/centaur.c | |||
@@ -53,7 +53,7 @@ static u32 __cpuinit ramtop(void) /* 16388 */ | |||
53 | continue; | 53 | continue; |
54 | /* | 54 | /* |
55 | * Don't MCR over reserved space. Ignore the ISA hole | 55 | * Don't MCR over reserved space. Ignore the ISA hole |
56 | * we frob around that catastrophy already | 56 | * we frob around that catastrophe already |
57 | */ | 57 | */ |
58 | 58 | ||
59 | if (e820.map[i].type == E820_RESERVED) | 59 | if (e820.map[i].type == E820_RESERVED) |
@@ -287,7 +287,7 @@ static void __cpuinit init_c3(struct cpuinfo_x86 *c) | |||
287 | c->x86_capability[5] = cpuid_edx(0xC0000001); | 287 | c->x86_capability[5] = cpuid_edx(0xC0000001); |
288 | } | 288 | } |
289 | 289 | ||
290 | /* Cyrix III family needs CX8 & PGE explicity enabled. */ | 290 | /* Cyrix III family needs CX8 & PGE explicitly enabled. */ |
291 | if (c->x86_model >=6 && c->x86_model <= 9) { | 291 | if (c->x86_model >=6 && c->x86_model <= 9) { |
292 | rdmsr (MSR_VIA_FCR, lo, hi); | 292 | rdmsr (MSR_VIA_FCR, lo, hi); |
293 | lo |= (1<<1 | 1<<7); | 293 | lo |= (1<<1 | 1<<7); |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index d506201d397c..e2fcf2051bdb 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -207,7 +207,7 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c, int early) | |||
207 | 207 | ||
208 | static int __init x86_fxsr_setup(char * s) | 208 | static int __init x86_fxsr_setup(char * s) |
209 | { | 209 | { |
210 | /* Tell all the other CPU's to not use it... */ | 210 | /* Tell all the other CPUs to not use it... */ |
211 | disable_x86_fxsr = 1; | 211 | disable_x86_fxsr = 1; |
212 | 212 | ||
213 | /* | 213 | /* |
diff --git a/arch/x86/kernel/cpu/cpufreq/Kconfig b/arch/x86/kernel/cpu/cpufreq/Kconfig_32 index d8c6f132dc7a..d8c6f132dc7a 100644 --- a/arch/x86/kernel/cpu/cpufreq/Kconfig +++ b/arch/x86/kernel/cpu/cpufreq/Kconfig_32 | |||
diff --git a/arch/x86/kernel/cpufreq/Kconfig b/arch/x86/kernel/cpu/cpufreq/Kconfig_64 index a3fd51926cbd..9c9699fdcf52 100644 --- a/arch/x86/kernel/cpufreq/Kconfig +++ b/arch/x86/kernel/cpu/cpufreq/Kconfig_64 | |||
@@ -19,7 +19,7 @@ config X86_POWERNOW_K8 | |||
19 | To compile this driver as a module, choose M here: the | 19 | To compile this driver as a module, choose M here: the |
20 | module will be called powernow-k8. | 20 | module will be called powernow-k8. |
21 | 21 | ||
22 | For details, take a look at <file:Documentation/cpu-freq/>. | 22 | For details, take a look at <file:Documentation/cpu-freq/>. |
23 | 23 | ||
24 | If in doubt, say N. | 24 | If in doubt, say N. |
25 | 25 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 2ca43ba32bc0..fea0af0476b9 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -77,7 +77,7 @@ static unsigned int acpi_pstate_strict; | |||
77 | 77 | ||
78 | static int check_est_cpu(unsigned int cpuid) | 78 | static int check_est_cpu(unsigned int cpuid) |
79 | { | 79 | { |
80 | struct cpuinfo_x86 *cpu = &cpu_data[cpuid]; | 80 | struct cpuinfo_x86 *cpu = &cpu_data(cpuid); |
81 | 81 | ||
82 | if (cpu->x86_vendor != X86_VENDOR_INTEL || | 82 | if (cpu->x86_vendor != X86_VENDOR_INTEL || |
83 | !cpu_has(cpu, X86_FEATURE_EST)) | 83 | !cpu_has(cpu, X86_FEATURE_EST)) |
@@ -560,7 +560,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
560 | unsigned int cpu = policy->cpu; | 560 | unsigned int cpu = policy->cpu; |
561 | struct acpi_cpufreq_data *data; | 561 | struct acpi_cpufreq_data *data; |
562 | unsigned int result = 0; | 562 | unsigned int result = 0; |
563 | struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; | 563 | struct cpuinfo_x86 *c = &cpu_data(policy->cpu); |
564 | struct acpi_processor_performance *perf; | 564 | struct acpi_processor_performance *perf; |
565 | 565 | ||
566 | dprintk("acpi_cpufreq_cpu_init\n"); | 566 | dprintk("acpi_cpufreq_cpu_init\n"); |
diff --git a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c index 32f0bda3fc95..f03e9153618e 100644 --- a/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c +++ b/arch/x86/kernel/cpu/cpufreq/cpufreq-nforce2.c | |||
@@ -260,7 +260,7 @@ static int nforce2_target(struct cpufreq_policy *policy, | |||
260 | 260 | ||
261 | freqs.old = nforce2_get(policy->cpu); | 261 | freqs.old = nforce2_get(policy->cpu); |
262 | freqs.new = target_fsb * fid * 100; | 262 | freqs.new = target_fsb * fid * 100; |
263 | freqs.cpu = 0; /* Only one CPU on nForce2 plattforms */ | 263 | freqs.cpu = 0; /* Only one CPU on nForce2 platforms */ |
264 | 264 | ||
265 | if (freqs.old == freqs.new) | 265 | if (freqs.old == freqs.new) |
266 | return 0; | 266 | return 0; |
diff --git a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c index c11baaf9f2b4..326a4c81f684 100644 --- a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c +++ b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c | |||
@@ -305,7 +305,7 @@ static struct cpufreq_driver eps_driver = { | |||
305 | 305 | ||
306 | static int __init eps_init(void) | 306 | static int __init eps_init(void) |
307 | { | 307 | { |
308 | struct cpuinfo_x86 *c = cpu_data; | 308 | struct cpuinfo_x86 *c = &cpu_data(0); |
309 | 309 | ||
310 | /* This driver will work only on Centaur C7 processors with | 310 | /* This driver will work only on Centaur C7 processors with |
311 | * Enhanced SpeedStep/PowerSaver registers */ | 311 | * Enhanced SpeedStep/PowerSaver registers */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/elanfreq.c b/arch/x86/kernel/cpu/cpufreq/elanfreq.c index 1e7ae7dafcf6..94619c22f563 100644 --- a/arch/x86/kernel/cpu/cpufreq/elanfreq.c +++ b/arch/x86/kernel/cpu/cpufreq/elanfreq.c | |||
@@ -199,7 +199,7 @@ static int elanfreq_target (struct cpufreq_policy *policy, | |||
199 | 199 | ||
200 | static int elanfreq_cpu_init(struct cpufreq_policy *policy) | 200 | static int elanfreq_cpu_init(struct cpufreq_policy *policy) |
201 | { | 201 | { |
202 | struct cpuinfo_x86 *c = cpu_data; | 202 | struct cpuinfo_x86 *c = &cpu_data(0); |
203 | unsigned int i; | 203 | unsigned int i; |
204 | int result; | 204 | int result; |
205 | 205 | ||
@@ -280,7 +280,7 @@ static struct cpufreq_driver elanfreq_driver = { | |||
280 | 280 | ||
281 | static int __init elanfreq_init(void) | 281 | static int __init elanfreq_init(void) |
282 | { | 282 | { |
283 | struct cpuinfo_x86 *c = cpu_data; | 283 | struct cpuinfo_x86 *c = &cpu_data(0); |
284 | 284 | ||
285 | /* Test if we have the right hardware */ | 285 | /* Test if we have the right hardware */ |
286 | if ((c->x86_vendor != X86_VENDOR_AMD) || | 286 | if ((c->x86_vendor != X86_VENDOR_AMD) || |
diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c index ed2bda127c44..2ed7db2fd257 100644 --- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | |||
@@ -12,12 +12,12 @@ | |||
12 | * of any nature resulting due to the use of this software. This | 12 | * of any nature resulting due to the use of this software. This |
13 | * software is provided AS-IS with no warranties. | 13 | * software is provided AS-IS with no warranties. |
14 | * | 14 | * |
15 | * Theoritical note: | 15 | * Theoretical note: |
16 | * | 16 | * |
17 | * (see Geode(tm) CS5530 manual (rev.4.1) page.56) | 17 | * (see Geode(tm) CS5530 manual (rev.4.1) page.56) |
18 | * | 18 | * |
19 | * CPU frequency control on NatSemi Geode GX1/GXLV processor and CS55x0 | 19 | * CPU frequency control on NatSemi Geode GX1/GXLV processor and CS55x0 |
20 | * are based on Suspend Moduration. | 20 | * are based on Suspend Modulation. |
21 | * | 21 | * |
22 | * Suspend Modulation works by asserting and de-asserting the SUSP# pin | 22 | * Suspend Modulation works by asserting and de-asserting the SUSP# pin |
23 | * to CPU(GX1/GXLV) for configurable durations. When asserting SUSP# | 23 | * to CPU(GX1/GXLV) for configurable durations. When asserting SUSP# |
@@ -101,11 +101,11 @@ | |||
101 | 101 | ||
102 | /* SUSCFG bits */ | 102 | /* SUSCFG bits */ |
103 | #define SUSMOD (1<<0) /* enable/disable suspend modulation */ | 103 | #define SUSMOD (1<<0) /* enable/disable suspend modulation */ |
104 | /* the belows support only with cs5530 (after rev.1.2)/cs5530A */ | 104 | /* the below is supported only with cs5530 (after rev.1.2)/cs5530A */ |
105 | #define SMISPDUP (1<<1) /* select how SMI re-enable suspend modulation: */ | 105 | #define SMISPDUP (1<<1) /* select how SMI re-enable suspend modulation: */ |
106 | /* IRQTC timer or read SMI speedup disable reg.(F1BAR[08-09h]) */ | 106 | /* IRQTC timer or read SMI speedup disable reg.(F1BAR[08-09h]) */ |
107 | #define SUSCFG (1<<2) /* enable powering down a GXLV processor. "Special 3Volt Suspend" mode */ | 107 | #define SUSCFG (1<<2) /* enable powering down a GXLV processor. "Special 3Volt Suspend" mode */ |
108 | /* the belows support only with cs5530A */ | 108 | /* the below is supported only with cs5530A */ |
109 | #define PWRSVE_ISA (1<<3) /* stop ISA clock */ | 109 | #define PWRSVE_ISA (1<<3) /* stop ISA clock */ |
110 | #define PWRSVE (1<<4) /* active idle */ | 110 | #define PWRSVE (1<<4) /* active idle */ |
111 | 111 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c index 5045f5d583c8..749d00cb2ebd 100644 --- a/arch/x86/kernel/cpu/cpufreq/longhaul.c +++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c | |||
@@ -780,7 +780,7 @@ static int longhaul_setup_southbridge(void) | |||
780 | 780 | ||
781 | static int __init longhaul_cpu_init(struct cpufreq_policy *policy) | 781 | static int __init longhaul_cpu_init(struct cpufreq_policy *policy) |
782 | { | 782 | { |
783 | struct cpuinfo_x86 *c = cpu_data; | 783 | struct cpuinfo_x86 *c = &cpu_data(0); |
784 | char *cpuname=NULL; | 784 | char *cpuname=NULL; |
785 | int ret; | 785 | int ret; |
786 | u32 lo, hi; | 786 | u32 lo, hi; |
@@ -959,7 +959,7 @@ static struct cpufreq_driver longhaul_driver = { | |||
959 | 959 | ||
960 | static int __init longhaul_init(void) | 960 | static int __init longhaul_init(void) |
961 | { | 961 | { |
962 | struct cpuinfo_x86 *c = cpu_data; | 962 | struct cpuinfo_x86 *c = &cpu_data(0); |
963 | 963 | ||
964 | if (c->x86_vendor != X86_VENDOR_CENTAUR || c->x86 != 6) | 964 | if (c->x86_vendor != X86_VENDOR_CENTAUR || c->x86 != 6) |
965 | return -ENODEV; | 965 | return -ENODEV; |
diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index b2689514295a..af4a867a097c 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c | |||
@@ -172,7 +172,7 @@ static unsigned int __init longrun_determine_freqs(unsigned int *low_freq, | |||
172 | u32 save_lo, save_hi; | 172 | u32 save_lo, save_hi; |
173 | u32 eax, ebx, ecx, edx; | 173 | u32 eax, ebx, ecx, edx; |
174 | u32 try_hi; | 174 | u32 try_hi; |
175 | struct cpuinfo_x86 *c = cpu_data; | 175 | struct cpuinfo_x86 *c = &cpu_data(0); |
176 | 176 | ||
177 | if (!low_freq || !high_freq) | 177 | if (!low_freq || !high_freq) |
178 | return -EINVAL; | 178 | return -EINVAL; |
@@ -298,7 +298,7 @@ static struct cpufreq_driver longrun_driver = { | |||
298 | */ | 298 | */ |
299 | static int __init longrun_init(void) | 299 | static int __init longrun_init(void) |
300 | { | 300 | { |
301 | struct cpuinfo_x86 *c = cpu_data; | 301 | struct cpuinfo_x86 *c = &cpu_data(0); |
302 | 302 | ||
303 | if (c->x86_vendor != X86_VENDOR_TRANSMETA || | 303 | if (c->x86_vendor != X86_VENDOR_TRANSMETA || |
304 | !cpu_has(c, X86_FEATURE_LONGRUN)) | 304 | !cpu_has(c, X86_FEATURE_LONGRUN)) |
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index 793eae854f4f..14791ec55cfd 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -195,7 +195,7 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) | |||
195 | 195 | ||
196 | static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) | 196 | static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) |
197 | { | 197 | { |
198 | struct cpuinfo_x86 *c = &cpu_data[policy->cpu]; | 198 | struct cpuinfo_x86 *c = &cpu_data(policy->cpu); |
199 | int cpuid = 0; | 199 | int cpuid = 0; |
200 | unsigned int i; | 200 | unsigned int i; |
201 | 201 | ||
@@ -279,7 +279,7 @@ static struct cpufreq_driver p4clockmod_driver = { | |||
279 | 279 | ||
280 | static int __init cpufreq_p4_init(void) | 280 | static int __init cpufreq_p4_init(void) |
281 | { | 281 | { |
282 | struct cpuinfo_x86 *c = cpu_data; | 282 | struct cpuinfo_x86 *c = &cpu_data(0); |
283 | int ret; | 283 | int ret; |
284 | 284 | ||
285 | /* | 285 | /* |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c index 6d0285339317..eb9b62b0830c 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * This file was based upon code in Powertweak Linux (http://powertweak.sf.net) | 2 | * This file was based upon code in Powertweak Linux (http://powertweak.sf.net) |
3 | * (C) 2000-2003 Dave Jones, Arjan van de Ven, Janne Pänkälä, Dominik Brodowski. | 3 | * (C) 2000-2003 Dave Jones, Arjan van de Ven, Janne Pänkälä, Dominik Brodowski. |
4 | * | 4 | * |
5 | * Licensed under the terms of the GNU GPL License version 2. | 5 | * Licensed under the terms of the GNU GPL License version 2. |
6 | * | 6 | * |
@@ -215,7 +215,7 @@ static struct cpufreq_driver powernow_k6_driver = { | |||
215 | */ | 215 | */ |
216 | static int __init powernow_k6_init(void) | 216 | static int __init powernow_k6_init(void) |
217 | { | 217 | { |
218 | struct cpuinfo_x86 *c = cpu_data; | 218 | struct cpuinfo_x86 *c = &cpu_data(0); |
219 | 219 | ||
220 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) || | 220 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) || |
221 | ((c->x86_model != 12) && (c->x86_model != 13))) | 221 | ((c->x86_model != 12) && (c->x86_model != 13))) |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c index f3686a5f2308..b5a9863d6cdc 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c | |||
@@ -114,7 +114,7 @@ static int check_fsb(unsigned int fsbspeed) | |||
114 | 114 | ||
115 | static int check_powernow(void) | 115 | static int check_powernow(void) |
116 | { | 116 | { |
117 | struct cpuinfo_x86 *c = cpu_data; | 117 | struct cpuinfo_x86 *c = &cpu_data(0); |
118 | unsigned int maxei, eax, ebx, ecx, edx; | 118 | unsigned int maxei, eax, ebx, ecx, edx; |
119 | 119 | ||
120 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 !=6)) { | 120 | if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 !=6)) { |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index c06ac680c9ca..9c36a53676b7 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -168,7 +168,7 @@ static void count_off_irt(struct powernow_k8_data *data) | |||
168 | return; | 168 | return; |
169 | } | 169 | } |
170 | 170 | ||
171 | /* the voltage stabalization time */ | 171 | /* the voltage stabilization time */ |
172 | static void count_off_vst(struct powernow_k8_data *data) | 172 | static void count_off_vst(struct powernow_k8_data *data) |
173 | { | 173 | { |
174 | udelay(data->vstable * VST_UNITS_20US); | 174 | udelay(data->vstable * VST_UNITS_20US); |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h index b06c812208ca..7c4f6e0faed4 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h | |||
@@ -148,10 +148,10 @@ struct powernow_k8_data { | |||
148 | #define PLL_LOCK_CONVERSION (1000/5) /* ms to ns, then divide by clock period */ | 148 | #define PLL_LOCK_CONVERSION (1000/5) /* ms to ns, then divide by clock period */ |
149 | 149 | ||
150 | #define MAXIMUM_VID_STEPS 1 /* Current cpus only allow a single step of 25mV */ | 150 | #define MAXIMUM_VID_STEPS 1 /* Current cpus only allow a single step of 25mV */ |
151 | #define VST_UNITS_20US 20 /* Voltage Stabalization Time is in units of 20us */ | 151 | #define VST_UNITS_20US 20 /* Voltage Stabilization Time is in units of 20us */ |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * Most values of interest are enocoded in a single field of the _PSS | 154 | * Most values of interest are encoded in a single field of the _PSS |
155 | * entries: the "control" value. | 155 | * entries: the "control" value. |
156 | */ | 156 | */ |
157 | 157 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c index d9f3e90a7ae0..42da9bd677d6 100644 --- a/arch/x86/kernel/cpu/cpufreq/sc520_freq.c +++ b/arch/x86/kernel/cpu/cpufreq/sc520_freq.c | |||
@@ -102,7 +102,7 @@ static int sc520_freq_target (struct cpufreq_policy *policy, | |||
102 | 102 | ||
103 | static int sc520_freq_cpu_init(struct cpufreq_policy *policy) | 103 | static int sc520_freq_cpu_init(struct cpufreq_policy *policy) |
104 | { | 104 | { |
105 | struct cpuinfo_x86 *c = cpu_data; | 105 | struct cpuinfo_x86 *c = &cpu_data(0); |
106 | int result; | 106 | int result; |
107 | 107 | ||
108 | /* capability check */ | 108 | /* capability check */ |
@@ -151,7 +151,7 @@ static struct cpufreq_driver sc520_freq_driver = { | |||
151 | 151 | ||
152 | static int __init sc520_freq_init(void) | 152 | static int __init sc520_freq_init(void) |
153 | { | 153 | { |
154 | struct cpuinfo_x86 *c = cpu_data; | 154 | struct cpuinfo_x86 *c = &cpu_data(0); |
155 | int err; | 155 | int err; |
156 | 156 | ||
157 | /* Test if we have the right hardware */ | 157 | /* Test if we have the right hardware */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index 811d47438546..3031f1196192 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -230,7 +230,7 @@ static struct cpu_model models[] = | |||
230 | 230 | ||
231 | static int centrino_cpu_init_table(struct cpufreq_policy *policy) | 231 | static int centrino_cpu_init_table(struct cpufreq_policy *policy) |
232 | { | 232 | { |
233 | struct cpuinfo_x86 *cpu = &cpu_data[policy->cpu]; | 233 | struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu); |
234 | struct cpu_model *model; | 234 | struct cpu_model *model; |
235 | 235 | ||
236 | for(model = models; model->cpu_id != NULL; model++) | 236 | for(model = models; model->cpu_id != NULL; model++) |
@@ -340,7 +340,7 @@ static unsigned int get_cur_freq(unsigned int cpu) | |||
340 | 340 | ||
341 | static int centrino_cpu_init(struct cpufreq_policy *policy) | 341 | static int centrino_cpu_init(struct cpufreq_policy *policy) |
342 | { | 342 | { |
343 | struct cpuinfo_x86 *cpu = &cpu_data[policy->cpu]; | 343 | struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu); |
344 | unsigned freq; | 344 | unsigned freq; |
345 | unsigned l, h; | 345 | unsigned l, h; |
346 | int ret; | 346 | int ret; |
@@ -612,7 +612,7 @@ static struct cpufreq_driver centrino_driver = { | |||
612 | */ | 612 | */ |
613 | static int __init centrino_init(void) | 613 | static int __init centrino_init(void) |
614 | { | 614 | { |
615 | struct cpuinfo_x86 *cpu = cpu_data; | 615 | struct cpuinfo_x86 *cpu = &cpu_data(0); |
616 | 616 | ||
617 | if (!cpu_has(cpu, X86_FEATURE_EST)) | 617 | if (!cpu_has(cpu, X86_FEATURE_EST)) |
618 | return -ENODEV; | 618 | return -ENODEV; |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c index b1acc8ce3167..76c3ab0da468 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c | |||
@@ -228,7 +228,7 @@ EXPORT_SYMBOL_GPL(speedstep_get_processor_frequency); | |||
228 | 228 | ||
229 | unsigned int speedstep_detect_processor (void) | 229 | unsigned int speedstep_detect_processor (void) |
230 | { | 230 | { |
231 | struct cpuinfo_x86 *c = cpu_data; | 231 | struct cpuinfo_x86 *c = &cpu_data(0); |
232 | u32 ebx, msr_lo, msr_hi; | 232 | u32 ebx, msr_lo, msr_hi; |
233 | 233 | ||
234 | dprintk("x86: %x, model: %x\n", c->x86, c->x86_model); | 234 | dprintk("x86: %x, model: %x\n", c->x86, c->x86_model); |
diff --git a/arch/x86/kernel/cpu/cyrix.c b/arch/x86/kernel/cpu/cyrix.c index 122d2d75aa9f..88d66fb8411d 100644 --- a/arch/x86/kernel/cpu/cyrix.c +++ b/arch/x86/kernel/cpu/cyrix.c | |||
@@ -93,7 +93,7 @@ static void __cpuinit check_cx686_slop(struct cpuinfo_x86 *c) | |||
93 | 93 | ||
94 | local_irq_save(flags); | 94 | local_irq_save(flags); |
95 | ccr3 = getCx86(CX86_CCR3); | 95 | ccr3 = getCx86(CX86_CCR3); |
96 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ | 96 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ |
97 | ccr5 = getCx86(CX86_CCR5); | 97 | ccr5 = getCx86(CX86_CCR5); |
98 | if (ccr5 & 2) | 98 | if (ccr5 & 2) |
99 | setCx86(CX86_CCR5, ccr5 & 0xfd); /* reset SLOP */ | 99 | setCx86(CX86_CCR5, ccr5 & 0xfd); /* reset SLOP */ |
@@ -115,9 +115,9 @@ static void __cpuinit set_cx86_reorder(void) | |||
115 | 115 | ||
116 | printk(KERN_INFO "Enable Memory access reorder on Cyrix/NSC processor.\n"); | 116 | printk(KERN_INFO "Enable Memory access reorder on Cyrix/NSC processor.\n"); |
117 | ccr3 = getCx86(CX86_CCR3); | 117 | ccr3 = getCx86(CX86_CCR3); |
118 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ | 118 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ |
119 | 119 | ||
120 | /* Load/Store Serialize to mem access disable (=reorder it) */ | 120 | /* Load/Store Serialize to mem access disable (=reorder it) */ |
121 | setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80); | 121 | setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80); |
122 | /* set load/store serialize from 1GB to 4GB */ | 122 | /* set load/store serialize from 1GB to 4GB */ |
123 | ccr3 |= 0xe0; | 123 | ccr3 |= 0xe0; |
@@ -146,7 +146,7 @@ static void __cpuinit set_cx86_inc(void) | |||
146 | printk(KERN_INFO "Enable Incrementor on Cyrix/NSC processor.\n"); | 146 | printk(KERN_INFO "Enable Incrementor on Cyrix/NSC processor.\n"); |
147 | 147 | ||
148 | ccr3 = getCx86(CX86_CCR3); | 148 | ccr3 = getCx86(CX86_CCR3); |
149 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ | 149 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN */ |
150 | /* PCR1 -- Performance Control */ | 150 | /* PCR1 -- Performance Control */ |
151 | /* Incrementor on, whatever that is */ | 151 | /* Incrementor on, whatever that is */ |
152 | setCx86(CX86_PCR1, getCx86(CX86_PCR1) | 0x02); | 152 | setCx86(CX86_PCR1, getCx86(CX86_PCR1) | 0x02); |
@@ -256,7 +256,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c) | |||
256 | u32 vendor, device; | 256 | u32 vendor, device; |
257 | /* It isn't really a PCI quirk directly, but the cure is the | 257 | /* It isn't really a PCI quirk directly, but the cure is the |
258 | same. The MediaGX has deep magic SMM stuff that handles the | 258 | same. The MediaGX has deep magic SMM stuff that handles the |
259 | SB emulation. It thows away the fifo on disable_dma() which | 259 | SB emulation. It throws away the fifo on disable_dma() which |
260 | is wrong and ruins the audio. | 260 | is wrong and ruins the audio. |
261 | 261 | ||
262 | Bug2: VSA1 has a wrap bug so that using maximum sized DMA | 262 | Bug2: VSA1 has a wrap bug so that using maximum sized DMA |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 297a24116949..9921b01fe199 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -295,7 +295,7 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
295 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ | 295 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ |
296 | unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; | 296 | unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; |
297 | #ifdef CONFIG_X86_HT | 297 | #ifdef CONFIG_X86_HT |
298 | unsigned int cpu = (c == &boot_cpu_data) ? 0 : (c - cpu_data); | 298 | unsigned int cpu = c->cpu_index; |
299 | #endif | 299 | #endif |
300 | 300 | ||
301 | if (c->cpuid_level > 3) { | 301 | if (c->cpuid_level > 3) { |
@@ -417,14 +417,14 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
417 | if (new_l2) { | 417 | if (new_l2) { |
418 | l2 = new_l2; | 418 | l2 = new_l2; |
419 | #ifdef CONFIG_X86_HT | 419 | #ifdef CONFIG_X86_HT |
420 | cpu_llc_id[cpu] = l2_id; | 420 | per_cpu(cpu_llc_id, cpu) = l2_id; |
421 | #endif | 421 | #endif |
422 | } | 422 | } |
423 | 423 | ||
424 | if (new_l3) { | 424 | if (new_l3) { |
425 | l3 = new_l3; | 425 | l3 = new_l3; |
426 | #ifdef CONFIG_X86_HT | 426 | #ifdef CONFIG_X86_HT |
427 | cpu_llc_id[cpu] = l3_id; | 427 | per_cpu(cpu_llc_id, cpu) = l3_id; |
428 | #endif | 428 | #endif |
429 | } | 429 | } |
430 | 430 | ||
@@ -459,7 +459,7 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
459 | struct _cpuid4_info *this_leaf, *sibling_leaf; | 459 | struct _cpuid4_info *this_leaf, *sibling_leaf; |
460 | unsigned long num_threads_sharing; | 460 | unsigned long num_threads_sharing; |
461 | int index_msb, i; | 461 | int index_msb, i; |
462 | struct cpuinfo_x86 *c = cpu_data; | 462 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
463 | 463 | ||
464 | this_leaf = CPUID4_INFO_IDX(cpu, index); | 464 | this_leaf = CPUID4_INFO_IDX(cpu, index); |
465 | num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing; | 465 | num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing; |
@@ -470,8 +470,8 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
470 | index_msb = get_count_order(num_threads_sharing); | 470 | index_msb = get_count_order(num_threads_sharing); |
471 | 471 | ||
472 | for_each_online_cpu(i) { | 472 | for_each_online_cpu(i) { |
473 | if (c[i].apicid >> index_msb == | 473 | if (cpu_data(i).apicid >> index_msb == |
474 | c[cpu].apicid >> index_msb) { | 474 | c->apicid >> index_msb) { |
475 | cpu_set(i, this_leaf->shared_cpu_map); | 475 | cpu_set(i, this_leaf->shared_cpu_map); |
476 | if (i != cpu && cpuid4_info[i]) { | 476 | if (i != cpu && cpuid4_info[i]) { |
477 | sibling_leaf = CPUID4_INFO_IDX(i, index); | 477 | sibling_leaf = CPUID4_INFO_IDX(i, index); |
diff --git a/arch/x86/kernel/cpu/mtrr/cyrix.c b/arch/x86/kernel/cpu/mtrr/cyrix.c index 2287d4863a8a..9964be3de2b7 100644 --- a/arch/x86/kernel/cpu/mtrr/cyrix.c +++ b/arch/x86/kernel/cpu/mtrr/cyrix.c | |||
@@ -147,10 +147,10 @@ static void prepare_set(void) | |||
147 | write_cr0(cr0); | 147 | write_cr0(cr0); |
148 | wbinvd(); | 148 | wbinvd(); |
149 | 149 | ||
150 | /* Cyrix ARRs - everything else were excluded at the top */ | 150 | /* Cyrix ARRs - everything else was excluded at the top */ |
151 | ccr3 = getCx86(CX86_CCR3); | 151 | ccr3 = getCx86(CX86_CCR3); |
152 | 152 | ||
153 | /* Cyrix ARRs - everything else were excluded at the top */ | 153 | /* Cyrix ARRs - everything else was excluded at the top */ |
154 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); | 154 | setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); |
155 | 155 | ||
156 | } | 156 | } |
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 56f64e34829f..992f08dfbb6c 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c | |||
@@ -182,7 +182,7 @@ static inline void k8_enable_fixed_iorrs(void) | |||
182 | 182 | ||
183 | /** | 183 | /** |
184 | * Checks and updates an fixed-range MTRR if it differs from the value it | 184 | * Checks and updates an fixed-range MTRR if it differs from the value it |
185 | * should have. If K8 extenstions are wanted, update the K8 SYSCFG MSR also. | 185 | * should have. If K8 extentions are wanted, update the K8 SYSCFG MSR also. |
186 | * see AMD publication no. 24593, chapter 7.8.1, page 233 for more information | 186 | * see AMD publication no. 24593, chapter 7.8.1, page 233 for more information |
187 | * \param msr MSR address of the MTTR which should be checked and updated | 187 | * \param msr MSR address of the MTTR which should be checked and updated |
188 | * \param changed pointer which indicates whether the MTRR needed to be changed | 188 | * \param changed pointer which indicates whether the MTRR needed to be changed |
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 5e4be30ff903..9abbdf7562c5 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -748,7 +748,7 @@ static int __init mtrr_init_finialize(void) | |||
748 | if (use_intel()) | 748 | if (use_intel()) |
749 | mtrr_state_warn(); | 749 | mtrr_state_warn(); |
750 | else { | 750 | else { |
751 | /* The CPUs haven't MTRR and seemes not support SMP. They have | 751 | /* The CPUs haven't MTRR and seem to not support SMP. They have |
752 | * specific drivers, we use a tricky method to support | 752 | * specific drivers, we use a tricky method to support |
753 | * suspend/resume for them. | 753 | * suspend/resume for them. |
754 | * TBD: is there any system with such CPU which supports | 754 | * TBD: is there any system with such CPU which supports |
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c index 54cdbf1a40f1..c02541e6e653 100644 --- a/arch/x86/kernel/cpu/perfctr-watchdog.c +++ b/arch/x86/kernel/cpu/perfctr-watchdog.c | |||
@@ -120,7 +120,9 @@ int reserve_perfctr_nmi(unsigned int msr) | |||
120 | unsigned int counter; | 120 | unsigned int counter; |
121 | 121 | ||
122 | counter = nmi_perfctr_msr_to_bit(msr); | 122 | counter = nmi_perfctr_msr_to_bit(msr); |
123 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 123 | /* register not managed by the allocator? */ |
124 | if (counter > NMI_MAX_COUNTER_BITS) | ||
125 | return 1; | ||
124 | 126 | ||
125 | if (!test_and_set_bit(counter, perfctr_nmi_owner)) | 127 | if (!test_and_set_bit(counter, perfctr_nmi_owner)) |
126 | return 1; | 128 | return 1; |
@@ -132,7 +134,9 @@ void release_perfctr_nmi(unsigned int msr) | |||
132 | unsigned int counter; | 134 | unsigned int counter; |
133 | 135 | ||
134 | counter = nmi_perfctr_msr_to_bit(msr); | 136 | counter = nmi_perfctr_msr_to_bit(msr); |
135 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 137 | /* register not managed by the allocator? */ |
138 | if (counter > NMI_MAX_COUNTER_BITS) | ||
139 | return; | ||
136 | 140 | ||
137 | clear_bit(counter, perfctr_nmi_owner); | 141 | clear_bit(counter, perfctr_nmi_owner); |
138 | } | 142 | } |
@@ -142,7 +146,9 @@ int reserve_evntsel_nmi(unsigned int msr) | |||
142 | unsigned int counter; | 146 | unsigned int counter; |
143 | 147 | ||
144 | counter = nmi_evntsel_msr_to_bit(msr); | 148 | counter = nmi_evntsel_msr_to_bit(msr); |
145 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 149 | /* register not managed by the allocator? */ |
150 | if (counter > NMI_MAX_COUNTER_BITS) | ||
151 | return 1; | ||
146 | 152 | ||
147 | if (!test_and_set_bit(counter, evntsel_nmi_owner)) | 153 | if (!test_and_set_bit(counter, evntsel_nmi_owner)) |
148 | return 1; | 154 | return 1; |
@@ -154,7 +160,9 @@ void release_evntsel_nmi(unsigned int msr) | |||
154 | unsigned int counter; | 160 | unsigned int counter; |
155 | 161 | ||
156 | counter = nmi_evntsel_msr_to_bit(msr); | 162 | counter = nmi_evntsel_msr_to_bit(msr); |
157 | BUG_ON(counter > NMI_MAX_COUNTER_BITS); | 163 | /* register not managed by the allocator? */ |
164 | if (counter > NMI_MAX_COUNTER_BITS) | ||
165 | return; | ||
158 | 166 | ||
159 | clear_bit(counter, evntsel_nmi_owner); | 167 | clear_bit(counter, evntsel_nmi_owner); |
160 | } | 168 | } |
diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c index 879a0f789b1e..2d42b414b777 100644 --- a/arch/x86/kernel/cpu/proc.c +++ b/arch/x86/kernel/cpu/proc.c | |||
@@ -85,12 +85,13 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
85 | /* nothing */ | 85 | /* nothing */ |
86 | }; | 86 | }; |
87 | struct cpuinfo_x86 *c = v; | 87 | struct cpuinfo_x86 *c = v; |
88 | int i, n = c - cpu_data; | 88 | int i, n = 0; |
89 | int fpu_exception; | 89 | int fpu_exception; |
90 | 90 | ||
91 | #ifdef CONFIG_SMP | 91 | #ifdef CONFIG_SMP |
92 | if (!cpu_online(n)) | 92 | if (!cpu_online(n)) |
93 | return 0; | 93 | return 0; |
94 | n = c->cpu_index; | ||
94 | #endif | 95 | #endif |
95 | seq_printf(m, "processor\t: %d\n" | 96 | seq_printf(m, "processor\t: %d\n" |
96 | "vendor_id\t: %s\n" | 97 | "vendor_id\t: %s\n" |
@@ -175,11 +176,15 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
175 | 176 | ||
176 | static void *c_start(struct seq_file *m, loff_t *pos) | 177 | static void *c_start(struct seq_file *m, loff_t *pos) |
177 | { | 178 | { |
178 | return *pos < NR_CPUS ? cpu_data + *pos : NULL; | 179 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
180 | *pos = first_cpu(cpu_possible_map); | ||
181 | if ((*pos) < NR_CPUS && cpu_possible(*pos)) | ||
182 | return &cpu_data(*pos); | ||
183 | return NULL; | ||
179 | } | 184 | } |
180 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 185 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
181 | { | 186 | { |
182 | ++*pos; | 187 | *pos = next_cpu(*pos, cpu_possible_map); |
183 | return c_start(m, pos); | 188 | return c_start(m, pos); |
184 | } | 189 | } |
185 | static void c_stop(struct seq_file *m, void *v) | 190 | static void c_stop(struct seq_file *m, void *v) |
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index 70dcf912d9fb..05c9936a16cc 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c | |||
@@ -114,7 +114,7 @@ static ssize_t cpuid_read(struct file *file, char __user *buf, | |||
114 | static int cpuid_open(struct inode *inode, struct file *file) | 114 | static int cpuid_open(struct inode *inode, struct file *file) |
115 | { | 115 | { |
116 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); | 116 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); |
117 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; | 117 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
118 | 118 | ||
119 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 119 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
120 | return -ENXIO; /* No such CPU */ | 120 | return -ENXIO; /* No such CPU */ |
@@ -134,15 +134,18 @@ static const struct file_operations cpuid_fops = { | |||
134 | .open = cpuid_open, | 134 | .open = cpuid_open, |
135 | }; | 135 | }; |
136 | 136 | ||
137 | static int __cpuinit cpuid_device_create(int i) | 137 | static __cpuinit int cpuid_device_create(int cpu) |
138 | { | 138 | { |
139 | int err = 0; | ||
140 | struct device *dev; | 139 | struct device *dev; |
141 | 140 | ||
142 | dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, i), "cpu%d",i); | 141 | dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), |
143 | if (IS_ERR(dev)) | 142 | "cpu%d", cpu); |
144 | err = PTR_ERR(dev); | 143 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; |
145 | return err; | 144 | } |
145 | |||
146 | static void cpuid_device_destroy(int cpu) | ||
147 | { | ||
148 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | ||
146 | } | 149 | } |
147 | 150 | ||
148 | static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb, | 151 | static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb, |
@@ -150,18 +153,21 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb, | |||
150 | void *hcpu) | 153 | void *hcpu) |
151 | { | 154 | { |
152 | unsigned int cpu = (unsigned long)hcpu; | 155 | unsigned int cpu = (unsigned long)hcpu; |
156 | int err = 0; | ||
153 | 157 | ||
154 | switch (action) { | 158 | switch (action) { |
155 | case CPU_ONLINE: | 159 | case CPU_UP_PREPARE: |
156 | case CPU_ONLINE_FROZEN: | 160 | case CPU_UP_PREPARE_FROZEN: |
157 | cpuid_device_create(cpu); | 161 | err = cpuid_device_create(cpu); |
158 | break; | 162 | break; |
163 | case CPU_UP_CANCELED: | ||
164 | case CPU_UP_CANCELED_FROZEN: | ||
159 | case CPU_DEAD: | 165 | case CPU_DEAD: |
160 | case CPU_DEAD_FROZEN: | 166 | case CPU_DEAD_FROZEN: |
161 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | 167 | cpuid_device_destroy(cpu); |
162 | break; | 168 | break; |
163 | } | 169 | } |
164 | return NOTIFY_OK; | 170 | return err ? NOTIFY_BAD : NOTIFY_OK; |
165 | } | 171 | } |
166 | 172 | ||
167 | static struct notifier_block __cpuinitdata cpuid_class_cpu_notifier = | 173 | static struct notifier_block __cpuinitdata cpuid_class_cpu_notifier = |
@@ -198,7 +204,7 @@ static int __init cpuid_init(void) | |||
198 | out_class: | 204 | out_class: |
199 | i = 0; | 205 | i = 0; |
200 | for_each_online_cpu(i) { | 206 | for_each_online_cpu(i) { |
201 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, i)); | 207 | cpuid_device_destroy(i); |
202 | } | 208 | } |
203 | class_destroy(cpuid_class); | 209 | class_destroy(cpuid_class); |
204 | out_chrdev: | 210 | out_chrdev: |
@@ -212,7 +218,7 @@ static void __exit cpuid_exit(void) | |||
212 | int cpu = 0; | 218 | int cpu = 0; |
213 | 219 | ||
214 | for_each_online_cpu(cpu) | 220 | for_each_online_cpu(cpu) |
215 | device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | 221 | cpuid_device_destroy(cpu); |
216 | class_destroy(cpuid_class); | 222 | class_destroy(cpuid_class); |
217 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); | 223 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); |
218 | unregister_hotcpu_notifier(&cpuid_class_cpu_notifier); | 224 | unregister_hotcpu_notifier(&cpuid_class_cpu_notifier); |
diff --git a/arch/x86/kernel/e820_32.c b/arch/x86/kernel/e820_32.c index d58039e8de74..58fd54eb5577 100644 --- a/arch/x86/kernel/e820_32.c +++ b/arch/x86/kernel/e820_32.c | |||
@@ -706,7 +706,7 @@ void __init e820_register_memory(void) | |||
706 | int i; | 706 | int i; |
707 | 707 | ||
708 | /* | 708 | /* |
709 | * Search for the bigest gap in the low 32 bits of the e820 | 709 | * Search for the biggest gap in the low 32 bits of the e820 |
710 | * memory space. | 710 | * memory space. |
711 | */ | 711 | */ |
712 | last = 0x100000000ull; | 712 | last = 0x100000000ull; |
diff --git a/arch/x86/kernel/early-quirks_64.c b/arch/x86/kernel/early-quirks.c index 13aa4fd728f3..dc34acbd54aa 100644 --- a/arch/x86/kernel/early-quirks_64.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -13,9 +13,13 @@ | |||
13 | #include <linux/acpi.h> | 13 | #include <linux/acpi.h> |
14 | #include <linux/pci_ids.h> | 14 | #include <linux/pci_ids.h> |
15 | #include <asm/pci-direct.h> | 15 | #include <asm/pci-direct.h> |
16 | #include <asm/proto.h> | ||
17 | #include <asm/iommu.h> | ||
18 | #include <asm/dma.h> | 16 | #include <asm/dma.h> |
17 | #include <asm/io_apic.h> | ||
18 | #include <asm/apic.h> | ||
19 | |||
20 | #ifdef CONFIG_IOMMU | ||
21 | #include <asm/iommu.h> | ||
22 | #endif | ||
19 | 23 | ||
20 | static void __init via_bugs(void) | 24 | static void __init via_bugs(void) |
21 | { | 25 | { |
@@ -23,7 +27,8 @@ static void __init via_bugs(void) | |||
23 | if ((end_pfn > MAX_DMA32_PFN || force_iommu) && | 27 | if ((end_pfn > MAX_DMA32_PFN || force_iommu) && |
24 | !iommu_aperture_allowed) { | 28 | !iommu_aperture_allowed) { |
25 | printk(KERN_INFO | 29 | printk(KERN_INFO |
26 | "Looks like a VIA chipset. Disabling IOMMU. Override with iommu=allowed\n"); | 30 | "Looks like a VIA chipset. Disabling IOMMU." |
31 | " Override with iommu=allowed\n"); | ||
27 | iommu_aperture_disabled = 1; | 32 | iommu_aperture_disabled = 1; |
28 | } | 33 | } |
29 | #endif | 34 | #endif |
@@ -40,6 +45,7 @@ static int __init nvidia_hpet_check(struct acpi_table_header *header) | |||
40 | static void __init nvidia_bugs(void) | 45 | static void __init nvidia_bugs(void) |
41 | { | 46 | { |
42 | #ifdef CONFIG_ACPI | 47 | #ifdef CONFIG_ACPI |
48 | #ifdef CONFIG_X86_IO_APIC | ||
43 | /* | 49 | /* |
44 | * All timer overrides on Nvidia are | 50 | * All timer overrides on Nvidia are |
45 | * wrong unless HPET is enabled. | 51 | * wrong unless HPET is enabled. |
@@ -59,17 +65,20 @@ static void __init nvidia_bugs(void) | |||
59 | "try acpi_use_timer_override\n"); | 65 | "try acpi_use_timer_override\n"); |
60 | } | 66 | } |
61 | #endif | 67 | #endif |
68 | #endif | ||
62 | /* RED-PEN skip them on mptables too? */ | 69 | /* RED-PEN skip them on mptables too? */ |
63 | 70 | ||
64 | } | 71 | } |
65 | 72 | ||
66 | static void __init ati_bugs(void) | 73 | static void __init ati_bugs(void) |
67 | { | 74 | { |
75 | #ifdef CONFIG_X86_IO_APIC | ||
68 | if (timer_over_8254 == 1) { | 76 | if (timer_over_8254 == 1) { |
69 | timer_over_8254 = 0; | 77 | timer_over_8254 = 0; |
70 | printk(KERN_INFO | 78 | printk(KERN_INFO |
71 | "ATI board detected. Disabling timer routing over 8254.\n"); | 79 | "ATI board detected. Disabling timer routing over 8254.\n"); |
72 | } | 80 | } |
81 | #endif | ||
73 | } | 82 | } |
74 | 83 | ||
75 | struct chipset { | 84 | struct chipset { |
@@ -104,7 +113,7 @@ void __init early_quirks(void) | |||
104 | if (class == 0xffffffff) | 113 | if (class == 0xffffffff) |
105 | break; | 114 | break; |
106 | 115 | ||
107 | if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) | 116 | if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) |
108 | continue; | 117 | continue; |
109 | 118 | ||
110 | vendor = read_pci_config(num, slot, func, | 119 | vendor = read_pci_config(num, slot, func, |
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/genapic_64.c index 4ae03e3e8294..ce703e21c912 100644 --- a/arch/x86/kernel/genapic_64.c +++ b/arch/x86/kernel/genapic_64.c | |||
@@ -24,10 +24,19 @@ | |||
24 | #include <acpi/acpi_bus.h> | 24 | #include <acpi/acpi_bus.h> |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | /* which logical CPU number maps to which CPU (physical APIC ID) */ | 27 | /* |
28 | u8 x86_cpu_to_apicid[NR_CPUS] __read_mostly | 28 | * which logical CPU number maps to which CPU (physical APIC ID) |
29 | * | ||
30 | * The following static array is used during kernel startup | ||
31 | * and the x86_cpu_to_apicid_ptr contains the address of the | ||
32 | * array during this time. Is it zeroed when the per_cpu | ||
33 | * data area is removed. | ||
34 | */ | ||
35 | u8 x86_cpu_to_apicid_init[NR_CPUS] __initdata | ||
29 | = { [0 ... NR_CPUS-1] = BAD_APICID }; | 36 | = { [0 ... NR_CPUS-1] = BAD_APICID }; |
30 | EXPORT_SYMBOL(x86_cpu_to_apicid); | 37 | void *x86_cpu_to_apicid_ptr; |
38 | DEFINE_PER_CPU(u8, x86_cpu_to_apicid) = BAD_APICID; | ||
39 | EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid); | ||
31 | 40 | ||
32 | struct genapic __read_mostly *genapic = &apic_flat; | 41 | struct genapic __read_mostly *genapic = &apic_flat; |
33 | 42 | ||
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c index 91c7526768ee..07352b74bda6 100644 --- a/arch/x86/kernel/genapic_flat_64.c +++ b/arch/x86/kernel/genapic_flat_64.c | |||
@@ -172,7 +172,7 @@ static unsigned int physflat_cpu_mask_to_apicid(cpumask_t cpumask) | |||
172 | */ | 172 | */ |
173 | cpu = first_cpu(cpumask); | 173 | cpu = first_cpu(cpumask); |
174 | if ((unsigned)cpu < NR_CPUS) | 174 | if ((unsigned)cpu < NR_CPUS) |
175 | return x86_cpu_to_apicid[cpu]; | 175 | return per_cpu(x86_cpu_to_apicid, cpu); |
176 | else | 176 | else |
177 | return BAD_APICID; | 177 | return BAD_APICID; |
178 | } | 178 | } |
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index a7eee0a4751d..6b3469311e42 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -58,7 +58,7 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
58 | 58 | ||
59 | for (i = 0; i < IDT_ENTRIES; i++) | 59 | for (i = 0; i < IDT_ENTRIES; i++) |
60 | set_intr_gate(i, early_idt_handler); | 60 | set_intr_gate(i, early_idt_handler); |
61 | asm volatile("lidt %0" :: "m" (idt_descr)); | 61 | load_idt((const struct desc_ptr *)&idt_descr); |
62 | 62 | ||
63 | early_printk("Kernel alive\n"); | 63 | early_printk("Kernel alive\n"); |
64 | 64 | ||
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index f8367074da0d..53303f2e5475 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -69,12 +69,15 @@ static inline void hpet_clear_mapping(void) | |||
69 | * HPET command line enable / disable | 69 | * HPET command line enable / disable |
70 | */ | 70 | */ |
71 | static int boot_hpet_disable; | 71 | static int boot_hpet_disable; |
72 | int hpet_force_user; | ||
72 | 73 | ||
73 | static int __init hpet_setup(char* str) | 74 | static int __init hpet_setup(char* str) |
74 | { | 75 | { |
75 | if (str) { | 76 | if (str) { |
76 | if (!strncmp("disable", str, 7)) | 77 | if (!strncmp("disable", str, 7)) |
77 | boot_hpet_disable = 1; | 78 | boot_hpet_disable = 1; |
79 | if (!strncmp("force", str, 5)) | ||
80 | hpet_force_user = 1; | ||
78 | } | 81 | } |
79 | return 1; | 82 | return 1; |
80 | } | 83 | } |
@@ -350,7 +353,7 @@ static int hpet_clocksource_register(void) | |||
350 | * | 353 | * |
351 | * hpet period is in femto seconds per cycle | 354 | * hpet period is in femto seconds per cycle |
352 | * so we need to convert this to ns/cyc units | 355 | * so we need to convert this to ns/cyc units |
353 | * aproximated by mult/2^shift | 356 | * approximated by mult/2^shift |
354 | * | 357 | * |
355 | * fsec/cyc * 1nsec/1000000fsec = nsec/cyc = mult/2^shift | 358 | * fsec/cyc * 1nsec/1000000fsec = nsec/cyc = mult/2^shift |
356 | * fsec/cyc * 1ns/1000000fsec * 2^shift = mult | 359 | * fsec/cyc * 1ns/1000000fsec * 2^shift = mult |
diff --git a/arch/x86/kernel/i8253.c b/arch/x86/kernel/i8253.c index 5cc8841ca2c6..a42c80745325 100644 --- a/arch/x86/kernel/i8253.c +++ b/arch/x86/kernel/i8253.c | |||
@@ -86,7 +86,7 @@ static int pit_next_event(unsigned long delta, struct clock_event_device *evt) | |||
86 | * On UP the PIT can serve all of the possible timer functions. On SMP systems | 86 | * On UP the PIT can serve all of the possible timer functions. On SMP systems |
87 | * it can be solely used for the global tick. | 87 | * it can be solely used for the global tick. |
88 | * | 88 | * |
89 | * The profiling and update capabilites are switched off once the local apic is | 89 | * The profiling and update capabilities are switched off once the local apic is |
90 | * registered. This mechanism replaces the previous #ifdef LOCAL_APIC - | 90 | * registered. This mechanism replaces the previous #ifdef LOCAL_APIC - |
91 | * !using_apic_timer decisions in do_timer_interrupt_hook() | 91 | * !using_apic_timer decisions in do_timer_interrupt_hook() |
92 | */ | 92 | */ |
diff --git a/arch/x86/kernel/i8259_32.c b/arch/x86/kernel/i8259_32.c index d34a10cc13a7..f634fc715c99 100644 --- a/arch/x86/kernel/i8259_32.c +++ b/arch/x86/kernel/i8259_32.c | |||
@@ -403,7 +403,8 @@ void __init native_init_IRQ(void) | |||
403 | int vector = FIRST_EXTERNAL_VECTOR + i; | 403 | int vector = FIRST_EXTERNAL_VECTOR + i; |
404 | if (i >= NR_IRQS) | 404 | if (i >= NR_IRQS) |
405 | break; | 405 | break; |
406 | if (vector != SYSCALL_VECTOR) | 406 | /* SYSCALL_VECTOR was reserved in trap_init. */ |
407 | if (!test_bit(vector, used_vectors)) | ||
407 | set_intr_gate(vector, interrupt[i]); | 408 | set_intr_gate(vector, interrupt[i]); |
408 | } | 409 | } |
409 | 410 | ||
diff --git a/arch/x86/kernel/init_task_32.c b/arch/x86/kernel/init_task.c index d26fc063a760..468c9c437842 100644 --- a/arch/x86/kernel/init_task_32.c +++ b/arch/x86/kernel/init_task.c | |||
@@ -15,7 +15,6 @@ static struct files_struct init_files = INIT_FILES; | |||
15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
17 | struct mm_struct init_mm = INIT_MM(init_mm); | 17 | struct mm_struct init_mm = INIT_MM(init_mm); |
18 | |||
19 | EXPORT_SYMBOL(init_mm); | 18 | EXPORT_SYMBOL(init_mm); |
20 | 19 | ||
21 | /* | 20 | /* |
@@ -25,7 +24,7 @@ EXPORT_SYMBOL(init_mm); | |||
25 | * way process stacks are handled. This is done by having a special | 24 | * way process stacks are handled. This is done by having a special |
26 | * "init_task" linker map entry.. | 25 | * "init_task" linker map entry.. |
27 | */ | 26 | */ |
28 | union thread_union init_thread_union | 27 | union thread_union init_thread_union |
29 | __attribute__((__section__(".data.init_task"))) = | 28 | __attribute__((__section__(".data.init_task"))) = |
30 | { INIT_THREAD_INFO(init_task) }; | 29 | { INIT_THREAD_INFO(init_task) }; |
31 | 30 | ||
@@ -35,12 +34,14 @@ union thread_union init_thread_union | |||
35 | * All other task structs will be allocated on slabs in fork.c | 34 | * All other task structs will be allocated on slabs in fork.c |
36 | */ | 35 | */ |
37 | struct task_struct init_task = INIT_TASK(init_task); | 36 | struct task_struct init_task = INIT_TASK(init_task); |
38 | |||
39 | EXPORT_SYMBOL(init_task); | 37 | EXPORT_SYMBOL(init_task); |
40 | 38 | ||
41 | /* | 39 | /* |
42 | * per-CPU TSS segments. Threads are completely 'soft' on Linux, | 40 | * per-CPU TSS segments. Threads are completely 'soft' on Linux, |
43 | * no more per-task TSS's. | 41 | * no more per-task TSS's. The TSS size is kept cacheline-aligned |
44 | */ | 42 | * so they are allowed to end up in the .data.cacheline_aligned |
43 | * section. Since TSS's are completely CPU-local, we want them | ||
44 | * on exact cacheline boundaries, to eliminate cacheline ping-pong. | ||
45 | */ | ||
45 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; | 46 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; |
46 | 47 | ||
diff --git a/arch/x86/kernel/init_task_64.c b/arch/x86/kernel/init_task_64.c deleted file mode 100644 index 4ff33d4f8551..000000000000 --- a/arch/x86/kernel/init_task_64.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #include <linux/mm.h> | ||
2 | #include <linux/module.h> | ||
3 | #include <linux/sched.h> | ||
4 | #include <linux/init.h> | ||
5 | #include <linux/init_task.h> | ||
6 | #include <linux/fs.h> | ||
7 | #include <linux/mqueue.h> | ||
8 | |||
9 | #include <asm/uaccess.h> | ||
10 | #include <asm/pgtable.h> | ||
11 | #include <asm/desc.h> | ||
12 | |||
13 | static struct fs_struct init_fs = INIT_FS; | ||
14 | static struct files_struct init_files = INIT_FILES; | ||
15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | ||
16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | ||
17 | struct mm_struct init_mm = INIT_MM(init_mm); | ||
18 | |||
19 | EXPORT_SYMBOL(init_mm); | ||
20 | |||
21 | /* | ||
22 | * Initial task structure. | ||
23 | * | ||
24 | * We need to make sure that this is 8192-byte aligned due to the | ||
25 | * way process stacks are handled. This is done by having a special | ||
26 | * "init_task" linker map entry.. | ||
27 | */ | ||
28 | union thread_union init_thread_union | ||
29 | __attribute__((__section__(".data.init_task"))) = | ||
30 | { INIT_THREAD_INFO(init_task) }; | ||
31 | |||
32 | /* | ||
33 | * Initial task structure. | ||
34 | * | ||
35 | * All other task structs will be allocated on slabs in fork.c | ||
36 | */ | ||
37 | struct task_struct init_task = INIT_TASK(init_task); | ||
38 | |||
39 | EXPORT_SYMBOL(init_task); | ||
40 | /* | ||
41 | * per-CPU TSS segments. Threads are completely 'soft' on Linux, | ||
42 | * no more per-task TSS's. The TSS size is kept cacheline-aligned | ||
43 | * so they are allowed to end up in the .data.cacheline_aligned | ||
44 | * section. Since TSS's are completely CPU-local, we want them | ||
45 | * on exact cacheline boundaries, to eliminate cacheline ping-pong. | ||
46 | */ | ||
47 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; | ||
48 | |||
49 | /* Copies of the original ist values from the tss are only accessed during | ||
50 | * debugging, no special alignment required. | ||
51 | */ | ||
52 | DEFINE_PER_CPU(struct orig_ist, orig_ist); | ||
53 | |||
54 | #define ALIGN_TO_4K __attribute__((section(".data.init_task"))) | ||
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index 5f10c7189534..f35c6eb33da9 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -584,7 +584,7 @@ tryanotherirq: | |||
584 | 584 | ||
585 | imbalance = move_this_load; | 585 | imbalance = move_this_load; |
586 | 586 | ||
587 | /* For physical_balance case, we accumlated both load | 587 | /* For physical_balance case, we accumulated both load |
588 | * values in the one of the siblings cpu_irq[], | 588 | * values in the one of the siblings cpu_irq[], |
589 | * to use the same code for physical and logical processors | 589 | * to use the same code for physical and logical processors |
590 | * as much as possible. | 590 | * as much as possible. |
@@ -1198,7 +1198,7 @@ static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 } | |||
1198 | static int __assign_irq_vector(int irq) | 1198 | static int __assign_irq_vector(int irq) |
1199 | { | 1199 | { |
1200 | static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0; | 1200 | static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0; |
1201 | int vector, offset, i; | 1201 | int vector, offset; |
1202 | 1202 | ||
1203 | BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); | 1203 | BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); |
1204 | 1204 | ||
@@ -1215,11 +1215,8 @@ next: | |||
1215 | } | 1215 | } |
1216 | if (vector == current_vector) | 1216 | if (vector == current_vector) |
1217 | return -ENOSPC; | 1217 | return -ENOSPC; |
1218 | if (vector == SYSCALL_VECTOR) | 1218 | if (test_and_set_bit(vector, used_vectors)) |
1219 | goto next; | 1219 | goto next; |
1220 | for (i = 0; i < NR_IRQ_VECTORS; i++) | ||
1221 | if (irq_vector[i] == vector) | ||
1222 | goto next; | ||
1223 | 1220 | ||
1224 | current_vector = vector; | 1221 | current_vector = vector; |
1225 | current_offset = offset; | 1222 | current_offset = offset; |
@@ -2295,6 +2292,12 @@ static inline void __init check_timer(void) | |||
2295 | 2292 | ||
2296 | void __init setup_IO_APIC(void) | 2293 | void __init setup_IO_APIC(void) |
2297 | { | 2294 | { |
2295 | int i; | ||
2296 | |||
2297 | /* Reserve all the system vectors. */ | ||
2298 | for (i = FIRST_SYSTEM_VECTOR; i < NR_VECTORS; i++) | ||
2299 | set_bit(i, used_vectors); | ||
2300 | |||
2298 | enable_IO_APIC(); | 2301 | enable_IO_APIC(); |
2299 | 2302 | ||
2300 | if (acpi_ioapic) | 2303 | if (acpi_ioapic) |
@@ -2472,7 +2475,7 @@ void destroy_irq(unsigned int irq) | |||
2472 | } | 2475 | } |
2473 | 2476 | ||
2474 | /* | 2477 | /* |
2475 | * MSI mesage composition | 2478 | * MSI message composition |
2476 | */ | 2479 | */ |
2477 | #ifdef CONFIG_PCI_MSI | 2480 | #ifdef CONFIG_PCI_MSI |
2478 | static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) | 2481 | static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) |
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 1c2c7bf6a9d3..b3c2d268d708 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -1770,7 +1770,7 @@ __setup("no_timer_check", notimercheck); | |||
1770 | 1770 | ||
1771 | /* | 1771 | /* |
1772 | * | 1772 | * |
1773 | * IRQ's that are handled by the PIC in the MPS IOAPIC case. | 1773 | * IRQs that are handled by the PIC in the MPS IOAPIC case. |
1774 | * - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ. | 1774 | * - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ. |
1775 | * Linux doesn't really care, as it's not actually used | 1775 | * Linux doesn't really care, as it's not actually used |
1776 | * for any interrupt handling anyway. | 1776 | * for any interrupt handling anyway. |
@@ -1921,7 +1921,7 @@ void destroy_irq(unsigned int irq) | |||
1921 | } | 1921 | } |
1922 | 1922 | ||
1923 | /* | 1923 | /* |
1924 | * MSI mesage composition | 1924 | * MSI message composition |
1925 | */ | 1925 | */ |
1926 | #ifdef CONFIG_PCI_MSI | 1926 | #ifdef CONFIG_PCI_MSI |
1927 | static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) | 1927 | static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_msg *msg) |
diff --git a/arch/x86/kernel/mce_64.c b/arch/x86/kernel/mce_64.c index 66e6b797b2cb..07bbfe7aa7f7 100644 --- a/arch/x86/kernel/mce_64.c +++ b/arch/x86/kernel/mce_64.c | |||
@@ -320,7 +320,7 @@ void do_machine_check(struct pt_regs * regs, long error_code) | |||
320 | #ifdef CONFIG_X86_MCE_INTEL | 320 | #ifdef CONFIG_X86_MCE_INTEL |
321 | /*** | 321 | /*** |
322 | * mce_log_therm_throt_event - Logs the thermal throttling event to mcelog | 322 | * mce_log_therm_throt_event - Logs the thermal throttling event to mcelog |
323 | * @cpu: The CPU on which the event occured. | 323 | * @cpu: The CPU on which the event occurred. |
324 | * @status: Event status information | 324 | * @status: Event status information |
325 | * | 325 | * |
326 | * This function should be called by the thermal interrupt after the | 326 | * This function should be called by the thermal interrupt after the |
@@ -688,7 +688,7 @@ static int __init mcheck_disable(char *str) | |||
688 | return 1; | 688 | return 1; |
689 | } | 689 | } |
690 | 690 | ||
691 | /* mce=off disables machine check. Note you can reenable it later | 691 | /* mce=off disables machine check. Note you can re-enable it later |
692 | using sysfs. | 692 | using sysfs. |
693 | mce=TOLERANCELEVEL (number, see above) | 693 | mce=TOLERANCELEVEL (number, see above) |
694 | mce=bootlog Log MCEs from before booting. Disabled by default on AMD. | 694 | mce=bootlog Log MCEs from before booting. Disabled by default on AMD. |
@@ -799,7 +799,8 @@ static __cpuinit int mce_create_device(unsigned int cpu) | |||
799 | { | 799 | { |
800 | int err; | 800 | int err; |
801 | int i; | 801 | int i; |
802 | if (!mce_available(&cpu_data[cpu])) | 802 | |
803 | if (!mce_available(&cpu_data(cpu))) | ||
803 | return -EIO; | 804 | return -EIO; |
804 | 805 | ||
805 | memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject)); | 806 | memset(&per_cpu(device_mce, cpu).kobj, 0, sizeof(struct kobject)); |
diff --git a/arch/x86/kernel/mce_amd_64.c b/arch/x86/kernel/mce_amd_64.c index 0d2afd96aca4..752fb16a817d 100644 --- a/arch/x86/kernel/mce_amd_64.c +++ b/arch/x86/kernel/mce_amd_64.c | |||
@@ -472,11 +472,11 @@ static __cpuinit int threshold_create_bank(unsigned int cpu, unsigned int bank) | |||
472 | sprintf(name, "threshold_bank%i", bank); | 472 | sprintf(name, "threshold_bank%i", bank); |
473 | 473 | ||
474 | #ifdef CONFIG_SMP | 474 | #ifdef CONFIG_SMP |
475 | if (cpu_data[cpu].cpu_core_id && shared_bank[bank]) { /* symlink */ | 475 | if (cpu_data(cpu).cpu_core_id && shared_bank[bank]) { /* symlink */ |
476 | i = first_cpu(per_cpu(cpu_core_map, cpu)); | 476 | i = first_cpu(per_cpu(cpu_core_map, cpu)); |
477 | 477 | ||
478 | /* first core not up yet */ | 478 | /* first core not up yet */ |
479 | if (cpu_data[i].cpu_core_id) | 479 | if (cpu_data(i).cpu_core_id) |
480 | goto out; | 480 | goto out; |
481 | 481 | ||
482 | /* already linked */ | 482 | /* already linked */ |
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c index 09cf78110358..09c315214a5e 100644 --- a/arch/x86/kernel/microcode.c +++ b/arch/x86/kernel/microcode.c | |||
@@ -132,7 +132,7 @@ static struct ucode_cpu_info { | |||
132 | 132 | ||
133 | static void collect_cpu_info(int cpu_num) | 133 | static void collect_cpu_info(int cpu_num) |
134 | { | 134 | { |
135 | struct cpuinfo_x86 *c = cpu_data + cpu_num; | 135 | struct cpuinfo_x86 *c = &cpu_data(cpu_num); |
136 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; | 136 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu_num; |
137 | unsigned int val[2]; | 137 | unsigned int val[2]; |
138 | 138 | ||
@@ -522,7 +522,7 @@ static struct platform_device *microcode_pdev; | |||
522 | static int cpu_request_microcode(int cpu) | 522 | static int cpu_request_microcode(int cpu) |
523 | { | 523 | { |
524 | char name[30]; | 524 | char name[30]; |
525 | struct cpuinfo_x86 *c = cpu_data + cpu; | 525 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
526 | const struct firmware *firmware; | 526 | const struct firmware *firmware; |
527 | void *buf; | 527 | void *buf; |
528 | unsigned long size; | 528 | unsigned long size; |
@@ -570,7 +570,7 @@ static int cpu_request_microcode(int cpu) | |||
570 | 570 | ||
571 | static int apply_microcode_check_cpu(int cpu) | 571 | static int apply_microcode_check_cpu(int cpu) |
572 | { | 572 | { |
573 | struct cpuinfo_x86 *c = cpu_data + cpu; | 573 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
574 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; | 574 | struct ucode_cpu_info *uci = ucode_cpu_info + cpu; |
575 | cpumask_t old; | 575 | cpumask_t old; |
576 | unsigned int val[2]; | 576 | unsigned int val[2]; |
diff --git a/arch/x86/kernel/mpparse_32.c b/arch/x86/kernel/mpparse_32.c index 13abb4ebfb79..7a05a7f6099a 100644 --- a/arch/x86/kernel/mpparse_32.c +++ b/arch/x86/kernel/mpparse_32.c | |||
@@ -1001,7 +1001,7 @@ void __init mp_config_acpi_legacy_irqs (void) | |||
1001 | 1001 | ||
1002 | /* | 1002 | /* |
1003 | * Use the default configuration for the IRQs 0-15. Unless | 1003 | * Use the default configuration for the IRQs 0-15. Unless |
1004 | * overriden by (MADT) interrupt source override entries. | 1004 | * overridden by (MADT) interrupt source override entries. |
1005 | */ | 1005 | */ |
1006 | for (i = 0; i < 16; i++) { | 1006 | for (i = 0; i < 16; i++) { |
1007 | int idx; | 1007 | int idx; |
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c index 8bf0ca03ac8e..ef4aab123581 100644 --- a/arch/x86/kernel/mpparse_64.c +++ b/arch/x86/kernel/mpparse_64.c | |||
@@ -57,6 +57,8 @@ unsigned long mp_lapic_addr = 0; | |||
57 | 57 | ||
58 | /* Processor that is doing the boot up */ | 58 | /* Processor that is doing the boot up */ |
59 | unsigned int boot_cpu_id = -1U; | 59 | unsigned int boot_cpu_id = -1U; |
60 | EXPORT_SYMBOL(boot_cpu_id); | ||
61 | |||
60 | /* Internal processor count */ | 62 | /* Internal processor count */ |
61 | unsigned int num_processors __cpuinitdata = 0; | 63 | unsigned int num_processors __cpuinitdata = 0; |
62 | 64 | ||
@@ -86,7 +88,7 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
86 | return sum & 0xFF; | 88 | return sum & 0xFF; |
87 | } | 89 | } |
88 | 90 | ||
89 | static void __cpuinit MP_processor_info (struct mpc_config_processor *m) | 91 | static void __cpuinit MP_processor_info(struct mpc_config_processor *m) |
90 | { | 92 | { |
91 | int cpu; | 93 | int cpu; |
92 | cpumask_t tmp_map; | 94 | cpumask_t tmp_map; |
@@ -123,7 +125,18 @@ static void __cpuinit MP_processor_info (struct mpc_config_processor *m) | |||
123 | cpu = 0; | 125 | cpu = 0; |
124 | } | 126 | } |
125 | bios_cpu_apicid[cpu] = m->mpc_apicid; | 127 | bios_cpu_apicid[cpu] = m->mpc_apicid; |
126 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; | 128 | /* |
129 | * We get called early in the the start_kernel initialization | ||
130 | * process when the per_cpu data area is not yet setup, so we | ||
131 | * use a static array that is removed after the per_cpu data | ||
132 | * area is created. | ||
133 | */ | ||
134 | if (x86_cpu_to_apicid_ptr) { | ||
135 | u8 *x86_cpu_to_apicid = (u8 *)x86_cpu_to_apicid_ptr; | ||
136 | x86_cpu_to_apicid[cpu] = m->mpc_apicid; | ||
137 | } else { | ||
138 | per_cpu(x86_cpu_to_apicid, cpu) = m->mpc_apicid; | ||
139 | } | ||
127 | 140 | ||
128 | cpu_set(cpu, cpu_possible_map); | 141 | cpu_set(cpu, cpu_possible_map); |
129 | cpu_set(cpu, cpu_present_map); | 142 | cpu_set(cpu, cpu_present_map); |
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index e18e516cf549..ee6eba4ecfea 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
@@ -112,7 +112,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf, | |||
112 | static int msr_open(struct inode *inode, struct file *file) | 112 | static int msr_open(struct inode *inode, struct file *file) |
113 | { | 113 | { |
114 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); | 114 | unsigned int cpu = iminor(file->f_path.dentry->d_inode); |
115 | struct cpuinfo_x86 *c = &(cpu_data)[cpu]; | 115 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
116 | 116 | ||
117 | if (cpu >= NR_CPUS || !cpu_online(cpu)) | 117 | if (cpu >= NR_CPUS || !cpu_online(cpu)) |
118 | return -ENXIO; /* No such CPU */ | 118 | return -ENXIO; /* No such CPU */ |
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c index b2b42bdb0a15..afaf9f12c032 100644 --- a/arch/x86/kernel/pci-dma_64.c +++ b/arch/x86/kernel/pci-dma_64.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/iommu.h> | 11 | #include <asm/iommu.h> |
12 | #include <asm/calgary.h> | 12 | #include <asm/calgary.h> |
13 | 13 | ||
14 | int iommu_merge __read_mostly = 0; | 14 | int iommu_merge __read_mostly = 1; |
15 | EXPORT_SYMBOL(iommu_merge); | 15 | EXPORT_SYMBOL(iommu_merge); |
16 | 16 | ||
17 | dma_addr_t bad_dma_address __read_mostly; | 17 | dma_addr_t bad_dma_address __read_mostly; |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index 044a47745a5c..7b899584d290 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -295,34 +295,52 @@ static int __init idle_setup(char *str) | |||
295 | } | 295 | } |
296 | early_param("idle", idle_setup); | 296 | early_param("idle", idle_setup); |
297 | 297 | ||
298 | void show_regs(struct pt_regs * regs) | 298 | void __show_registers(struct pt_regs *regs, int all) |
299 | { | 299 | { |
300 | unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; | 300 | unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L; |
301 | unsigned long d0, d1, d2, d3, d6, d7; | 301 | unsigned long d0, d1, d2, d3, d6, d7; |
302 | unsigned long esp; | ||
303 | unsigned short ss, gs; | ||
304 | |||
305 | if (user_mode_vm(regs)) { | ||
306 | esp = regs->esp; | ||
307 | ss = regs->xss & 0xffff; | ||
308 | savesegment(gs, gs); | ||
309 | } else { | ||
310 | esp = (unsigned long) (®s->esp); | ||
311 | savesegment(ss, ss); | ||
312 | savesegment(gs, gs); | ||
313 | } | ||
302 | 314 | ||
303 | printk("\n"); | 315 | printk("\n"); |
304 | printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm); | 316 | printk("Pid: %d, comm: %s %s (%s %.*s)\n", |
305 | printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id()); | 317 | task_pid_nr(current), current->comm, |
318 | print_tainted(), init_utsname()->release, | ||
319 | (int)strcspn(init_utsname()->version, " "), | ||
320 | init_utsname()->version); | ||
321 | |||
322 | printk("EIP: %04x:[<%08lx>] EFLAGS: %08lx CPU: %d\n", | ||
323 | 0xffff & regs->xcs, regs->eip, regs->eflags, | ||
324 | smp_processor_id()); | ||
306 | print_symbol("EIP is at %s\n", regs->eip); | 325 | print_symbol("EIP is at %s\n", regs->eip); |
307 | 326 | ||
308 | if (user_mode_vm(regs)) | ||
309 | printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp); | ||
310 | printk(" EFLAGS: %08lx %s (%s %.*s)\n", | ||
311 | regs->eflags, print_tainted(), init_utsname()->release, | ||
312 | (int)strcspn(init_utsname()->version, " "), | ||
313 | init_utsname()->version); | ||
314 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", | 327 | printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n", |
315 | regs->eax,regs->ebx,regs->ecx,regs->edx); | 328 | regs->eax, regs->ebx, regs->ecx, regs->edx); |
316 | printk("ESI: %08lx EDI: %08lx EBP: %08lx", | 329 | printk("ESI: %08lx EDI: %08lx EBP: %08lx ESP: %08lx\n", |
317 | regs->esi, regs->edi, regs->ebp); | 330 | regs->esi, regs->edi, regs->ebp, esp); |
318 | printk(" DS: %04x ES: %04x FS: %04x\n", | 331 | printk(" DS: %04x ES: %04x FS: %04x GS: %04x SS: %04x\n", |
319 | 0xffff & regs->xds,0xffff & regs->xes, 0xffff & regs->xfs); | 332 | regs->xds & 0xffff, regs->xes & 0xffff, |
333 | regs->xfs & 0xffff, gs, ss); | ||
334 | |||
335 | if (!all) | ||
336 | return; | ||
320 | 337 | ||
321 | cr0 = read_cr0(); | 338 | cr0 = read_cr0(); |
322 | cr2 = read_cr2(); | 339 | cr2 = read_cr2(); |
323 | cr3 = read_cr3(); | 340 | cr3 = read_cr3(); |
324 | cr4 = read_cr4_safe(); | 341 | cr4 = read_cr4_safe(); |
325 | printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4); | 342 | printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", |
343 | cr0, cr2, cr3, cr4); | ||
326 | 344 | ||
327 | get_debugreg(d0, 0); | 345 | get_debugreg(d0, 0); |
328 | get_debugreg(d1, 1); | 346 | get_debugreg(d1, 1); |
@@ -330,10 +348,16 @@ void show_regs(struct pt_regs * regs) | |||
330 | get_debugreg(d3, 3); | 348 | get_debugreg(d3, 3); |
331 | printk("DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n", | 349 | printk("DR0: %08lx DR1: %08lx DR2: %08lx DR3: %08lx\n", |
332 | d0, d1, d2, d3); | 350 | d0, d1, d2, d3); |
351 | |||
333 | get_debugreg(d6, 6); | 352 | get_debugreg(d6, 6); |
334 | get_debugreg(d7, 7); | 353 | get_debugreg(d7, 7); |
335 | printk("DR6: %08lx DR7: %08lx\n", d6, d7); | 354 | printk("DR6: %08lx DR7: %08lx\n", |
355 | d6, d7); | ||
356 | } | ||
336 | 357 | ||
358 | void show_regs(struct pt_regs *regs) | ||
359 | { | ||
360 | __show_registers(regs, 1); | ||
337 | show_trace(NULL, regs, ®s->esp); | 361 | show_trace(NULL, regs, ®s->esp); |
338 | } | 362 | } |
339 | 363 | ||
diff --git a/arch/x86/kernel/ptrace_32.c b/arch/x86/kernel/ptrace_32.c index 99102ec5fade..ff5431cc03ee 100644 --- a/arch/x86/kernel/ptrace_32.c +++ b/arch/x86/kernel/ptrace_32.c | |||
@@ -632,7 +632,7 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) | |||
632 | /* User-mode eip? */ | 632 | /* User-mode eip? */ |
633 | info.si_addr = user_mode_vm(regs) ? (void __user *) regs->eip : NULL; | 633 | info.si_addr = user_mode_vm(regs) ? (void __user *) regs->eip : NULL; |
634 | 634 | ||
635 | /* Send us the fakey SIGTRAP */ | 635 | /* Send us the fake SIGTRAP */ |
636 | force_sig_info(SIGTRAP, &info, tsk); | 636 | force_sig_info(SIGTRAP, &info, tsk); |
637 | } | 637 | } |
638 | 638 | ||
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index d769e204f942..a4ce1911efdf 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
@@ -45,9 +45,12 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | |||
45 | if (!(config & 0x2)) | 45 | if (!(config & 0x2)) |
46 | pci_write_config_byte(dev, 0xf4, config); | 46 | pci_write_config_byte(dev, 0xf4, config); |
47 | } | 47 | } |
48 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_intel_irqbalance); | 48 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, |
49 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_intel_irqbalance); | 49 | quirk_intel_irqbalance); |
50 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quirk_intel_irqbalance); | 50 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, |
51 | quirk_intel_irqbalance); | ||
52 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, | ||
53 | quirk_intel_irqbalance); | ||
51 | #endif | 54 | #endif |
52 | 55 | ||
53 | #if defined(CONFIG_HPET_TIMER) | 56 | #if defined(CONFIG_HPET_TIMER) |
@@ -56,7 +59,8 @@ unsigned long force_hpet_address; | |||
56 | static enum { | 59 | static enum { |
57 | NONE_FORCE_HPET_RESUME, | 60 | NONE_FORCE_HPET_RESUME, |
58 | OLD_ICH_FORCE_HPET_RESUME, | 61 | OLD_ICH_FORCE_HPET_RESUME, |
59 | ICH_FORCE_HPET_RESUME | 62 | ICH_FORCE_HPET_RESUME, |
63 | VT8237_FORCE_HPET_RESUME | ||
60 | } force_hpet_resume_type; | 64 | } force_hpet_resume_type; |
61 | 65 | ||
62 | static void __iomem *rcba_base; | 66 | static void __iomem *rcba_base; |
@@ -146,17 +150,17 @@ static void ich_force_enable_hpet(struct pci_dev *dev) | |||
146 | } | 150 | } |
147 | 151 | ||
148 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, | 152 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB2_0, |
149 | ich_force_enable_hpet); | 153 | ich_force_enable_hpet); |
150 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, | 154 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, |
151 | ich_force_enable_hpet); | 155 | ich_force_enable_hpet); |
152 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, | 156 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, |
153 | ich_force_enable_hpet); | 157 | ich_force_enable_hpet); |
154 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, | 158 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, |
155 | ich_force_enable_hpet); | 159 | ich_force_enable_hpet); |
156 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, | 160 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, |
157 | ich_force_enable_hpet); | 161 | ich_force_enable_hpet); |
158 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_1, | 162 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_1, |
159 | ich_force_enable_hpet); | 163 | ich_force_enable_hpet); |
160 | 164 | ||
161 | 165 | ||
162 | static struct pci_dev *cached_dev; | 166 | static struct pci_dev *cached_dev; |
@@ -232,10 +236,91 @@ static void old_ich_force_enable_hpet(struct pci_dev *dev) | |||
232 | printk(KERN_DEBUG "Failed to force enable HPET\n"); | 236 | printk(KERN_DEBUG "Failed to force enable HPET\n"); |
233 | } | 237 | } |
234 | 238 | ||
239 | /* | ||
240 | * Undocumented chipset features. Make sure that the user enforced | ||
241 | * this. | ||
242 | */ | ||
243 | static void old_ich_force_enable_hpet_user(struct pci_dev *dev) | ||
244 | { | ||
245 | if (hpet_force_user) | ||
246 | old_ich_force_enable_hpet(dev); | ||
247 | } | ||
248 | |||
249 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, | ||
250 | old_ich_force_enable_hpet_user); | ||
251 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, | ||
252 | old_ich_force_enable_hpet_user); | ||
253 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, | ||
254 | old_ich_force_enable_hpet_user); | ||
255 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, | ||
256 | old_ich_force_enable_hpet_user); | ||
235 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, | 257 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, |
236 | old_ich_force_enable_hpet); | 258 | old_ich_force_enable_hpet); |
237 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_12, | 259 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_12, |
238 | old_ich_force_enable_hpet); | 260 | old_ich_force_enable_hpet); |
261 | |||
262 | |||
263 | static void vt8237_force_hpet_resume(void) | ||
264 | { | ||
265 | u32 val; | ||
266 | |||
267 | if (!force_hpet_address || !cached_dev) | ||
268 | return; | ||
269 | |||
270 | val = 0xfed00000 | 0x80; | ||
271 | pci_write_config_dword(cached_dev, 0x68, val); | ||
272 | |||
273 | pci_read_config_dword(cached_dev, 0x68, &val); | ||
274 | if (val & 0x80) | ||
275 | printk(KERN_DEBUG "Force enabled HPET at resume\n"); | ||
276 | else | ||
277 | BUG(); | ||
278 | } | ||
279 | |||
280 | static void vt8237_force_enable_hpet(struct pci_dev *dev) | ||
281 | { | ||
282 | u32 uninitialized_var(val); | ||
283 | |||
284 | if (!hpet_force_user || hpet_address || force_hpet_address) | ||
285 | return; | ||
286 | |||
287 | pci_read_config_dword(dev, 0x68, &val); | ||
288 | /* | ||
289 | * Bit 7 is HPET enable bit. | ||
290 | * Bit 31:10 is HPET base address (contrary to what datasheet claims) | ||
291 | */ | ||
292 | if (val & 0x80) { | ||
293 | force_hpet_address = (val & ~0x3ff); | ||
294 | printk(KERN_DEBUG "HPET at base address 0x%lx\n", | ||
295 | force_hpet_address); | ||
296 | return; | ||
297 | } | ||
298 | |||
299 | /* | ||
300 | * HPET is disabled. Trying enabling at FED00000 and check | ||
301 | * whether it sticks | ||
302 | */ | ||
303 | val = 0xfed00000 | 0x80; | ||
304 | pci_write_config_dword(dev, 0x68, val); | ||
305 | |||
306 | pci_read_config_dword(dev, 0x68, &val); | ||
307 | if (val & 0x80) { | ||
308 | force_hpet_address = (val & ~0x3ff); | ||
309 | printk(KERN_DEBUG "Force enabled HPET at base address 0x%lx\n", | ||
310 | force_hpet_address); | ||
311 | cached_dev = dev; | ||
312 | force_hpet_resume_type = VT8237_FORCE_HPET_RESUME; | ||
313 | return; | ||
314 | } | ||
315 | |||
316 | printk(KERN_DEBUG "Failed to force enable HPET\n"); | ||
317 | } | ||
318 | |||
319 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, | ||
320 | vt8237_force_enable_hpet); | ||
321 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, | ||
322 | vt8237_force_enable_hpet); | ||
323 | |||
239 | 324 | ||
240 | void force_hpet_resume(void) | 325 | void force_hpet_resume(void) |
241 | { | 326 | { |
@@ -246,6 +331,9 @@ void force_hpet_resume(void) | |||
246 | case OLD_ICH_FORCE_HPET_RESUME: | 331 | case OLD_ICH_FORCE_HPET_RESUME: |
247 | return old_ich_force_hpet_resume(); | 332 | return old_ich_force_hpet_resume(); |
248 | 333 | ||
334 | case VT8237_FORCE_HPET_RESUME: | ||
335 | return vt8237_force_hpet_resume(); | ||
336 | |||
249 | default: | 337 | default: |
250 | break; | 338 | break; |
251 | } | 339 | } |
diff --git a/arch/x86/kernel/reboot_64.c b/arch/x86/kernel/reboot_64.c index 368db2b9c5ac..776eb06b6512 100644 --- a/arch/x86/kernel/reboot_64.c +++ b/arch/x86/kernel/reboot_64.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <asm/io.h> | 12 | #include <asm/io.h> |
13 | #include <asm/delay.h> | 13 | #include <asm/delay.h> |
14 | #include <asm/desc.h> | ||
14 | #include <asm/hw_irq.h> | 15 | #include <asm/hw_irq.h> |
15 | #include <asm/system.h> | 16 | #include <asm/system.h> |
16 | #include <asm/pgtable.h> | 17 | #include <asm/pgtable.h> |
@@ -136,7 +137,7 @@ void machine_emergency_restart(void) | |||
136 | } | 137 | } |
137 | 138 | ||
138 | case BOOT_TRIPLE: | 139 | case BOOT_TRIPLE: |
139 | __asm__ __volatile__("lidt (%0)": :"r" (&no_idt)); | 140 | load_idt((const struct desc_ptr *)&no_idt); |
140 | __asm__ __volatile__("int3"); | 141 | __asm__ __volatile__("int3"); |
141 | 142 | ||
142 | reboot_type = BOOT_KBD; | 143 | reboot_type = BOOT_KBD; |
diff --git a/arch/x86/kernel/reboot_fixups_32.c b/arch/x86/kernel/reboot_fixups_32.c index 8b30b26ad069..1a07bbea7be3 100644 --- a/arch/x86/kernel/reboot_fixups_32.c +++ b/arch/x86/kernel/reboot_fixups_32.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
13 | #include <asm/reboot_fixups.h> | 13 | #include <asm/reboot_fixups.h> |
14 | #include <asm/msr.h> | 14 | #include <asm/msr.h> |
15 | #include <asm/geode.h> | ||
15 | 16 | ||
16 | static void cs5530a_warm_reset(struct pci_dev *dev) | 17 | static void cs5530a_warm_reset(struct pci_dev *dev) |
17 | { | 18 | { |
@@ -24,11 +25,8 @@ static void cs5530a_warm_reset(struct pci_dev *dev) | |||
24 | 25 | ||
25 | static void cs5536_warm_reset(struct pci_dev *dev) | 26 | static void cs5536_warm_reset(struct pci_dev *dev) |
26 | { | 27 | { |
27 | /* | 28 | /* writing 1 to the LSB of this MSR causes a hard reset */ |
28 | * 6.6.2.12 Soft Reset (DIVIL_SOFT_RESET) | 29 | wrmsrl(MSR_DIVIL_SOFT_RESET, 1ULL); |
29 | * writing 1 to the LSB of this MSR causes a hard reset. | ||
30 | */ | ||
31 | wrmsrl(0x51400017, 1ULL); | ||
32 | udelay(50); /* shouldn't get here but be safe and spin a while */ | 30 | udelay(50); /* shouldn't get here but be safe and spin a while */ |
33 | } | 31 | } |
34 | 32 | ||
diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c index ba9188235057..3558ac78c926 100644 --- a/arch/x86/kernel/setup64.c +++ b/arch/x86/kernel/setup64.c | |||
@@ -185,6 +185,12 @@ void __cpuinit check_efer(void) | |||
185 | unsigned long kernel_eflags; | 185 | unsigned long kernel_eflags; |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * Copies of the original ist values from the tss are only accessed during | ||
189 | * debugging, no special alignment required. | ||
190 | */ | ||
191 | DEFINE_PER_CPU(struct orig_ist, orig_ist); | ||
192 | |||
193 | /* | ||
188 | * cpu_init() initializes state that is per-CPU. Some data is already | 194 | * cpu_init() initializes state that is per-CPU. Some data is already |
189 | * initialized (naturally) in the bootstrap process, such as the GDT | 195 | * initialized (naturally) in the bootstrap process, such as the GDT |
190 | * and IDT. We reload them nevertheless, this function acts as a | 196 | * and IDT. We reload them nevertheless, this function acts as a |
@@ -224,8 +230,8 @@ void __cpuinit cpu_init (void) | |||
224 | memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE); | 230 | memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE); |
225 | 231 | ||
226 | cpu_gdt_descr[cpu].size = GDT_SIZE; | 232 | cpu_gdt_descr[cpu].size = GDT_SIZE; |
227 | asm volatile("lgdt %0" :: "m" (cpu_gdt_descr[cpu])); | 233 | load_gdt((const struct desc_ptr *)&cpu_gdt_descr[cpu]); |
228 | asm volatile("lidt %0" :: "m" (idt_descr)); | 234 | load_idt((const struct desc_ptr *)&idt_descr); |
229 | 235 | ||
230 | memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8); | 236 | memset(me->thread.tls_array, 0, GDT_ENTRY_TLS_ENTRIES * 8); |
231 | syscall_init(); | 237 | syscall_init(); |
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index 978dc0196a0f..ba2e165a8a0f 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c | |||
@@ -624,7 +624,7 @@ void __init setup_arch(char **cmdline_p) | |||
624 | /* | 624 | /* |
625 | * NOTE: before this point _nobody_ is allowed to allocate | 625 | * NOTE: before this point _nobody_ is allowed to allocate |
626 | * any memory using the bootmem allocator. Although the | 626 | * any memory using the bootmem allocator. Although the |
627 | * alloctor is now initialised only the first 8Mb of the kernel | 627 | * allocator is now initialised only the first 8Mb of the kernel |
628 | * virtual address space has been mapped. All allocations before | 628 | * virtual address space has been mapped. All allocations before |
629 | * paging_init() has completed must use the alloc_bootmem_low_pages() | 629 | * paging_init() has completed must use the alloc_bootmem_low_pages() |
630 | * variant (which allocates DMA'able memory) and care must be taken | 630 | * variant (which allocates DMA'able memory) and care must be taken |
@@ -661,9 +661,7 @@ void __init setup_arch(char **cmdline_p) | |||
661 | #endif | 661 | #endif |
662 | 662 | ||
663 | #ifdef CONFIG_PCI | 663 | #ifdef CONFIG_PCI |
664 | #ifdef CONFIG_X86_IO_APIC | 664 | early_quirks(); |
665 | check_acpi_pci(); /* Checks more than just ACPI actually */ | ||
666 | #endif | ||
667 | #endif | 665 | #endif |
668 | 666 | ||
669 | #ifdef CONFIG_ACPI | 667 | #ifdef CONFIG_ACPI |
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index cdcba6975226..31322d42eaae 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -302,6 +302,11 @@ void __init setup_arch(char **cmdline_p) | |||
302 | 302 | ||
303 | dmi_scan_machine(); | 303 | dmi_scan_machine(); |
304 | 304 | ||
305 | #ifdef CONFIG_SMP | ||
306 | /* setup to use the static apicid table during kernel startup */ | ||
307 | x86_cpu_to_apicid_ptr = (void *)&x86_cpu_to_apicid_init; | ||
308 | #endif | ||
309 | |||
305 | #ifdef CONFIG_ACPI | 310 | #ifdef CONFIG_ACPI |
306 | /* | 311 | /* |
307 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). | 312 | * Initialize the ACPI boot-time table parser (gets the RSDP and SDT). |
@@ -554,7 +559,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
554 | but in the same order as the HT nodeids. | 559 | but in the same order as the HT nodeids. |
555 | If that doesn't result in a usable node fall back to the | 560 | If that doesn't result in a usable node fall back to the |
556 | path for the previous case. */ | 561 | path for the previous case. */ |
557 | int ht_nodeid = apicid - (cpu_data[0].phys_proc_id << bits); | 562 | int ht_nodeid = apicid - (cpu_data(0).phys_proc_id << bits); |
558 | if (ht_nodeid >= 0 && | 563 | if (ht_nodeid >= 0 && |
559 | apicid_to_node[ht_nodeid] != NUMA_NO_NODE) | 564 | apicid_to_node[ht_nodeid] != NUMA_NO_NODE) |
560 | node = apicid_to_node[ht_nodeid]; | 565 | node = apicid_to_node[ht_nodeid]; |
@@ -878,6 +883,7 @@ void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) | |||
878 | 883 | ||
879 | #ifdef CONFIG_SMP | 884 | #ifdef CONFIG_SMP |
880 | c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; | 885 | c->phys_proc_id = (cpuid_ebx(1) >> 24) & 0xff; |
886 | c->cpu_index = 0; | ||
881 | #endif | 887 | #endif |
882 | } | 888 | } |
883 | 889 | ||
@@ -984,6 +990,7 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) | |||
984 | static int show_cpuinfo(struct seq_file *m, void *v) | 990 | static int show_cpuinfo(struct seq_file *m, void *v) |
985 | { | 991 | { |
986 | struct cpuinfo_x86 *c = v; | 992 | struct cpuinfo_x86 *c = v; |
993 | int cpu = 0; | ||
987 | 994 | ||
988 | /* | 995 | /* |
989 | * These flag bits must match the definitions in <asm/cpufeature.h>. | 996 | * These flag bits must match the definitions in <asm/cpufeature.h>. |
@@ -1062,8 +1069,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1062 | 1069 | ||
1063 | 1070 | ||
1064 | #ifdef CONFIG_SMP | 1071 | #ifdef CONFIG_SMP |
1065 | if (!cpu_online(c-cpu_data)) | 1072 | if (!cpu_online(c->cpu_index)) |
1066 | return 0; | 1073 | return 0; |
1074 | cpu = c->cpu_index; | ||
1067 | #endif | 1075 | #endif |
1068 | 1076 | ||
1069 | seq_printf(m,"processor\t: %u\n" | 1077 | seq_printf(m,"processor\t: %u\n" |
@@ -1071,7 +1079,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1071 | "cpu family\t: %d\n" | 1079 | "cpu family\t: %d\n" |
1072 | "model\t\t: %d\n" | 1080 | "model\t\t: %d\n" |
1073 | "model name\t: %s\n", | 1081 | "model name\t: %s\n", |
1074 | (unsigned)(c-cpu_data), | 1082 | (unsigned)cpu, |
1075 | c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown", | 1083 | c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown", |
1076 | c->x86, | 1084 | c->x86, |
1077 | (int)c->x86_model, | 1085 | (int)c->x86_model, |
@@ -1083,7 +1091,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1083 | seq_printf(m, "stepping\t: unknown\n"); | 1091 | seq_printf(m, "stepping\t: unknown\n"); |
1084 | 1092 | ||
1085 | if (cpu_has(c,X86_FEATURE_TSC)) { | 1093 | if (cpu_has(c,X86_FEATURE_TSC)) { |
1086 | unsigned int freq = cpufreq_quick_get((unsigned)(c-cpu_data)); | 1094 | unsigned int freq = cpufreq_quick_get((unsigned)cpu); |
1087 | if (!freq) | 1095 | if (!freq) |
1088 | freq = cpu_khz; | 1096 | freq = cpu_khz; |
1089 | seq_printf(m, "cpu MHz\t\t: %u.%03u\n", | 1097 | seq_printf(m, "cpu MHz\t\t: %u.%03u\n", |
@@ -1096,7 +1104,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1096 | 1104 | ||
1097 | #ifdef CONFIG_SMP | 1105 | #ifdef CONFIG_SMP |
1098 | if (smp_num_siblings * c->x86_max_cores > 1) { | 1106 | if (smp_num_siblings * c->x86_max_cores > 1) { |
1099 | int cpu = c - cpu_data; | ||
1100 | seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); | 1107 | seq_printf(m, "physical id\t: %d\n", c->phys_proc_id); |
1101 | seq_printf(m, "siblings\t: %d\n", | 1108 | seq_printf(m, "siblings\t: %d\n", |
1102 | cpus_weight(per_cpu(cpu_core_map, cpu))); | 1109 | cpus_weight(per_cpu(cpu_core_map, cpu))); |
@@ -1154,12 +1161,16 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1154 | 1161 | ||
1155 | static void *c_start(struct seq_file *m, loff_t *pos) | 1162 | static void *c_start(struct seq_file *m, loff_t *pos) |
1156 | { | 1163 | { |
1157 | return *pos < NR_CPUS ? cpu_data + *pos : NULL; | 1164 | if (*pos == 0) /* just in case, cpu 0 is not the first */ |
1165 | *pos = first_cpu(cpu_possible_map); | ||
1166 | if ((*pos) < NR_CPUS && cpu_possible(*pos)) | ||
1167 | return &cpu_data(*pos); | ||
1168 | return NULL; | ||
1158 | } | 1169 | } |
1159 | 1170 | ||
1160 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) | 1171 | static void *c_next(struct seq_file *m, void *v, loff_t *pos) |
1161 | { | 1172 | { |
1162 | ++*pos; | 1173 | *pos = next_cpu(*pos, cpu_possible_map); |
1163 | return c_start(m, pos); | 1174 | return c_start(m, pos); |
1164 | } | 1175 | } |
1165 | 1176 | ||
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index 6dc394b87255..9bdd83022f5f 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -594,7 +594,7 @@ static void fastcall do_signal(struct pt_regs *regs) | |||
594 | 594 | ||
595 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 595 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
596 | if (signr > 0) { | 596 | if (signr > 0) { |
597 | /* Reenable any watchpoints before delivering the | 597 | /* Re-enable any watchpoints before delivering the |
598 | * signal to user space. The processor register will | 598 | * signal to user space. The processor register will |
599 | * have been cleared if the watchpoint triggered | 599 | * have been cleared if the watchpoint triggered |
600 | * inside the kernel. | 600 | * inside the kernel. |
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 683802bec419..ab086b0357fc 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -410,7 +410,7 @@ static void do_signal(struct pt_regs *regs) | |||
410 | 410 | ||
411 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); | 411 | signr = get_signal_to_deliver(&info, &ka, regs, NULL); |
412 | if (signr > 0) { | 412 | if (signr > 0) { |
413 | /* Reenable any watchpoints before delivering the | 413 | /* Re-enable any watchpoints before delivering the |
414 | * signal to user space. The processor register will | 414 | * signal to user space. The processor register will |
415 | * have been cleared if the watchpoint triggered | 415 | * have been cleared if the watchpoint triggered |
416 | * inside the kernel. | 416 | * inside the kernel. |
diff --git a/arch/x86/kernel/smp_32.c b/arch/x86/kernel/smp_32.c index 791d9f8036ae..f32115308399 100644 --- a/arch/x86/kernel/smp_32.c +++ b/arch/x86/kernel/smp_32.c | |||
@@ -69,7 +69,7 @@ | |||
69 | * | 69 | * |
70 | * B stepping CPUs may hang. There are hardware work arounds | 70 | * B stepping CPUs may hang. There are hardware work arounds |
71 | * for this. We warn about it in case your board doesn't have the work | 71 | * for this. We warn about it in case your board doesn't have the work |
72 | * arounds. Basically thats so I can tell anyone with a B stepping | 72 | * arounds. Basically that's so I can tell anyone with a B stepping |
73 | * CPU and SMP problems "tough". | 73 | * CPU and SMP problems "tough". |
74 | * | 74 | * |
75 | * Specific items [From Pentium Processor Specification Update] | 75 | * Specific items [From Pentium Processor Specification Update] |
@@ -273,7 +273,7 @@ void leave_mm(unsigned long cpu) | |||
273 | * 1a1) cpu_clear(cpu, old_mm->cpu_vm_mask); | 273 | * 1a1) cpu_clear(cpu, old_mm->cpu_vm_mask); |
274 | * Stop ipi delivery for the old mm. This is not synchronized with | 274 | * Stop ipi delivery for the old mm. This is not synchronized with |
275 | * the other cpus, but smp_invalidate_interrupt ignore flush ipis | 275 | * the other cpus, but smp_invalidate_interrupt ignore flush ipis |
276 | * for the wrong mm, and in the worst case we perform a superflous | 276 | * for the wrong mm, and in the worst case we perform a superfluous |
277 | * tlb flush. | 277 | * tlb flush. |
278 | * 1a2) set cpu_tlbstate to TLBSTATE_OK | 278 | * 1a2) set cpu_tlbstate to TLBSTATE_OK |
279 | * Now the smp_invalidate_interrupt won't call leave_mm if cpu0 | 279 | * Now the smp_invalidate_interrupt won't call leave_mm if cpu0 |
@@ -610,7 +610,7 @@ static void stop_this_cpu (void * dummy) | |||
610 | */ | 610 | */ |
611 | cpu_clear(smp_processor_id(), cpu_online_map); | 611 | cpu_clear(smp_processor_id(), cpu_online_map); |
612 | disable_local_APIC(); | 612 | disable_local_APIC(); |
613 | if (cpu_data[smp_processor_id()].hlt_works_ok) | 613 | if (cpu_data(smp_processor_id()).hlt_works_ok) |
614 | for(;;) halt(); | 614 | for(;;) halt(); |
615 | for (;;); | 615 | for (;;); |
616 | } | 616 | } |
@@ -676,7 +676,7 @@ static int convert_apicid_to_cpu(int apic_id) | |||
676 | int i; | 676 | int i; |
677 | 677 | ||
678 | for (i = 0; i < NR_CPUS; i++) { | 678 | for (i = 0; i < NR_CPUS; i++) { |
679 | if (x86_cpu_to_apicid[i] == apic_id) | 679 | if (per_cpu(x86_cpu_to_apicid, i) == apic_id) |
680 | return i; | 680 | return i; |
681 | } | 681 | } |
682 | return -1; | 682 | return -1; |
diff --git a/arch/x86/kernel/smp_64.c b/arch/x86/kernel/smp_64.c index 5c2964727d19..03fa6ed559c6 100644 --- a/arch/x86/kernel/smp_64.c +++ b/arch/x86/kernel/smp_64.c | |||
@@ -322,17 +322,27 @@ void unlock_ipi_call_lock(void) | |||
322 | } | 322 | } |
323 | 323 | ||
324 | /* | 324 | /* |
325 | * this function sends a 'generic call function' IPI to one other CPU | 325 | * this function sends a 'generic call function' IPI to all other CPU |
326 | * in the system. | 326 | * of the system defined in the mask. |
327 | * | ||
328 | * cpu is a standard Linux logical CPU number. | ||
329 | */ | 327 | */ |
330 | static void | 328 | |
331 | __smp_call_function_single(int cpu, void (*func) (void *info), void *info, | 329 | static int |
332 | int nonatomic, int wait) | 330 | __smp_call_function_mask(cpumask_t mask, |
331 | void (*func)(void *), void *info, | ||
332 | int wait) | ||
333 | { | 333 | { |
334 | struct call_data_struct data; | 334 | struct call_data_struct data; |
335 | int cpus = 1; | 335 | cpumask_t allbutself; |
336 | int cpus; | ||
337 | |||
338 | allbutself = cpu_online_map; | ||
339 | cpu_clear(smp_processor_id(), allbutself); | ||
340 | |||
341 | cpus_and(mask, mask, allbutself); | ||
342 | cpus = cpus_weight(mask); | ||
343 | |||
344 | if (!cpus) | ||
345 | return 0; | ||
336 | 346 | ||
337 | data.func = func; | 347 | data.func = func; |
338 | data.info = info; | 348 | data.info = info; |
@@ -343,19 +353,55 @@ __smp_call_function_single(int cpu, void (*func) (void *info), void *info, | |||
343 | 353 | ||
344 | call_data = &data; | 354 | call_data = &data; |
345 | wmb(); | 355 | wmb(); |
346 | /* Send a message to all other CPUs and wait for them to respond */ | 356 | |
347 | send_IPI_mask(cpumask_of_cpu(cpu), CALL_FUNCTION_VECTOR); | 357 | /* Send a message to other CPUs */ |
358 | if (cpus_equal(mask, allbutself)) | ||
359 | send_IPI_allbutself(CALL_FUNCTION_VECTOR); | ||
360 | else | ||
361 | send_IPI_mask(mask, CALL_FUNCTION_VECTOR); | ||
348 | 362 | ||
349 | /* Wait for response */ | 363 | /* Wait for response */ |
350 | while (atomic_read(&data.started) != cpus) | 364 | while (atomic_read(&data.started) != cpus) |
351 | cpu_relax(); | 365 | cpu_relax(); |
352 | 366 | ||
353 | if (!wait) | 367 | if (!wait) |
354 | return; | 368 | return 0; |
355 | 369 | ||
356 | while (atomic_read(&data.finished) != cpus) | 370 | while (atomic_read(&data.finished) != cpus) |
357 | cpu_relax(); | 371 | cpu_relax(); |
372 | |||
373 | return 0; | ||
374 | } | ||
375 | /** | ||
376 | * smp_call_function_mask(): Run a function on a set of other CPUs. | ||
377 | * @mask: The set of cpus to run on. Must not include the current cpu. | ||
378 | * @func: The function to run. This must be fast and non-blocking. | ||
379 | * @info: An arbitrary pointer to pass to the function. | ||
380 | * @wait: If true, wait (atomically) until function has completed on other CPUs. | ||
381 | * | ||
382 | * Returns 0 on success, else a negative status code. | ||
383 | * | ||
384 | * If @wait is true, then returns once @func has returned; otherwise | ||
385 | * it returns just before the target cpu calls @func. | ||
386 | * | ||
387 | * You must not call this function with disabled interrupts or from a | ||
388 | * hardware interrupt handler or from a bottom half handler. | ||
389 | */ | ||
390 | int smp_call_function_mask(cpumask_t mask, | ||
391 | void (*func)(void *), void *info, | ||
392 | int wait) | ||
393 | { | ||
394 | int ret; | ||
395 | |||
396 | /* Can deadlock when called with interrupts disabled */ | ||
397 | WARN_ON(irqs_disabled()); | ||
398 | |||
399 | spin_lock(&call_lock); | ||
400 | ret = __smp_call_function_mask(mask, func, info, wait); | ||
401 | spin_unlock(&call_lock); | ||
402 | return ret; | ||
358 | } | 403 | } |
404 | EXPORT_SYMBOL(smp_call_function_mask); | ||
359 | 405 | ||
360 | /* | 406 | /* |
361 | * smp_call_function_single - Run a function on a specific CPU | 407 | * smp_call_function_single - Run a function on a specific CPU |
@@ -374,6 +420,7 @@ int smp_call_function_single (int cpu, void (*func) (void *info), void *info, | |||
374 | int nonatomic, int wait) | 420 | int nonatomic, int wait) |
375 | { | 421 | { |
376 | /* prevent preemption and reschedule on another processor */ | 422 | /* prevent preemption and reschedule on another processor */ |
423 | int ret; | ||
377 | int me = get_cpu(); | 424 | int me = get_cpu(); |
378 | 425 | ||
379 | /* Can deadlock when called with interrupts disabled */ | 426 | /* Can deadlock when called with interrupts disabled */ |
@@ -387,51 +434,14 @@ int smp_call_function_single (int cpu, void (*func) (void *info), void *info, | |||
387 | return 0; | 434 | return 0; |
388 | } | 435 | } |
389 | 436 | ||
390 | spin_lock(&call_lock); | 437 | ret = smp_call_function_mask(cpumask_of_cpu(cpu), func, info, wait); |
391 | __smp_call_function_single(cpu, func, info, nonatomic, wait); | 438 | |
392 | spin_unlock(&call_lock); | ||
393 | put_cpu(); | 439 | put_cpu(); |
394 | return 0; | 440 | return ret; |
395 | } | 441 | } |
396 | EXPORT_SYMBOL(smp_call_function_single); | 442 | EXPORT_SYMBOL(smp_call_function_single); |
397 | 443 | ||
398 | /* | 444 | /* |
399 | * this function sends a 'generic call function' IPI to all other CPUs | ||
400 | * in the system. | ||
401 | */ | ||
402 | static void __smp_call_function (void (*func) (void *info), void *info, | ||
403 | int nonatomic, int wait) | ||
404 | { | ||
405 | struct call_data_struct data; | ||
406 | int cpus = num_online_cpus()-1; | ||
407 | |||
408 | if (!cpus) | ||
409 | return; | ||
410 | |||
411 | data.func = func; | ||
412 | data.info = info; | ||
413 | atomic_set(&data.started, 0); | ||
414 | data.wait = wait; | ||
415 | if (wait) | ||
416 | atomic_set(&data.finished, 0); | ||
417 | |||
418 | call_data = &data; | ||
419 | wmb(); | ||
420 | /* Send a message to all other CPUs and wait for them to respond */ | ||
421 | send_IPI_allbutself(CALL_FUNCTION_VECTOR); | ||
422 | |||
423 | /* Wait for response */ | ||
424 | while (atomic_read(&data.started) != cpus) | ||
425 | cpu_relax(); | ||
426 | |||
427 | if (!wait) | ||
428 | return; | ||
429 | |||
430 | while (atomic_read(&data.finished) != cpus) | ||
431 | cpu_relax(); | ||
432 | } | ||
433 | |||
434 | /* | ||
435 | * smp_call_function - run a function on all other CPUs. | 445 | * smp_call_function - run a function on all other CPUs. |
436 | * @func: The function to run. This must be fast and non-blocking. | 446 | * @func: The function to run. This must be fast and non-blocking. |
437 | * @info: An arbitrary pointer to pass to the function. | 447 | * @info: An arbitrary pointer to pass to the function. |
@@ -449,10 +459,7 @@ static void __smp_call_function (void (*func) (void *info), void *info, | |||
449 | int smp_call_function (void (*func) (void *info), void *info, int nonatomic, | 459 | int smp_call_function (void (*func) (void *info), void *info, int nonatomic, |
450 | int wait) | 460 | int wait) |
451 | { | 461 | { |
452 | spin_lock(&call_lock); | 462 | return smp_call_function_mask(cpu_online_map, func, info, wait); |
453 | __smp_call_function(func,info,nonatomic,wait); | ||
454 | spin_unlock(&call_lock); | ||
455 | return 0; | ||
456 | } | 463 | } |
457 | EXPORT_SYMBOL(smp_call_function); | 464 | EXPORT_SYMBOL(smp_call_function); |
458 | 465 | ||
@@ -479,7 +486,7 @@ void smp_send_stop(void) | |||
479 | /* Don't deadlock on the call lock in panic */ | 486 | /* Don't deadlock on the call lock in panic */ |
480 | nolock = !spin_trylock(&call_lock); | 487 | nolock = !spin_trylock(&call_lock); |
481 | local_irq_save(flags); | 488 | local_irq_save(flags); |
482 | __smp_call_function(stop_this_cpu, NULL, 0, 0); | 489 | __smp_call_function_mask(cpu_online_map, stop_this_cpu, NULL, 0); |
483 | if (!nolock) | 490 | if (!nolock) |
484 | spin_unlock(&call_lock); | 491 | spin_unlock(&call_lock); |
485 | disable_local_APIC(); | 492 | disable_local_APIC(); |
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c index be3faac04719..ef0f34ede1ab 100644 --- a/arch/x86/kernel/smpboot_32.c +++ b/arch/x86/kernel/smpboot_32.c | |||
@@ -67,7 +67,7 @@ int smp_num_siblings = 1; | |||
67 | EXPORT_SYMBOL(smp_num_siblings); | 67 | EXPORT_SYMBOL(smp_num_siblings); |
68 | 68 | ||
69 | /* Last level cache ID of each logical CPU */ | 69 | /* Last level cache ID of each logical CPU */ |
70 | int cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID}; | 70 | DEFINE_PER_CPU(u8, cpu_llc_id) = BAD_APICID; |
71 | 71 | ||
72 | /* representing HT siblings of each logical CPU */ | 72 | /* representing HT siblings of each logical CPU */ |
73 | DEFINE_PER_CPU(cpumask_t, cpu_sibling_map); | 73 | DEFINE_PER_CPU(cpumask_t, cpu_sibling_map); |
@@ -89,12 +89,20 @@ EXPORT_SYMBOL(cpu_possible_map); | |||
89 | static cpumask_t smp_commenced_mask; | 89 | static cpumask_t smp_commenced_mask; |
90 | 90 | ||
91 | /* Per CPU bogomips and other parameters */ | 91 | /* Per CPU bogomips and other parameters */ |
92 | struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; | 92 | DEFINE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info); |
93 | EXPORT_SYMBOL(cpu_data); | 93 | EXPORT_PER_CPU_SYMBOL(cpu_info); |
94 | 94 | ||
95 | u8 x86_cpu_to_apicid[NR_CPUS] __read_mostly = | 95 | /* |
96 | { [0 ... NR_CPUS-1] = 0xff }; | 96 | * The following static array is used during kernel startup |
97 | EXPORT_SYMBOL(x86_cpu_to_apicid); | 97 | * and the x86_cpu_to_apicid_ptr contains the address of the |
98 | * array during this time. Is it zeroed when the per_cpu | ||
99 | * data area is removed. | ||
100 | */ | ||
101 | u8 x86_cpu_to_apicid_init[NR_CPUS] __initdata = | ||
102 | { [0 ... NR_CPUS-1] = BAD_APICID }; | ||
103 | void *x86_cpu_to_apicid_ptr; | ||
104 | DEFINE_PER_CPU(u8, x86_cpu_to_apicid) = BAD_APICID; | ||
105 | EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid); | ||
98 | 106 | ||
99 | u8 apicid_2_node[MAX_APICID]; | 107 | u8 apicid_2_node[MAX_APICID]; |
100 | 108 | ||
@@ -150,9 +158,10 @@ void __init smp_alloc_memory(void) | |||
150 | 158 | ||
151 | void __cpuinit smp_store_cpu_info(int id) | 159 | void __cpuinit smp_store_cpu_info(int id) |
152 | { | 160 | { |
153 | struct cpuinfo_x86 *c = cpu_data + id; | 161 | struct cpuinfo_x86 *c = &cpu_data(id); |
154 | 162 | ||
155 | *c = boot_cpu_data; | 163 | *c = boot_cpu_data; |
164 | c->cpu_index = id; | ||
156 | if (id!=0) | 165 | if (id!=0) |
157 | identify_secondary_cpu(c); | 166 | identify_secondary_cpu(c); |
158 | /* | 167 | /* |
@@ -294,7 +303,7 @@ static int cpucount; | |||
294 | /* maps the cpu to the sched domain representing multi-core */ | 303 | /* maps the cpu to the sched domain representing multi-core */ |
295 | cpumask_t cpu_coregroup_map(int cpu) | 304 | cpumask_t cpu_coregroup_map(int cpu) |
296 | { | 305 | { |
297 | struct cpuinfo_x86 *c = cpu_data + cpu; | 306 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
298 | /* | 307 | /* |
299 | * For perf, we return last level cache shared map. | 308 | * For perf, we return last level cache shared map. |
300 | * And for power savings, we return cpu_core_map | 309 | * And for power savings, we return cpu_core_map |
@@ -311,41 +320,41 @@ static cpumask_t cpu_sibling_setup_map; | |||
311 | void __cpuinit set_cpu_sibling_map(int cpu) | 320 | void __cpuinit set_cpu_sibling_map(int cpu) |
312 | { | 321 | { |
313 | int i; | 322 | int i; |
314 | struct cpuinfo_x86 *c = cpu_data; | 323 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
315 | 324 | ||
316 | cpu_set(cpu, cpu_sibling_setup_map); | 325 | cpu_set(cpu, cpu_sibling_setup_map); |
317 | 326 | ||
318 | if (smp_num_siblings > 1) { | 327 | if (smp_num_siblings > 1) { |
319 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 328 | for_each_cpu_mask(i, cpu_sibling_setup_map) { |
320 | if (c[cpu].phys_proc_id == c[i].phys_proc_id && | 329 | if (c->phys_proc_id == cpu_data(i).phys_proc_id && |
321 | c[cpu].cpu_core_id == c[i].cpu_core_id) { | 330 | c->cpu_core_id == cpu_data(i).cpu_core_id) { |
322 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); | 331 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); |
323 | cpu_set(cpu, per_cpu(cpu_sibling_map, i)); | 332 | cpu_set(cpu, per_cpu(cpu_sibling_map, i)); |
324 | cpu_set(i, per_cpu(cpu_core_map, cpu)); | 333 | cpu_set(i, per_cpu(cpu_core_map, cpu)); |
325 | cpu_set(cpu, per_cpu(cpu_core_map, i)); | 334 | cpu_set(cpu, per_cpu(cpu_core_map, i)); |
326 | cpu_set(i, c[cpu].llc_shared_map); | 335 | cpu_set(i, c->llc_shared_map); |
327 | cpu_set(cpu, c[i].llc_shared_map); | 336 | cpu_set(cpu, cpu_data(i).llc_shared_map); |
328 | } | 337 | } |
329 | } | 338 | } |
330 | } else { | 339 | } else { |
331 | cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); | 340 | cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); |
332 | } | 341 | } |
333 | 342 | ||
334 | cpu_set(cpu, c[cpu].llc_shared_map); | 343 | cpu_set(cpu, c->llc_shared_map); |
335 | 344 | ||
336 | if (current_cpu_data.x86_max_cores == 1) { | 345 | if (current_cpu_data.x86_max_cores == 1) { |
337 | per_cpu(cpu_core_map, cpu) = per_cpu(cpu_sibling_map, cpu); | 346 | per_cpu(cpu_core_map, cpu) = per_cpu(cpu_sibling_map, cpu); |
338 | c[cpu].booted_cores = 1; | 347 | c->booted_cores = 1; |
339 | return; | 348 | return; |
340 | } | 349 | } |
341 | 350 | ||
342 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 351 | for_each_cpu_mask(i, cpu_sibling_setup_map) { |
343 | if (cpu_llc_id[cpu] != BAD_APICID && | 352 | if (per_cpu(cpu_llc_id, cpu) != BAD_APICID && |
344 | cpu_llc_id[cpu] == cpu_llc_id[i]) { | 353 | per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { |
345 | cpu_set(i, c[cpu].llc_shared_map); | 354 | cpu_set(i, c->llc_shared_map); |
346 | cpu_set(cpu, c[i].llc_shared_map); | 355 | cpu_set(cpu, cpu_data(i).llc_shared_map); |
347 | } | 356 | } |
348 | if (c[cpu].phys_proc_id == c[i].phys_proc_id) { | 357 | if (c->phys_proc_id == cpu_data(i).phys_proc_id) { |
349 | cpu_set(i, per_cpu(cpu_core_map, cpu)); | 358 | cpu_set(i, per_cpu(cpu_core_map, cpu)); |
350 | cpu_set(cpu, per_cpu(cpu_core_map, i)); | 359 | cpu_set(cpu, per_cpu(cpu_core_map, i)); |
351 | /* | 360 | /* |
@@ -357,15 +366,15 @@ void __cpuinit set_cpu_sibling_map(int cpu) | |||
357 | * the booted_cores for this new cpu | 366 | * the booted_cores for this new cpu |
358 | */ | 367 | */ |
359 | if (first_cpu(per_cpu(cpu_sibling_map, i)) == i) | 368 | if (first_cpu(per_cpu(cpu_sibling_map, i)) == i) |
360 | c[cpu].booted_cores++; | 369 | c->booted_cores++; |
361 | /* | 370 | /* |
362 | * increment the core count for all | 371 | * increment the core count for all |
363 | * the other cpus in this package | 372 | * the other cpus in this package |
364 | */ | 373 | */ |
365 | if (i != cpu) | 374 | if (i != cpu) |
366 | c[i].booted_cores++; | 375 | cpu_data(i).booted_cores++; |
367 | } else if (i != cpu && !c[cpu].booted_cores) | 376 | } else if (i != cpu && !c->booted_cores) |
368 | c[cpu].booted_cores = c[i].booted_cores; | 377 | c->booted_cores = cpu_data(i).booted_cores; |
369 | } | 378 | } |
370 | } | 379 | } |
371 | } | 380 | } |
@@ -412,7 +421,7 @@ static void __cpuinit start_secondary(void *unused) | |||
412 | /* | 421 | /* |
413 | * We need to hold call_lock, so there is no inconsistency | 422 | * We need to hold call_lock, so there is no inconsistency |
414 | * between the time smp_call_function() determines number of | 423 | * between the time smp_call_function() determines number of |
415 | * IPI receipients, and the time when the determination is made | 424 | * IPI recipients, and the time when the determination is made |
416 | * for which cpus receive the IPI. Holding this | 425 | * for which cpus receive the IPI. Holding this |
417 | * lock helps us to not include this cpu in a currently in progress | 426 | * lock helps us to not include this cpu in a currently in progress |
418 | * smp_call_function(). | 427 | * smp_call_function(). |
@@ -804,7 +813,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) | |||
804 | 813 | ||
805 | irq_ctx_init(cpu); | 814 | irq_ctx_init(cpu); |
806 | 815 | ||
807 | x86_cpu_to_apicid[cpu] = apicid; | 816 | per_cpu(x86_cpu_to_apicid, cpu) = apicid; |
808 | /* | 817 | /* |
809 | * This grunge runs the startup process for | 818 | * This grunge runs the startup process for |
810 | * the targeted processor. | 819 | * the targeted processor. |
@@ -844,7 +853,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) | |||
844 | /* number CPUs logically, starting from 1 (BSP is 0) */ | 853 | /* number CPUs logically, starting from 1 (BSP is 0) */ |
845 | Dprintk("OK.\n"); | 854 | Dprintk("OK.\n"); |
846 | printk("CPU%d: ", cpu); | 855 | printk("CPU%d: ", cpu); |
847 | print_cpu_info(&cpu_data[cpu]); | 856 | print_cpu_info(&cpu_data(cpu)); |
848 | Dprintk("CPU has booted.\n"); | 857 | Dprintk("CPU has booted.\n"); |
849 | } else { | 858 | } else { |
850 | boot_error= 1; | 859 | boot_error= 1; |
@@ -866,7 +875,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu) | |||
866 | cpu_clear(cpu, cpu_initialized); /* was set by cpu_init() */ | 875 | cpu_clear(cpu, cpu_initialized); /* was set by cpu_init() */ |
867 | cpucount--; | 876 | cpucount--; |
868 | } else { | 877 | } else { |
869 | x86_cpu_to_apicid[cpu] = apicid; | 878 | per_cpu(x86_cpu_to_apicid, cpu) = apicid; |
870 | cpu_set(cpu, cpu_present_map); | 879 | cpu_set(cpu, cpu_present_map); |
871 | } | 880 | } |
872 | 881 | ||
@@ -915,7 +924,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu) | |||
915 | struct warm_boot_cpu_info info; | 924 | struct warm_boot_cpu_info info; |
916 | int apicid, ret; | 925 | int apicid, ret; |
917 | 926 | ||
918 | apicid = x86_cpu_to_apicid[cpu]; | 927 | apicid = per_cpu(x86_cpu_to_apicid, cpu); |
919 | if (apicid == BAD_APICID) { | 928 | if (apicid == BAD_APICID) { |
920 | ret = -ENODEV; | 929 | ret = -ENODEV; |
921 | goto exit; | 930 | goto exit; |
@@ -961,11 +970,11 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
961 | */ | 970 | */ |
962 | smp_store_cpu_info(0); /* Final full version of the data */ | 971 | smp_store_cpu_info(0); /* Final full version of the data */ |
963 | printk("CPU%d: ", 0); | 972 | printk("CPU%d: ", 0); |
964 | print_cpu_info(&cpu_data[0]); | 973 | print_cpu_info(&cpu_data(0)); |
965 | 974 | ||
966 | boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); | 975 | boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); |
967 | boot_cpu_logical_apicid = logical_smp_processor_id(); | 976 | boot_cpu_logical_apicid = logical_smp_processor_id(); |
968 | x86_cpu_to_apicid[0] = boot_cpu_physical_apicid; | 977 | per_cpu(x86_cpu_to_apicid, 0) = boot_cpu_physical_apicid; |
969 | 978 | ||
970 | current_thread_info()->cpu = 0; | 979 | current_thread_info()->cpu = 0; |
971 | 980 | ||
@@ -1008,6 +1017,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1008 | printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); | 1017 | printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); |
1009 | smpboot_clear_io_apic_irqs(); | 1018 | smpboot_clear_io_apic_irqs(); |
1010 | phys_cpu_present_map = physid_mask_of_physid(0); | 1019 | phys_cpu_present_map = physid_mask_of_physid(0); |
1020 | map_cpu_to_logical_apicid(); | ||
1011 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); | 1021 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); |
1012 | cpu_set(0, per_cpu(cpu_core_map, 0)); | 1022 | cpu_set(0, per_cpu(cpu_core_map, 0)); |
1013 | return; | 1023 | return; |
@@ -1029,6 +1039,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1029 | } | 1039 | } |
1030 | smpboot_clear_io_apic_irqs(); | 1040 | smpboot_clear_io_apic_irqs(); |
1031 | phys_cpu_present_map = physid_mask_of_physid(0); | 1041 | phys_cpu_present_map = physid_mask_of_physid(0); |
1042 | map_cpu_to_logical_apicid(); | ||
1032 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); | 1043 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); |
1033 | cpu_set(0, per_cpu(cpu_core_map, 0)); | 1044 | cpu_set(0, per_cpu(cpu_core_map, 0)); |
1034 | return; | 1045 | return; |
@@ -1082,7 +1093,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1082 | Dprintk("Before bogomips.\n"); | 1093 | Dprintk("Before bogomips.\n"); |
1083 | for (cpu = 0; cpu < NR_CPUS; cpu++) | 1094 | for (cpu = 0; cpu < NR_CPUS; cpu++) |
1084 | if (cpu_isset(cpu, cpu_callout_map)) | 1095 | if (cpu_isset(cpu, cpu_callout_map)) |
1085 | bogosum += cpu_data[cpu].loops_per_jiffy; | 1096 | bogosum += cpu_data(cpu).loops_per_jiffy; |
1086 | printk(KERN_INFO | 1097 | printk(KERN_INFO |
1087 | "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", | 1098 | "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", |
1088 | cpucount+1, | 1099 | cpucount+1, |
@@ -1152,7 +1163,7 @@ void __init native_smp_prepare_boot_cpu(void) | |||
1152 | void remove_siblinginfo(int cpu) | 1163 | void remove_siblinginfo(int cpu) |
1153 | { | 1164 | { |
1154 | int sibling; | 1165 | int sibling; |
1155 | struct cpuinfo_x86 *c = cpu_data; | 1166 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
1156 | 1167 | ||
1157 | for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { | 1168 | for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { |
1158 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); | 1169 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); |
@@ -1160,15 +1171,15 @@ void remove_siblinginfo(int cpu) | |||
1160 | * last thread sibling in this cpu core going down | 1171 | * last thread sibling in this cpu core going down |
1161 | */ | 1172 | */ |
1162 | if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1) | 1173 | if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1) |
1163 | c[sibling].booted_cores--; | 1174 | cpu_data(sibling).booted_cores--; |
1164 | } | 1175 | } |
1165 | 1176 | ||
1166 | for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) | 1177 | for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) |
1167 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); | 1178 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); |
1168 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); | 1179 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); |
1169 | cpus_clear(per_cpu(cpu_core_map, cpu)); | 1180 | cpus_clear(per_cpu(cpu_core_map, cpu)); |
1170 | c[cpu].phys_proc_id = 0; | 1181 | c->phys_proc_id = 0; |
1171 | c[cpu].cpu_core_id = 0; | 1182 | c->cpu_core_id = 0; |
1172 | cpu_clear(cpu, cpu_sibling_setup_map); | 1183 | cpu_clear(cpu, cpu_sibling_setup_map); |
1173 | } | 1184 | } |
1174 | 1185 | ||
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index e351ac4ab5b1..b7e768dd87c9 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c | |||
@@ -65,7 +65,7 @@ int smp_num_siblings = 1; | |||
65 | EXPORT_SYMBOL(smp_num_siblings); | 65 | EXPORT_SYMBOL(smp_num_siblings); |
66 | 66 | ||
67 | /* Last level cache ID of each logical CPU */ | 67 | /* Last level cache ID of each logical CPU */ |
68 | u8 cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID}; | 68 | DEFINE_PER_CPU(u8, cpu_llc_id) = BAD_APICID; |
69 | 69 | ||
70 | /* Bitmask of currently online CPUs */ | 70 | /* Bitmask of currently online CPUs */ |
71 | cpumask_t cpu_online_map __read_mostly; | 71 | cpumask_t cpu_online_map __read_mostly; |
@@ -84,8 +84,8 @@ cpumask_t cpu_possible_map; | |||
84 | EXPORT_SYMBOL(cpu_possible_map); | 84 | EXPORT_SYMBOL(cpu_possible_map); |
85 | 85 | ||
86 | /* Per CPU bogomips and other parameters */ | 86 | /* Per CPU bogomips and other parameters */ |
87 | struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; | 87 | DEFINE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info); |
88 | EXPORT_SYMBOL(cpu_data); | 88 | EXPORT_PER_CPU_SYMBOL(cpu_info); |
89 | 89 | ||
90 | /* Set when the idlers are all forked */ | 90 | /* Set when the idlers are all forked */ |
91 | int smp_threads_ready; | 91 | int smp_threads_ready; |
@@ -138,9 +138,10 @@ static unsigned long __cpuinit setup_trampoline(void) | |||
138 | 138 | ||
139 | static void __cpuinit smp_store_cpu_info(int id) | 139 | static void __cpuinit smp_store_cpu_info(int id) |
140 | { | 140 | { |
141 | struct cpuinfo_x86 *c = cpu_data + id; | 141 | struct cpuinfo_x86 *c = &cpu_data(id); |
142 | 142 | ||
143 | *c = boot_cpu_data; | 143 | *c = boot_cpu_data; |
144 | c->cpu_index = id; | ||
144 | identify_cpu(c); | 145 | identify_cpu(c); |
145 | print_cpu_info(c); | 146 | print_cpu_info(c); |
146 | } | 147 | } |
@@ -237,7 +238,7 @@ void __cpuinit smp_callin(void) | |||
237 | /* maps the cpu to the sched domain representing multi-core */ | 238 | /* maps the cpu to the sched domain representing multi-core */ |
238 | cpumask_t cpu_coregroup_map(int cpu) | 239 | cpumask_t cpu_coregroup_map(int cpu) |
239 | { | 240 | { |
240 | struct cpuinfo_x86 *c = cpu_data + cpu; | 241 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
241 | /* | 242 | /* |
242 | * For perf, we return last level cache shared map. | 243 | * For perf, we return last level cache shared map. |
243 | * And for power savings, we return cpu_core_map | 244 | * And for power savings, we return cpu_core_map |
@@ -254,41 +255,41 @@ static cpumask_t cpu_sibling_setup_map; | |||
254 | static inline void set_cpu_sibling_map(int cpu) | 255 | static inline void set_cpu_sibling_map(int cpu) |
255 | { | 256 | { |
256 | int i; | 257 | int i; |
257 | struct cpuinfo_x86 *c = cpu_data; | 258 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
258 | 259 | ||
259 | cpu_set(cpu, cpu_sibling_setup_map); | 260 | cpu_set(cpu, cpu_sibling_setup_map); |
260 | 261 | ||
261 | if (smp_num_siblings > 1) { | 262 | if (smp_num_siblings > 1) { |
262 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 263 | for_each_cpu_mask(i, cpu_sibling_setup_map) { |
263 | if (c[cpu].phys_proc_id == c[i].phys_proc_id && | 264 | if (c->phys_proc_id == cpu_data(i).phys_proc_id && |
264 | c[cpu].cpu_core_id == c[i].cpu_core_id) { | 265 | c->cpu_core_id == cpu_data(i).cpu_core_id) { |
265 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); | 266 | cpu_set(i, per_cpu(cpu_sibling_map, cpu)); |
266 | cpu_set(cpu, per_cpu(cpu_sibling_map, i)); | 267 | cpu_set(cpu, per_cpu(cpu_sibling_map, i)); |
267 | cpu_set(i, per_cpu(cpu_core_map, cpu)); | 268 | cpu_set(i, per_cpu(cpu_core_map, cpu)); |
268 | cpu_set(cpu, per_cpu(cpu_core_map, i)); | 269 | cpu_set(cpu, per_cpu(cpu_core_map, i)); |
269 | cpu_set(i, c[cpu].llc_shared_map); | 270 | cpu_set(i, c->llc_shared_map); |
270 | cpu_set(cpu, c[i].llc_shared_map); | 271 | cpu_set(cpu, cpu_data(i).llc_shared_map); |
271 | } | 272 | } |
272 | } | 273 | } |
273 | } else { | 274 | } else { |
274 | cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); | 275 | cpu_set(cpu, per_cpu(cpu_sibling_map, cpu)); |
275 | } | 276 | } |
276 | 277 | ||
277 | cpu_set(cpu, c[cpu].llc_shared_map); | 278 | cpu_set(cpu, c->llc_shared_map); |
278 | 279 | ||
279 | if (current_cpu_data.x86_max_cores == 1) { | 280 | if (current_cpu_data.x86_max_cores == 1) { |
280 | per_cpu(cpu_core_map, cpu) = per_cpu(cpu_sibling_map, cpu); | 281 | per_cpu(cpu_core_map, cpu) = per_cpu(cpu_sibling_map, cpu); |
281 | c[cpu].booted_cores = 1; | 282 | c->booted_cores = 1; |
282 | return; | 283 | return; |
283 | } | 284 | } |
284 | 285 | ||
285 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 286 | for_each_cpu_mask(i, cpu_sibling_setup_map) { |
286 | if (cpu_llc_id[cpu] != BAD_APICID && | 287 | if (per_cpu(cpu_llc_id, cpu) != BAD_APICID && |
287 | cpu_llc_id[cpu] == cpu_llc_id[i]) { | 288 | per_cpu(cpu_llc_id, cpu) == per_cpu(cpu_llc_id, i)) { |
288 | cpu_set(i, c[cpu].llc_shared_map); | 289 | cpu_set(i, c->llc_shared_map); |
289 | cpu_set(cpu, c[i].llc_shared_map); | 290 | cpu_set(cpu, cpu_data(i).llc_shared_map); |
290 | } | 291 | } |
291 | if (c[cpu].phys_proc_id == c[i].phys_proc_id) { | 292 | if (c->phys_proc_id == cpu_data(i).phys_proc_id) { |
292 | cpu_set(i, per_cpu(cpu_core_map, cpu)); | 293 | cpu_set(i, per_cpu(cpu_core_map, cpu)); |
293 | cpu_set(cpu, per_cpu(cpu_core_map, i)); | 294 | cpu_set(cpu, per_cpu(cpu_core_map, i)); |
294 | /* | 295 | /* |
@@ -300,15 +301,15 @@ static inline void set_cpu_sibling_map(int cpu) | |||
300 | * the booted_cores for this new cpu | 301 | * the booted_cores for this new cpu |
301 | */ | 302 | */ |
302 | if (first_cpu(per_cpu(cpu_sibling_map, i)) == i) | 303 | if (first_cpu(per_cpu(cpu_sibling_map, i)) == i) |
303 | c[cpu].booted_cores++; | 304 | c->booted_cores++; |
304 | /* | 305 | /* |
305 | * increment the core count for all | 306 | * increment the core count for all |
306 | * the other cpus in this package | 307 | * the other cpus in this package |
307 | */ | 308 | */ |
308 | if (i != cpu) | 309 | if (i != cpu) |
309 | c[i].booted_cores++; | 310 | cpu_data(i).booted_cores++; |
310 | } else if (i != cpu && !c[cpu].booted_cores) | 311 | } else if (i != cpu && !c->booted_cores) |
311 | c[cpu].booted_cores = c[i].booted_cores; | 312 | c->booted_cores = cpu_data(i).booted_cores; |
312 | } | 313 | } |
313 | } | 314 | } |
314 | } | 315 | } |
@@ -350,7 +351,7 @@ void __cpuinit start_secondary(void) | |||
350 | /* | 351 | /* |
351 | * We need to hold call_lock, so there is no inconsistency | 352 | * We need to hold call_lock, so there is no inconsistency |
352 | * between the time smp_call_function() determines number of | 353 | * between the time smp_call_function() determines number of |
353 | * IPI receipients, and the time when the determination is made | 354 | * IPI recipients, and the time when the determination is made |
354 | * for which cpus receive the IPI in genapic_flat.c. Holding this | 355 | * for which cpus receive the IPI in genapic_flat.c. Holding this |
355 | * lock helps us to not include this cpu in a currently in progress | 356 | * lock helps us to not include this cpu in a currently in progress |
356 | * smp_call_function(). | 357 | * smp_call_function(). |
@@ -694,7 +695,7 @@ do_rest: | |||
694 | clear_node_cpumask(cpu); /* was set by numa_add_cpu */ | 695 | clear_node_cpumask(cpu); /* was set by numa_add_cpu */ |
695 | cpu_clear(cpu, cpu_present_map); | 696 | cpu_clear(cpu, cpu_present_map); |
696 | cpu_clear(cpu, cpu_possible_map); | 697 | cpu_clear(cpu, cpu_possible_map); |
697 | x86_cpu_to_apicid[cpu] = BAD_APICID; | 698 | per_cpu(x86_cpu_to_apicid, cpu) = BAD_APICID; |
698 | return -EIO; | 699 | return -EIO; |
699 | } | 700 | } |
700 | 701 | ||
@@ -841,6 +842,26 @@ static int __init smp_sanity_check(unsigned max_cpus) | |||
841 | } | 842 | } |
842 | 843 | ||
843 | /* | 844 | /* |
845 | * Copy apicid's found by MP_processor_info from initial array to the per cpu | ||
846 | * data area. The x86_cpu_to_apicid_init array is then expendable and the | ||
847 | * x86_cpu_to_apicid_ptr is zeroed indicating that the static array is no | ||
848 | * longer available. | ||
849 | */ | ||
850 | void __init smp_set_apicids(void) | ||
851 | { | ||
852 | int cpu; | ||
853 | |||
854 | for_each_cpu_mask(cpu, cpu_possible_map) { | ||
855 | if (per_cpu_offset(cpu)) | ||
856 | per_cpu(x86_cpu_to_apicid, cpu) = | ||
857 | x86_cpu_to_apicid_init[cpu]; | ||
858 | } | ||
859 | |||
860 | /* indicate the static array will be going away soon */ | ||
861 | x86_cpu_to_apicid_ptr = NULL; | ||
862 | } | ||
863 | |||
864 | /* | ||
844 | * Prepare for SMP bootup. The MP table or ACPI has been read | 865 | * Prepare for SMP bootup. The MP table or ACPI has been read |
845 | * earlier. Just do some sanity checking here and enable APIC mode. | 866 | * earlier. Just do some sanity checking here and enable APIC mode. |
846 | */ | 867 | */ |
@@ -849,6 +870,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
849 | nmi_watchdog_default(); | 870 | nmi_watchdog_default(); |
850 | current_cpu_data = boot_cpu_data; | 871 | current_cpu_data = boot_cpu_data; |
851 | current_thread_info()->cpu = 0; /* needed? */ | 872 | current_thread_info()->cpu = 0; /* needed? */ |
873 | smp_set_apicids(); | ||
852 | set_cpu_sibling_map(0); | 874 | set_cpu_sibling_map(0); |
853 | 875 | ||
854 | if (smp_sanity_check(max_cpus) < 0) { | 876 | if (smp_sanity_check(max_cpus) < 0) { |
@@ -968,7 +990,7 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
968 | static void remove_siblinginfo(int cpu) | 990 | static void remove_siblinginfo(int cpu) |
969 | { | 991 | { |
970 | int sibling; | 992 | int sibling; |
971 | struct cpuinfo_x86 *c = cpu_data; | 993 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
972 | 994 | ||
973 | for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { | 995 | for_each_cpu_mask(sibling, per_cpu(cpu_core_map, cpu)) { |
974 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); | 996 | cpu_clear(cpu, per_cpu(cpu_core_map, sibling)); |
@@ -976,15 +998,15 @@ static void remove_siblinginfo(int cpu) | |||
976 | * last thread sibling in this cpu core going down | 998 | * last thread sibling in this cpu core going down |
977 | */ | 999 | */ |
978 | if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1) | 1000 | if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1) |
979 | c[sibling].booted_cores--; | 1001 | cpu_data(sibling).booted_cores--; |
980 | } | 1002 | } |
981 | 1003 | ||
982 | for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) | 1004 | for_each_cpu_mask(sibling, per_cpu(cpu_sibling_map, cpu)) |
983 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); | 1005 | cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling)); |
984 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); | 1006 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); |
985 | cpus_clear(per_cpu(cpu_core_map, cpu)); | 1007 | cpus_clear(per_cpu(cpu_core_map, cpu)); |
986 | c[cpu].phys_proc_id = 0; | 1008 | c->phys_proc_id = 0; |
987 | c[cpu].cpu_core_id = 0; | 1009 | c->cpu_core_id = 0; |
988 | cpu_clear(cpu, cpu_sibling_setup_map); | 1010 | cpu_clear(cpu, cpu_sibling_setup_map); |
989 | } | 1011 | } |
990 | 1012 | ||
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c index 91c7acc8d999..72f463401592 100644 --- a/arch/x86/kernel/summit_32.c +++ b/arch/x86/kernel/summit_32.c | |||
@@ -64,7 +64,7 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus) | |||
64 | 64 | ||
65 | switch (rio_devs[wpeg_num]->type){ | 65 | switch (rio_devs[wpeg_num]->type){ |
66 | case CompatWPEG: | 66 | case CompatWPEG: |
67 | /* The Compatability Winnipeg controls the 2 legacy buses, | 67 | /* The Compatibility Winnipeg controls the 2 legacy buses, |
68 | * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case | 68 | * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case |
69 | * a PCI-PCI bridge card is used in either slot: total 5 buses. | 69 | * a PCI-PCI bridge card is used in either slot: total 5 buses. |
70 | */ | 70 | */ |
diff --git a/arch/x86/kernel/suspend_64.c b/arch/x86/kernel/suspend_64.c index f8fafe527ff1..bc9f59c246fd 100644 --- a/arch/x86/kernel/suspend_64.c +++ b/arch/x86/kernel/suspend_64.c | |||
@@ -32,9 +32,9 @@ void __save_processor_state(struct saved_context *ctxt) | |||
32 | /* | 32 | /* |
33 | * descriptor tables | 33 | * descriptor tables |
34 | */ | 34 | */ |
35 | asm volatile ("sgdt %0" : "=m" (ctxt->gdt_limit)); | 35 | store_gdt((struct desc_ptr *)&ctxt->gdt_limit); |
36 | asm volatile ("sidt %0" : "=m" (ctxt->idt_limit)); | 36 | store_idt((struct desc_ptr *)&ctxt->idt_limit); |
37 | asm volatile ("str %0" : "=m" (ctxt->tr)); | 37 | store_tr(ctxt->tr); |
38 | 38 | ||
39 | /* XMM0..XMM15 should be handled by kernel_fpu_begin(). */ | 39 | /* XMM0..XMM15 should be handled by kernel_fpu_begin(). */ |
40 | /* | 40 | /* |
@@ -91,8 +91,9 @@ void __restore_processor_state(struct saved_context *ctxt) | |||
91 | * now restore the descriptor tables to their proper values | 91 | * now restore the descriptor tables to their proper values |
92 | * ltr is done i fix_processor_context(). | 92 | * ltr is done i fix_processor_context(). |
93 | */ | 93 | */ |
94 | asm volatile ("lgdt %0" :: "m" (ctxt->gdt_limit)); | 94 | load_gdt((const struct desc_ptr *)&ctxt->gdt_limit); |
95 | asm volatile ("lidt %0" :: "m" (ctxt->idt_limit)); | 95 | load_idt((const struct desc_ptr *)&ctxt->idt_limit); |
96 | |||
96 | 97 | ||
97 | /* | 98 | /* |
98 | * segment registers | 99 | * segment registers |
@@ -123,7 +124,7 @@ void fix_processor_context(void) | |||
123 | int cpu = smp_processor_id(); | 124 | int cpu = smp_processor_id(); |
124 | struct tss_struct *t = &per_cpu(init_tss, cpu); | 125 | struct tss_struct *t = &per_cpu(init_tss, cpu); |
125 | 126 | ||
126 | set_tss_desc(cpu,t); /* This just modifies memory; should not be neccessary. But... This is neccessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ | 127 | set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ |
127 | 128 | ||
128 | cpu_gdt(cpu)[GDT_ENTRY_TSS].type = 9; | 129 | cpu_gdt(cpu)[GDT_ENTRY_TSS].type = 9; |
129 | 130 | ||
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 1e9d57256eb1..cc9acace7e23 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -63,6 +63,9 @@ | |||
63 | 63 | ||
64 | int panic_on_unrecovered_nmi; | 64 | int panic_on_unrecovered_nmi; |
65 | 65 | ||
66 | DECLARE_BITMAP(used_vectors, NR_VECTORS); | ||
67 | EXPORT_SYMBOL_GPL(used_vectors); | ||
68 | |||
66 | asmlinkage int system_call(void); | 69 | asmlinkage int system_call(void); |
67 | 70 | ||
68 | /* Do we ignore FPU interrupts ? */ | 71 | /* Do we ignore FPU interrupts ? */ |
@@ -288,33 +291,9 @@ EXPORT_SYMBOL(dump_stack); | |||
288 | void show_registers(struct pt_regs *regs) | 291 | void show_registers(struct pt_regs *regs) |
289 | { | 292 | { |
290 | int i; | 293 | int i; |
291 | int in_kernel = 1; | 294 | |
292 | unsigned long esp; | ||
293 | unsigned short ss, gs; | ||
294 | |||
295 | esp = (unsigned long) (®s->esp); | ||
296 | savesegment(ss, ss); | ||
297 | savesegment(gs, gs); | ||
298 | if (user_mode_vm(regs)) { | ||
299 | in_kernel = 0; | ||
300 | esp = regs->esp; | ||
301 | ss = regs->xss & 0xffff; | ||
302 | } | ||
303 | print_modules(); | 295 | print_modules(); |
304 | printk(KERN_EMERG "CPU: %d\n" | 296 | __show_registers(regs, 0); |
305 | KERN_EMERG "EIP: %04x:[<%08lx>] %s VLI\n" | ||
306 | KERN_EMERG "EFLAGS: %08lx (%s %.*s)\n", | ||
307 | smp_processor_id(), 0xffff & regs->xcs, regs->eip, | ||
308 | print_tainted(), regs->eflags, init_utsname()->release, | ||
309 | (int)strcspn(init_utsname()->version, " "), | ||
310 | init_utsname()->version); | ||
311 | print_symbol(KERN_EMERG "EIP is at %s\n", regs->eip); | ||
312 | printk(KERN_EMERG "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n", | ||
313 | regs->eax, regs->ebx, regs->ecx, regs->edx); | ||
314 | printk(KERN_EMERG "esi: %08lx edi: %08lx ebp: %08lx esp: %08lx\n", | ||
315 | regs->esi, regs->edi, regs->ebp, esp); | ||
316 | printk(KERN_EMERG "ds: %04x es: %04x fs: %04x gs: %04x ss: %04x\n", | ||
317 | regs->xds & 0xffff, regs->xes & 0xffff, regs->xfs & 0xffff, gs, ss); | ||
318 | printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)", | 297 | printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)", |
319 | TASK_COMM_LEN, current->comm, task_pid_nr(current), | 298 | TASK_COMM_LEN, current->comm, task_pid_nr(current), |
320 | current_thread_info(), current, task_thread_info(current)); | 299 | current_thread_info(), current, task_thread_info(current)); |
@@ -322,14 +301,14 @@ void show_registers(struct pt_regs *regs) | |||
322 | * When in-kernel, we also print out the stack and code at the | 301 | * When in-kernel, we also print out the stack and code at the |
323 | * time of the fault.. | 302 | * time of the fault.. |
324 | */ | 303 | */ |
325 | if (in_kernel) { | 304 | if (!user_mode_vm(regs)) { |
326 | u8 *eip; | 305 | u8 *eip; |
327 | unsigned int code_prologue = code_bytes * 43 / 64; | 306 | unsigned int code_prologue = code_bytes * 43 / 64; |
328 | unsigned int code_len = code_bytes; | 307 | unsigned int code_len = code_bytes; |
329 | unsigned char c; | 308 | unsigned char c; |
330 | 309 | ||
331 | printk("\n" KERN_EMERG "Stack: "); | 310 | printk("\n" KERN_EMERG "Stack: "); |
332 | show_stack_log_lvl(NULL, regs, (unsigned long *)esp, KERN_EMERG); | 311 | show_stack_log_lvl(NULL, regs, ®s->esp, KERN_EMERG); |
333 | 312 | ||
334 | printk(KERN_EMERG "Code: "); | 313 | printk(KERN_EMERG "Code: "); |
335 | 314 | ||
@@ -374,11 +353,11 @@ int is_valid_bugaddr(unsigned long eip) | |||
374 | void die(const char * str, struct pt_regs * regs, long err) | 353 | void die(const char * str, struct pt_regs * regs, long err) |
375 | { | 354 | { |
376 | static struct { | 355 | static struct { |
377 | spinlock_t lock; | 356 | raw_spinlock_t lock; |
378 | u32 lock_owner; | 357 | u32 lock_owner; |
379 | int lock_owner_depth; | 358 | int lock_owner_depth; |
380 | } die = { | 359 | } die = { |
381 | .lock = __SPIN_LOCK_UNLOCKED(die.lock), | 360 | .lock = __RAW_SPIN_LOCK_UNLOCKED, |
382 | .lock_owner = -1, | 361 | .lock_owner = -1, |
383 | .lock_owner_depth = 0 | 362 | .lock_owner_depth = 0 |
384 | }; | 363 | }; |
@@ -389,13 +368,14 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
389 | 368 | ||
390 | if (die.lock_owner != raw_smp_processor_id()) { | 369 | if (die.lock_owner != raw_smp_processor_id()) { |
391 | console_verbose(); | 370 | console_verbose(); |
392 | spin_lock_irqsave(&die.lock, flags); | 371 | __raw_spin_lock(&die.lock); |
372 | raw_local_save_flags(flags); | ||
393 | die.lock_owner = smp_processor_id(); | 373 | die.lock_owner = smp_processor_id(); |
394 | die.lock_owner_depth = 0; | 374 | die.lock_owner_depth = 0; |
395 | bust_spinlocks(1); | 375 | bust_spinlocks(1); |
396 | } | 376 | } |
397 | else | 377 | else |
398 | local_save_flags(flags); | 378 | raw_local_save_flags(flags); |
399 | 379 | ||
400 | if (++die.lock_owner_depth < 3) { | 380 | if (++die.lock_owner_depth < 3) { |
401 | unsigned long esp; | 381 | unsigned long esp; |
@@ -439,7 +419,8 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
439 | bust_spinlocks(0); | 419 | bust_spinlocks(0); |
440 | die.lock_owner = -1; | 420 | die.lock_owner = -1; |
441 | add_taint(TAINT_DIE); | 421 | add_taint(TAINT_DIE); |
442 | spin_unlock_irqrestore(&die.lock, flags); | 422 | __raw_spin_unlock(&die.lock); |
423 | raw_local_irq_restore(flags); | ||
443 | 424 | ||
444 | if (!regs) | 425 | if (!regs) |
445 | return; | 426 | return; |
@@ -1142,6 +1123,8 @@ static void __init set_task_gate(unsigned int n, unsigned int gdt_entry) | |||
1142 | 1123 | ||
1143 | void __init trap_init(void) | 1124 | void __init trap_init(void) |
1144 | { | 1125 | { |
1126 | int i; | ||
1127 | |||
1145 | #ifdef CONFIG_EISA | 1128 | #ifdef CONFIG_EISA |
1146 | void __iomem *p = ioremap(0x0FFFD9, 4); | 1129 | void __iomem *p = ioremap(0x0FFFD9, 4); |
1147 | if (readl(p) == 'E'+('I'<<8)+('S'<<16)+('A'<<24)) { | 1130 | if (readl(p) == 'E'+('I'<<8)+('S'<<16)+('A'<<24)) { |
@@ -1201,6 +1184,11 @@ void __init trap_init(void) | |||
1201 | 1184 | ||
1202 | set_system_gate(SYSCALL_VECTOR,&system_call); | 1185 | set_system_gate(SYSCALL_VECTOR,&system_call); |
1203 | 1186 | ||
1187 | /* Reserve all the builtin and the syscall vector. */ | ||
1188 | for (i = 0; i < FIRST_EXTERNAL_VECTOR; i++) | ||
1189 | set_bit(i, used_vectors); | ||
1190 | set_bit(SYSCALL_VECTOR, used_vectors); | ||
1191 | |||
1204 | /* | 1192 | /* |
1205 | * Should be a barrier for any external CPU state. | 1193 | * Should be a barrier for any external CPU state. |
1206 | */ | 1194 | */ |
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index b4a9b3db1994..d0c2bc7ab2ec 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c | |||
@@ -201,7 +201,7 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | |||
201 | #define MSG(txt) ops->warning(data, txt) | 201 | #define MSG(txt) ops->warning(data, txt) |
202 | 202 | ||
203 | /* | 203 | /* |
204 | * x86-64 can have upto three kernel stacks: | 204 | * x86-64 can have up to three kernel stacks: |
205 | * process stack | 205 | * process stack |
206 | * interrupt stack | 206 | * interrupt stack |
207 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack | 207 | * severe exception (double fault, nmi, stack fault, debug, mce) hardware stack |
@@ -462,7 +462,7 @@ void out_of_line_bug(void) | |||
462 | EXPORT_SYMBOL(out_of_line_bug); | 462 | EXPORT_SYMBOL(out_of_line_bug); |
463 | #endif | 463 | #endif |
464 | 464 | ||
465 | static DEFINE_SPINLOCK(die_lock); | 465 | static raw_spinlock_t die_lock = __RAW_SPIN_LOCK_UNLOCKED; |
466 | static int die_owner = -1; | 466 | static int die_owner = -1; |
467 | static unsigned int die_nest_count; | 467 | static unsigned int die_nest_count; |
468 | 468 | ||
@@ -474,13 +474,13 @@ unsigned __kprobes long oops_begin(void) | |||
474 | oops_enter(); | 474 | oops_enter(); |
475 | 475 | ||
476 | /* racy, but better than risking deadlock. */ | 476 | /* racy, but better than risking deadlock. */ |
477 | local_irq_save(flags); | 477 | raw_local_irq_save(flags); |
478 | cpu = smp_processor_id(); | 478 | cpu = smp_processor_id(); |
479 | if (!spin_trylock(&die_lock)) { | 479 | if (!__raw_spin_trylock(&die_lock)) { |
480 | if (cpu == die_owner) | 480 | if (cpu == die_owner) |
481 | /* nested oops. should stop eventually */; | 481 | /* nested oops. should stop eventually */; |
482 | else | 482 | else |
483 | spin_lock(&die_lock); | 483 | __raw_spin_lock(&die_lock); |
484 | } | 484 | } |
485 | die_nest_count++; | 485 | die_nest_count++; |
486 | die_owner = cpu; | 486 | die_owner = cpu; |
@@ -494,12 +494,10 @@ void __kprobes oops_end(unsigned long flags) | |||
494 | die_owner = -1; | 494 | die_owner = -1; |
495 | bust_spinlocks(0); | 495 | bust_spinlocks(0); |
496 | die_nest_count--; | 496 | die_nest_count--; |
497 | if (die_nest_count) | 497 | if (!die_nest_count) |
498 | /* We still own the lock */ | ||
499 | local_irq_restore(flags); | ||
500 | else | ||
501 | /* Nest count reaches zero, release the lock. */ | 498 | /* Nest count reaches zero, release the lock. */ |
502 | spin_unlock_irqrestore(&die_lock, flags); | 499 | __raw_spin_unlock(&die_lock); |
500 | raw_local_irq_restore(flags); | ||
503 | if (panic_on_oops) | 501 | if (panic_on_oops) |
504 | panic("Fatal exception"); | 502 | panic("Fatal exception"); |
505 | oops_exit(); | 503 | oops_exit(); |
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c index e87a3939ed40..d78444c788a3 100644 --- a/arch/x86/kernel/tsc_32.c +++ b/arch/x86/kernel/tsc_32.c | |||
@@ -59,7 +59,7 @@ int check_tsc_unstable(void) | |||
59 | } | 59 | } |
60 | EXPORT_SYMBOL_GPL(check_tsc_unstable); | 60 | EXPORT_SYMBOL_GPL(check_tsc_unstable); |
61 | 61 | ||
62 | /* Accellerators for sched_clock() | 62 | /* Accelerators for sched_clock() |
63 | * convert from cycles(64bits) => nanoseconds (64bits) | 63 | * convert from cycles(64bits) => nanoseconds (64bits) |
64 | * basic equation: | 64 | * basic equation: |
65 | * ns = cycles / (freq / ns_per_sec) | 65 | * ns = cycles / (freq / ns_per_sec) |
@@ -74,7 +74,7 @@ EXPORT_SYMBOL_GPL(check_tsc_unstable); | |||
74 | * And since SC is a constant power of two, we can convert the div | 74 | * And since SC is a constant power of two, we can convert the div |
75 | * into a shift. | 75 | * into a shift. |
76 | * | 76 | * |
77 | * We can use khz divisor instead of mhz to keep a better percision, since | 77 | * We can use khz divisor instead of mhz to keep a better precision, since |
78 | * cyc2ns_scale is limited to 10^6 * 2^10, which fits in 32 bits. | 78 | * cyc2ns_scale is limited to 10^6 * 2^10, which fits in 32 bits. |
79 | * (mathieu.desnoyers@polymtl.ca) | 79 | * (mathieu.desnoyers@polymtl.ca) |
80 | * | 80 | * |
@@ -181,8 +181,8 @@ int recalibrate_cpu_khz(void) | |||
181 | if (cpu_has_tsc) { | 181 | if (cpu_has_tsc) { |
182 | cpu_khz = calculate_cpu_khz(); | 182 | cpu_khz = calculate_cpu_khz(); |
183 | tsc_khz = cpu_khz; | 183 | tsc_khz = cpu_khz; |
184 | cpu_data[0].loops_per_jiffy = | 184 | cpu_data(0).loops_per_jiffy = |
185 | cpufreq_scale(cpu_data[0].loops_per_jiffy, | 185 | cpufreq_scale(cpu_data(0).loops_per_jiffy, |
186 | cpu_khz_old, cpu_khz); | 186 | cpu_khz_old, cpu_khz); |
187 | return 0; | 187 | return 0; |
188 | } else | 188 | } else |
@@ -215,7 +215,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data) | |||
215 | return 0; | 215 | return 0; |
216 | } | 216 | } |
217 | ref_freq = freq->old; | 217 | ref_freq = freq->old; |
218 | loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy; | 218 | loops_per_jiffy_ref = cpu_data(freq->cpu).loops_per_jiffy; |
219 | cpu_khz_ref = cpu_khz; | 219 | cpu_khz_ref = cpu_khz; |
220 | } | 220 | } |
221 | 221 | ||
@@ -223,7 +223,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, void *data) | |||
223 | (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) || | 223 | (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) || |
224 | (val == CPUFREQ_RESUMECHANGE)) { | 224 | (val == CPUFREQ_RESUMECHANGE)) { |
225 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) | 225 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) |
226 | cpu_data[freq->cpu].loops_per_jiffy = | 226 | cpu_data(freq->cpu).loops_per_jiffy = |
227 | cpufreq_scale(loops_per_jiffy_ref, | 227 | cpufreq_scale(loops_per_jiffy_ref, |
228 | ref_freq, freq->new); | 228 | ref_freq, freq->new); |
229 | 229 | ||
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c index 9f22e542c374..9c70af45b42b 100644 --- a/arch/x86/kernel/tsc_64.c +++ b/arch/x86/kernel/tsc_64.c | |||
@@ -73,13 +73,13 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | |||
73 | struct cpufreq_freqs *freq = data; | 73 | struct cpufreq_freqs *freq = data; |
74 | unsigned long *lpj, dummy; | 74 | unsigned long *lpj, dummy; |
75 | 75 | ||
76 | if (cpu_has(&cpu_data[freq->cpu], X86_FEATURE_CONSTANT_TSC)) | 76 | if (cpu_has(&cpu_data(freq->cpu), X86_FEATURE_CONSTANT_TSC)) |
77 | return 0; | 77 | return 0; |
78 | 78 | ||
79 | lpj = &dummy; | 79 | lpj = &dummy; |
80 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) | 80 | if (!(freq->flags & CPUFREQ_CONST_LOOPS)) |
81 | #ifdef CONFIG_SMP | 81 | #ifdef CONFIG_SMP |
82 | lpj = &cpu_data[freq->cpu].loops_per_jiffy; | 82 | lpj = &cpu_data(freq->cpu).loops_per_jiffy; |
83 | #else | 83 | #else |
84 | lpj = &boot_cpu_data.loops_per_jiffy; | 84 | lpj = &boot_cpu_data.loops_per_jiffy; |
85 | #endif | 85 | #endif |
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index 585541ca1a7e..ad4005c6d4a1 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -48,12 +48,12 @@ | |||
48 | ({unsigned long v; \ | 48 | ({unsigned long v; \ |
49 | extern char __vsyscall_0; \ | 49 | extern char __vsyscall_0; \ |
50 | asm("" : "=r" (v) : "0" (x)); \ | 50 | asm("" : "=r" (v) : "0" (x)); \ |
51 | ((v - VSYSCALL_FIRST_PAGE) + __pa_symbol(&__vsyscall_0)); }) | 51 | ((v - VSYSCALL_START) + __pa_symbol(&__vsyscall_0)); }) |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * vsyscall_gtod_data contains data that is : | 54 | * vsyscall_gtod_data contains data that is : |
55 | * - readonly from vsyscalls | 55 | * - readonly from vsyscalls |
56 | * - writen by timer interrupt or systcl (/proc/sys/kernel/vsyscall64) | 56 | * - written by timer interrupt or systcl (/proc/sys/kernel/vsyscall64) |
57 | * Try to keep this structure as small as possible to avoid cache line ping pongs | 57 | * Try to keep this structure as small as possible to avoid cache line ping pongs |
58 | */ | 58 | */ |
59 | int __vgetcpu_mode __section_vgetcpu_mode; | 59 | int __vgetcpu_mode __section_vgetcpu_mode; |
@@ -291,7 +291,7 @@ static void __cpuinit vsyscall_set_cpu(int cpu) | |||
291 | #ifdef CONFIG_NUMA | 291 | #ifdef CONFIG_NUMA |
292 | node = cpu_to_node(cpu); | 292 | node = cpu_to_node(cpu); |
293 | #endif | 293 | #endif |
294 | if (cpu_has(&cpu_data[cpu], X86_FEATURE_RDTSCP)) | 294 | if (cpu_has(&cpu_data(cpu), X86_FEATURE_RDTSCP)) |
295 | write_rdtscp_aux((node << 12) | cpu); | 295 | write_rdtscp_aux((node << 12) | cpu); |
296 | 296 | ||
297 | /* Store cpu number in limit so that it can be loaded quickly | 297 | /* Store cpu number in limit so that it can be loaded quickly |
diff --git a/arch/x86/lib/delay_32.c b/arch/x86/lib/delay_32.c index f6edb11364df..952e7a89c2ac 100644 --- a/arch/x86/lib/delay_32.c +++ b/arch/x86/lib/delay_32.c | |||
@@ -82,7 +82,7 @@ inline void __const_udelay(unsigned long xloops) | |||
82 | __asm__("mull %0" | 82 | __asm__("mull %0" |
83 | :"=d" (xloops), "=&a" (d0) | 83 | :"=d" (xloops), "=&a" (d0) |
84 | :"1" (xloops), "0" | 84 | :"1" (xloops), "0" |
85 | (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (HZ/4))); | 85 | (cpu_data(raw_smp_processor_id()).loops_per_jiffy * (HZ/4))); |
86 | 86 | ||
87 | __delay(++xloops); | 87 | __delay(++xloops); |
88 | } | 88 | } |
diff --git a/arch/x86/lib/delay_64.c b/arch/x86/lib/delay_64.c index 2dbebd308347..0ebbfb9e7c7f 100644 --- a/arch/x86/lib/delay_64.c +++ b/arch/x86/lib/delay_64.c | |||
@@ -40,7 +40,8 @@ EXPORT_SYMBOL(__delay); | |||
40 | 40 | ||
41 | inline void __const_udelay(unsigned long xloops) | 41 | inline void __const_udelay(unsigned long xloops) |
42 | { | 42 | { |
43 | __delay(((xloops * HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy) >> 32) + 1); | 43 | __delay(((xloops * HZ * |
44 | cpu_data(raw_smp_processor_id()).loops_per_jiffy) >> 32) + 1); | ||
44 | } | 45 | } |
45 | EXPORT_SYMBOL(__const_udelay); | 46 | EXPORT_SYMBOL(__const_udelay); |
46 | 47 | ||
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c index 3f08010f3517..0c28a071824c 100644 --- a/arch/x86/mach-default/setup.c +++ b/arch/x86/mach-default/setup.c | |||
@@ -108,7 +108,7 @@ void __init time_init_hook(void) | |||
108 | * mca_nmi_hook - hook into MCA specific NMI chain | 108 | * mca_nmi_hook - hook into MCA specific NMI chain |
109 | * | 109 | * |
110 | * Description: | 110 | * Description: |
111 | * The MCA (Microchannel Arcitecture) has an NMI chain for NMI sources | 111 | * The MCA (Microchannel Architecture) has an NMI chain for NMI sources |
112 | * along the MCA bus. Use this to hook into that chain if you will need | 112 | * along the MCA bus. Use this to hook into that chain if you will need |
113 | * it. | 113 | * it. |
114 | **/ | 114 | **/ |
@@ -131,7 +131,7 @@ static __init int no_ipi_broadcast(char *str) | |||
131 | return 1; | 131 | return 1; |
132 | } | 132 | } |
133 | 133 | ||
134 | __setup("no_ipi_broadcast", no_ipi_broadcast); | 134 | __setup("no_ipi_broadcast=", no_ipi_broadcast); |
135 | 135 | ||
136 | static int __init print_ipi_mode(void) | 136 | static int __init print_ipi_mode(void) |
137 | { | 137 | { |
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c index 8685208d8512..1af0cc7648f0 100644 --- a/arch/x86/mach-generic/default.c +++ b/arch/x86/mach-generic/default.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Default generic APIC driver. This handles upto 8 CPUs. | 2 | * Default generic APIC driver. This handles up to 8 CPUs. |
3 | */ | 3 | */ |
4 | #define APIC_DEFINITION 1 | 4 | #define APIC_DEFINITION 1 |
5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c index 4121d1551800..f410d3cb5659 100644 --- a/arch/x86/mach-generic/probe.c +++ b/arch/x86/mach-generic/probe.c | |||
@@ -56,7 +56,7 @@ void __init generic_bigsmp_probe(void) | |||
56 | /* | 56 | /* |
57 | * This routine is used to switch to bigsmp mode when | 57 | * This routine is used to switch to bigsmp mode when |
58 | * - There is no apic= option specified by the user | 58 | * - There is no apic= option specified by the user |
59 | * - generic_apic_probe() has choosen apic_default as the sub_arch | 59 | * - generic_apic_probe() has chosen apic_default as the sub_arch |
60 | * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support | 60 | * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support |
61 | */ | 61 | */ |
62 | 62 | ||
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c index e4928aa6bdfb..361ac5107b33 100644 --- a/arch/x86/mach-voyager/voyager_smp.c +++ b/arch/x86/mach-voyager/voyager_smp.c | |||
@@ -36,8 +36,8 @@ static unsigned long cpu_irq_affinity[NR_CPUS] __cacheline_aligned = { [0 ... NR | |||
36 | 36 | ||
37 | /* per CPU data structure (for /proc/cpuinfo et al), visible externally | 37 | /* per CPU data structure (for /proc/cpuinfo et al), visible externally |
38 | * indexed physically */ | 38 | * indexed physically */ |
39 | struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; | 39 | DEFINE_PER_CPU(cpuinfo_x86, cpu_info) __cacheline_aligned; |
40 | EXPORT_SYMBOL(cpu_data); | 40 | EXPORT_PER_CPU_SYMBOL(cpu_info); |
41 | 41 | ||
42 | /* physical ID of the CPU used to boot the system */ | 42 | /* physical ID of the CPU used to boot the system */ |
43 | unsigned char boot_cpu_id; | 43 | unsigned char boot_cpu_id; |
@@ -389,7 +389,7 @@ find_smp_config(void) | |||
389 | 389 | ||
390 | /* The boot CPU must be extended */ | 390 | /* The boot CPU must be extended */ |
391 | voyager_extended_vic_processors = 1<<boot_cpu_id; | 391 | voyager_extended_vic_processors = 1<<boot_cpu_id; |
392 | /* initially, all of the first 8 cpu's can boot */ | 392 | /* initially, all of the first 8 CPUs can boot */ |
393 | voyager_allowed_boot_processors = 0xff; | 393 | voyager_allowed_boot_processors = 0xff; |
394 | /* set up everything for just this CPU, we can alter | 394 | /* set up everything for just this CPU, we can alter |
395 | * this as we start the other CPUs later */ | 395 | * this as we start the other CPUs later */ |
@@ -430,7 +430,7 @@ find_smp_config(void) | |||
430 | void __init | 430 | void __init |
431 | smp_store_cpu_info(int id) | 431 | smp_store_cpu_info(int id) |
432 | { | 432 | { |
433 | struct cpuinfo_x86 *c=&cpu_data[id]; | 433 | struct cpuinfo_x86 *c = &cpu_data(id); |
434 | 434 | ||
435 | *c = boot_cpu_data; | 435 | *c = boot_cpu_data; |
436 | 436 | ||
@@ -634,7 +634,7 @@ do_boot_cpu(__u8 cpu) | |||
634 | cpu, smp_processor_id())); | 634 | cpu, smp_processor_id())); |
635 | 635 | ||
636 | printk("CPU%d: ", cpu); | 636 | printk("CPU%d: ", cpu); |
637 | print_cpu_info(&cpu_data[cpu]); | 637 | print_cpu_info(&cpu_data(cpu)); |
638 | wmb(); | 638 | wmb(); |
639 | cpu_set(cpu, cpu_callout_map); | 639 | cpu_set(cpu, cpu_callout_map); |
640 | cpu_set(cpu, cpu_present_map); | 640 | cpu_set(cpu, cpu_present_map); |
@@ -683,7 +683,7 @@ smp_boot_cpus(void) | |||
683 | */ | 683 | */ |
684 | smp_store_cpu_info(boot_cpu_id); | 684 | smp_store_cpu_info(boot_cpu_id); |
685 | printk("CPU%d: ", boot_cpu_id); | 685 | printk("CPU%d: ", boot_cpu_id); |
686 | print_cpu_info(&cpu_data[boot_cpu_id]); | 686 | print_cpu_info(&cpu_data(boot_cpu_id)); |
687 | 687 | ||
688 | if(is_cpu_quad()) { | 688 | if(is_cpu_quad()) { |
689 | /* booting on a Quad CPU */ | 689 | /* booting on a Quad CPU */ |
@@ -714,7 +714,7 @@ smp_boot_cpus(void) | |||
714 | unsigned long bogosum = 0; | 714 | unsigned long bogosum = 0; |
715 | for (i = 0; i < NR_CPUS; i++) | 715 | for (i = 0; i < NR_CPUS; i++) |
716 | if (cpu_isset(i, cpu_online_map)) | 716 | if (cpu_isset(i, cpu_online_map)) |
717 | bogosum += cpu_data[i].loops_per_jiffy; | 717 | bogosum += cpu_data(i).loops_per_jiffy; |
718 | printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", | 718 | printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", |
719 | cpucount+1, | 719 | cpucount+1, |
720 | bogosum/(500000/HZ), | 720 | bogosum/(500000/HZ), |
@@ -1010,7 +1010,7 @@ static struct call_data_struct * call_data; | |||
1010 | 1010 | ||
1011 | /* execute a thread on a new CPU. The function to be called must be | 1011 | /* execute a thread on a new CPU. The function to be called must be |
1012 | * previously set up. This is used to schedule a function for | 1012 | * previously set up. This is used to schedule a function for |
1013 | * execution on all CPU's - set up the function then broadcast a | 1013 | * execution on all CPUs - set up the function then broadcast a |
1014 | * function_interrupt CPI to come here on each CPU */ | 1014 | * function_interrupt CPI to come here on each CPU */ |
1015 | static void | 1015 | static void |
1016 | smp_call_function_interrupt(void) | 1016 | smp_call_function_interrupt(void) |
@@ -1095,7 +1095,7 @@ voyager_smp_call_function_mask (cpumask_t cpumask, | |||
1095 | * CPI here. We don't use this actually for counting so losing | 1095 | * CPI here. We don't use this actually for counting so losing |
1096 | * ticks doesn't matter | 1096 | * ticks doesn't matter |
1097 | * | 1097 | * |
1098 | * FIXME: For those CPU's which actually have a local APIC, we could | 1098 | * FIXME: For those CPUs which actually have a local APIC, we could |
1099 | * try to use it to trigger this interrupt instead of having to | 1099 | * try to use it to trigger this interrupt instead of having to |
1100 | * broadcast the timer tick. Unfortunately, all my pentium DYADs have | 1100 | * broadcast the timer tick. Unfortunately, all my pentium DYADs have |
1101 | * no local APIC, so I can't do this | 1101 | * no local APIC, so I can't do this |
@@ -1287,7 +1287,7 @@ smp_local_timer_interrupt(void) | |||
1287 | 1287 | ||
1288 | /* | 1288 | /* |
1289 | * We take the 'long' return path, and there every subsystem | 1289 | * We take the 'long' return path, and there every subsystem |
1290 | * grabs the apropriate locks (kernel lock/ irq lock). | 1290 | * grabs the appropriate locks (kernel lock/ irq lock). |
1291 | * | 1291 | * |
1292 | * we might want to decouple profiling from the 'long path', | 1292 | * we might want to decouple profiling from the 'long path', |
1293 | * and do the profiling totally in assembly. | 1293 | * and do the profiling totally in assembly. |
@@ -1759,7 +1759,7 @@ set_vic_irq_affinity(unsigned int irq, cpumask_t mask) | |||
1759 | real_mask = cpus_addr(mask)[0] & voyager_extended_vic_processors; | 1759 | real_mask = cpus_addr(mask)[0] & voyager_extended_vic_processors; |
1760 | 1760 | ||
1761 | if(cpus_addr(mask)[0] == 0) | 1761 | if(cpus_addr(mask)[0] == 0) |
1762 | /* can't have no cpu's to accept the interrupt -- extremely | 1762 | /* can't have no CPUs to accept the interrupt -- extremely |
1763 | * bad things will happen */ | 1763 | * bad things will happen */ |
1764 | return; | 1764 | return; |
1765 | 1765 | ||
@@ -1791,7 +1791,7 @@ set_vic_irq_affinity(unsigned int irq, cpumask_t mask) | |||
1791 | } | 1791 | } |
1792 | /* this is magic, we now have the correct affinity maps, so | 1792 | /* this is magic, we now have the correct affinity maps, so |
1793 | * enable the interrupt. This will send an enable CPI to | 1793 | * enable the interrupt. This will send an enable CPI to |
1794 | * those cpu's who need to enable it in their local masks, | 1794 | * those CPUs who need to enable it in their local masks, |
1795 | * causing them to correct for the new affinity . If the | 1795 | * causing them to correct for the new affinity . If the |
1796 | * interrupt is currently globally disabled, it will simply be | 1796 | * interrupt is currently globally disabled, it will simply be |
1797 | * disabled again as it comes in (voyager lazy disable). If | 1797 | * disabled again as it comes in (voyager lazy disable). If |
diff --git a/arch/x86/mach-voyager/voyager_thread.c b/arch/x86/mach-voyager/voyager_thread.c index f9d595338159..50f9366c411e 100644 --- a/arch/x86/mach-voyager/voyager_thread.c +++ b/arch/x86/mach-voyager/voyager_thread.c | |||
@@ -64,7 +64,7 @@ check_from_kernel(void) | |||
64 | { | 64 | { |
65 | if(voyager_status.switch_off) { | 65 | if(voyager_status.switch_off) { |
66 | 66 | ||
67 | /* FIXME: This should be configureable via proc */ | 67 | /* FIXME: This should be configurable via proc */ |
68 | execute("umask 600; echo 0 > /etc/initrunlvl; kill -HUP 1"); | 68 | execute("umask 600; echo 0 > /etc/initrunlvl; kill -HUP 1"); |
69 | } else if(voyager_status.power_fail) { | 69 | } else if(voyager_status.power_fail) { |
70 | VDEBUG(("Voyager daemon detected AC power failure\n")); | 70 | VDEBUG(("Voyager daemon detected AC power failure\n")); |
diff --git a/arch/x86/mm/boot_ioremap_32.c b/arch/x86/mm/boot_ioremap_32.c index 4de95a17a7d4..f14da2a53ece 100644 --- a/arch/x86/mm/boot_ioremap_32.c +++ b/arch/x86/mm/boot_ioremap_32.c | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | /* | 11 | /* |
12 | * We need to use the 2-level pagetable functions, but CONFIG_X86_PAE | 12 | * We need to use the 2-level pagetable functions, but CONFIG_X86_PAE |
13 | * keeps that from happenning. If anyone has a better way, I'm listening. | 13 | * keeps that from happening. If anyone has a better way, I'm listening. |
14 | * | 14 | * |
15 | * boot_pte_t is defined only if this all works correctly | 15 | * boot_pte_t is defined only if this all works correctly |
16 | */ | 16 | */ |
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c index 13893772cc48..fe608a45ffb6 100644 --- a/arch/x86/mm/discontig_32.c +++ b/arch/x86/mm/discontig_32.c | |||
@@ -273,7 +273,7 @@ unsigned long __init setup_memory(void) | |||
273 | * When mapping a NUMA machine we allocate the node_mem_map arrays | 273 | * When mapping a NUMA machine we allocate the node_mem_map arrays |
274 | * from node local memory. They are then mapped directly into KVA | 274 | * from node local memory. They are then mapped directly into KVA |
275 | * between zone normal and vmalloc space. Calculate the size of | 275 | * between zone normal and vmalloc space. Calculate the size of |
276 | * this space and use it to adjust the boundry between ZONE_NORMAL | 276 | * this space and use it to adjust the boundary between ZONE_NORMAL |
277 | * and ZONE_HIGHMEM. | 277 | * and ZONE_HIGHMEM. |
278 | */ | 278 | */ |
279 | find_max_pfn(); | 279 | find_max_pfn(); |
diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index 4d3e538c57ab..503dfc05111b 100644 --- a/arch/x86/mm/fault_32.c +++ b/arch/x86/mm/fault_32.c | |||
@@ -354,7 +354,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, | |||
354 | 354 | ||
355 | /* When running in the kernel we expect faults to occur only to | 355 | /* When running in the kernel we expect faults to occur only to |
356 | * addresses in user space. All other faults represent errors in the | 356 | * addresses in user space. All other faults represent errors in the |
357 | * kernel and should generate an OOPS. Unfortunatly, in the case of an | 357 | * kernel and should generate an OOPS. Unfortunately, in the case of an |
358 | * erroneous fault occurring in a code path which already holds mmap_sem | 358 | * erroneous fault occurring in a code path which already holds mmap_sem |
359 | * we will deadlock attempting to validate the fault against the | 359 | * we will deadlock attempting to validate the fault against the |
360 | * address space. Luckily the kernel only validly references user | 360 | * address space. Luckily the kernel only validly references user |
@@ -362,7 +362,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs, | |||
362 | * exceptions table. | 362 | * exceptions table. |
363 | * | 363 | * |
364 | * As the vast majority of faults will be valid we will only perform | 364 | * As the vast majority of faults will be valid we will only perform |
365 | * the source reference check when there is a possibilty of a deadlock. | 365 | * the source reference check when there is a possibility of a deadlock. |
366 | * Attempt to lock the address space, if we cannot we then validate the | 366 | * Attempt to lock the address space, if we cannot we then validate the |
367 | * source. If this is invalid we can skip the address space check, | 367 | * source. If this is invalid we can skip the address space check, |
368 | * thus avoiding the deadlock. | 368 | * thus avoiding the deadlock. |
@@ -564,7 +564,8 @@ no_context: | |||
564 | * it's allocated already. | 564 | * it's allocated already. |
565 | */ | 565 | */ |
566 | if ((page >> PAGE_SHIFT) < max_low_pfn | 566 | if ((page >> PAGE_SHIFT) < max_low_pfn |
567 | && (page & _PAGE_PRESENT)) { | 567 | && (page & _PAGE_PRESENT) |
568 | && !(page & _PAGE_PSE)) { | ||
568 | page &= PAGE_MASK; | 569 | page &= PAGE_MASK; |
569 | page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) | 570 | page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) |
570 | & (PTRS_PER_PTE - 1)]; | 571 | & (PTRS_PER_PTE - 1)]; |
diff --git a/arch/x86/mm/fault_64.c b/arch/x86/mm/fault_64.c index 5149ac136a5d..644b4f7ece10 100644 --- a/arch/x86/mm/fault_64.c +++ b/arch/x86/mm/fault_64.c | |||
@@ -169,7 +169,7 @@ void dump_pagetable(unsigned long address) | |||
169 | pmd = pmd_offset(pud, address); | 169 | pmd = pmd_offset(pud, address); |
170 | if (bad_address(pmd)) goto bad; | 170 | if (bad_address(pmd)) goto bad; |
171 | printk("PMD %lx ", pmd_val(*pmd)); | 171 | printk("PMD %lx ", pmd_val(*pmd)); |
172 | if (!pmd_present(*pmd)) goto ret; | 172 | if (!pmd_present(*pmd) || pmd_large(*pmd)) goto ret; |
173 | 173 | ||
174 | pte = pte_offset_kernel(pmd, address); | 174 | pte = pte_offset_kernel(pmd, address); |
175 | if (bad_address(pte)) goto bad; | 175 | if (bad_address(pte)) goto bad; |
@@ -285,7 +285,6 @@ static int vmalloc_fault(unsigned long address) | |||
285 | return 0; | 285 | return 0; |
286 | } | 286 | } |
287 | 287 | ||
288 | static int page_fault_trace; | ||
289 | int show_unhandled_signals = 1; | 288 | int show_unhandled_signals = 1; |
290 | 289 | ||
291 | /* | 290 | /* |
@@ -354,10 +353,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
354 | if (likely(regs->eflags & X86_EFLAGS_IF)) | 353 | if (likely(regs->eflags & X86_EFLAGS_IF)) |
355 | local_irq_enable(); | 354 | local_irq_enable(); |
356 | 355 | ||
357 | if (unlikely(page_fault_trace)) | ||
358 | printk("pagefault rip:%lx rsp:%lx cs:%lu ss:%lu address %lx error %lx\n", | ||
359 | regs->rip,regs->rsp,regs->cs,regs->ss,address,error_code); | ||
360 | |||
361 | if (unlikely(error_code & PF_RSVD)) | 356 | if (unlikely(error_code & PF_RSVD)) |
362 | pgtable_bad(address, regs, error_code); | 357 | pgtable_bad(address, regs, error_code); |
363 | 358 | ||
@@ -378,7 +373,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
378 | again: | 373 | again: |
379 | /* When running in the kernel we expect faults to occur only to | 374 | /* When running in the kernel we expect faults to occur only to |
380 | * addresses in user space. All other faults represent errors in the | 375 | * addresses in user space. All other faults represent errors in the |
381 | * kernel and should generate an OOPS. Unfortunatly, in the case of an | 376 | * kernel and should generate an OOPS. Unfortunately, in the case of an |
382 | * erroneous fault occurring in a code path which already holds mmap_sem | 377 | * erroneous fault occurring in a code path which already holds mmap_sem |
383 | * we will deadlock attempting to validate the fault against the | 378 | * we will deadlock attempting to validate the fault against the |
384 | * address space. Luckily the kernel only validly references user | 379 | * address space. Luckily the kernel only validly references user |
@@ -386,7 +381,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
386 | * exceptions table. | 381 | * exceptions table. |
387 | * | 382 | * |
388 | * As the vast majority of faults will be valid we will only perform | 383 | * As the vast majority of faults will be valid we will only perform |
389 | * the source reference check when there is a possibilty of a deadlock. | 384 | * the source reference check when there is a possibility of a deadlock. |
390 | * Attempt to lock the address space, if we cannot we then validate the | 385 | * Attempt to lock the address space, if we cannot we then validate the |
391 | * source. If this is invalid we can skip the address space check, | 386 | * source. If this is invalid we can skip the address space check, |
392 | * thus avoiding the deadlock. | 387 | * thus avoiding the deadlock. |
@@ -488,7 +483,7 @@ bad_area_nosemaphore: | |||
488 | if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && | 483 | if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && |
489 | printk_ratelimit()) { | 484 | printk_ratelimit()) { |
490 | printk( | 485 | printk( |
491 | "%s%s[%d]: segfault at %016lx rip %016lx rsp %016lx error %lx\n", | 486 | "%s%s[%d]: segfault at %lx rip %lx rsp %lx error %lx\n", |
492 | tsk->pid > 1 ? KERN_INFO : KERN_EMERG, | 487 | tsk->pid > 1 ? KERN_INFO : KERN_EMERG, |
493 | tsk->comm, tsk->pid, address, regs->rip, | 488 | tsk->comm, tsk->pid, address, regs->rip, |
494 | regs->rsp, error_code); | 489 | regs->rsp, error_code); |
@@ -621,10 +616,3 @@ void vmalloc_sync_all(void) | |||
621 | BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) == | 616 | BUILD_BUG_ON(!(((MODULES_END - 1) & PGDIR_MASK) == |
622 | (__START_KERNEL & PGDIR_MASK))); | 617 | (__START_KERNEL & PGDIR_MASK))); |
623 | } | 618 | } |
624 | |||
625 | static int __init enable_pagefaulttrace(char *str) | ||
626 | { | ||
627 | page_fault_trace = 1; | ||
628 | return 1; | ||
629 | } | ||
630 | __setup("pagefaulttrace", enable_pagefaulttrace); | ||
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 5eec5e56d07f..3d6926ba8995 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -612,7 +612,7 @@ void __init init_cpu_to_node(void) | |||
612 | { | 612 | { |
613 | int i; | 613 | int i; |
614 | for (i = 0; i < NR_CPUS; i++) { | 614 | for (i = 0; i < NR_CPUS; i++) { |
615 | u8 apicid = x86_cpu_to_apicid[i]; | 615 | u8 apicid = x86_cpu_to_apicid_init[i]; |
616 | if (apicid == BAD_APICID) | 616 | if (apicid == BAD_APICID) |
617 | continue; | 617 | continue; |
618 | if (apicid_to_node[apicid] == NUMA_NO_NODE) | 618 | if (apicid_to_node[apicid] == NUMA_NO_NODE) |
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 56089ccc3949..ea85172fc0cc 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
@@ -218,7 +218,7 @@ static inline int save_add_info(void) {return 0;} | |||
218 | /* | 218 | /* |
219 | * Update nodes_add and decide if to include add are in the zone. | 219 | * Update nodes_add and decide if to include add are in the zone. |
220 | * Both SPARSE and RESERVE need nodes_add infomation. | 220 | * Both SPARSE and RESERVE need nodes_add infomation. |
221 | * This code supports one contigious hot add area per node. | 221 | * This code supports one contiguous hot add area per node. |
222 | */ | 222 | */ |
223 | static int reserve_hotadd(int node, unsigned long start, unsigned long end) | 223 | static int reserve_hotadd(int node, unsigned long start, unsigned long end) |
224 | { | 224 | { |
diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c index c049ce414f01..0ed046a187f7 100644 --- a/arch/x86/oprofile/backtrace.c +++ b/arch/x86/oprofile/backtrace.c | |||
@@ -13,25 +13,45 @@ | |||
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> |
15 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
16 | #include <asm/stacktrace.h> | ||
16 | 17 | ||
17 | struct frame_head { | 18 | static void backtrace_warning_symbol(void *data, char *msg, |
18 | struct frame_head * ebp; | 19 | unsigned long symbol) |
19 | unsigned long ret; | 20 | { |
20 | } __attribute__((packed)); | 21 | /* Ignore warnings */ |
22 | } | ||
21 | 23 | ||
22 | static struct frame_head * | 24 | static void backtrace_warning(void *data, char *msg) |
23 | dump_kernel_backtrace(struct frame_head * head) | ||
24 | { | 25 | { |
25 | oprofile_add_trace(head->ret); | 26 | /* Ignore warnings */ |
27 | } | ||
26 | 28 | ||
27 | /* frame pointers should strictly progress back up the stack | 29 | static int backtrace_stack(void *data, char *name) |
28 | * (towards higher addresses) */ | 30 | { |
29 | if (head >= head->ebp) | 31 | /* Yes, we want all stacks */ |
30 | return NULL; | 32 | return 0; |
33 | } | ||
34 | |||
35 | static void backtrace_address(void *data, unsigned long addr) | ||
36 | { | ||
37 | unsigned int *depth = data; | ||
31 | 38 | ||
32 | return head->ebp; | 39 | if ((*depth)--) |
40 | oprofile_add_trace(addr); | ||
33 | } | 41 | } |
34 | 42 | ||
43 | static struct stacktrace_ops backtrace_ops = { | ||
44 | .warning = backtrace_warning, | ||
45 | .warning_symbol = backtrace_warning_symbol, | ||
46 | .stack = backtrace_stack, | ||
47 | .address = backtrace_address, | ||
48 | }; | ||
49 | |||
50 | struct frame_head { | ||
51 | struct frame_head *ebp; | ||
52 | unsigned long ret; | ||
53 | } __attribute__((packed)); | ||
54 | |||
35 | static struct frame_head * | 55 | static struct frame_head * |
36 | dump_user_backtrace(struct frame_head * head) | 56 | dump_user_backtrace(struct frame_head * head) |
37 | { | 57 | { |
@@ -53,72 +73,16 @@ dump_user_backtrace(struct frame_head * head) | |||
53 | return bufhead[0].ebp; | 73 | return bufhead[0].ebp; |
54 | } | 74 | } |
55 | 75 | ||
56 | /* | ||
57 | * | | /\ Higher addresses | ||
58 | * | | | ||
59 | * --------------- stack base (address of current_thread_info) | ||
60 | * | thread info | | ||
61 | * . . | ||
62 | * | stack | | ||
63 | * --------------- saved regs->ebp value if valid (frame_head address) | ||
64 | * . . | ||
65 | * --------------- saved regs->rsp value if x86_64 | ||
66 | * | | | ||
67 | * --------------- struct pt_regs * stored on stack if 32-bit | ||
68 | * | | | ||
69 | * . . | ||
70 | * | | | ||
71 | * --------------- %esp | ||
72 | * | | | ||
73 | * | | \/ Lower addresses | ||
74 | * | ||
75 | * Thus, regs (or regs->rsp for x86_64) <-> stack base restricts the | ||
76 | * valid(ish) ebp values. Note: (1) for x86_64, NMI and several other | ||
77 | * exceptions use special stacks, maintained by the interrupt stack table | ||
78 | * (IST). These stacks are set up in trap_init() in | ||
79 | * arch/x86_64/kernel/traps.c. Thus, for x86_64, regs now does not point | ||
80 | * to the kernel stack; instead, it points to some location on the NMI | ||
81 | * stack. On the other hand, regs->rsp is the stack pointer saved when the | ||
82 | * NMI occurred. (2) For 32-bit, regs->esp is not valid because the | ||
83 | * processor does not save %esp on the kernel stack when interrupts occur | ||
84 | * in the kernel mode. | ||
85 | */ | ||
86 | #ifdef CONFIG_FRAME_POINTER | ||
87 | static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs) | ||
88 | { | ||
89 | unsigned long headaddr = (unsigned long)head; | ||
90 | #ifdef CONFIG_X86_64 | ||
91 | unsigned long stack = (unsigned long)regs->rsp; | ||
92 | #else | ||
93 | unsigned long stack = (unsigned long)regs; | ||
94 | #endif | ||
95 | unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE; | ||
96 | |||
97 | return headaddr > stack && headaddr < stack_base; | ||
98 | } | ||
99 | #else | ||
100 | /* without fp, it's just junk */ | ||
101 | static int valid_kernel_stack(struct frame_head * head, struct pt_regs * regs) | ||
102 | { | ||
103 | return 0; | ||
104 | } | ||
105 | #endif | ||
106 | |||
107 | |||
108 | void | 76 | void |
109 | x86_backtrace(struct pt_regs * const regs, unsigned int depth) | 77 | x86_backtrace(struct pt_regs * const regs, unsigned int depth) |
110 | { | 78 | { |
111 | struct frame_head *head; | 79 | struct frame_head *head = (struct frame_head *)frame_pointer(regs); |
112 | 80 | unsigned long stack = stack_pointer(regs); | |
113 | #ifdef CONFIG_X86_64 | ||
114 | head = (struct frame_head *)regs->rbp; | ||
115 | #else | ||
116 | head = (struct frame_head *)regs->ebp; | ||
117 | #endif | ||
118 | 81 | ||
119 | if (!user_mode_vm(regs)) { | 82 | if (!user_mode_vm(regs)) { |
120 | while (depth-- && valid_kernel_stack(head, regs)) | 83 | if (depth) |
121 | head = dump_kernel_backtrace(head); | 84 | dump_trace(NULL, regs, (unsigned long *)stack, |
85 | &backtrace_ops, &depth); | ||
122 | return; | 86 | return; |
123 | } | 87 | } |
124 | 88 | ||
diff --git a/arch/x86/oprofile/op_x86_model.h b/arch/x86/oprofile/op_x86_model.h index abb1aa95b979..45b605fa71d0 100644 --- a/arch/x86/oprofile/op_x86_model.h +++ b/arch/x86/oprofile/op_x86_model.h | |||
@@ -29,7 +29,7 @@ struct op_msrs { | |||
29 | struct pt_regs; | 29 | struct pt_regs; |
30 | 30 | ||
31 | /* The model vtable abstracts the differences between | 31 | /* The model vtable abstracts the differences between |
32 | * various x86 CPU model's perfctr support. | 32 | * various x86 CPU models' perfctr support. |
33 | */ | 33 | */ |
34 | struct op_x86_model_spec { | 34 | struct op_x86_model_spec { |
35 | unsigned int const num_counters; | 35 | unsigned int const num_counters; |
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index c52150fdf82b..88d8f5c0ecb5 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -169,7 +169,7 @@ void eisa_set_level_irq(unsigned int irq) | |||
169 | } | 169 | } |
170 | 170 | ||
171 | /* | 171 | /* |
172 | * Common IRQ routing practice: nybbles in config space, | 172 | * Common IRQ routing practice: nibbles in config space, |
173 | * offset by some magic constant. | 173 | * offset by some magic constant. |
174 | */ | 174 | */ |
175 | static unsigned int read_config_nybble(struct pci_dev *router, unsigned offset, unsigned nr) | 175 | static unsigned int read_config_nybble(struct pci_dev *router, unsigned offset, unsigned nr) |
@@ -585,7 +585,7 @@ static __init int via_router_probe(struct irq_router *r, | |||
585 | /* FIXME: We should move some of the quirk fixup stuff here */ | 585 | /* FIXME: We should move some of the quirk fixup stuff here */ |
586 | 586 | ||
587 | /* | 587 | /* |
588 | * work arounds for some buggy BIOSes | 588 | * workarounds for some buggy BIOSes |
589 | */ | 589 | */ |
590 | if (device == PCI_DEVICE_ID_VIA_82C586_0) { | 590 | if (device == PCI_DEVICE_ID_VIA_82C586_0) { |
591 | switch(router->device) { | 591 | switch(router->device) { |
diff --git a/arch/x86_64/.gitignore b/arch/x86_64/.gitignore new file mode 100644 index 000000000000..36ef4c374d25 --- /dev/null +++ b/arch/x86_64/.gitignore | |||
@@ -0,0 +1 @@ | |||
boot | |||
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 25785b23df87..aab25f3ba3ce 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -723,7 +723,7 @@ config ARCH_HIBERNATION_HEADER | |||
723 | 723 | ||
724 | source "drivers/acpi/Kconfig" | 724 | source "drivers/acpi/Kconfig" |
725 | 725 | ||
726 | source "arch/x86/kernel/cpufreq/Kconfig" | 726 | source "arch/x86/kernel/cpu/cpufreq/Kconfig_64" |
727 | 727 | ||
728 | source "drivers/cpuidle/Kconfig" | 728 | source "drivers/cpuidle/Kconfig" |
729 | 729 | ||
@@ -768,9 +768,9 @@ source "fs/Kconfig.binfmt" | |||
768 | config IA32_EMULATION | 768 | config IA32_EMULATION |
769 | bool "IA32 Emulation" | 769 | bool "IA32 Emulation" |
770 | help | 770 | help |
771 | Include code to run 32-bit programs under a 64-bit kernel. You should likely | 771 | Include code to run 32-bit programs under a 64-bit kernel. You should |
772 | turn this on, unless you're 100% sure that you don't have any 32-bit programs | 772 | likely turn this on, unless you're 100% sure that you don't have any |
773 | left. | 773 | 32-bit programs left. |
774 | 774 | ||
775 | config IA32_AOUT | 775 | config IA32_AOUT |
776 | tristate "IA32 a.out support" | 776 | tristate "IA32 a.out support" |
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 03e1ede27b85..6d89ab762ffc 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -74,7 +74,7 @@ KBUILD_CFLAGS += $(cflags-y) | |||
74 | CFLAGS_KERNEL += $(cflags-kernel-y) | 74 | CFLAGS_KERNEL += $(cflags-kernel-y) |
75 | KBUILD_AFLAGS += -m64 | 75 | KBUILD_AFLAGS += -m64 |
76 | 76 | ||
77 | head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task_64.o | 77 | head-y := arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/init_task.o |
78 | 78 | ||
79 | libs-y += arch/x86/lib/ | 79 | libs-y += arch/x86/lib/ |
80 | core-y += arch/x86/kernel/ \ | 80 | core-y += arch/x86/kernel/ \ |
@@ -97,9 +97,9 @@ BOOTIMAGE := arch/x86/boot/bzImage | |||
97 | KBUILD_IMAGE := $(BOOTIMAGE) | 97 | KBUILD_IMAGE := $(BOOTIMAGE) |
98 | 98 | ||
99 | bzImage: vmlinux | 99 | bzImage: vmlinux |
100 | $(Q)mkdir -p $(objtree)/arch/x86_64/boot | ||
101 | $(Q)ln -fsn $(objtree)/arch/x86/boot/bzImage $(objtree)/arch/x86_64/boot/bzImage | ||
102 | $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE) | 100 | $(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE) |
101 | $(Q)mkdir -p $(objtree)/arch/x86_64/boot | ||
102 | $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/x86_64/boot/bzImage | ||
103 | 103 | ||
104 | bzlilo: vmlinux | 104 | bzlilo: vmlinux |
105 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zlilo | 105 | $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zlilo |
diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c index f09962fa98c0..b61fb36674e7 100644 --- a/arch/xtensa/platform-iss/network.c +++ b/arch/xtensa/platform-iss/network.c | |||
@@ -798,7 +798,7 @@ static int iss_net_setup(char *str) | |||
798 | 798 | ||
799 | #undef ERR | 799 | #undef ERR |
800 | 800 | ||
801 | __setup("eth", iss_net_setup); | 801 | __setup("eth=", iss_net_setup); |
802 | 802 | ||
803 | /* | 803 | /* |
804 | * Initialize all ISS Ethernet devices previously registered in iss_net_setup. | 804 | * Initialize all ISS Ethernet devices previously registered in iss_net_setup. |
diff --git a/block/elevator.c b/block/elevator.c index 952aee04a68a..446aea2a3cfb 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -390,7 +390,7 @@ EXPORT_SYMBOL(elv_rb_find); | |||
390 | 390 | ||
391 | /* | 391 | /* |
392 | * Insert rq into dispatch queue of q. Queue lock must be held on | 392 | * Insert rq into dispatch queue of q. Queue lock must be held on |
393 | * entry. rq is sort insted into the dispatch queue. To be used by | 393 | * entry. rq is sort instead into the dispatch queue. To be used by |
394 | * specific elevators. | 394 | * specific elevators. |
395 | */ | 395 | */ |
396 | void elv_dispatch_sort(struct request_queue *q, struct request *rq) | 396 | void elv_dispatch_sort(struct request_queue *q, struct request *rq) |
diff --git a/crypto/api.c b/crypto/api.c index 4ccc5af6c265..1f5c72477356 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au> | 6 | * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au> |
7 | * | 7 | * |
8 | * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no> | 8 | * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no> |
9 | * and Nettle, by Niels Möller. | 9 | * and Nettle, by Niels Möller. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify it | 11 | * This program is free software; you can redistribute it and/or modify it |
12 | * under the terms of the GNU General Public License as published by the Free | 12 | * under the terms of the GNU General Public License as published by the Free |
diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c index 9c2bb535b09a..d161949fdb94 100644 --- a/crypto/fcrypt.c +++ b/crypto/fcrypt.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * | 10 | * |
11 | * Based on code: | 11 | * Based on code: |
12 | * | 12 | * |
13 | * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan | 13 | * Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan |
14 | * (Royal Institute of Technology, Stockholm, Sweden). | 14 | * (Royal Institute of Technology, Stockholm, Sweden). |
15 | * All rights reserved. | 15 | * All rights reserved. |
16 | * | 16 | * |
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index b83389145f28..5d0e26a5c34c 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -52,7 +52,7 @@ config ACPI_PROCFS | |||
52 | depends on PROC_FS | 52 | depends on PROC_FS |
53 | ---help--- | 53 | ---help--- |
54 | For backwards compatibility, this option allows | 54 | For backwards compatibility, this option allows |
55 | depricated /proc/acpi/ files to exist, even when | 55 | deprecated /proc/acpi/ files to exist, even when |
56 | they have been replaced by functions in /sys. | 56 | they have been replaced by functions in /sys. |
57 | The deprecated files (and their replacements) include: | 57 | The deprecated files (and their replacements) include: |
58 | 58 | ||
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index a7351084f2f8..235a51e328c3 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -422,12 +422,6 @@ static int map_lsapic_id(struct acpi_subtable_header *entry, | |||
422 | return 0; | 422 | return 0; |
423 | } | 423 | } |
424 | 424 | ||
425 | #ifdef CONFIG_IA64 | ||
426 | #define arch_cpu_to_apicid ia64_cpu_to_sapicid | ||
427 | #else | ||
428 | #define arch_cpu_to_apicid x86_cpu_to_apicid | ||
429 | #endif | ||
430 | |||
431 | static int map_madt_entry(u32 acpi_id) | 425 | static int map_madt_entry(u32 acpi_id) |
432 | { | 426 | { |
433 | unsigned long madt_end, entry; | 427 | unsigned long madt_end, entry; |
@@ -501,7 +495,7 @@ static int get_cpu_id(acpi_handle handle, u32 acpi_id) | |||
501 | return apic_id; | 495 | return apic_id; |
502 | 496 | ||
503 | for (i = 0; i < NR_CPUS; ++i) { | 497 | for (i = 0; i < NR_CPUS; ++i) { |
504 | if (arch_cpu_to_apicid[i] == apic_id) | 498 | if (cpu_physical_id(i) == apic_id) |
505 | return i; | 499 | return i; |
506 | } | 500 | } |
507 | return -1; | 501 | return -1; |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 10bc3f64c453..47c806040524 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -1479,7 +1479,7 @@ static void ahci_port_intr(struct ata_port *ap) | |||
1479 | return; | 1479 | return; |
1480 | } | 1480 | } |
1481 | 1481 | ||
1482 | /* hmmm... a spurious interupt */ | 1482 | /* hmmm... a spurious interrupt */ |
1483 | 1483 | ||
1484 | /* if !NCQ, ignore. No modern ATA device has broken HSM | 1484 | /* if !NCQ, ignore. No modern ATA device has broken HSM |
1485 | * implementation for non-NCQ commands. | 1485 | * implementation for non-NCQ commands. |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index bbaa545ea999..629eadbd0ec0 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1392,7 +1392,7 @@ static void ata_qc_complete_internal(struct ata_queued_cmd *qc) | |||
1392 | * @tf: Taskfile registers for the command and the result | 1392 | * @tf: Taskfile registers for the command and the result |
1393 | * @cdb: CDB for packet command | 1393 | * @cdb: CDB for packet command |
1394 | * @dma_dir: Data tranfer direction of the command | 1394 | * @dma_dir: Data tranfer direction of the command |
1395 | * @sg: sg list for the data buffer of the command | 1395 | * @sgl: sg list for the data buffer of the command |
1396 | * @n_elem: Number of sg entries | 1396 | * @n_elem: Number of sg entries |
1397 | * @timeout: Timeout in msecs (0 for default) | 1397 | * @timeout: Timeout in msecs (0 for default) |
1398 | * | 1398 | * |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index f9e4cd527942..8227c45109ec 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -856,7 +856,7 @@ err_out: | |||
856 | * @pdev: PCI device | 856 | * @pdev: PCI device |
857 | * | 857 | * |
858 | * Some PCI ATA devices report simplex mode but in fact can be told to | 858 | * Some PCI ATA devices report simplex mode but in fact can be told to |
859 | * enter non simplex mode. This implements the neccessary logic to | 859 | * enter non simplex mode. This implements the necessary logic to |
860 | * perform the task on such devices. Calling it on other devices will | 860 | * perform the task on such devices. Calling it on other devices will |
861 | * have -undefined- behaviour. | 861 | * have -undefined- behaviour. |
862 | */ | 862 | */ |
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index 9e412c26b2a3..7acbbd9ee469 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c | |||
@@ -215,7 +215,7 @@ static void cmd64x_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
215 | regU &= ~(0x05 << adev->devno); | 215 | regU &= ~(0x05 << adev->devno); |
216 | 216 | ||
217 | if (adev->dma_mode >= XFER_UDMA_0) { | 217 | if (adev->dma_mode >= XFER_UDMA_0) { |
218 | /* Merge thge timing value */ | 218 | /* Merge the timing value */ |
219 | regU |= udma_data[adev->dma_mode - XFER_UDMA_0] << shift; | 219 | regU |= udma_data[adev->dma_mode - XFER_UDMA_0] << shift; |
220 | /* Merge the control bits */ | 220 | /* Merge the control bits */ |
221 | regU |= 1 << adev->devno; /* UDMA on */ | 221 | regU |= 1 << adev->devno; /* UDMA on */ |
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c index 57e827e4109e..e1818fdd9159 100644 --- a/drivers/ata/pata_cs5530.c +++ b/drivers/ata/pata_cs5530.c | |||
@@ -138,7 +138,7 @@ static void cs5530_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
138 | * | 138 | * |
139 | * Called when the libata layer is about to issue a command. We wrap | 139 | * Called when the libata layer is about to issue a command. We wrap |
140 | * this interface so that we can load the correct ATA timings if | 140 | * this interface so that we can load the correct ATA timings if |
141 | * neccessary. Specifically we have a problem that there is only | 141 | * necessary. Specifically we have a problem that there is only |
142 | * one MWDMA/UDMA bit. | 142 | * one MWDMA/UDMA bit. |
143 | */ | 143 | */ |
144 | 144 | ||
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c index 3578593a882b..01324530d052 100644 --- a/drivers/ata/pata_cs5535.c +++ b/drivers/ata/pata_cs5535.c | |||
@@ -25,7 +25,7 @@ | |||
25 | * Documentation: | 25 | * Documentation: |
26 | * Available from AMD web site. | 26 | * Available from AMD web site. |
27 | * TODO | 27 | * TODO |
28 | * Review errata to see if serializing is neccessary | 28 | * Review errata to see if serializing is necessary |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index 53070f6b1fc4..d753e568588e 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/msr.h> | 40 | #include <asm/msr.h> |
41 | 41 | ||
42 | #define DRV_NAME "pata_cs5536" | 42 | #define DRV_NAME "pata_cs5536" |
43 | #define DRV_VERSION "0.0.5" | 43 | #define DRV_VERSION "0.0.6" |
44 | 44 | ||
45 | enum { | 45 | enum { |
46 | CFG = 0, | 46 | CFG = 0, |
@@ -214,7 +214,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
214 | cs5536_read(pdev, DTC, &dtc); | 214 | cs5536_read(pdev, DTC, &dtc); |
215 | 215 | ||
216 | dtc &= ~(IDE_DRV_MASK << dshift); | 216 | dtc &= ~(IDE_DRV_MASK << dshift); |
217 | dtc |= mwdma_timings[mode] << dshift; | 217 | dtc |= mwdma_timings[mode - XFER_MW_DMA_0] << dshift; |
218 | 218 | ||
219 | cs5536_write(pdev, DTC, dtc); | 219 | cs5536_write(pdev, DTC, dtc); |
220 | } | 220 | } |
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index 988ef736b936..ca9aae09daed 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c | |||
@@ -105,7 +105,7 @@ struct it821x_dev | |||
105 | 105 | ||
106 | /* | 106 | /* |
107 | * We allow users to force the card into non raid mode without | 107 | * We allow users to force the card into non raid mode without |
108 | * flashing the alternative BIOS. This is also neccessary right now | 108 | * flashing the alternative BIOS. This is also necessary right now |
109 | * for embedded platforms that cannot run a PC BIOS but are using this | 109 | * for embedded platforms that cannot run a PC BIOS but are using this |
110 | * device. | 110 | * device. |
111 | */ | 111 | */ |
@@ -383,7 +383,7 @@ static void it821x_passthru_bmdma_stop(struct ata_queued_cmd *qc) | |||
383 | * @ap: ATA port | 383 | * @ap: ATA port |
384 | * @device: Device number (not pointer) | 384 | * @device: Device number (not pointer) |
385 | * | 385 | * |
386 | * Device selection hook. If neccessary perform clock switching | 386 | * Device selection hook. If necessary perform clock switching |
387 | */ | 387 | */ |
388 | 388 | ||
389 | static void it821x_passthru_dev_select(struct ata_port *ap, | 389 | static void it821x_passthru_dev_select(struct ata_port *ap, |
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c index d5483087a3fa..c0d9e0cf208c 100644 --- a/drivers/ata/pata_mpiix.c +++ b/drivers/ata/pata_mpiix.c | |||
@@ -129,7 +129,7 @@ static void mpiix_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
129 | * | 129 | * |
130 | * Called when the libata layer is about to issue a command. We wrap | 130 | * Called when the libata layer is about to issue a command. We wrap |
131 | * this interface so that we can load the correct ATA timings if | 131 | * this interface so that we can load the correct ATA timings if |
132 | * neccessary. Our logic also clears TIME0/TIME1 for the other device so | 132 | * necessary. Our logic also clears TIME0/TIME1 for the other device so |
133 | * that, even if we get this wrong, cycles to the other device will | 133 | * that, even if we get this wrong, cycles to the other device will |
134 | * be made PIO0. | 134 | * be made PIO0. |
135 | */ | 135 | */ |
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c index 6e8e55745b7b..9fe66fd75017 100644 --- a/drivers/ata/pata_ns87410.c +++ b/drivers/ata/pata_ns87410.c | |||
@@ -124,7 +124,7 @@ static void ns87410_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
124 | * | 124 | * |
125 | * Called when the libata layer is about to issue a command. We wrap | 125 | * Called when the libata layer is about to issue a command. We wrap |
126 | * this interface so that we can load the correct ATA timings if | 126 | * this interface so that we can load the correct ATA timings if |
127 | * neccessary. | 127 | * necessary. |
128 | */ | 128 | */ |
129 | 129 | ||
130 | static unsigned int ns87410_qc_issue_prot(struct ata_queued_cmd *qc) | 130 | static unsigned int ns87410_qc_issue_prot(struct ata_queued_cmd *qc) |
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c index 3cd5eb2b6c91..44da09ace52c 100644 --- a/drivers/ata/pata_oldpiix.c +++ b/drivers/ata/pata_oldpiix.c | |||
@@ -200,7 +200,7 @@ static void oldpiix_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
200 | * | 200 | * |
201 | * Called when the libata layer is about to issue a command. We wrap | 201 | * Called when the libata layer is about to issue a command. We wrap |
202 | * this interface so that we can load the correct ATA timings if | 202 | * this interface so that we can load the correct ATA timings if |
203 | * neccessary. Our logic also clears TIME0/TIME1 for the other device so | 203 | * necessary. Our logic also clears TIME0/TIME1 for the other device so |
204 | * that, even if we get this wrong, cycles to the other device will | 204 | * that, even if we get this wrong, cycles to the other device will |
205 | * be made PIO0. | 205 | * be made PIO0. |
206 | */ | 206 | */ |
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c index d5b76497f4a2..8109b08fc024 100644 --- a/drivers/ata/pata_radisys.c +++ b/drivers/ata/pata_radisys.c | |||
@@ -161,7 +161,7 @@ static void radisys_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
161 | * | 161 | * |
162 | * Called when the libata layer is about to issue a command. We wrap | 162 | * Called when the libata layer is about to issue a command. We wrap |
163 | * this interface so that we can load the correct ATA timings if | 163 | * this interface so that we can load the correct ATA timings if |
164 | * neccessary. Our logic also clears TIME0/TIME1 for the other device so | 164 | * necessary. Our logic also clears TIME0/TIME1 for the other device so |
165 | * that, even if we get this wrong, cycles to the other device will | 165 | * that, even if we get this wrong, cycles to the other device will |
166 | * be made PIO0. | 166 | * be made PIO0. |
167 | */ | 167 | */ |
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c index 21ebc485ca4b..725a8586cd6e 100644 --- a/drivers/ata/pata_sc1200.c +++ b/drivers/ata/pata_sc1200.c | |||
@@ -156,7 +156,7 @@ static void sc1200_set_dmamode(struct ata_port *ap, struct ata_device *adev) | |||
156 | * | 156 | * |
157 | * Called when the libata layer is about to issue a command. We wrap | 157 | * Called when the libata layer is about to issue a command. We wrap |
158 | * this interface so that we can load the correct ATA timings if | 158 | * this interface so that we can load the correct ATA timings if |
159 | * neccessary. Specifically we have a problem that there is only | 159 | * necessary. Specifically we have a problem that there is only |
160 | * one MWDMA/UDMA bit. | 160 | * one MWDMA/UDMA bit. |
161 | */ | 161 | */ |
162 | 162 | ||
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 4dc2e73298fd..5c1e9cb59ecb 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * | 16 | * |
17 | * If you have strange problems with nVidia chipset systems please | 17 | * If you have strange problems with nVidia chipset systems please |
18 | * see the SI support documentation and update your system BIOS | 18 | * see the SI support documentation and update your system BIOS |
19 | * if neccessary | 19 | * if necessary |
20 | * | 20 | * |
21 | * TODO | 21 | * TODO |
22 | * If we know all our devices are LBA28 (or LBA28 sized) we could use | 22 | * If we know all our devices are LBA28 (or LBA28 sized) we could use |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 5d41b6612d7f..ea7a9a652e61 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -420,7 +420,7 @@ static struct ata_port_operations via_port_ops_noirq = { | |||
420 | * @pdev: PCI device | 420 | * @pdev: PCI device |
421 | * @flags: configuration flags | 421 | * @flags: configuration flags |
422 | * | 422 | * |
423 | * Set the FIFO properties for this device if neccessary. Used both on | 423 | * Set the FIFO properties for this device if necessary. Used both on |
424 | * set up and on and the resume path | 424 | * set up and on and the resume path |
425 | */ | 425 | */ |
426 | 426 | ||
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index 8d98a9fb0a42..f147dc7bf464 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c | |||
@@ -92,7 +92,7 @@ static struct scsi_host_template sis_sht = { | |||
92 | .queuecommand = ata_scsi_queuecmd, | 92 | .queuecommand = ata_scsi_queuecmd, |
93 | .can_queue = ATA_DEF_QUEUE, | 93 | .can_queue = ATA_DEF_QUEUE, |
94 | .this_id = ATA_SHT_THIS_ID, | 94 | .this_id = ATA_SHT_THIS_ID, |
95 | .sg_tablesize = ATA_MAX_PRD, | 95 | .sg_tablesize = LIBATA_MAX_PRD, |
96 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 96 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
97 | .emulated = ATA_SHT_EMULATED, | 97 | .emulated = ATA_SHT_EMULATED, |
98 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 98 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
@@ -166,11 +166,11 @@ static unsigned int get_scr_cfg_addr(struct ata_port *ap, unsigned int sc_reg) | |||
166 | return addr; | 166 | return addr; |
167 | } | 167 | } |
168 | 168 | ||
169 | static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg) | 169 | static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg, u32 *val) |
170 | { | 170 | { |
171 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 171 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
172 | unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg); | 172 | unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg); |
173 | u32 val, val2 = 0; | 173 | u32 val2 = 0; |
174 | u8 pmr; | 174 | u8 pmr; |
175 | 175 | ||
176 | if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */ | 176 | if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */ |
@@ -178,13 +178,16 @@ static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg) | |||
178 | 178 | ||
179 | pci_read_config_byte(pdev, SIS_PMR, &pmr); | 179 | pci_read_config_byte(pdev, SIS_PMR, &pmr); |
180 | 180 | ||
181 | pci_read_config_dword(pdev, cfg_addr, &val); | 181 | pci_read_config_dword(pdev, cfg_addr, val); |
182 | 182 | ||
183 | if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || | 183 | if ((pdev->device == 0x0182) || (pdev->device == 0x0183) || |
184 | (pdev->device == 0x1182) || (pmr & SIS_PMR_COMBINED)) | 184 | (pdev->device == 0x1182) || (pmr & SIS_PMR_COMBINED)) |
185 | pci_read_config_dword(pdev, cfg_addr+0x10, &val2); | 185 | pci_read_config_dword(pdev, cfg_addr+0x10, &val2); |
186 | 186 | ||
187 | return (val|val2) & 0xfffffffb; /* avoid problems with powerdowned ports */ | 187 | *val |= val2; |
188 | *val &= 0xfffffffb; /* avoid problems with powerdowned ports */ | ||
189 | |||
190 | return 0; | ||
188 | } | 191 | } |
189 | 192 | ||
190 | static void sis_scr_cfg_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | 193 | static void sis_scr_cfg_write (struct ata_port *ap, unsigned int sc_reg, u32 val) |
@@ -214,7 +217,7 @@ static int sis_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val) | |||
214 | return -EINVAL; | 217 | return -EINVAL; |
215 | 218 | ||
216 | if (ap->flags & SIS_FLAG_CFGSCR) | 219 | if (ap->flags & SIS_FLAG_CFGSCR) |
217 | return sis_scr_cfg_read(ap, sc_reg); | 220 | return sis_scr_cfg_read(ap, sc_reg, val); |
218 | 221 | ||
219 | pci_read_config_byte(pdev, SIS_PMR, &pmr); | 222 | pci_read_config_byte(pdev, SIS_PMR, &pmr); |
220 | 223 | ||
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 94ebc9dc40fd..f8f7139c07c1 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -1596,7 +1596,7 @@ static irqreturn_t fs_irq (int irq, void *dev_id) | |||
1596 | 1596 | ||
1597 | /* print the bits in the ISR register. */ | 1597 | /* print the bits in the ISR register. */ |
1598 | if (fs_debug & FS_DEBUG_IRQ) { | 1598 | if (fs_debug & FS_DEBUG_IRQ) { |
1599 | /* The FS_DEBUG things are unneccesary here. But this way it is | 1599 | /* The FS_DEBUG things are unnecessary here. But this way it is |
1600 | clear for grep that these are debug prints. */ | 1600 | clear for grep that these are debug prints. */ |
1601 | fs_dprintk (FS_DEBUG_IRQ, "IRQ status:"); | 1601 | fs_dprintk (FS_DEBUG_IRQ, "IRQ status:"); |
1602 | for (i=0;i<27;i++) | 1602 | for (i=0;i<27;i++) |
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index ca4d7f0d09b7..ce4b1e484e64 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig | |||
@@ -204,23 +204,6 @@ config BLK_DEV_COW_COMMON | |||
204 | bool | 204 | bool |
205 | default BLK_DEV_UBD | 205 | default BLK_DEV_UBD |
206 | 206 | ||
207 | config MMAPPER | ||
208 | tristate "Example IO memory driver (BROKEN)" | ||
209 | depends on UML && BROKEN | ||
210 | ---help--- | ||
211 | The User-Mode Linux port can provide support for IO Memory | ||
212 | emulation with this option. This allows a host file to be | ||
213 | specified as an I/O region on the kernel command line. That file | ||
214 | will be mapped into UML's kernel address space where a driver can | ||
215 | locate it and do whatever it wants with the memory, including | ||
216 | providing an interface to it for UML processes to use. | ||
217 | |||
218 | For more information, see | ||
219 | <http://user-mode-linux.sourceforge.net/iomem.html>. | ||
220 | |||
221 | If you'd like to be able to provide a simulated IO port space for | ||
222 | User-Mode Linux processes, say Y. If unsure, say N. | ||
223 | |||
224 | config BLK_DEV_LOOP | 207 | config BLK_DEV_LOOP |
225 | tristate "Loopback device support" | 208 | tristate "Loopback device support" |
226 | ---help--- | 209 | ---help--- |
@@ -351,7 +334,7 @@ config BLK_DEV_RAM_COUNT | |||
351 | default "16" | 334 | default "16" |
352 | depends on BLK_DEV_RAM | 335 | depends on BLK_DEV_RAM |
353 | help | 336 | help |
354 | The default value is 16 RAM disks. Change this if you know what | 337 | The default value is 16 RAM disks. Change this if you know what you |
355 | are doing. If you boot from a filesystem that needs to be extracted | 338 | are doing. If you boot from a filesystem that needs to be extracted |
356 | in memory, you will need at least one RAM disk (e.g. root on cramfs). | 339 | in memory, you will need at least one RAM disk (e.g. root on cramfs). |
357 | 340 | ||
@@ -361,7 +344,7 @@ config BLK_DEV_RAM_SIZE | |||
361 | default "4096" | 344 | default "4096" |
362 | help | 345 | help |
363 | The default value is 4096 kilobytes. Only change this if you know | 346 | The default value is 4096 kilobytes. Only change this if you know |
364 | what are you doing. | 347 | what you are doing. |
365 | 348 | ||
366 | config BLK_DEV_RAM_BLOCKSIZE | 349 | config BLK_DEV_RAM_BLOCKSIZE |
367 | int "Default RAM disk block size (bytes)" | 350 | int "Default RAM disk block size (bytes)" |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 589cbbd9cd4f..56e23042728a 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -29,7 +29,7 @@ | |||
29 | * | 29 | * |
30 | * Maximum number of loop devices when compiled-in now selectable by passing | 30 | * Maximum number of loop devices when compiled-in now selectable by passing |
31 | * max_loop=<1-255> to the kernel on boot. | 31 | * max_loop=<1-255> to the kernel on boot. |
32 | * Erik I. Bolsø, <eriki@himolde.no>, Oct 31, 1999 | 32 | * Erik I. Bolsø, <eriki@himolde.no>, Oct 31, 1999 |
33 | * | 33 | * |
34 | * Completely rewrite request handling to be make_request_fn style and | 34 | * Completely rewrite request handling to be make_request_fn style and |
35 | * non blocking, pushing work to a helper thread. Lots of fixes from | 35 | * non blocking, pushing work to a helper thread. Lots of fixes from |
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index ac4a0cb217ab..6332acad078c 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -508,7 +508,6 @@ error_out: | |||
508 | nbd_end_request(req); | 508 | nbd_end_request(req); |
509 | spin_lock(q->queue_lock); | 509 | spin_lock(q->queue_lock); |
510 | } | 510 | } |
511 | return; | ||
512 | } | 511 | } |
513 | 512 | ||
514 | static int nbd_ioctl(struct inode *inode, struct file *file, | 513 | static int nbd_ioctl(struct inode *inode, struct file *file, |
diff --git a/drivers/block/rd.c b/drivers/block/rd.c index 08176d23a46c..47f8ac6cce57 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c | |||
@@ -365,7 +365,7 @@ static int rd_open(struct inode *inode, struct file *filp) | |||
365 | /* | 365 | /* |
366 | * Deep badness. rd_blkdev_pagecache_IO() needs to allocate | 366 | * Deep badness. rd_blkdev_pagecache_IO() needs to allocate |
367 | * pagecache pages within a request_fn. We cannot recur back | 367 | * pagecache pages within a request_fn. We cannot recur back |
368 | * into the filesytem which is mounted atop the ramdisk, because | 368 | * into the filesystem which is mounted atop the ramdisk, because |
369 | * that would deadlock on fs locks. And we really don't want | 369 | * that would deadlock on fs locks. And we really don't want |
370 | * to reenter rd_blkdev_pagecache_IO when we're already within | 370 | * to reenter rd_blkdev_pagecache_IO when we're already within |
371 | * that function. | 371 | * that function. |
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index d15234c5965e..d1bd0f08a331 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -359,7 +359,7 @@ | |||
359 | * | 359 | * |
360 | * Revision 1.36.3.8 1996/06/07 16:29:00 bentson | 360 | * Revision 1.36.3.8 1996/06/07 16:29:00 bentson |
361 | * starting minor number at zero; added missing verify_area | 361 | * starting minor number at zero; added missing verify_area |
362 | * as noted by Heiko Eissfeldt <heiko@colossus.escape.de> | 362 | * as noted by Heiko Eißfeldt <heiko@colossus.escape.de> |
363 | * | 363 | * |
364 | * Revision 1.36.3.7 1996/04/19 21:06:18 bentson | 364 | * Revision 1.36.3.7 1996/04/19 21:06:18 bentson |
365 | * remove unneeded boot message & fix CLOCAL hardware flow | 365 | * remove unneeded boot message & fix CLOCAL hardware flow |
@@ -727,8 +727,6 @@ static struct tty_driver *cy_serial_driver; | |||
727 | driver to probe addresses at a different address, add it to | 727 | driver to probe addresses at a different address, add it to |
728 | this table. If the driver is probing some other board and | 728 | this table. If the driver is probing some other board and |
729 | causing problems, remove the offending address from this table. | 729 | causing problems, remove the offending address from this table. |
730 | The cy_setup function extracts additional addresses from the | ||
731 | boot options line. The form is "cyclades=address,address..." | ||
732 | */ | 730 | */ |
733 | 731 | ||
734 | static unsigned int cy_isa_addresses[] = { | 732 | static unsigned int cy_isa_addresses[] = { |
diff --git a/drivers/char/drm/drm_hashtab.c b/drivers/char/drm/drm_hashtab.c index 3ad319070704..4b8e7db5a232 100644 --- a/drivers/char/drm/drm_hashtab.c +++ b/drivers/char/drm/drm_hashtab.c | |||
@@ -29,7 +29,7 @@ | |||
29 | * Simple open hash tab implementation. | 29 | * Simple open hash tab implementation. |
30 | * | 30 | * |
31 | * Authors: | 31 | * Authors: |
32 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> | 32 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "drmP.h" | 35 | #include "drmP.h" |
diff --git a/drivers/char/drm/drm_hashtab.h b/drivers/char/drm/drm_hashtab.h index 0f1376774168..573e333ac457 100644 --- a/drivers/char/drm/drm_hashtab.h +++ b/drivers/char/drm/drm_hashtab.h | |||
@@ -29,7 +29,7 @@ | |||
29 | * Simple open hash tab implementation. | 29 | * Simple open hash tab implementation. |
30 | * | 30 | * |
31 | * Authors: | 31 | * Authors: |
32 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> | 32 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #ifndef DRM_HASHTAB_H | 35 | #ifndef DRM_HASHTAB_H |
diff --git a/drivers/char/drm/drm_mm.c b/drivers/char/drm/drm_mm.c index 3e6bc14f7441..86f4eb61a6a4 100644 --- a/drivers/char/drm/drm_mm.c +++ b/drivers/char/drm/drm_mm.c | |||
@@ -38,7 +38,7 @@ | |||
38 | * Aligned allocations can also see improvement. | 38 | * Aligned allocations can also see improvement. |
39 | * | 39 | * |
40 | * Authors: | 40 | * Authors: |
41 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> | 41 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> |
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "drmP.h" | 44 | #include "drmP.h" |
diff --git a/drivers/char/drm/drm_pci.c b/drivers/char/drm/drm_pci.c index e292bb0eaca2..b55d5bc6ea61 100644 --- a/drivers/char/drm/drm_pci.c +++ b/drivers/char/drm/drm_pci.c | |||
@@ -8,12 +8,12 @@ | |||
8 | * \todo Implement the remaining ioctl's for the PCI pools. | 8 | * \todo Implement the remaining ioctl's for the PCI pools. |
9 | * \todo The wrappers here are so thin that they would be better off inlined.. | 9 | * \todo The wrappers here are so thin that they would be better off inlined.. |
10 | * | 10 | * |
11 | * \author Jose Fonseca <jrfonseca@tungstengraphics.com> | 11 | * \author José Fonseca <jrfonseca@tungstengraphics.com> |
12 | * \author Leif Delgass <ldelgass@retinalburn.net> | 12 | * \author Leif Delgass <ldelgass@retinalburn.net> |
13 | */ | 13 | */ |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Copyright 2003 Jos�Fonseca. | 16 | * Copyright 2003 José Fonseca. |
17 | * Copyright 2003 Leif Delgass. | 17 | * Copyright 2003 Leif Delgass. |
18 | * All Rights Reserved. | 18 | * All Rights Reserved. |
19 | * | 19 | * |
diff --git a/drivers/char/drm/drm_sarea.h b/drivers/char/drm/drm_sarea.h index f5466966081e..e040f47f369f 100644 --- a/drivers/char/drm/drm_sarea.h +++ b/drivers/char/drm/drm_sarea.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * \file drm_sarea.h | 2 | * \file drm_sarea.h |
3 | * \brief SAREA definitions | 3 | * \brief SAREA definitions |
4 | * | 4 | * |
5 | * \author Michel Dänzer <michel@daenzer.net> | 5 | * \author Michel Dänzer <michel@daenzer.net> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | /* | 8 | /* |
diff --git a/drivers/char/drm/drm_sman.c b/drivers/char/drm/drm_sman.c index 8421a93946d8..926f146390ce 100644 --- a/drivers/char/drm/drm_sman.c +++ b/drivers/char/drm/drm_sman.c | |||
@@ -33,7 +33,7 @@ | |||
33 | * struct or a context identifier. | 33 | * struct or a context identifier. |
34 | * | 34 | * |
35 | * Authors: | 35 | * Authors: |
36 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> | 36 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "drm_sman.h" | 39 | #include "drm_sman.h" |
diff --git a/drivers/char/drm/drm_sman.h b/drivers/char/drm/drm_sman.h index 39a39fefeef1..08ecf83ad5d4 100644 --- a/drivers/char/drm/drm_sman.h +++ b/drivers/char/drm/drm_sman.h | |||
@@ -33,7 +33,7 @@ | |||
33 | * struct or a context identifier. | 33 | * struct or a context identifier. |
34 | * | 34 | * |
35 | * Authors: | 35 | * Authors: |
36 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> | 36 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #ifndef DRM_SMAN_H | 39 | #ifndef DRM_SMAN_H |
diff --git a/drivers/char/drm/r128_drv.h b/drivers/char/drm/r128_drv.h index 250d2aa46581..5041bd8dbed8 100644 --- a/drivers/char/drm/r128_drv.h +++ b/drivers/char/drm/r128_drv.h | |||
@@ -29,7 +29,7 @@ | |||
29 | * Rickard E. (Rik) Faith <faith@valinux.com> | 29 | * Rickard E. (Rik) Faith <faith@valinux.com> |
30 | * Kevin E. Martin <martin@valinux.com> | 30 | * Kevin E. Martin <martin@valinux.com> |
31 | * Gareth Hughes <gareth@valinux.com> | 31 | * Gareth Hughes <gareth@valinux.com> |
32 | * Michel D�zer <daenzerm@student.ethz.ch> | 32 | * Michel Dänzer <daenzerm@student.ethz.ch> |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #ifndef __R128_DRV_H__ | 35 | #ifndef __R128_DRV_H__ |
diff --git a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c index 2b2407ee490e..84f5bc36252b 100644 --- a/drivers/char/drm/radeon_irq.c +++ b/drivers/char/drm/radeon_irq.c | |||
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * Authors: | 28 | * Authors: |
29 | * Keith Whitwell <keith@tungstengraphics.com> | 29 | * Keith Whitwell <keith@tungstengraphics.com> |
30 | * Michel D�zer <michel@daenzer.net> | 30 | * Michel Dänzer <michel@daenzer.net> |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include "drmP.h" | 33 | #include "drmP.h" |
diff --git a/drivers/char/drm/radeon_state.c b/drivers/char/drm/radeon_state.c index 69c9f2febf43..f824f2f5fdc2 100644 --- a/drivers/char/drm/radeon_state.c +++ b/drivers/char/drm/radeon_state.c | |||
@@ -3005,7 +3005,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil | |||
3005 | /* | 3005 | /* |
3006 | * This ioctl() doesn't work on 64-bit platforms because hw_lock is a | 3006 | * This ioctl() doesn't work on 64-bit platforms because hw_lock is a |
3007 | * pointer which can't fit into an int-sized variable. According to | 3007 | * pointer which can't fit into an int-sized variable. According to |
3008 | * Michel Dänzer, the ioctl() is only used on embedded platforms, so | 3008 | * Michel Dänzer, the ioctl() is only used on embedded platforms, so |
3009 | * not supporting it shouldn't be a problem. If the same functionality | 3009 | * not supporting it shouldn't be a problem. If the same functionality |
3010 | * is needed on 64-bit platforms, a new ioctl() would have to be added, | 3010 | * is needed on 64-bit platforms, a new ioctl() would have to be added, |
3011 | * so backwards-compatibility for the embedded platforms can be | 3011 | * so backwards-compatibility for the embedded platforms can be |
diff --git a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c index 8c66838ff515..6be1c5757580 100644 --- a/drivers/char/drm/sis_mm.c +++ b/drivers/char/drm/sis_mm.c | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Authors: | 30 | * Authors: |
31 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> | 31 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include "drmP.h" | 34 | #include "drmP.h" |
diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c index 9afc1684348d..3ffbf8649833 100644 --- a/drivers/char/drm/via_mm.c +++ b/drivers/char/drm/via_mm.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | /* | 24 | /* |
25 | * Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com> | 25 | * Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com> |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "drmP.h" | 28 | #include "drmP.h" |
diff --git a/drivers/char/drm/via_verifier.h b/drivers/char/drm/via_verifier.h index 28b50296a7bd..d6f8214b69f5 100644 --- a/drivers/char/drm/via_verifier.h +++ b/drivers/char/drm/via_verifier.h | |||
@@ -20,7 +20,7 @@ | |||
20 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | * DEALINGS IN THE SOFTWARE. | 21 | * DEALINGS IN THE SOFTWARE. |
22 | * | 22 | * |
23 | * Author: Thomas Hellström 2004. | 23 | * Author: Thomas Hellström 2004. |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #ifndef _VIA_VERIFIER_H_ | 26 | #ifndef _VIA_VERIFIER_H_ |
diff --git a/drivers/char/esp.c b/drivers/char/esp.c index 0f8fb135da53..28607763ae64 100644 --- a/drivers/char/esp.c +++ b/drivers/char/esp.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * | 19 | * |
20 | * rs_set_termios fixed to look also for changes of the input | 20 | * rs_set_termios fixed to look also for changes of the input |
21 | * flags INPCK, BRKINT, PARMRK, IGNPAR and IGNBRK. | 21 | * flags INPCK, BRKINT, PARMRK, IGNPAR and IGNBRK. |
22 | * Bernd Anh�pl 05/17/96. | 22 | * Bernd Anhäupl 05/17/96. |
23 | * | 23 | * |
24 | * --- End of notices from serial.c --- | 24 | * --- End of notices from serial.c --- |
25 | * | 25 | * |
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index e13dd1892bfd..3f35a1c562b1 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * Mostly based on original driver: | 10 | * Mostly based on original driver: |
11 | * | 11 | * |
12 | * Copyright (C) 2005 Nokia Corporation | 12 | * Copyright (C) 2005 Nokia Corporation |
13 | * Author: Juha Yrj��<juha.yrjola@nokia.com> | 13 | * Author: Juha Yrjölä <juha.yrjola@nokia.com> |
14 | * | 14 | * |
15 | * This file is licensed under the terms of the GNU General Public | 15 | * This file is licensed under the terms of the GNU General Public |
16 | * License version 2. This program is licensed "as is" without any | 16 | * License version 2. This program is licensed "as is" without any |
diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c index cd406416effd..30e564516422 100644 --- a/drivers/char/i8k.c +++ b/drivers/char/i8k.c | |||
@@ -371,14 +371,14 @@ static int i8k_proc_show(struct seq_file *seq, void *offset) | |||
371 | int fn_key, cpu_temp, ac_power; | 371 | int fn_key, cpu_temp, ac_power; |
372 | int left_fan, right_fan, left_speed, right_speed; | 372 | int left_fan, right_fan, left_speed, right_speed; |
373 | 373 | ||
374 | cpu_temp = i8k_get_temp(0); /* 11100 µs */ | 374 | cpu_temp = i8k_get_temp(0); /* 11100 µs */ |
375 | left_fan = i8k_get_fan_status(I8K_FAN_LEFT); /* 580 µs */ | 375 | left_fan = i8k_get_fan_status(I8K_FAN_LEFT); /* 580 µs */ |
376 | right_fan = i8k_get_fan_status(I8K_FAN_RIGHT); /* 580 µs */ | 376 | right_fan = i8k_get_fan_status(I8K_FAN_RIGHT); /* 580 µs */ |
377 | left_speed = i8k_get_fan_speed(I8K_FAN_LEFT); /* 580 µs */ | 377 | left_speed = i8k_get_fan_speed(I8K_FAN_LEFT); /* 580 µs */ |
378 | right_speed = i8k_get_fan_speed(I8K_FAN_RIGHT); /* 580 µs */ | 378 | right_speed = i8k_get_fan_speed(I8K_FAN_RIGHT); /* 580 µs */ |
379 | fn_key = i8k_get_fn_status(); /* 750 µs */ | 379 | fn_key = i8k_get_fn_status(); /* 750 µs */ |
380 | if (power_status) | 380 | if (power_status) |
381 | ac_power = i8k_get_power_status(); /* 14700 µs */ | 381 | ac_power = i8k_get_power_status(); /* 14700 µs */ |
382 | else | 382 | else |
383 | ac_power = -1; | 383 | ac_power = -1; |
384 | 384 | ||
diff --git a/drivers/char/n_tty.c b/drivers/char/n_tty.c index 038056911934..596c7173997b 100644 --- a/drivers/char/n_tty.c +++ b/drivers/char/n_tty.c | |||
@@ -437,7 +437,7 @@ static inline void finish_erasing(struct tty_struct *tty) | |||
437 | * @c: character input | 437 | * @c: character input |
438 | * @tty: terminal device | 438 | * @tty: terminal device |
439 | * | 439 | * |
440 | * Perform erase and neccessary output when an erase character is | 440 | * Perform erase and necessary output when an erase character is |
441 | * present in the stream from the driver layer. Handles the complexities | 441 | * present in the stream from the driver layer. Handles the complexities |
442 | * of UTF-8 multibyte symbols. | 442 | * of UTF-8 multibyte symbols. |
443 | */ | 443 | */ |
@@ -657,7 +657,7 @@ static inline void n_tty_receive_overrun(struct tty_struct *tty) | |||
657 | * @c: character | 657 | * @c: character |
658 | * | 658 | * |
659 | * Process a parity error and queue the right data to indicate | 659 | * Process a parity error and queue the right data to indicate |
660 | * the error case if neccessary. Locking as per n_tty_receive_buf. | 660 | * the error case if necessary. Locking as per n_tty_receive_buf. |
661 | */ | 661 | */ |
662 | static inline void n_tty_receive_parity_error(struct tty_struct *tty, | 662 | static inline void n_tty_receive_parity_error(struct tty_struct *tty, |
663 | unsigned char c) | 663 | unsigned char c) |
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c index 7e6a3a413bb2..d83419c3857e 100644 --- a/drivers/char/rocket.c +++ b/drivers/char/rocket.c | |||
@@ -563,7 +563,7 @@ static void rp_do_poll(unsigned long dummy) | |||
563 | /* Get a ptr to the board's control struct */ | 563 | /* Get a ptr to the board's control struct */ |
564 | ctlp = sCtlNumToCtlPtr(ctrl); | 564 | ctlp = sCtlNumToCtlPtr(ctrl); |
565 | 565 | ||
566 | /* Get the interupt status from the board */ | 566 | /* Get the interrupt status from the board */ |
567 | #ifdef CONFIG_PCI | 567 | #ifdef CONFIG_PCI |
568 | if (ctlp->BusType == isPCI) | 568 | if (ctlp->BusType == isPCI) |
569 | CtlMask = sPCIGetControllerIntStatus(ctlp); | 569 | CtlMask = sPCIGetControllerIntStatus(ctlp); |
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 9782cb4d30dc..877e53dcb996 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Copyright (C) 2005 Narayanan R S <nars@kadamba.org> | 8 | * Copyright (C) 2005 Narayanan R S <nars@kadamba.org> |
9 | * | 9 | * |
10 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> | 10 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> |
11 | * | 11 | * |
12 | * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> | 12 | * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> |
13 | * | 13 | * |
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 13a53575a016..f36fecd3fd26 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -943,7 +943,7 @@ EXPORT_SYMBOL_GPL(tty_ldisc_deref); | |||
943 | * @tty: terminal to activate ldisc on | 943 | * @tty: terminal to activate ldisc on |
944 | * | 944 | * |
945 | * Set the TTY_LDISC flag when the line discipline can be called | 945 | * Set the TTY_LDISC flag when the line discipline can be called |
946 | * again. Do neccessary wakeups for existing sleepers. | 946 | * again. Do necessary wakeups for existing sleepers. |
947 | * | 947 | * |
948 | * Note: nobody should set this bit except via this function. Clearing | 948 | * Note: nobody should set this bit except via this function. Clearing |
949 | * directly is allowed. | 949 | * directly is allowed. |
@@ -1504,7 +1504,7 @@ EXPORT_SYMBOL(tty_hangup); | |||
1504 | * | 1504 | * |
1505 | * The user has asked via system call for the terminal to be hung up. | 1505 | * The user has asked via system call for the terminal to be hung up. |
1506 | * We do this synchronously so that when the syscall returns the process | 1506 | * We do this synchronously so that when the syscall returns the process |
1507 | * is complete. That guarantee is neccessary for security reasons. | 1507 | * is complete. That guarantee is necessary for security reasons. |
1508 | */ | 1508 | */ |
1509 | 1509 | ||
1510 | void tty_vhangup(struct tty_struct * tty) | 1510 | void tty_vhangup(struct tty_struct * tty) |
@@ -1691,7 +1691,7 @@ EXPORT_SYMBOL(stop_tty); | |||
1691 | * @tty: tty to start | 1691 | * @tty: tty to start |
1692 | * | 1692 | * |
1693 | * Start a tty that has been stopped if at all possible. Perform | 1693 | * Start a tty that has been stopped if at all possible. Perform |
1694 | * any neccessary wakeups and propagate the TIOCPKT status. If this | 1694 | * any necessary wakeups and propagate the TIOCPKT status. If this |
1695 | * is the tty was previous stopped and is being started then the | 1695 | * is the tty was previous stopped and is being started then the |
1696 | * driver start method is invoked and the line discipline woken. | 1696 | * driver start method is invoked and the line discipline woken. |
1697 | * | 1697 | * |
@@ -2877,7 +2877,7 @@ static int tty_fasync(int fd, struct file * filp, int on) | |||
2877 | * @tty: tty to fake input into | 2877 | * @tty: tty to fake input into |
2878 | * @p: pointer to character | 2878 | * @p: pointer to character |
2879 | * | 2879 | * |
2880 | * Fake input to a tty device. Does the neccessary locking and | 2880 | * Fake input to a tty device. Does the necessary locking and |
2881 | * input management. | 2881 | * input management. |
2882 | * | 2882 | * |
2883 | * FIXME: does not honour flow control ?? | 2883 | * FIXME: does not honour flow control ?? |
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c index 0def089cc1f2..7a003504c265 100644 --- a/drivers/char/tty_ioctl.c +++ b/drivers/char/tty_ioctl.c | |||
@@ -444,7 +444,7 @@ static void change_termios(struct tty_struct * tty, struct ktermios * new_termio | |||
444 | * @arg: user data | 444 | * @arg: user data |
445 | * @opt: option information | 445 | * @opt: option information |
446 | * | 446 | * |
447 | * Helper function to prepare termios data and run neccessary other | 447 | * Helper function to prepare termios data and run necessary other |
448 | * functions before using change_termios to do the actual changes. | 448 | * functions before using change_termios to do the actual changes. |
449 | * | 449 | * |
450 | * Locking: | 450 | * Locking: |
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 9959b799dbe2..c00d4a9b39e5 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c | |||
@@ -228,7 +228,7 @@ fw_fill_request(struct fw_packet *packet, int tcode, int tlabel, | |||
228 | * | 228 | * |
229 | * @param card the card from which to send the request | 229 | * @param card the card from which to send the request |
230 | * @param tcode the tcode for this transaction. Do not use | 230 | * @param tcode the tcode for this transaction. Do not use |
231 | * TCODE_LOCK_REQUEST directly, insted use TCODE_LOCK_MASK_SWAP | 231 | * TCODE_LOCK_REQUEST directly, instead use TCODE_LOCK_MASK_SWAP |
232 | * etc. to specify tcode and ext_tcode. | 232 | * etc. to specify tcode and ext_tcode. |
233 | * @param node_id the destination node ID (bus ID and PHY ID concatenated) | 233 | * @param node_id the destination node ID (bus ID and PHY ID concatenated) |
234 | * @param generation the generation for which node_id is valid | 234 | * @param generation the generation for which node_id is valid |
diff --git a/drivers/hid/usbhid/hid-ff.c b/drivers/hid/usbhid/hid-ff.c index 22329feb3b5a..4c210e16b1b4 100644 --- a/drivers/hid/usbhid/hid-ff.c +++ b/drivers/hid/usbhid/hid-ff.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: hid-ff.c,v 1.2 2002/04/18 22:02:47 jdeneux Exp $ | ||
3 | * | ||
4 | * Force feedback support for hid devices. | 2 | * Force feedback support for hid devices. |
5 | * Not all hid devices use the same protocol. For example, some use PID, | 3 | * Not all hid devices use the same protocol. For example, some use PID, |
6 | * other use their own proprietary procotol. | 4 | * other use their own proprietary procotol. |
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 6f66551d9e51..5c82ec7f8bbd 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c | |||
@@ -150,7 +150,7 @@ static struct coretemp_data *coretemp_update_device(struct device *dev) | |||
150 | static int __devinit coretemp_probe(struct platform_device *pdev) | 150 | static int __devinit coretemp_probe(struct platform_device *pdev) |
151 | { | 151 | { |
152 | struct coretemp_data *data; | 152 | struct coretemp_data *data; |
153 | struct cpuinfo_x86 *c = &(cpu_data)[pdev->id]; | 153 | struct cpuinfo_x86 *c = &cpu_data(pdev->id); |
154 | int err; | 154 | int err; |
155 | u32 eax, edx; | 155 | u32 eax, edx; |
156 | 156 | ||
@@ -359,7 +359,7 @@ static int __init coretemp_init(void) | |||
359 | struct pdev_entry *p, *n; | 359 | struct pdev_entry *p, *n; |
360 | 360 | ||
361 | /* quick check if we run Intel */ | 361 | /* quick check if we run Intel */ |
362 | if (cpu_data[0].x86_vendor != X86_VENDOR_INTEL) | 362 | if (cpu_data(0).x86_vendor != X86_VENDOR_INTEL) |
363 | goto exit; | 363 | goto exit; |
364 | 364 | ||
365 | err = platform_driver_register(&coretemp_driver); | 365 | err = platform_driver_register(&coretemp_driver); |
@@ -367,7 +367,7 @@ static int __init coretemp_init(void) | |||
367 | goto exit; | 367 | goto exit; |
368 | 368 | ||
369 | for_each_online_cpu(i) { | 369 | for_each_online_cpu(i) { |
370 | struct cpuinfo_x86 *c = &(cpu_data)[i]; | 370 | struct cpuinfo_x86 *c = &cpu_data(i); |
371 | 371 | ||
372 | /* check if family 6, models e, f, 16 */ | 372 | /* check if family 6, models e, f, 16 */ |
373 | if ((c->cpuid_level < 0) || (c->x86 != 0x6) || | 373 | if ((c->cpuid_level < 0) || (c->x86 != 0x6) || |
diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c index a3b56c816e11..2d39d8fc2389 100644 --- a/drivers/hwmon/gl520sm.c +++ b/drivers/hwmon/gl520sm.c | |||
@@ -2,7 +2,7 @@ | |||
2 | gl520sm.c - Part of lm_sensors, Linux kernel modules for hardware | 2 | gl520sm.c - Part of lm_sensors, Linux kernel modules for hardware |
3 | monitoring | 3 | monitoring |
4 | Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>, | 4 | Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>, |
5 | Kyösti Mälkki <kmalkki@cc.hut.fi> | 5 | Kyösti Mälkki <kmalkki@cc.hut.fi> |
6 | Copyright (c) 2005 Maarten Deprez <maartendeprez@users.sourceforge.net> | 6 | Copyright (c) 2005 Maarten Deprez <maartendeprez@users.sourceforge.net> |
7 | 7 | ||
8 | This program is free software; you can redistribute it and/or modify | 8 | This program is free software; you can redistribute it and/or modify |
@@ -805,7 +805,7 @@ static void __exit sensors_gl520sm_exit(void) | |||
805 | 805 | ||
806 | 806 | ||
807 | MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, " | 807 | MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, " |
808 | "Kyösti Mälkki <kmalkki@cc.hut.fi>, " | 808 | "Kyösti Mälkki <kmalkki@cc.hut.fi>, " |
809 | "Maarten Deprez <maartendeprez@users.sourceforge.net>"); | 809 | "Maarten Deprez <maartendeprez@users.sourceforge.net>"); |
810 | MODULE_DESCRIPTION("GL520SM driver"); | 810 | MODULE_DESCRIPTION("GL520SM driver"); |
811 | MODULE_LICENSE("GPL"); | 811 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c index f17e771e42f8..3330667280b9 100644 --- a/drivers/hwmon/hwmon-vid.c +++ b/drivers/hwmon/hwmon-vid.c | |||
@@ -200,7 +200,7 @@ static u8 find_vrm(u8 eff_family, u8 eff_model, u8 eff_stepping, u8 vendor) | |||
200 | 200 | ||
201 | u8 vid_which_vrm(void) | 201 | u8 vid_which_vrm(void) |
202 | { | 202 | { |
203 | struct cpuinfo_x86 *c = cpu_data; | 203 | struct cpuinfo_x86 *c = &cpu_data(0); |
204 | u32 eax; | 204 | u32 eax; |
205 | u8 eff_family, eff_model, eff_stepping, vrm_ret; | 205 | u8 eff_family, eff_model, eff_stepping, vrm_ret; |
206 | 206 | ||
diff --git a/drivers/hwmon/sis5595.c b/drivers/hwmon/sis5595.c index 860b71ccbb86..7e2d9787babc 100644 --- a/drivers/hwmon/sis5595.c +++ b/drivers/hwmon/sis5595.c | |||
@@ -3,7 +3,7 @@ | |||
3 | for hardware monitoring | 3 | for hardware monitoring |
4 | 4 | ||
5 | Copyright (C) 1998 - 2001 Frodo Looijaard <frodol@dds.nl>, | 5 | Copyright (C) 1998 - 2001 Frodo Looijaard <frodol@dds.nl>, |
6 | Kyösti Mälkki <kmalkki@cc.hut.fi>, and | 6 | Kyösti Mälkki <kmalkki@cc.hut.fi>, and |
7 | Mark D. Studebaker <mdsxyz123@yahoo.com> | 7 | Mark D. Studebaker <mdsxyz123@yahoo.com> |
8 | Ported to Linux 2.6 by Aurelien Jarno <aurelien@aurel32.net> with | 8 | Ported to Linux 2.6 by Aurelien Jarno <aurelien@aurel32.net> with |
9 | the help of Jean Delvare <khali@linux-fr.org> | 9 | the help of Jean Delvare <khali@linux-fr.org> |
diff --git a/drivers/hwmon/via686a.c b/drivers/hwmon/via686a.c index 8f63dada6019..2635bba1e3fc 100644 --- a/drivers/hwmon/via686a.c +++ b/drivers/hwmon/via686a.c | |||
@@ -3,7 +3,7 @@ | |||
3 | for hardware monitoring | 3 | for hardware monitoring |
4 | 4 | ||
5 | Copyright (c) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>, | 5 | Copyright (c) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>, |
6 | Kyösti Mälkki <kmalkki@cc.hut.fi>, | 6 | Kyösti Mälkki <kmalkki@cc.hut.fi>, |
7 | Mark Studebaker <mdsxyz123@yahoo.com>, | 7 | Mark Studebaker <mdsxyz123@yahoo.com>, |
8 | and Bob Dougherty <bobd@stanford.edu> | 8 | and Bob Dougherty <bobd@stanford.edu> |
9 | (Some conversion-factor data were contributed by Jonathan Teh Soon Yew | 9 | (Some conversion-factor data were contributed by Jonathan Teh Soon Yew |
@@ -866,7 +866,7 @@ static void __exit sm_via686a_exit(void) | |||
866 | } | 866 | } |
867 | } | 867 | } |
868 | 868 | ||
869 | MODULE_AUTHOR("Kyösti Mälkki <kmalkki@cc.hut.fi>, " | 869 | MODULE_AUTHOR("Kyösti Mälkki <kmalkki@cc.hut.fi>, " |
870 | "Mark Studebaker <mdsxyz123@yahoo.com> " | 870 | "Mark Studebaker <mdsxyz123@yahoo.com> " |
871 | "and Bob Dougherty <bobd@stanford.edu>"); | 871 | "and Bob Dougherty <bobd@stanford.edu>"); |
872 | MODULE_DESCRIPTION("VIA 686A Sensor device"); | 872 | MODULE_DESCRIPTION("VIA 686A Sensor device"); |
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index 7f0a0a62cf60..a37cb6b8593c 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c | |||
@@ -18,7 +18,7 @@ | |||
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
19 | /* ------------------------------------------------------------------------- */ | 19 | /* ------------------------------------------------------------------------- */ |
20 | 20 | ||
21 | /* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki | 21 | /* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki |
22 | <kmalkki@cc.hut.fi> and Jean Delvare <khali@linux-fr.org> */ | 22 | <kmalkki@cc.hut.fi> and Jean Delvare <khali@linux-fr.org> */ |
23 | 23 | ||
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index 36fdf971f080..2a16211f12e5 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c | |||
@@ -350,7 +350,7 @@ static int pca_init(struct i2c_algo_pca_data *adap) | |||
350 | pca_outw(adap, I2C_PCA_ADR, own << 1); | 350 | pca_outw(adap, I2C_PCA_ADR, own << 1); |
351 | 351 | ||
352 | pca_set_con(adap, I2C_PCA_CON_ENSIO | clock); | 352 | pca_set_con(adap, I2C_PCA_CON_ENSIO | clock); |
353 | udelay(500); /* 500 µs for oscilator to stabilise */ | 353 | udelay(500); /* 500 µs for oscilator to stabilise */ |
354 | 354 | ||
355 | return 0; | 355 | return 0; |
356 | } | 356 | } |
diff --git a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c index ecb2c2d7d540..ab2e6f3498b4 100644 --- a/drivers/i2c/algos/i2c-algo-pcf.c +++ b/drivers/i2c/algos/i2c-algo-pcf.c | |||
@@ -19,7 +19,7 @@ | |||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
20 | /* ------------------------------------------------------------------------- */ | 20 | /* ------------------------------------------------------------------------- */ |
21 | 21 | ||
22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and | 22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and |
23 | Frodo Looijaard <frodol@dds.nl> ,and also from Martin Bailey | 23 | Frodo Looijaard <frodol@dds.nl> ,and also from Martin Bailey |
24 | <mbailey@littlefeet-inc.com> */ | 24 | <mbailey@littlefeet-inc.com> */ |
25 | 25 | ||
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index de95c75efb41..c466c6cfc2e5 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
@@ -278,7 +278,7 @@ config I2C_IXP2000 | |||
278 | depends on ARCH_IXP2000 | 278 | depends on ARCH_IXP2000 |
279 | select I2C_ALGOBIT | 279 | select I2C_ALGOBIT |
280 | help | 280 | help |
281 | Say Y here if you have an Intel IXP2000(2400, 2800, 2850) based | 281 | Say Y here if you have an Intel IXP2000 (2400, 2800, 2850) based |
282 | system and are using GPIO lines for an I2C bus. | 282 | system and are using GPIO lines for an I2C bus. |
283 | 283 | ||
284 | This support is also available as a module. If so, the module | 284 | This support is also available as a module. If so, the module |
@@ -293,8 +293,8 @@ config I2C_POWERMAC | |||
293 | default y | 293 | default y |
294 | help | 294 | help |
295 | This exposes the various PowerMac i2c interfaces to the linux i2c | 295 | This exposes the various PowerMac i2c interfaces to the linux i2c |
296 | layer and to userland. It is used by various drivers on the powemac | 296 | layer and to userland. It is used by various drivers on the PowerMac |
297 | platform, thus should generally be enabled. | 297 | platform, and should generally be enabled. |
298 | 298 | ||
299 | This support is also available as a module. If so, the module | 299 | This support is also available as a module. If so, the module |
300 | will be called i2c-powermac. | 300 | will be called i2c-powermac. |
@@ -438,12 +438,12 @@ config I2C_SIMTEC | |||
438 | tristate "Simtec Generic I2C interface" | 438 | tristate "Simtec Generic I2C interface" |
439 | select I2C_ALGOBIT | 439 | select I2C_ALGOBIT |
440 | help | 440 | help |
441 | If you say yes to this option, support will be inclyded for | 441 | If you say yes to this option, support will be included for |
442 | the Simtec Generic I2C interface. This driver is for the | 442 | the Simtec Generic I2C interface. This driver is for the |
443 | simple I2C bus used on newer Simtec products for general | 443 | simple I2C bus used on newer Simtec products for general |
444 | I2C, such as DDC on the Simtec BBD2016A. | 444 | I2C, such as DDC on the Simtec BBD2016A. |
445 | 445 | ||
446 | This driver can also be build as a module. If so, the module | 446 | This driver can also be built as a module. If so, the module |
447 | will be called i2c-simtec. | 447 | will be called i2c-simtec. |
448 | 448 | ||
449 | config SCx200_I2C | 449 | config SCx200_I2C |
diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c index 804f0a551c05..b7a9977b025f 100644 --- a/drivers/i2c/busses/i2c-elektor.c +++ b/drivers/i2c/busses/i2c-elektor.c | |||
@@ -19,7 +19,7 @@ | |||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | 19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
20 | /* ------------------------------------------------------------------------- */ | 20 | /* ------------------------------------------------------------------------- */ |
21 | 21 | ||
22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even | 22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even |
23 | Frodo Looijaard <frodol@dds.nl> */ | 23 | Frodo Looijaard <frodol@dds.nl> */ |
24 | 24 | ||
25 | /* Partialy rewriten by Oleg I. Vdovikin for mmapped support of | 25 | /* Partialy rewriten by Oleg I. Vdovikin for mmapped support of |
diff --git a/drivers/i2c/busses/i2c-hydra.c b/drivers/i2c/busses/i2c-hydra.c index 9832f773651d..f9972f9651e4 100644 --- a/drivers/i2c/busses/i2c-hydra.c +++ b/drivers/i2c/busses/i2c-hydra.c | |||
@@ -7,7 +7,7 @@ | |||
7 | Copyright (c) 1999-2004 Geert Uytterhoeven <geert@linux-m68k.org> | 7 | Copyright (c) 1999-2004 Geert Uytterhoeven <geert@linux-m68k.org> |
8 | 8 | ||
9 | Based on i2c Support for Via Technologies 82C586B South Bridge | 9 | Based on i2c Support for Via Technologies 82C586B South Bridge |
10 | Copyright (c) 1998, 1999 Kyösti Mälkki <kmalkki@cc.hut.fi> | 10 | Copyright (c) 1998, 1999 Kyösti Mälkki <kmalkki@cc.hut.fi> |
11 | 11 | ||
12 | This program is free software; you can redistribute it and/or modify | 12 | This program is free software; you can redistribute it and/or modify |
13 | it under the terms of the GNU General Public License as published by | 13 | it under the terms of the GNU General Public License as published by |
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index e08bacadd6bc..9b43ff7270d0 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * Copyright 1995-97 Simon G. Vogl | 18 | * Copyright 1995-97 Simon G. Vogl |
19 | * 1998-99 Hans Berglund | 19 | * 1998-99 Hans Berglund |
20 | * | 20 | * |
21 | * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> | 21 | * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> |
22 | * and even Frodo Looijaard <frodol@dds.nl> | 22 | * and even Frodo Looijaard <frodol@dds.nl> |
23 | * | 23 | * |
24 | * This program is free software; you can redistribute it and/or modify it | 24 | * This program is free software; you can redistribute it and/or modify it |
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index e471e3bfdc1e..89a30028ddb6 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * Tony Lindgren <tony@atomide.com> and Imre Deak <imre.deak@nokia.com> | 8 | * Tony Lindgren <tony@atomide.com> and Imre Deak <imre.deak@nokia.com> |
9 | * Copyright (C) 2005 Nokia Corporation | 9 | * Copyright (C) 2005 Nokia Corporation |
10 | * | 10 | * |
11 | * Cleaned up by Juha Yrjölä <juha.yrjola@nokia.com> | 11 | * Cleaned up by Juha Yrjölä <juha.yrjola@nokia.com> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or modify | 13 | * This program is free software; you can redistribute it and/or modify |
14 | * it under the terms of the GNU General Public License as published by | 14 | * it under the terms of the GNU General Public License as published by |
diff --git a/drivers/i2c/busses/i2c-parport-light.c b/drivers/i2c/busses/i2c-parport-light.c index 49a95e2887bc..c6faf9bdad18 100644 --- a/drivers/i2c/busses/i2c-parport-light.c +++ b/drivers/i2c/busses/i2c-parport-light.c | |||
@@ -7,7 +7,7 @@ | |||
7 | Copyright (C) 1995-2000 Simon G. Vogl | 7 | Copyright (C) 1995-2000 Simon G. Vogl |
8 | With some changes from: | 8 | With some changes from: |
9 | Frodo Looijaard <frodol@dds.nl> | 9 | Frodo Looijaard <frodol@dds.nl> |
10 | Kyösti Mälkki <kmalkki@cc.hut.fi> | 10 | Kyösti Mälkki <kmalkki@cc.hut.fi> |
11 | 11 | ||
12 | This program is free software; you can redistribute it and/or modify | 12 | This program is free software; you can redistribute it and/or modify |
13 | it under the terms of the GNU General Public License as published by | 13 | it under the terms of the GNU General Public License as published by |
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index 039a07fde908..59ba2086d2f9 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c | |||
@@ -7,7 +7,7 @@ | |||
7 | Copyright (C) 1995-2000 Simon G. Vogl | 7 | Copyright (C) 1995-2000 Simon G. Vogl |
8 | With some changes from: | 8 | With some changes from: |
9 | Frodo Looijaard <frodol@dds.nl> | 9 | Frodo Looijaard <frodol@dds.nl> |
10 | Kyösti Mälkki <kmalkki@cc.hut.fi> | 10 | Kyösti Mälkki <kmalkki@cc.hut.fi> |
11 | 11 | ||
12 | This program is free software; you can redistribute it and/or modify | 12 | This program is free software; you can redistribute it and/or modify |
13 | it under the terms of the GNU General Public License as published by | 13 | it under the terms of the GNU General Public License as published by |
diff --git a/drivers/i2c/busses/i2c-via.c b/drivers/i2c/busses/i2c-via.c index 81520868797b..61716f6b14dc 100644 --- a/drivers/i2c/busses/i2c-via.c +++ b/drivers/i2c/busses/i2c-via.c | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | i2c Support for Via Technologies 82C586B South Bridge | 5 | i2c Support for Via Technologies 82C586B South Bridge |
6 | 6 | ||
7 | Copyright (c) 1998, 1999 Kyösti Mälkki <kmalkki@cc.hut.fi> | 7 | Copyright (c) 1998, 1999 Kyösti Mälkki <kmalkki@cc.hut.fi> |
8 | 8 | ||
9 | This program is free software; you can redistribute it and/or modify | 9 | This program is free software; you can redistribute it and/or modify |
10 | it under the terms of the GNU General Public License as published by | 10 | it under the terms of the GNU General Public License as published by |
@@ -176,7 +176,7 @@ static void __exit i2c_vt586b_exit(void) | |||
176 | } | 176 | } |
177 | 177 | ||
178 | 178 | ||
179 | MODULE_AUTHOR("Kyösti Mälkki <kmalkki@cc.hut.fi>"); | 179 | MODULE_AUTHOR("Kyösti Mälkki <kmalkki@cc.hut.fi>"); |
180 | MODULE_DESCRIPTION("i2c for Via vt82c586b southbridge"); | 180 | MODULE_DESCRIPTION("i2c for Via vt82c586b southbridge"); |
181 | MODULE_LICENSE("GPL"); | 181 | MODULE_LICENSE("GPL"); |
182 | 182 | ||
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index edc275002f80..c9ce77f13c0e 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c | |||
@@ -2,7 +2,7 @@ | |||
2 | i2c-viapro.c - Part of lm_sensors, Linux kernel modules for hardware | 2 | i2c-viapro.c - Part of lm_sensors, Linux kernel modules for hardware |
3 | monitoring | 3 | monitoring |
4 | Copyright (c) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>, | 4 | Copyright (c) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>, |
5 | Philip Edelbrock <phil@netroedge.com>, Kyösti Mälkki <kmalkki@cc.hut.fi>, | 5 | Philip Edelbrock <phil@netroedge.com>, Kyösti Mälkki <kmalkki@cc.hut.fi>, |
6 | Mark D. Studebaker <mdsxyz123@yahoo.com> | 6 | Mark D. Studebaker <mdsxyz123@yahoo.com> |
7 | Copyright (C) 2005 - 2007 Jean Delvare <khali@linux-fr.org> | 7 | Copyright (C) 2005 - 2007 Jean Delvare <khali@linux-fr.org> |
8 | 8 | ||
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index e73d58c43f38..1a4e8dc03b36 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -17,7 +17,7 @@ | |||
17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | 17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
18 | /* ------------------------------------------------------------------------- */ | 18 | /* ------------------------------------------------------------------------- */ |
19 | 19 | ||
20 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi>. | 20 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi>. |
21 | All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl> | 21 | All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl> |
22 | SMBus 2.0 support by Mark Studebaker <mdsxyz123@yahoo.com> and | 22 | SMBus 2.0 support by Mark Studebaker <mdsxyz123@yahoo.com> and |
23 | Jean Delvare <khali@linux-fr.org> */ | 23 | Jean Delvare <khali@linux-fr.org> */ |
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 6d9fd92763f4..6eaece96524e 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -1056,6 +1056,9 @@ endif | |||
1056 | config BLK_DEV_IDEDMA | 1056 | config BLK_DEV_IDEDMA |
1057 | def_bool BLK_DEV_IDEDMA_PCI || BLK_DEV_IDEDMA_PMAC || BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 1057 | def_bool BLK_DEV_IDEDMA_PCI || BLK_DEV_IDEDMA_PMAC || BLK_DEV_IDEDMA_ICS || BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
1058 | 1058 | ||
1059 | config IDE_ARCH_OBSOLETE_INIT | ||
1060 | def_bool ALPHA || (ARM && !ARCH_L7200) || BLACKFIN || X86 || IA64 || M32R || MIPS || PARISC || PPC || (SUPERH64 && BLK_DEV_IDEPCI) || SPARC | ||
1061 | |||
1059 | endif | 1062 | endif |
1060 | 1063 | ||
1061 | config BLK_DEV_HD_ONLY | 1064 | config BLK_DEV_HD_ONLY |
diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c index f7449d04114a..48db6167bb90 100644 --- a/drivers/ide/arm/bast-ide.c +++ b/drivers/ide/arm/bast-ide.c | |||
@@ -45,7 +45,7 @@ bastide_register(unsigned int base, unsigned int aux, int irq, | |||
45 | hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20); | 45 | hw.io_ports[IDE_CONTROL_OFFSET] = aux + (6 * 0x20); |
46 | hw.irq = irq; | 46 | hw.irq = irq; |
47 | 47 | ||
48 | ide_register_hw(&hw, 0, hwif); | 48 | ide_register_hw(&hw, NULL, 0, hwif); |
49 | 49 | ||
50 | return 0; | 50 | return 0; |
51 | } | 51 | } |
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index 3af33fbf1f88..410a0d13e35e 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c | |||
@@ -316,27 +316,29 @@ static int icside_dma_end(ide_drive_t *drive) | |||
316 | 316 | ||
317 | drive->waiting_for_dma = 0; | 317 | drive->waiting_for_dma = 0; |
318 | 318 | ||
319 | disable_dma(hwif->hw.dma); | 319 | disable_dma(state->dev->dma); |
320 | 320 | ||
321 | /* Teardown mappings after DMA has completed. */ | 321 | /* Teardown mappings after DMA has completed. */ |
322 | dma_unmap_sg(state->dev, hwif->sg_table, hwif->sg_nents, | 322 | dma_unmap_sg(state->dev, hwif->sg_table, hwif->sg_nents, |
323 | hwif->sg_dma_direction); | 323 | hwif->sg_dma_direction); |
324 | 324 | ||
325 | return get_dma_residue(hwif->hw.dma) != 0; | 325 | return get_dma_residue(state->dev->dma) != 0; |
326 | } | 326 | } |
327 | 327 | ||
328 | static void icside_dma_start(ide_drive_t *drive) | 328 | static void icside_dma_start(ide_drive_t *drive) |
329 | { | 329 | { |
330 | ide_hwif_t *hwif = HWIF(drive); | 330 | ide_hwif_t *hwif = HWIF(drive); |
331 | struct icside_state *state = hwif->hwif_data; | ||
331 | 332 | ||
332 | /* We can not enable DMA on both channels simultaneously. */ | 333 | /* We can not enable DMA on both channels simultaneously. */ |
333 | BUG_ON(dma_channel_active(hwif->hw.dma)); | 334 | BUG_ON(dma_channel_active(state->dev->dma)); |
334 | enable_dma(hwif->hw.dma); | 335 | enable_dma(state->dev->dma); |
335 | } | 336 | } |
336 | 337 | ||
337 | static int icside_dma_setup(ide_drive_t *drive) | 338 | static int icside_dma_setup(ide_drive_t *drive) |
338 | { | 339 | { |
339 | ide_hwif_t *hwif = HWIF(drive); | 340 | ide_hwif_t *hwif = HWIF(drive); |
341 | struct icside_state *state = hwif->hwif_data; | ||
340 | struct request *rq = hwif->hwgroup->rq; | 342 | struct request *rq = hwif->hwgroup->rq; |
341 | unsigned int dma_mode; | 343 | unsigned int dma_mode; |
342 | 344 | ||
@@ -348,7 +350,7 @@ static int icside_dma_setup(ide_drive_t *drive) | |||
348 | /* | 350 | /* |
349 | * We can not enable DMA on both channels. | 351 | * We can not enable DMA on both channels. |
350 | */ | 352 | */ |
351 | BUG_ON(dma_channel_active(hwif->hw.dma)); | 353 | BUG_ON(dma_channel_active(state->dev->dma)); |
352 | 354 | ||
353 | icside_build_sglist(drive, rq); | 355 | icside_build_sglist(drive, rq); |
354 | 356 | ||
@@ -365,14 +367,14 @@ static int icside_dma_setup(ide_drive_t *drive) | |||
365 | /* | 367 | /* |
366 | * Select the correct timing for this drive. | 368 | * Select the correct timing for this drive. |
367 | */ | 369 | */ |
368 | set_dma_speed(hwif->hw.dma, drive->drive_data); | 370 | set_dma_speed(state->dev->dma, drive->drive_data); |
369 | 371 | ||
370 | /* | 372 | /* |
371 | * Tell the DMA engine about the SG table and | 373 | * Tell the DMA engine about the SG table and |
372 | * data direction. | 374 | * data direction. |
373 | */ | 375 | */ |
374 | set_dma_sg(hwif->hw.dma, hwif->sg_table, hwif->sg_nents); | 376 | set_dma_sg(state->dev->dma, hwif->sg_table, hwif->sg_nents); |
375 | set_dma_mode(hwif->hw.dma, dma_mode); | 377 | set_dma_mode(state->dev->dma, dma_mode); |
376 | 378 | ||
377 | drive->waiting_for_dma = 1; | 379 | drive->waiting_for_dma = 1; |
378 | 380 | ||
@@ -438,40 +440,16 @@ static void icside_dma_init(ide_hwif_t *hwif) | |||
438 | #define icside_dma_init(hwif) (0) | 440 | #define icside_dma_init(hwif) (0) |
439 | #endif | 441 | #endif |
440 | 442 | ||
441 | static ide_hwif_t *icside_find_hwif(unsigned long dataport) | ||
442 | { | ||
443 | ide_hwif_t *hwif; | ||
444 | int index; | ||
445 | |||
446 | for (index = 0; index < MAX_HWIFS; ++index) { | ||
447 | hwif = &ide_hwifs[index]; | ||
448 | if (hwif->io_ports[IDE_DATA_OFFSET] == dataport) | ||
449 | goto found; | ||
450 | } | ||
451 | |||
452 | for (index = 0; index < MAX_HWIFS; ++index) { | ||
453 | hwif = &ide_hwifs[index]; | ||
454 | if (!hwif->io_ports[IDE_DATA_OFFSET]) | ||
455 | goto found; | ||
456 | } | ||
457 | |||
458 | hwif = NULL; | ||
459 | found: | ||
460 | return hwif; | ||
461 | } | ||
462 | |||
463 | static ide_hwif_t * | 443 | static ide_hwif_t * |
464 | icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *ec) | 444 | icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *ec) |
465 | { | 445 | { |
466 | unsigned long port = (unsigned long)base + info->dataoffset; | 446 | unsigned long port = (unsigned long)base + info->dataoffset; |
467 | ide_hwif_t *hwif; | 447 | ide_hwif_t *hwif; |
468 | 448 | ||
469 | hwif = icside_find_hwif(port); | 449 | hwif = ide_find_port(port); |
470 | if (hwif) { | 450 | if (hwif) { |
471 | int i; | 451 | int i; |
472 | 452 | ||
473 | memset(&hwif->hw, 0, sizeof(hw_regs_t)); | ||
474 | |||
475 | /* | 453 | /* |
476 | * Ensure we're using MMIO | 454 | * Ensure we're using MMIO |
477 | */ | 455 | */ |
@@ -479,13 +457,10 @@ icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *e | |||
479 | hwif->mmio = 1; | 457 | hwif->mmio = 1; |
480 | 458 | ||
481 | for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { | 459 | for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { |
482 | hwif->hw.io_ports[i] = port; | ||
483 | hwif->io_ports[i] = port; | 460 | hwif->io_ports[i] = port; |
484 | port += 1 << info->stepping; | 461 | port += 1 << info->stepping; |
485 | } | 462 | } |
486 | hwif->hw.io_ports[IDE_CONTROL_OFFSET] = (unsigned long)base + info->ctrloffset; | ||
487 | hwif->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)base + info->ctrloffset; | 463 | hwif->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)base + info->ctrloffset; |
488 | hwif->hw.irq = ec->irq; | ||
489 | hwif->irq = ec->irq; | 464 | hwif->irq = ec->irq; |
490 | hwif->noprobe = 0; | 465 | hwif->noprobe = 0; |
491 | hwif->chipset = ide_acorn; | 466 | hwif->chipset = ide_acorn; |
@@ -500,6 +475,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) | |||
500 | { | 475 | { |
501 | ide_hwif_t *hwif; | 476 | ide_hwif_t *hwif; |
502 | void __iomem *base; | 477 | void __iomem *base; |
478 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
503 | 479 | ||
504 | base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0); | 480 | base = ecardm_iomap(ec, ECARD_RES_MEMC, 0, 0); |
505 | if (!base) | 481 | if (!base) |
@@ -523,9 +499,9 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) | |||
523 | 499 | ||
524 | state->hwif[0] = hwif; | 500 | state->hwif[0] = hwif; |
525 | 501 | ||
526 | probe_hwif_init(hwif); | 502 | idx[0] = hwif->index; |
527 | 503 | ||
528 | ide_proc_register_port(hwif); | 504 | ide_device_add(idx); |
529 | 505 | ||
530 | return 0; | 506 | return 0; |
531 | } | 507 | } |
@@ -537,6 +513,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
537 | void __iomem *ioc_base, *easi_base; | 513 | void __iomem *ioc_base, *easi_base; |
538 | unsigned int sel = 0; | 514 | unsigned int sel = 0; |
539 | int ret; | 515 | int ret; |
516 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
540 | 517 | ||
541 | ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); | 518 | ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); |
542 | if (!ioc_base) { | 519 | if (!ioc_base) { |
@@ -592,7 +569,6 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
592 | hwif->serialized = 1; | 569 | hwif->serialized = 1; |
593 | hwif->config_data = (unsigned long)ioc_base; | 570 | hwif->config_data = (unsigned long)ioc_base; |
594 | hwif->select_data = sel; | 571 | hwif->select_data = sel; |
595 | hwif->hw.dma = ec->dma; | ||
596 | 572 | ||
597 | mate->maskproc = icside_maskproc; | 573 | mate->maskproc = icside_maskproc; |
598 | mate->channel = 1; | 574 | mate->channel = 1; |
@@ -601,18 +577,16 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
601 | mate->serialized = 1; | 577 | mate->serialized = 1; |
602 | mate->config_data = (unsigned long)ioc_base; | 578 | mate->config_data = (unsigned long)ioc_base; |
603 | mate->select_data = sel | 1; | 579 | mate->select_data = sel | 1; |
604 | mate->hw.dma = ec->dma; | ||
605 | 580 | ||
606 | if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) { | 581 | if (ec->dma != NO_DMA && !request_dma(ec->dma, hwif->name)) { |
607 | icside_dma_init(hwif); | 582 | icside_dma_init(hwif); |
608 | icside_dma_init(mate); | 583 | icside_dma_init(mate); |
609 | } | 584 | } |
610 | 585 | ||
611 | probe_hwif_init(hwif); | 586 | idx[0] = hwif->index; |
612 | probe_hwif_init(mate); | 587 | idx[1] = mate->index; |
613 | 588 | ||
614 | ide_proc_register_port(hwif); | 589 | ide_device_add(idx); |
615 | ide_proc_register_port(mate); | ||
616 | 590 | ||
617 | return 0; | 591 | return 0; |
618 | 592 | ||
diff --git a/drivers/ide/arm/ide_arm.c b/drivers/ide/arm/ide_arm.c index bce2bec81413..8957cbadf5c2 100644 --- a/drivers/ide/arm/ide_arm.c +++ b/drivers/ide/arm/ide_arm.c | |||
@@ -31,5 +31,5 @@ void __init ide_arm_init(void) | |||
31 | memset(&hw, 0, sizeof(hw)); | 31 | memset(&hw, 0, sizeof(hw)); |
32 | ide_std_init_ports(&hw, IDE_ARM_IO, IDE_ARM_IO + 0x206); | 32 | ide_std_init_ports(&hw, IDE_ARM_IO, IDE_ARM_IO + 0x206); |
33 | hw.irq = IDE_ARM_IRQ; | 33 | hw.irq = IDE_ARM_IRQ; |
34 | ide_register_hw(&hw, 1, NULL); | 34 | ide_register_hw(&hw, NULL, 1, NULL); |
35 | } | 35 | } |
diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c index 83811af11610..0775a3afef48 100644 --- a/drivers/ide/arm/rapide.c +++ b/drivers/ide/arm/rapide.c | |||
@@ -13,42 +13,25 @@ | |||
13 | 13 | ||
14 | #include <asm/ecard.h> | 14 | #include <asm/ecard.h> |
15 | 15 | ||
16 | /* | ||
17 | * Something like this really should be in generic code, but isn't. | ||
18 | */ | ||
19 | static ide_hwif_t * | 16 | static ide_hwif_t * |
20 | rapide_locate_hwif(void __iomem *base, void __iomem *ctrl, unsigned int sz, int irq) | 17 | rapide_locate_hwif(void __iomem *base, void __iomem *ctrl, unsigned int sz, int irq) |
21 | { | 18 | { |
22 | unsigned long port = (unsigned long)base; | 19 | unsigned long port = (unsigned long)base; |
23 | ide_hwif_t *hwif; | 20 | ide_hwif_t *hwif = ide_find_port(port); |
24 | int index, i; | 21 | int i; |
25 | |||
26 | for (index = 0; index < MAX_HWIFS; ++index) { | ||
27 | hwif = ide_hwifs + index; | ||
28 | if (hwif->io_ports[IDE_DATA_OFFSET] == port) | ||
29 | goto found; | ||
30 | } | ||
31 | |||
32 | for (index = 0; index < MAX_HWIFS; ++index) { | ||
33 | hwif = ide_hwifs + index; | ||
34 | if (hwif->io_ports[IDE_DATA_OFFSET] == 0) | ||
35 | goto found; | ||
36 | } | ||
37 | 22 | ||
38 | return NULL; | 23 | if (hwif == NULL) |
24 | goto out; | ||
39 | 25 | ||
40 | found: | ||
41 | for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { | 26 | for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { |
42 | hwif->hw.io_ports[i] = port; | ||
43 | hwif->io_ports[i] = port; | 27 | hwif->io_ports[i] = port; |
44 | port += sz; | 28 | port += sz; |
45 | } | 29 | } |
46 | hwif->hw.io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl; | ||
47 | hwif->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl; | 30 | hwif->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl; |
48 | hwif->hw.irq = hwif->irq = irq; | 31 | hwif->irq = irq; |
49 | hwif->mmio = 1; | 32 | hwif->mmio = 1; |
50 | default_hwif_mmiops(hwif); | 33 | default_hwif_mmiops(hwif); |
51 | 34 | out: | |
52 | return hwif; | 35 | return hwif; |
53 | } | 36 | } |
54 | 37 | ||
@@ -58,6 +41,7 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
58 | ide_hwif_t *hwif; | 41 | ide_hwif_t *hwif; |
59 | void __iomem *base; | 42 | void __iomem *base; |
60 | int ret; | 43 | int ret; |
44 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
61 | 45 | ||
62 | ret = ecard_request_resources(ec); | 46 | ret = ecard_request_resources(ec); |
63 | if (ret) | 47 | if (ret) |
@@ -74,8 +58,11 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
74 | hwif->hwif_data = base; | 58 | hwif->hwif_data = base; |
75 | hwif->gendev.parent = &ec->dev; | 59 | hwif->gendev.parent = &ec->dev; |
76 | hwif->noprobe = 0; | 60 | hwif->noprobe = 0; |
77 | probe_hwif_init(hwif); | 61 | |
78 | ide_proc_register_port(hwif); | 62 | idx[0] = hwif->index; |
63 | |||
64 | ide_device_add(idx); | ||
65 | |||
79 | ecard_set_drvdata(ec, hwif); | 66 | ecard_set_drvdata(ec, hwif); |
80 | goto out; | 67 | goto out; |
81 | } | 68 | } |
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index 9a96a10ba9d3..ff20377b4c82 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c | |||
@@ -782,7 +782,7 @@ init_e100_ide (void) | |||
782 | ide_offsets, | 782 | ide_offsets, |
783 | 0, 0, cris_ide_ack_intr, | 783 | 0, 0, cris_ide_ack_intr, |
784 | ide_default_irq(0)); | 784 | ide_default_irq(0)); |
785 | ide_register_hw(&hw, 1, &hwif); | 785 | ide_register_hw(&hw, NULL, 1, &hwif); |
786 | hwif->mmio = 1; | 786 | hwif->mmio = 1; |
787 | hwif->chipset = ide_etrax100; | 787 | hwif->chipset = ide_etrax100; |
788 | hwif->set_pio_mode = &cris_set_pio_mode; | 788 | hwif->set_pio_mode = &cris_set_pio_mode; |
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c index 6d26ad7360d5..4a49b5c59acb 100644 --- a/drivers/ide/h8300/ide-h8300.c +++ b/drivers/ide/h8300/ide-h8300.c | |||
@@ -68,7 +68,6 @@ static inline void hw_setup(hw_regs_t *hw) | |||
68 | hw->io_ports[i] = CONFIG_H8300_IDE_BASE + H8300_IDE_GAP*i; | 68 | hw->io_ports[i] = CONFIG_H8300_IDE_BASE + H8300_IDE_GAP*i; |
69 | hw->io_ports[IDE_CONTROL_OFFSET] = CONFIG_H8300_IDE_ALT; | 69 | hw->io_ports[IDE_CONTROL_OFFSET] = CONFIG_H8300_IDE_ALT; |
70 | hw->irq = EXT_IRQ0 + CONFIG_H8300_IDE_IRQ; | 70 | hw->irq = EXT_IRQ0 + CONFIG_H8300_IDE_IRQ; |
71 | hw->dma = NO_DMA; | ||
72 | hw->chipset = ide_generic; | 71 | hw->chipset = ide_generic; |
73 | } | 72 | } |
74 | 73 | ||
@@ -101,7 +100,7 @@ void __init h8300_ide_init(void) | |||
101 | hw_setup(&hw); | 100 | hw_setup(&hw); |
102 | 101 | ||
103 | /* register if */ | 102 | /* register if */ |
104 | idx = ide_register_hw(&hw, 1, &hwif); | 103 | idx = ide_register_hw(&hw, NULL, 1, &hwif); |
105 | if (idx == -1) { | 104 | if (idx == -1) { |
106 | printk(KERN_ERR "ide-h8300: IDE I/F register failed\n"); | 105 | printk(KERN_ERR "ide-h8300: IDE I/F register failed\n"); |
107 | return; | 106 | return; |
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 1d5f6823101c..89df48fdc69d 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -350,7 +350,7 @@ static int taskfile_load_raw(ide_drive_t *drive, | |||
350 | 350 | ||
351 | memset(&args, 0, sizeof(ide_task_t)); | 351 | memset(&args, 0, sizeof(ide_task_t)); |
352 | args.command_type = IDE_DRIVE_TASK_NO_DATA; | 352 | args.command_type = IDE_DRIVE_TASK_NO_DATA; |
353 | args.data_phase = TASKFILE_IN; | 353 | args.data_phase = TASKFILE_NO_DATA; |
354 | args.handler = &task_no_data_intr; | 354 | args.handler = &task_no_data_intr; |
355 | 355 | ||
356 | /* convert gtf to IDE Taskfile */ | 356 | /* convert gtf to IDE Taskfile */ |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index ca843522f91d..57a5f63d6ae3 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -120,7 +120,7 @@ | |||
120 | * Reformat to match kernel tabbing style. | 120 | * Reformat to match kernel tabbing style. |
121 | * Add CDROM_GET_UPC ioctl. | 121 | * Add CDROM_GET_UPC ioctl. |
122 | * 3.10 Apr 10, 1996 -- Fix compilation error with STANDARD_ATAPI. | 122 | * 3.10 Apr 10, 1996 -- Fix compilation error with STANDARD_ATAPI. |
123 | * 3.11 Apr 29, 1996 -- Patch from Heiko Eissfeldt <heiko@colossus.escape.de> | 123 | * 3.11 Apr 29, 1996 -- Patch from Heiko Eißfeldt <heiko@colossus.escape.de> |
124 | * to remove redundant verify_area calls. | 124 | * to remove redundant verify_area calls. |
125 | * 3.12 May 7, 1996 -- Rudimentary changer support. Based on patches | 125 | * 3.12 May 7, 1996 -- Rudimentary changer support. Based on patches |
126 | * from Gerhard Zuber <zuber@berlin.snafu.de>. | 126 | * from Gerhard Zuber <zuber@berlin.snafu.de>. |
@@ -256,7 +256,7 @@ | |||
256 | * - Minimize the TOC reading - only do it when we | 256 | * - Minimize the TOC reading - only do it when we |
257 | * know a media change has occurred. | 257 | * know a media change has occurred. |
258 | * - Moved all the CDROMREADx ioctls to the Uniform layer. | 258 | * - Moved all the CDROMREADx ioctls to the Uniform layer. |
259 | * - Heiko Eissfeldt <heiko@colossus.escape.de> supplied | 259 | * - Heiko Eißfeldt <heiko@colossus.escape.de> supplied |
260 | * some fixes for CDI. | 260 | * some fixes for CDI. |
261 | * - CD-ROM leaving door locked fix from Andries | 261 | * - CD-ROM leaving door locked fix from Andries |
262 | * Brouwer <Andries.Brouwer@cwi.nl> | 262 | * Brouwer <Andries.Brouwer@cwi.nl> |
@@ -2341,7 +2341,7 @@ static int cdrom_read_toc(ide_drive_t *drive, struct request_sense *sense) | |||
2341 | If we get an error for the regular case, we assume | 2341 | If we get an error for the regular case, we assume |
2342 | a CDI without additional audio tracks. In this case | 2342 | a CDI without additional audio tracks. In this case |
2343 | the readable TOC is empty (CDI tracks are not included) | 2343 | the readable TOC is empty (CDI tracks are not included) |
2344 | and only holds the Leadout entry. Heiko Eißfeldt */ | 2344 | and only holds the Leadout entry. Heiko Eißfeldt */ |
2345 | ntracks = 0; | 2345 | ntracks = 0; |
2346 | stat = cdrom_read_tocentry(drive, CDROM_LEADOUT, 1, 0, | 2346 | stat = cdrom_read_tocentry(drive, CDROM_LEADOUT, 1, 0, |
2347 | (char *)&toc->hdr, | 2347 | (char *)&toc->hdr, |
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 2722d9165b6b..00123d99527a 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c | |||
@@ -593,28 +593,12 @@ static int smart_enable(ide_drive_t *drive) | |||
593 | return ide_raw_taskfile(drive, &args, NULL); | 593 | return ide_raw_taskfile(drive, &args, NULL); |
594 | } | 594 | } |
595 | 595 | ||
596 | static int get_smart_values(ide_drive_t *drive, u8 *buf) | 596 | static int get_smart_data(ide_drive_t *drive, u8 *buf, u8 sub_cmd) |
597 | { | 597 | { |
598 | ide_task_t args; | 598 | ide_task_t args; |
599 | 599 | ||
600 | memset(&args, 0, sizeof(ide_task_t)); | 600 | memset(&args, 0, sizeof(ide_task_t)); |
601 | args.tfRegister[IDE_FEATURE_OFFSET] = SMART_READ_VALUES; | 601 | args.tfRegister[IDE_FEATURE_OFFSET] = sub_cmd; |
602 | args.tfRegister[IDE_NSECTOR_OFFSET] = 0x01; | ||
603 | args.tfRegister[IDE_LCYL_OFFSET] = SMART_LCYL_PASS; | ||
604 | args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; | ||
605 | args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SMART; | ||
606 | args.command_type = IDE_DRIVE_TASK_IN; | ||
607 | args.data_phase = TASKFILE_IN; | ||
608 | args.handler = &task_in_intr; | ||
609 | (void) smart_enable(drive); | ||
610 | return ide_raw_taskfile(drive, &args, buf); | ||
611 | } | ||
612 | |||
613 | static int get_smart_thresholds(ide_drive_t *drive, u8 *buf) | ||
614 | { | ||
615 | ide_task_t args; | ||
616 | memset(&args, 0, sizeof(ide_task_t)); | ||
617 | args.tfRegister[IDE_FEATURE_OFFSET] = SMART_READ_THRESHOLDS; | ||
618 | args.tfRegister[IDE_NSECTOR_OFFSET] = 0x01; | 602 | args.tfRegister[IDE_NSECTOR_OFFSET] = 0x01; |
619 | args.tfRegister[IDE_LCYL_OFFSET] = SMART_LCYL_PASS; | 603 | args.tfRegister[IDE_LCYL_OFFSET] = SMART_LCYL_PASS; |
620 | args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; | 604 | args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; |
@@ -656,7 +640,7 @@ static int proc_idedisk_read_smart_thresholds | |||
656 | ide_drive_t *drive = (ide_drive_t *)data; | 640 | ide_drive_t *drive = (ide_drive_t *)data; |
657 | int len = 0, i = 0; | 641 | int len = 0, i = 0; |
658 | 642 | ||
659 | if (!get_smart_thresholds(drive, page)) { | 643 | if (get_smart_data(drive, page, SMART_READ_THRESHOLDS) == 0) { |
660 | unsigned short *val = (unsigned short *) page; | 644 | unsigned short *val = (unsigned short *) page; |
661 | char *out = ((char *)val) + (SECTOR_WORDS * 4); | 645 | char *out = ((char *)val) + (SECTOR_WORDS * 4); |
662 | page = out; | 646 | page = out; |
@@ -675,7 +659,7 @@ static int proc_idedisk_read_smart_values | |||
675 | ide_drive_t *drive = (ide_drive_t *)data; | 659 | ide_drive_t *drive = (ide_drive_t *)data; |
676 | int len = 0, i = 0; | 660 | int len = 0, i = 0; |
677 | 661 | ||
678 | if (!get_smart_values(drive, page)) { | 662 | if (get_smart_data(drive, page, SMART_READ_VALUES) == 0) { |
679 | unsigned short *val = (unsigned short *) page; | 663 | unsigned short *val = (unsigned short *) page; |
680 | char *out = ((char *)val) + (SECTOR_WORDS * 4); | 664 | char *out = ((char *)val) + (SECTOR_WORDS * 4); |
681 | page = out; | 665 | page = out; |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 80b4f17f3941..428f7a8a00b6 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -901,10 +901,7 @@ void ide_dma_timeout (ide_drive_t *drive) | |||
901 | 901 | ||
902 | EXPORT_SYMBOL(ide_dma_timeout); | 902 | EXPORT_SYMBOL(ide_dma_timeout); |
903 | 903 | ||
904 | /* | 904 | static void ide_release_dma_engine(ide_hwif_t *hwif) |
905 | * Needed for allowing full modular support of ide-driver | ||
906 | */ | ||
907 | static int ide_release_dma_engine(ide_hwif_t *hwif) | ||
908 | { | 905 | { |
909 | if (hwif->dmatable_cpu) { | 906 | if (hwif->dmatable_cpu) { |
910 | pci_free_consistent(hwif->pci_dev, | 907 | pci_free_consistent(hwif->pci_dev, |
@@ -913,7 +910,6 @@ static int ide_release_dma_engine(ide_hwif_t *hwif) | |||
913 | hwif->dmatable_dma); | 910 | hwif->dmatable_dma); |
914 | hwif->dmatable_cpu = NULL; | 911 | hwif->dmatable_cpu = NULL; |
915 | } | 912 | } |
916 | return 1; | ||
917 | } | 913 | } |
918 | 914 | ||
919 | static int ide_release_iomio_dma(ide_hwif_t *hwif) | 915 | static int ide_release_iomio_dma(ide_hwif_t *hwif) |
@@ -956,12 +952,6 @@ static int ide_mapped_mmio_dma(ide_hwif_t *hwif, unsigned long base, unsigned in | |||
956 | { | 952 | { |
957 | printk(KERN_INFO " %s: MMIO-DMA ", hwif->name); | 953 | printk(KERN_INFO " %s: MMIO-DMA ", hwif->name); |
958 | 954 | ||
959 | hwif->dma_base = base; | ||
960 | |||
961 | if(hwif->mate) | ||
962 | hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base : base; | ||
963 | else | ||
964 | hwif->dma_master = base; | ||
965 | return 0; | 955 | return 0; |
966 | } | 956 | } |
967 | 957 | ||
@@ -975,8 +965,6 @@ static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int port | |||
975 | return 1; | 965 | return 1; |
976 | } | 966 | } |
977 | 967 | ||
978 | hwif->dma_base = base; | ||
979 | |||
980 | if (hwif->cds->extra) { | 968 | if (hwif->cds->extra) { |
981 | hwif->extra_base = base + (hwif->channel ? 8 : 16); | 969 | hwif->extra_base = base + (hwif->channel ? 8 : 16); |
982 | 970 | ||
@@ -991,10 +979,6 @@ static int ide_iomio_dma(ide_hwif_t *hwif, unsigned long base, unsigned int port | |||
991 | } | 979 | } |
992 | } | 980 | } |
993 | 981 | ||
994 | if(hwif->mate) | ||
995 | hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base:base; | ||
996 | else | ||
997 | hwif->dma_master = base; | ||
998 | return 0; | 982 | return 0; |
999 | } | 983 | } |
1000 | 984 | ||
@@ -1006,12 +990,9 @@ static int ide_dma_iobase(ide_hwif_t *hwif, unsigned long base, unsigned int por | |||
1006 | return ide_iomio_dma(hwif, base, ports); | 990 | return ide_iomio_dma(hwif, base, ports); |
1007 | } | 991 | } |
1008 | 992 | ||
1009 | /* | 993 | void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, unsigned num_ports) |
1010 | * This can be called for a dynamically installed interface. Don't __init it | ||
1011 | */ | ||
1012 | void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_ports) | ||
1013 | { | 994 | { |
1014 | if (ide_dma_iobase(hwif, dma_base, num_ports)) | 995 | if (ide_dma_iobase(hwif, base, num_ports)) |
1015 | return; | 996 | return; |
1016 | 997 | ||
1017 | if (ide_allocate_dma_engine(hwif)) { | 998 | if (ide_allocate_dma_engine(hwif)) { |
@@ -1019,6 +1000,13 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p | |||
1019 | return; | 1000 | return; |
1020 | } | 1001 | } |
1021 | 1002 | ||
1003 | hwif->dma_base = base; | ||
1004 | |||
1005 | if (hwif->mate) | ||
1006 | hwif->dma_master = hwif->channel ? hwif->mate->dma_base : base; | ||
1007 | else | ||
1008 | hwif->dma_master = base; | ||
1009 | |||
1022 | if (!(hwif->dma_command)) | 1010 | if (!(hwif->dma_command)) |
1023 | hwif->dma_command = hwif->dma_base; | 1011 | hwif->dma_command = hwif->dma_base; |
1024 | if (!(hwif->dma_vendor1)) | 1012 | if (!(hwif->dma_vendor1)) |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 32eaa3f80515..c89f0d3058e9 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -55,7 +55,7 @@ | |||
55 | #include <asm/io.h> | 55 | #include <asm/io.h> |
56 | 56 | ||
57 | static int __ide_end_request(ide_drive_t *drive, struct request *rq, | 57 | static int __ide_end_request(ide_drive_t *drive, struct request *rq, |
58 | int uptodate, unsigned int nr_bytes) | 58 | int uptodate, unsigned int nr_bytes, int dequeue) |
59 | { | 59 | { |
60 | int ret = 1; | 60 | int ret = 1; |
61 | 61 | ||
@@ -80,9 +80,11 @@ static int __ide_end_request(ide_drive_t *drive, struct request *rq, | |||
80 | 80 | ||
81 | if (!end_that_request_chunk(rq, uptodate, nr_bytes)) { | 81 | if (!end_that_request_chunk(rq, uptodate, nr_bytes)) { |
82 | add_disk_randomness(rq->rq_disk); | 82 | add_disk_randomness(rq->rq_disk); |
83 | if (!list_empty(&rq->queuelist)) | 83 | if (dequeue) { |
84 | blkdev_dequeue_request(rq); | 84 | if (!list_empty(&rq->queuelist)) |
85 | HWGROUP(drive)->rq = NULL; | 85 | blkdev_dequeue_request(rq); |
86 | HWGROUP(drive)->rq = NULL; | ||
87 | } | ||
86 | end_that_request_last(rq, uptodate); | 88 | end_that_request_last(rq, uptodate); |
87 | ret = 0; | 89 | ret = 0; |
88 | } | 90 | } |
@@ -122,7 +124,7 @@ int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors) | |||
122 | nr_bytes = rq->hard_cur_sectors << 9; | 124 | nr_bytes = rq->hard_cur_sectors << 9; |
123 | } | 125 | } |
124 | 126 | ||
125 | ret = __ide_end_request(drive, rq, uptodate, nr_bytes); | 127 | ret = __ide_end_request(drive, rq, uptodate, nr_bytes, 1); |
126 | 128 | ||
127 | spin_unlock_irqrestore(&ide_lock, flags); | 129 | spin_unlock_irqrestore(&ide_lock, flags); |
128 | return ret; | 130 | return ret; |
@@ -255,39 +257,13 @@ int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | |||
255 | int uptodate, int nr_sectors) | 257 | int uptodate, int nr_sectors) |
256 | { | 258 | { |
257 | unsigned long flags; | 259 | unsigned long flags; |
258 | int ret = 1; | 260 | int ret; |
259 | 261 | ||
260 | spin_lock_irqsave(&ide_lock, flags); | 262 | spin_lock_irqsave(&ide_lock, flags); |
261 | |||
262 | BUG_ON(!blk_rq_started(rq)); | 263 | BUG_ON(!blk_rq_started(rq)); |
263 | 264 | ret = __ide_end_request(drive, rq, uptodate, nr_sectors << 9, 0); | |
264 | /* | ||
265 | * if failfast is set on a request, override number of sectors and | ||
266 | * complete the whole request right now | ||
267 | */ | ||
268 | if (blk_noretry_request(rq) && end_io_error(uptodate)) | ||
269 | nr_sectors = rq->hard_nr_sectors; | ||
270 | |||
271 | if (!blk_fs_request(rq) && end_io_error(uptodate) && !rq->errors) | ||
272 | rq->errors = -EIO; | ||
273 | |||
274 | /* | ||
275 | * decide whether to reenable DMA -- 3 is a random magic for now, | ||
276 | * if we DMA timeout more than 3 times, just stay in PIO | ||
277 | */ | ||
278 | if (drive->state == DMA_PIO_RETRY && drive->retry_pio <= 3) { | ||
279 | drive->state = 0; | ||
280 | HWGROUP(drive)->hwif->ide_dma_on(drive); | ||
281 | } | ||
282 | |||
283 | if (!end_that_request_first(rq, uptodate, nr_sectors)) { | ||
284 | add_disk_randomness(rq->rq_disk); | ||
285 | if (blk_rq_tagged(rq)) | ||
286 | blk_queue_end_tag(drive->queue, rq); | ||
287 | end_that_request_last(rq, uptodate); | ||
288 | ret = 0; | ||
289 | } | ||
290 | spin_unlock_irqrestore(&ide_lock, flags); | 265 | spin_unlock_irqrestore(&ide_lock, flags); |
266 | |||
291 | return ret; | 267 | return ret; |
292 | } | 268 | } |
293 | EXPORT_SYMBOL_GPL(ide_end_dequeued_request); | 269 | EXPORT_SYMBOL_GPL(ide_end_dequeued_request); |
@@ -800,7 +776,20 @@ static ide_startstop_t do_special (ide_drive_t *drive) | |||
800 | s->b.set_tune = 0; | 776 | s->b.set_tune = 0; |
801 | 777 | ||
802 | if (set_pio_mode_abuse(drive->hwif, req_pio)) { | 778 | if (set_pio_mode_abuse(drive->hwif, req_pio)) { |
803 | if (hwif->set_pio_mode) | 779 | |
780 | if (hwif->set_pio_mode == NULL) | ||
781 | return ide_stopped; | ||
782 | |||
783 | /* | ||
784 | * take ide_lock for drive->[no_]unmask/[no_]io_32bit | ||
785 | */ | ||
786 | if (req_pio == 8 || req_pio == 9) { | ||
787 | unsigned long flags; | ||
788 | |||
789 | spin_lock_irqsave(&ide_lock, flags); | ||
790 | hwif->set_pio_mode(drive, req_pio); | ||
791 | spin_unlock_irqrestore(&ide_lock, flags); | ||
792 | } else | ||
804 | hwif->set_pio_mode(drive, req_pio); | 793 | hwif->set_pio_mode(drive, req_pio); |
805 | } else { | 794 | } else { |
806 | int keep_dma = drive->using_dma; | 795 | int keep_dma = drive->using_dma; |
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index d4d790f91f91..95168833d069 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -693,35 +693,16 @@ static u8 ide_auto_reduce_xfer (ide_drive_t *drive) | |||
693 | } | 693 | } |
694 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 694 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
695 | 695 | ||
696 | /* | 696 | int ide_driveid_update(ide_drive_t *drive) |
697 | * Update the | ||
698 | */ | ||
699 | int ide_driveid_update (ide_drive_t *drive) | ||
700 | { | 697 | { |
701 | ide_hwif_t *hwif = HWIF(drive); | 698 | ide_hwif_t *hwif = drive->hwif; |
702 | struct hd_driveid *id; | 699 | struct hd_driveid *id; |
703 | #if 0 | 700 | unsigned long timeout, flags; |
704 | id = kmalloc(SECTOR_WORDS*4, GFP_ATOMIC); | ||
705 | if (!id) | ||
706 | return 0; | ||
707 | |||
708 | taskfile_lib_get_identify(drive, (char *)&id); | ||
709 | 701 | ||
710 | ide_fix_driveid(id); | ||
711 | if (id) { | ||
712 | drive->id->dma_ultra = id->dma_ultra; | ||
713 | drive->id->dma_mword = id->dma_mword; | ||
714 | drive->id->dma_1word = id->dma_1word; | ||
715 | /* anything more ? */ | ||
716 | kfree(id); | ||
717 | } | ||
718 | return 1; | ||
719 | #else | ||
720 | /* | 702 | /* |
721 | * Re-read drive->id for possible DMA mode | 703 | * Re-read drive->id for possible DMA mode |
722 | * change (copied from ide-probe.c) | 704 | * change (copied from ide-probe.c) |
723 | */ | 705 | */ |
724 | unsigned long timeout, flags; | ||
725 | 706 | ||
726 | SELECT_MASK(drive, 1); | 707 | SELECT_MASK(drive, 1); |
727 | if (IDE_CONTROL_REG) | 708 | if (IDE_CONTROL_REG) |
@@ -763,7 +744,6 @@ int ide_driveid_update (ide_drive_t *drive) | |||
763 | } | 744 | } |
764 | 745 | ||
765 | return 1; | 746 | return 1; |
766 | #endif | ||
767 | } | 747 | } |
768 | 748 | ||
769 | int ide_config_drive_speed(ide_drive_t *drive, u8 speed) | 749 | int ide_config_drive_speed(ide_drive_t *drive, u8 speed) |
diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c index 2b8009c50e91..e245521af7b5 100644 --- a/drivers/ide/ide-pnp.c +++ b/drivers/ide/ide-pnp.c | |||
@@ -40,9 +40,8 @@ static int idepnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id | |||
40 | ide_std_init_ports(&hw, pnp_port_start(dev, 0), | 40 | ide_std_init_ports(&hw, pnp_port_start(dev, 0), |
41 | pnp_port_start(dev, 1)); | 41 | pnp_port_start(dev, 1)); |
42 | hw.irq = pnp_irq(dev, 0); | 42 | hw.irq = pnp_irq(dev, 0); |
43 | hw.dma = NO_DMA; | ||
44 | 43 | ||
45 | index = ide_register_hw(&hw, 1, &hwif); | 44 | index = ide_register_hw(&hw, NULL, 1, &hwif); |
46 | 45 | ||
47 | if (index != -1) { | 46 | if (index != -1) { |
48 | printk(KERN_INFO "ide%d: generic PnP IDE interface\n", index); | 47 | printk(KERN_INFO "ide%d: generic PnP IDE interface\n", index); |
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index e294c7415c27..d5146c57e5b3 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -717,7 +717,7 @@ EXPORT_SYMBOL_GPL(ide_undecoded_slave); | |||
717 | * This routine only knows how to look for drive units 0 and 1 | 717 | * This routine only knows how to look for drive units 0 and 1 |
718 | * on an interface, so any setting of MAX_DRIVES > 2 won't work here. | 718 | * on an interface, so any setting of MAX_DRIVES > 2 won't work here. |
719 | */ | 719 | */ |
720 | static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) | 720 | static void probe_hwif(ide_hwif_t *hwif) |
721 | { | 721 | { |
722 | unsigned long flags; | 722 | unsigned long flags; |
723 | unsigned int irqd; | 723 | unsigned int irqd; |
@@ -819,8 +819,8 @@ static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) | |||
819 | return; | 819 | return; |
820 | } | 820 | } |
821 | 821 | ||
822 | if (fixup) | 822 | if (hwif->fixup) |
823 | fixup(hwif); | 823 | hwif->fixup(hwif); |
824 | 824 | ||
825 | for (unit = 0; unit < MAX_DRIVES; ++unit) { | 825 | for (unit = 0; unit < MAX_DRIVES; ++unit) { |
826 | ide_drive_t *drive = &hwif->drives[unit]; | 826 | ide_drive_t *drive = &hwif->drives[unit]; |
@@ -859,10 +859,11 @@ static void probe_hwif(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) | |||
859 | } | 859 | } |
860 | 860 | ||
861 | static int hwif_init(ide_hwif_t *hwif); | 861 | static int hwif_init(ide_hwif_t *hwif); |
862 | static void hwif_register_devices(ide_hwif_t *hwif); | ||
862 | 863 | ||
863 | int probe_hwif_init_with_fixup(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif)) | 864 | static int probe_hwif_init(ide_hwif_t *hwif) |
864 | { | 865 | { |
865 | probe_hwif(hwif, fixup); | 866 | probe_hwif(hwif); |
866 | 867 | ||
867 | if (!hwif_init(hwif)) { | 868 | if (!hwif_init(hwif)) { |
868 | printk(KERN_INFO "%s: failed to initialize IDE interface\n", | 869 | printk(KERN_INFO "%s: failed to initialize IDE interface\n", |
@@ -870,34 +871,12 @@ int probe_hwif_init_with_fixup(ide_hwif_t *hwif, void (*fixup)(ide_hwif_t *hwif) | |||
870 | return -1; | 871 | return -1; |
871 | } | 872 | } |
872 | 873 | ||
873 | if (hwif->present) { | 874 | if (hwif->present) |
874 | u16 unit = 0; | 875 | hwif_register_devices(hwif); |
875 | int ret; | ||
876 | 876 | ||
877 | for (unit = 0; unit < MAX_DRIVES; ++unit) { | ||
878 | ide_drive_t *drive = &hwif->drives[unit]; | ||
879 | /* For now don't attach absent drives, we may | ||
880 | want them on default or a new "empty" class | ||
881 | for hotplug reprobing ? */ | ||
882 | if (drive->present) { | ||
883 | ret = device_register(&drive->gendev); | ||
884 | if (ret < 0) | ||
885 | printk(KERN_WARNING "IDE: %s: " | ||
886 | "device_register error: %d\n", | ||
887 | __FUNCTION__, ret); | ||
888 | } | ||
889 | } | ||
890 | } | ||
891 | return 0; | 877 | return 0; |
892 | } | 878 | } |
893 | 879 | ||
894 | int probe_hwif_init(ide_hwif_t *hwif) | ||
895 | { | ||
896 | return probe_hwif_init_with_fixup(hwif, NULL); | ||
897 | } | ||
898 | |||
899 | EXPORT_SYMBOL(probe_hwif_init); | ||
900 | |||
901 | #if MAX_HWIFS > 1 | 880 | #if MAX_HWIFS > 1 |
902 | /* | 881 | /* |
903 | * save_match() is used to simplify logic in init_irq() below. | 882 | * save_match() is used to simplify logic in init_irq() below. |
@@ -1379,6 +1358,24 @@ out: | |||
1379 | return 0; | 1358 | return 0; |
1380 | } | 1359 | } |
1381 | 1360 | ||
1361 | static void hwif_register_devices(ide_hwif_t *hwif) | ||
1362 | { | ||
1363 | unsigned int i; | ||
1364 | |||
1365 | for (i = 0; i < MAX_DRIVES; i++) { | ||
1366 | ide_drive_t *drive = &hwif->drives[i]; | ||
1367 | |||
1368 | if (drive->present) { | ||
1369 | int ret = device_register(&drive->gendev); | ||
1370 | |||
1371 | if (ret < 0) | ||
1372 | printk(KERN_WARNING "IDE: %s: " | ||
1373 | "device_register error: %d\n", | ||
1374 | __FUNCTION__, ret); | ||
1375 | } | ||
1376 | } | ||
1377 | } | ||
1378 | |||
1382 | int ideprobe_init (void) | 1379 | int ideprobe_init (void) |
1383 | { | 1380 | { |
1384 | unsigned int index; | 1381 | unsigned int index; |
@@ -1390,27 +1387,18 @@ int ideprobe_init (void) | |||
1390 | 1387 | ||
1391 | for (index = 0; index < MAX_HWIFS; ++index) | 1388 | for (index = 0; index < MAX_HWIFS; ++index) |
1392 | if (probe[index]) | 1389 | if (probe[index]) |
1393 | probe_hwif(&ide_hwifs[index], NULL); | 1390 | probe_hwif(&ide_hwifs[index]); |
1394 | for (index = 0; index < MAX_HWIFS; ++index) | 1391 | for (index = 0; index < MAX_HWIFS; ++index) |
1395 | if (probe[index]) | 1392 | if (probe[index]) |
1396 | hwif_init(&ide_hwifs[index]); | 1393 | hwif_init(&ide_hwifs[index]); |
1397 | for (index = 0; index < MAX_HWIFS; ++index) { | 1394 | for (index = 0; index < MAX_HWIFS; ++index) { |
1398 | if (probe[index]) { | 1395 | if (probe[index]) { |
1399 | ide_hwif_t *hwif = &ide_hwifs[index]; | 1396 | ide_hwif_t *hwif = &ide_hwifs[index]; |
1400 | int unit; | ||
1401 | if (!hwif->present) | 1397 | if (!hwif->present) |
1402 | continue; | 1398 | continue; |
1403 | if (hwif->chipset == ide_unknown || hwif->chipset == ide_forced) | 1399 | if (hwif->chipset == ide_unknown || hwif->chipset == ide_forced) |
1404 | hwif->chipset = ide_generic; | 1400 | hwif->chipset = ide_generic; |
1405 | for (unit = 0; unit < MAX_DRIVES; ++unit) | 1401 | hwif_register_devices(hwif); |
1406 | if (hwif->drives[unit].present) { | ||
1407 | int ret = device_register( | ||
1408 | &hwif->drives[unit].gendev); | ||
1409 | if (ret < 0) | ||
1410 | printk(KERN_WARNING "IDE: %s: " | ||
1411 | "device_register error: %d\n", | ||
1412 | __FUNCTION__, ret); | ||
1413 | } | ||
1414 | } | 1402 | } |
1415 | } | 1403 | } |
1416 | for (index = 0; index < MAX_HWIFS; ++index) | 1404 | for (index = 0; index < MAX_HWIFS; ++index) |
@@ -1420,3 +1408,22 @@ int ideprobe_init (void) | |||
1420 | } | 1408 | } |
1421 | 1409 | ||
1422 | EXPORT_SYMBOL_GPL(ideprobe_init); | 1410 | EXPORT_SYMBOL_GPL(ideprobe_init); |
1411 | |||
1412 | int ide_device_add(u8 idx[4]) | ||
1413 | { | ||
1414 | int i, rc = 0; | ||
1415 | |||
1416 | for (i = 0; i < 4; i++) { | ||
1417 | if (idx[i] != 0xff) | ||
1418 | rc |= probe_hwif_init(&ide_hwifs[idx[i]]); | ||
1419 | } | ||
1420 | |||
1421 | for (i = 0; i < 4; i++) { | ||
1422 | if (idx[i] != 0xff) | ||
1423 | ide_proc_register_port(&ide_hwifs[idx[i]]); | ||
1424 | } | ||
1425 | |||
1426 | return rc; | ||
1427 | } | ||
1428 | |||
1429 | EXPORT_SYMBOL_GPL(ide_device_add); | ||
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index fc1d8ae6a803..a4007d30da52 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -804,8 +804,6 @@ void ide_proc_register_port(ide_hwif_t *hwif) | |||
804 | create_proc_ide_drives(hwif); | 804 | create_proc_ide_drives(hwif); |
805 | } | 805 | } |
806 | 806 | ||
807 | EXPORT_SYMBOL_GPL(ide_proc_register_port); | ||
808 | |||
809 | #ifdef CONFIG_BLK_DEV_IDEPCI | 807 | #ifdef CONFIG_BLK_DEV_IDEPCI |
810 | void ide_pci_create_host_proc(const char *name, get_info_t *get_info) | 808 | void ide_pci_create_host_proc(const char *name, get_info_t *get_info) |
811 | { | 809 | { |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 1fa57947bca0..7b9181b5469d 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -565,7 +565,7 @@ typedef struct os_dat_s { | |||
565 | * The following parameter is used to select the point in the internal | 565 | * The following parameter is used to select the point in the internal |
566 | * tape fifo in which we will start to refill the buffer. Decreasing | 566 | * tape fifo in which we will start to refill the buffer. Decreasing |
567 | * the following parameter will improve the system's latency and | 567 | * the following parameter will improve the system's latency and |
568 | * interactive response, while using a high value might improve sytem | 568 | * interactive response, while using a high value might improve system |
569 | * throughput. | 569 | * throughput. |
570 | */ | 570 | */ |
571 | #define IDETAPE_FIFO_THRESHOLD 2 | 571 | #define IDETAPE_FIFO_THRESHOLD 2 |
@@ -621,7 +621,6 @@ typedef struct os_dat_s { | |||
621 | */ | 621 | */ |
622 | #define USE_IOTRACE 0 | 622 | #define USE_IOTRACE 0 |
623 | #if USE_IOTRACE | 623 | #if USE_IOTRACE |
624 | #include <linux/io_trace.h> | ||
625 | #define IO_IDETAPE_FIFO 500 | 624 | #define IO_IDETAPE_FIFO 500 |
626 | #endif | 625 | #endif |
627 | 626 | ||
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 2a3c8d498343..73ef6bf5fbcc 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -8,23 +8,6 @@ | |||
8 | * Copyright (C) 2003-2004 Bartlomiej Zolnierkiewicz | 8 | * Copyright (C) 2003-2004 Bartlomiej Zolnierkiewicz |
9 | * | 9 | * |
10 | * The big the bad and the ugly. | 10 | * The big the bad and the ugly. |
11 | * | ||
12 | * Problems to be fixed because of BH interface or the lack therefore. | ||
13 | * | ||
14 | * Fill me in stupid !!! | ||
15 | * | ||
16 | * HOST: | ||
17 | * General refers to the Controller and Driver "pair". | ||
18 | * DATA HANDLER: | ||
19 | * Under the context of Linux it generally refers to an interrupt handler. | ||
20 | * However, it correctly describes the 'HOST' | ||
21 | * DATA BLOCK: | ||
22 | * The amount of data needed to be transfered as predefined in the | ||
23 | * setup of the device. | ||
24 | * STORAGE ATOMIC: | ||
25 | * The 'DATA BLOCK' associated to the 'DATA HANDLER', and can be as | ||
26 | * small as a single sector or as large as the entire command block | ||
27 | * request. | ||
28 | */ | 11 | */ |
29 | 12 | ||
30 | #include <linux/module.h> | 13 | #include <linux/module.h> |
@@ -695,9 +678,6 @@ int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, | |||
695 | return ide_do_drive_cmd(drive, &rq, ide_wait); | 678 | return ide_do_drive_cmd(drive, &rq, ide_wait); |
696 | } | 679 | } |
697 | 680 | ||
698 | /* | ||
699 | * FIXME : this needs to map into at taskfile. <andre@linux-ide.org> | ||
700 | */ | ||
701 | int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | 681 | int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) |
702 | { | 682 | { |
703 | int err = 0; | 683 | int err = 0; |
@@ -761,9 +741,6 @@ static int ide_wait_cmd_task(ide_drive_t *drive, u8 *buf) | |||
761 | return ide_do_drive_cmd(drive, &rq, ide_wait); | 741 | return ide_do_drive_cmd(drive, &rq, ide_wait); |
762 | } | 742 | } |
763 | 743 | ||
764 | /* | ||
765 | * FIXME : this needs to map into at taskfile. <andre@linux-ide.org> | ||
766 | */ | ||
767 | int ide_task_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) | 744 | int ide_task_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg) |
768 | { | 745 | { |
769 | void __user *p = (void __user *)arg; | 746 | void __user *p = (void __user *)arg; |
@@ -860,9 +837,14 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
860 | case TASKFILE_OUT_DMA: | 837 | case TASKFILE_OUT_DMA: |
861 | case TASKFILE_IN_DMAQ: | 838 | case TASKFILE_IN_DMAQ: |
862 | case TASKFILE_IN_DMA: | 839 | case TASKFILE_IN_DMA: |
863 | hwif->dma_setup(drive); | 840 | if (!drive->using_dma) |
864 | hwif->dma_exec_cmd(drive, taskfile->command); | 841 | break; |
865 | hwif->dma_start(drive); | 842 | |
843 | if (!hwif->dma_setup(drive)) { | ||
844 | hwif->dma_exec_cmd(drive, taskfile->command); | ||
845 | hwif->dma_start(drive); | ||
846 | return ide_started; | ||
847 | } | ||
866 | break; | 848 | break; |
867 | 849 | ||
868 | default: | 850 | default: |
@@ -876,7 +858,8 @@ ide_startstop_t flagged_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
876 | return task->prehandler(drive, task->rq); | 858 | return task->prehandler(drive, task->rq); |
877 | } | 859 | } |
878 | ide_execute_command(drive, taskfile->command, task->handler, WAIT_WORSTCASE, NULL); | 860 | ide_execute_command(drive, taskfile->command, task->handler, WAIT_WORSTCASE, NULL); |
861 | return ide_started; | ||
879 | } | 862 | } |
880 | 863 | ||
881 | return ide_started; | 864 | return ide_stopped; |
882 | } | 865 | } |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 961e6c897286..674a65c1a130 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -168,7 +168,6 @@ static void init_hwif_default(ide_hwif_t *hwif, unsigned int index) | |||
168 | 168 | ||
169 | ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, &hwif->irq); | 169 | ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, &hwif->irq); |
170 | 170 | ||
171 | memcpy(&hwif->hw, &hw, sizeof(hw)); | ||
172 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hw.io_ports)); | 171 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hw.io_ports)); |
173 | 172 | ||
174 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; | 173 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; |
@@ -214,7 +213,7 @@ static void __init init_ide_data (void) | |||
214 | init_hwif_data(hwif, index); | 213 | init_hwif_data(hwif, index); |
215 | init_hwif_default(hwif, index); | 214 | init_hwif_default(hwif, index); |
216 | #if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI) | 215 | #if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI) |
217 | hwif->irq = hwif->hw.irq = | 216 | hwif->irq = |
218 | ide_init_default_irq(hwif->io_ports[IDE_DATA_OFFSET]); | 217 | ide_init_default_irq(hwif->io_ports[IDE_DATA_OFFSET]); |
219 | #endif | 218 | #endif |
220 | } | 219 | } |
@@ -265,6 +264,30 @@ static int ide_system_bus_speed(void) | |||
265 | return system_bus_speed; | 264 | return system_bus_speed; |
266 | } | 265 | } |
267 | 266 | ||
267 | ide_hwif_t * ide_find_port(unsigned long base) | ||
268 | { | ||
269 | ide_hwif_t *hwif; | ||
270 | int i; | ||
271 | |||
272 | for (i = 0; i < MAX_HWIFS; i++) { | ||
273 | hwif = &ide_hwifs[i]; | ||
274 | if (hwif->io_ports[IDE_DATA_OFFSET] == base) | ||
275 | goto found; | ||
276 | } | ||
277 | |||
278 | for (i = 0; i < MAX_HWIFS; i++) { | ||
279 | hwif = &ide_hwifs[i]; | ||
280 | if (hwif->io_ports[IDE_DATA_OFFSET] == 0) | ||
281 | goto found; | ||
282 | } | ||
283 | |||
284 | hwif = NULL; | ||
285 | found: | ||
286 | return hwif; | ||
287 | } | ||
288 | |||
289 | EXPORT_SYMBOL_GPL(ide_find_port); | ||
290 | |||
268 | static struct resource* hwif_request_region(ide_hwif_t *hwif, | 291 | static struct resource* hwif_request_region(ide_hwif_t *hwif, |
269 | unsigned long addr, int num) | 292 | unsigned long addr, int num) |
270 | { | 293 | { |
@@ -391,6 +414,8 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif) | |||
391 | hwif->cds = tmp_hwif->cds; | 414 | hwif->cds = tmp_hwif->cds; |
392 | #endif | 415 | #endif |
393 | 416 | ||
417 | hwif->fixup = tmp_hwif->fixup; | ||
418 | |||
394 | hwif->set_pio_mode = tmp_hwif->set_pio_mode; | 419 | hwif->set_pio_mode = tmp_hwif->set_pio_mode; |
395 | hwif->set_dma_mode = tmp_hwif->set_dma_mode; | 420 | hwif->set_dma_mode = tmp_hwif->set_dma_mode; |
396 | hwif->mdma_filter = tmp_hwif->mdma_filter; | 421 | hwif->mdma_filter = tmp_hwif->mdma_filter; |
@@ -652,7 +677,6 @@ void ide_setup_ports ( hw_regs_t *hw, | |||
652 | } | 677 | } |
653 | } | 678 | } |
654 | hw->irq = irq; | 679 | hw->irq = irq; |
655 | hw->dma = NO_DMA; | ||
656 | hw->ack_intr = ack_intr; | 680 | hw->ack_intr = ack_intr; |
657 | /* | 681 | /* |
658 | * hw->iops = iops; | 682 | * hw->iops = iops; |
@@ -660,11 +684,11 @@ void ide_setup_ports ( hw_regs_t *hw, | |||
660 | } | 684 | } |
661 | 685 | ||
662 | /** | 686 | /** |
663 | * ide_register_hw_with_fixup - register IDE interface | 687 | * ide_register_hw - register IDE interface |
664 | * @hw: hardware registers | 688 | * @hw: hardware registers |
689 | * @fixup: fixup function | ||
665 | * @initializing: set while initializing built-in drivers | 690 | * @initializing: set while initializing built-in drivers |
666 | * @hwifp: pointer to returned hwif | 691 | * @hwifp: pointer to returned hwif |
667 | * @fixup: fixup function | ||
668 | * | 692 | * |
669 | * Register an IDE interface, specifying exactly the registers etc. | 693 | * Register an IDE interface, specifying exactly the registers etc. |
670 | * Set init=1 iff calling before probes have taken place. | 694 | * Set init=1 iff calling before probes have taken place. |
@@ -672,9 +696,8 @@ void ide_setup_ports ( hw_regs_t *hw, | |||
672 | * Returns -1 on error. | 696 | * Returns -1 on error. |
673 | */ | 697 | */ |
674 | 698 | ||
675 | int ide_register_hw_with_fixup(hw_regs_t *hw, int initializing, | 699 | int ide_register_hw(hw_regs_t *hw, void (*fixup)(ide_hwif_t *), |
676 | ide_hwif_t **hwifp, | 700 | int initializing, ide_hwif_t **hwifp) |
677 | void(*fixup)(ide_hwif_t *hwif)) | ||
678 | { | 701 | { |
679 | int index, retry = 1; | 702 | int index, retry = 1; |
680 | ide_hwif_t *hwif; | 703 | ide_hwif_t *hwif; |
@@ -682,7 +705,7 @@ int ide_register_hw_with_fixup(hw_regs_t *hw, int initializing, | |||
682 | do { | 705 | do { |
683 | for (index = 0; index < MAX_HWIFS; ++index) { | 706 | for (index = 0; index < MAX_HWIFS; ++index) { |
684 | hwif = &ide_hwifs[index]; | 707 | hwif = &ide_hwifs[index]; |
685 | if (hwif->hw.io_ports[IDE_DATA_OFFSET] == hw->io_ports[IDE_DATA_OFFSET]) | 708 | if (hwif->io_ports[IDE_DATA_OFFSET] == hw->io_ports[IDE_DATA_OFFSET]) |
686 | goto found; | 709 | goto found; |
687 | } | 710 | } |
688 | for (index = 0; index < MAX_HWIFS; ++index) { | 711 | for (index = 0; index < MAX_HWIFS; ++index) { |
@@ -690,7 +713,7 @@ int ide_register_hw_with_fixup(hw_regs_t *hw, int initializing, | |||
690 | if (hwif->hold) | 713 | if (hwif->hold) |
691 | continue; | 714 | continue; |
692 | if ((!hwif->present && !hwif->mate && !initializing) || | 715 | if ((!hwif->present && !hwif->mate && !initializing) || |
693 | (!hwif->hw.io_ports[IDE_DATA_OFFSET] && initializing)) | 716 | (!hwif->io_ports[IDE_DATA_OFFSET] && initializing)) |
694 | goto found; | 717 | goto found; |
695 | } | 718 | } |
696 | for (index = 0; index < MAX_HWIFS; index++) | 719 | for (index = 0; index < MAX_HWIFS; index++) |
@@ -706,16 +729,18 @@ found: | |||
706 | } | 729 | } |
707 | if (hwif->present) | 730 | if (hwif->present) |
708 | return -1; | 731 | return -1; |
709 | memcpy(&hwif->hw, hw, sizeof(*hw)); | 732 | memcpy(hwif->io_ports, hw->io_ports, sizeof(hwif->io_ports)); |
710 | memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->hw.io_ports)); | ||
711 | hwif->irq = hw->irq; | 733 | hwif->irq = hw->irq; |
712 | hwif->noprobe = 0; | 734 | hwif->noprobe = 0; |
735 | hwif->fixup = fixup; | ||
713 | hwif->chipset = hw->chipset; | 736 | hwif->chipset = hw->chipset; |
714 | hwif->gendev.parent = hw->dev; | 737 | hwif->gendev.parent = hw->dev; |
738 | hwif->ack_intr = hw->ack_intr; | ||
739 | |||
740 | if (initializing == 0) { | ||
741 | u8 idx[4] = { index, 0xff, 0xff, 0xff }; | ||
715 | 742 | ||
716 | if (!initializing) { | 743 | ide_device_add(idx); |
717 | probe_hwif_init_with_fixup(hwif, fixup); | ||
718 | ide_proc_register_port(hwif); | ||
719 | } | 744 | } |
720 | 745 | ||
721 | if (hwifp) | 746 | if (hwifp) |
@@ -724,13 +749,6 @@ found: | |||
724 | return (initializing || hwif->present) ? index : -1; | 749 | return (initializing || hwif->present) ? index : -1; |
725 | } | 750 | } |
726 | 751 | ||
727 | EXPORT_SYMBOL(ide_register_hw_with_fixup); | ||
728 | |||
729 | int ide_register_hw(hw_regs_t *hw, int initializing, ide_hwif_t **hwifp) | ||
730 | { | ||
731 | return ide_register_hw_with_fixup(hw, initializing, hwifp, NULL); | ||
732 | } | ||
733 | |||
734 | EXPORT_SYMBOL(ide_register_hw); | 752 | EXPORT_SYMBOL(ide_register_hw); |
735 | 753 | ||
736 | /* | 754 | /* |
@@ -1046,7 +1064,7 @@ int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device | |||
1046 | ide_init_hwif_ports(&hw, (unsigned long) args[0], | 1064 | ide_init_hwif_ports(&hw, (unsigned long) args[0], |
1047 | (unsigned long) args[1], NULL); | 1065 | (unsigned long) args[1], NULL); |
1048 | hw.irq = args[2]; | 1066 | hw.irq = args[2]; |
1049 | if (ide_register_hw(&hw, 0, NULL) == -1) | 1067 | if (ide_register_hw(&hw, NULL, 0, NULL) == -1) |
1050 | return -EIO; | 1068 | return -EIO; |
1051 | return 0; | 1069 | return 0; |
1052 | } | 1070 | } |
@@ -1397,6 +1415,9 @@ static int __init ide_setup(char *s) | |||
1397 | "reset", "minus6", "ata66", "minus8", "minus9", | 1415 | "reset", "minus6", "ata66", "minus8", "minus9", |
1398 | "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb", | 1416 | "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb", |
1399 | "dtc2278", "umc8672", "ali14xx", NULL }; | 1417 | "dtc2278", "umc8672", "ali14xx", NULL }; |
1418 | |||
1419 | hw_regs_t hwregs; | ||
1420 | |||
1400 | hw = s[3] - '0'; | 1421 | hw = s[3] - '0'; |
1401 | hwif = &ide_hwifs[hw]; | 1422 | hwif = &ide_hwifs[hw]; |
1402 | i = match_parm(&s[4], ide_words, vals, 3); | 1423 | i = match_parm(&s[4], ide_words, vals, 3); |
@@ -1506,9 +1527,9 @@ static int __init ide_setup(char *s) | |||
1506 | case 2: /* base,ctl */ | 1527 | case 2: /* base,ctl */ |
1507 | vals[2] = 0; /* default irq = probe for it */ | 1528 | vals[2] = 0; /* default irq = probe for it */ |
1508 | case 3: /* base,ctl,irq */ | 1529 | case 3: /* base,ctl,irq */ |
1509 | hwif->hw.irq = vals[2]; | 1530 | memset(&hwregs, 0, sizeof(hwregs)); |
1510 | ide_init_hwif_ports(&hwif->hw, (unsigned long) vals[0], (unsigned long) vals[1], &hwif->irq); | 1531 | ide_init_hwif_ports(&hwregs, vals[0], vals[1], &hwif->irq); |
1511 | memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); | 1532 | memcpy(hwif->io_ports, hwregs.io_ports, sizeof(hwif->io_ports)); |
1512 | hwif->irq = vals[2]; | 1533 | hwif->irq = vals[2]; |
1513 | hwif->noprobe = 0; | 1534 | hwif->noprobe = 0; |
1514 | hwif->chipset = ide_forced; | 1535 | hwif->chipset = ide_forced; |
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c index 2f0ef9b44033..10311ecc674a 100644 --- a/drivers/ide/legacy/ali14xx.c +++ b/drivers/ide/legacy/ali14xx.c | |||
@@ -102,6 +102,8 @@ static void outReg (u8 data, u8 reg) | |||
102 | outb_p(data, dataPort); | 102 | outb_p(data, dataPort); |
103 | } | 103 | } |
104 | 104 | ||
105 | static DEFINE_SPINLOCK(ali14xx_lock); | ||
106 | |||
105 | /* | 107 | /* |
106 | * Set PIO mode for the specified drive. | 108 | * Set PIO mode for the specified drive. |
107 | * This function computes timing parameters | 109 | * This function computes timing parameters |
@@ -129,14 +131,14 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
129 | 131 | ||
130 | /* stuff timing parameters into controller registers */ | 132 | /* stuff timing parameters into controller registers */ |
131 | driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit; | 133 | driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit; |
132 | spin_lock_irqsave(&ide_lock, flags); | 134 | spin_lock_irqsave(&ali14xx_lock, flags); |
133 | outb_p(regOn, basePort); | 135 | outb_p(regOn, basePort); |
134 | outReg(param1, regTab[driveNum].reg1); | 136 | outReg(param1, regTab[driveNum].reg1); |
135 | outReg(param2, regTab[driveNum].reg2); | 137 | outReg(param2, regTab[driveNum].reg2); |
136 | outReg(param3, regTab[driveNum].reg3); | 138 | outReg(param3, regTab[driveNum].reg3); |
137 | outReg(param4, regTab[driveNum].reg4); | 139 | outReg(param4, regTab[driveNum].reg4); |
138 | outb_p(regOff, basePort); | 140 | outb_p(regOff, basePort); |
139 | spin_unlock_irqrestore(&ide_lock, flags); | 141 | spin_unlock_irqrestore(&ali14xx_lock, flags); |
140 | } | 142 | } |
141 | 143 | ||
142 | /* | 144 | /* |
@@ -193,6 +195,7 @@ static int __init initRegisters (void) { | |||
193 | static int __init ali14xx_probe(void) | 195 | static int __init ali14xx_probe(void) |
194 | { | 196 | { |
195 | ide_hwif_t *hwif, *mate; | 197 | ide_hwif_t *hwif, *mate; |
198 | static u8 idx[4] = { 0, 1, 0xff, 0xff }; | ||
196 | 199 | ||
197 | printk(KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n", | 200 | printk(KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n", |
198 | basePort, regOn); | 201 | basePort, regOn); |
@@ -217,11 +220,7 @@ static int __init ali14xx_probe(void) | |||
217 | mate->mate = hwif; | 220 | mate->mate = hwif; |
218 | mate->channel = 1; | 221 | mate->channel = 1; |
219 | 222 | ||
220 | probe_hwif_init(hwif); | 223 | ide_device_add(idx); |
221 | probe_hwif_init(mate); | ||
222 | |||
223 | ide_proc_register_port(hwif); | ||
224 | ide_proc_register_port(mate); | ||
225 | 224 | ||
226 | return 0; | 225 | return 0; |
227 | } | 226 | } |
diff --git a/drivers/ide/legacy/buddha.c b/drivers/ide/legacy/buddha.c index 101aee1711c4..4a0be251a05f 100644 --- a/drivers/ide/legacy/buddha.c +++ b/drivers/ide/legacy/buddha.c | |||
@@ -212,8 +212,8 @@ fail_base2: | |||
212 | // xsurf_iops, | 212 | // xsurf_iops, |
213 | IRQ_AMIGA_PORTS); | 213 | IRQ_AMIGA_PORTS); |
214 | } | 214 | } |
215 | 215 | ||
216 | index = ide_register_hw(&hw, 1, &hwif); | 216 | index = ide_register_hw(&hw, NULL, 1, &hwif); |
217 | if (index != -1) { | 217 | if (index != -1) { |
218 | hwif->mmio = 1; | 218 | hwif->mmio = 1; |
219 | printk("ide%d: ", index); | 219 | printk("ide%d: ", index); |
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c index f16521254867..24a845d45bd2 100644 --- a/drivers/ide/legacy/dtc2278.c +++ b/drivers/ide/legacy/dtc2278.c | |||
@@ -67,20 +67,24 @@ static void sub22 (char b, char c) | |||
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
70 | static DEFINE_SPINLOCK(dtc2278_lock); | ||
71 | |||
70 | static void dtc2278_set_pio_mode(ide_drive_t *drive, const u8 pio) | 72 | static void dtc2278_set_pio_mode(ide_drive_t *drive, const u8 pio) |
71 | { | 73 | { |
72 | unsigned long flags; | 74 | unsigned long flags; |
73 | 75 | ||
74 | if (pio >= 3) { | 76 | if (pio >= 3) { |
75 | spin_lock_irqsave(&ide_lock, flags); | 77 | spin_lock_irqsave(&dtc2278_lock, flags); |
76 | /* | 78 | /* |
77 | * This enables PIO mode4 (3?) on the first interface | 79 | * This enables PIO mode4 (3?) on the first interface |
78 | */ | 80 | */ |
79 | sub22(1,0xc3); | 81 | sub22(1,0xc3); |
80 | sub22(0,0xa0); | 82 | sub22(0,0xa0); |
81 | spin_unlock_irqrestore(&ide_lock, flags); | 83 | spin_unlock_irqrestore(&dtc2278_lock, flags); |
82 | } else { | 84 | } else { |
83 | /* we don't know how to set it back again.. */ | 85 | /* we don't know how to set it back again.. */ |
86 | /* Actually we do - there is a data sheet available for the | ||
87 | Winbond but does anyone actually care */ | ||
84 | } | 88 | } |
85 | 89 | ||
86 | /* | 90 | /* |
@@ -94,6 +98,7 @@ static int __init dtc2278_probe(void) | |||
94 | { | 98 | { |
95 | unsigned long flags; | 99 | unsigned long flags; |
96 | ide_hwif_t *hwif, *mate; | 100 | ide_hwif_t *hwif, *mate; |
101 | static u8 idx[4] = { 0, 1, 0xff, 0xff }; | ||
97 | 102 | ||
98 | hwif = &ide_hwifs[0]; | 103 | hwif = &ide_hwifs[0]; |
99 | mate = &ide_hwifs[1]; | 104 | mate = &ide_hwifs[1]; |
@@ -129,16 +134,13 @@ static int __init dtc2278_probe(void) | |||
129 | 134 | ||
130 | mate->serialized = 1; | 135 | mate->serialized = 1; |
131 | mate->chipset = ide_dtc2278; | 136 | mate->chipset = ide_dtc2278; |
137 | mate->pio_mask = ATA_PIO4; | ||
132 | mate->drives[0].no_unmask = 1; | 138 | mate->drives[0].no_unmask = 1; |
133 | mate->drives[1].no_unmask = 1; | 139 | mate->drives[1].no_unmask = 1; |
134 | mate->mate = hwif; | 140 | mate->mate = hwif; |
135 | mate->channel = 1; | 141 | mate->channel = 1; |
136 | 142 | ||
137 | probe_hwif_init(hwif); | 143 | ide_device_add(idx); |
138 | probe_hwif_init(mate); | ||
139 | |||
140 | ide_proc_register_port(hwif); | ||
141 | ide_proc_register_port(mate); | ||
142 | 144 | ||
143 | return 0; | 145 | return 0; |
144 | } | 146 | } |
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c index f0829b83e970..7d7936f1b900 100644 --- a/drivers/ide/legacy/falconide.c +++ b/drivers/ide/legacy/falconide.c | |||
@@ -72,7 +72,7 @@ void __init falconide_init(void) | |||
72 | 0, 0, NULL, | 72 | 0, 0, NULL, |
73 | // falconide_iops, | 73 | // falconide_iops, |
74 | IRQ_MFP_IDE); | 74 | IRQ_MFP_IDE); |
75 | index = ide_register_hw(&hw, 1, NULL); | 75 | index = ide_register_hw(&hw, NULL, 1, NULL); |
76 | 76 | ||
77 | if (index != -1) | 77 | if (index != -1) |
78 | printk("ide%d: Falcon IDE interface\n", index); | 78 | printk("ide%d: Falcon IDE interface\n", index); |
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c index 0830a021bbb6..53331ee1e957 100644 --- a/drivers/ide/legacy/gayle.c +++ b/drivers/ide/legacy/gayle.c | |||
@@ -165,7 +165,7 @@ found: | |||
165 | // &gayle_iops, | 165 | // &gayle_iops, |
166 | IRQ_AMIGA_PORTS); | 166 | IRQ_AMIGA_PORTS); |
167 | 167 | ||
168 | index = ide_register_hw(&hw, 1, &hwif); | 168 | index = ide_register_hw(&hw, NULL, 1, &hwif); |
169 | if (index != -1) { | 169 | if (index != -1) { |
170 | hwif->mmio = 1; | 170 | hwif->mmio = 1; |
171 | switch (i) { | 171 | switch (i) { |
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c index 2e5a9cc5c0f7..a4245d13f11b 100644 --- a/drivers/ide/legacy/ht6560b.c +++ b/drivers/ide/legacy/ht6560b.c | |||
@@ -247,6 +247,8 @@ static u8 ht_pio2timings(ide_drive_t *drive, const u8 pio) | |||
247 | } | 247 | } |
248 | } | 248 | } |
249 | 249 | ||
250 | static DEFINE_SPINLOCK(ht6560b_lock); | ||
251 | |||
250 | /* | 252 | /* |
251 | * Enable/Disable so called prefetch mode | 253 | * Enable/Disable so called prefetch mode |
252 | */ | 254 | */ |
@@ -254,9 +256,9 @@ static void ht_set_prefetch(ide_drive_t *drive, u8 state) | |||
254 | { | 256 | { |
255 | unsigned long flags; | 257 | unsigned long flags; |
256 | int t = HT_PREFETCH_MODE << 8; | 258 | int t = HT_PREFETCH_MODE << 8; |
257 | 259 | ||
258 | spin_lock_irqsave(&ide_lock, flags); | 260 | spin_lock_irqsave(&ht6560b_lock, flags); |
259 | 261 | ||
260 | /* | 262 | /* |
261 | * Prefetch mode and unmask irq seems to conflict | 263 | * Prefetch mode and unmask irq seems to conflict |
262 | */ | 264 | */ |
@@ -268,9 +270,9 @@ static void ht_set_prefetch(ide_drive_t *drive, u8 state) | |||
268 | drive->drive_data &= ~t; /* disable prefetch mode */ | 270 | drive->drive_data &= ~t; /* disable prefetch mode */ |
269 | drive->no_unmask = 0; | 271 | drive->no_unmask = 0; |
270 | } | 272 | } |
271 | 273 | ||
272 | spin_unlock_irqrestore(&ide_lock, flags); | 274 | spin_unlock_irqrestore(&ht6560b_lock, flags); |
273 | 275 | ||
274 | #ifdef DEBUG | 276 | #ifdef DEBUG |
275 | printk("ht6560b: drive %s prefetch mode %sabled\n", drive->name, (state ? "en" : "dis")); | 277 | printk("ht6560b: drive %s prefetch mode %sabled\n", drive->name, (state ? "en" : "dis")); |
276 | #endif | 278 | #endif |
@@ -287,16 +289,14 @@ static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
287 | ht_set_prefetch(drive, pio & 1); | 289 | ht_set_prefetch(drive, pio & 1); |
288 | return; | 290 | return; |
289 | } | 291 | } |
290 | 292 | ||
291 | timing = ht_pio2timings(drive, pio); | 293 | timing = ht_pio2timings(drive, pio); |
292 | 294 | ||
293 | spin_lock_irqsave(&ide_lock, flags); | 295 | spin_lock_irqsave(&ht6560b_lock, flags); |
294 | |||
295 | drive->drive_data &= 0xff00; | 296 | drive->drive_data &= 0xff00; |
296 | drive->drive_data |= timing; | 297 | drive->drive_data |= timing; |
297 | 298 | spin_unlock_irqrestore(&ht6560b_lock, flags); | |
298 | spin_unlock_irqrestore(&ide_lock, flags); | 299 | |
299 | |||
300 | #ifdef DEBUG | 300 | #ifdef DEBUG |
301 | printk("ht6560b: drive %s tuned to pio mode %#x timing=%#x\n", drive->name, pio, timing); | 301 | printk("ht6560b: drive %s tuned to pio mode %#x timing=%#x\n", drive->name, pio, timing); |
302 | #endif | 302 | #endif |
@@ -311,6 +311,7 @@ MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); | |||
311 | int __init ht6560b_init(void) | 311 | int __init ht6560b_init(void) |
312 | { | 312 | { |
313 | ide_hwif_t *hwif, *mate; | 313 | ide_hwif_t *hwif, *mate; |
314 | static u8 idx[4] = { 0, 1, 0xff, 0xff }; | ||
314 | int t; | 315 | int t; |
315 | 316 | ||
316 | if (probe_ht6560b == 0) | 317 | if (probe_ht6560b == 0) |
@@ -359,11 +360,7 @@ int __init ht6560b_init(void) | |||
359 | mate->drives[0].drive_data = t; | 360 | mate->drives[0].drive_data = t; |
360 | mate->drives[1].drive_data = t; | 361 | mate->drives[1].drive_data = t; |
361 | 362 | ||
362 | probe_hwif_init(hwif); | 363 | ide_device_add(idx); |
363 | probe_hwif_init(mate); | ||
364 | |||
365 | ide_proc_register_port(hwif); | ||
366 | ide_proc_register_port(mate); | ||
367 | 364 | ||
368 | return 0; | 365 | return 0; |
369 | 366 | ||
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index e8e360c2619d..03715c058664 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c | |||
@@ -153,7 +153,7 @@ static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq | |||
153 | hw.irq = irq; | 153 | hw.irq = irq; |
154 | hw.chipset = ide_pci; | 154 | hw.chipset = ide_pci; |
155 | hw.dev = &handle->dev; | 155 | hw.dev = &handle->dev; |
156 | return ide_register_hw_with_fixup(&hw, 0, NULL, ide_undecoded_slave); | 156 | return ide_register_hw(&hw, &ide_undecoded_slave, 0, NULL); |
157 | } | 157 | } |
158 | 158 | ||
159 | /*====================================================================== | 159 | /*====================================================================== |
diff --git a/drivers/ide/legacy/ide_platform.c b/drivers/ide/legacy/ide_platform.c index b992b2b91fe2..7bb79f53dac8 100644 --- a/drivers/ide/legacy/ide_platform.c +++ b/drivers/ide/legacy/ide_platform.c | |||
@@ -33,39 +33,24 @@ static ide_hwif_t *__devinit plat_ide_locate_hwif(void __iomem *base, | |||
33 | int mmio) | 33 | int mmio) |
34 | { | 34 | { |
35 | unsigned long port = (unsigned long)base; | 35 | unsigned long port = (unsigned long)base; |
36 | ide_hwif_t *hwif; | 36 | ide_hwif_t *hwif = ide_find_port(port); |
37 | int index, i; | 37 | int i; |
38 | |||
39 | for (index = 0; index < MAX_HWIFS; ++index) { | ||
40 | hwif = ide_hwifs + index; | ||
41 | if (hwif->io_ports[IDE_DATA_OFFSET] == port) | ||
42 | goto found; | ||
43 | } | ||
44 | |||
45 | for (index = 0; index < MAX_HWIFS; ++index) { | ||
46 | hwif = ide_hwifs + index; | ||
47 | if (hwif->io_ports[IDE_DATA_OFFSET] == 0) | ||
48 | goto found; | ||
49 | } | ||
50 | 38 | ||
51 | return NULL; | 39 | if (hwif == NULL) |
52 | 40 | goto out; | |
53 | found: | ||
54 | 41 | ||
55 | hwif->hw.io_ports[IDE_DATA_OFFSET] = port; | 42 | hwif->io_ports[IDE_DATA_OFFSET] = port; |
56 | 43 | ||
57 | port += (1 << pdata->ioport_shift); | 44 | port += (1 << pdata->ioport_shift); |
58 | for (i = IDE_ERROR_OFFSET; i <= IDE_STATUS_OFFSET; | 45 | for (i = IDE_ERROR_OFFSET; i <= IDE_STATUS_OFFSET; |
59 | i++, port += (1 << pdata->ioport_shift)) | 46 | i++, port += (1 << pdata->ioport_shift)) |
60 | hwif->hw.io_ports[i] = port; | 47 | hwif->io_ports[i] = port; |
61 | 48 | ||
62 | hwif->hw.io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl; | 49 | hwif->io_ports[IDE_CONTROL_OFFSET] = (unsigned long)ctrl; |
63 | 50 | ||
64 | memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->hw.io_ports)); | 51 | hwif->irq = irq; |
65 | hwif->hw.irq = hwif->irq = irq; | ||
66 | 52 | ||
67 | hwif->hw.dma = NO_DMA; | 53 | hwif->chipset = ide_generic; |
68 | hwif->chipset = hwif->hw.chipset = ide_generic; | ||
69 | 54 | ||
70 | if (mmio) { | 55 | if (mmio) { |
71 | hwif->mmio = 1; | 56 | hwif->mmio = 1; |
@@ -73,8 +58,8 @@ found: | |||
73 | } | 58 | } |
74 | 59 | ||
75 | hwif_prop.hwif = hwif; | 60 | hwif_prop.hwif = hwif; |
76 | hwif_prop.index = index; | 61 | hwif_prop.index = hwif->index; |
77 | 62 | out: | |
78 | return hwif; | 63 | return hwif; |
79 | } | 64 | } |
80 | 65 | ||
@@ -83,6 +68,7 @@ static int __devinit plat_ide_probe(struct platform_device *pdev) | |||
83 | struct resource *res_base, *res_alt, *res_irq; | 68 | struct resource *res_base, *res_alt, *res_irq; |
84 | ide_hwif_t *hwif; | 69 | ide_hwif_t *hwif; |
85 | struct pata_platform_info *pdata; | 70 | struct pata_platform_info *pdata; |
71 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
86 | int ret = 0; | 72 | int ret = 0; |
87 | int mmio = 0; | 73 | int mmio = 0; |
88 | 74 | ||
@@ -130,10 +116,11 @@ static int __devinit plat_ide_probe(struct platform_device *pdev) | |||
130 | hwif->gendev.parent = &pdev->dev; | 116 | hwif->gendev.parent = &pdev->dev; |
131 | hwif->noprobe = 0; | 117 | hwif->noprobe = 0; |
132 | 118 | ||
133 | probe_hwif_init(hwif); | 119 | idx[0] = hwif->index; |
120 | |||
121 | ide_device_add(idx); | ||
134 | 122 | ||
135 | platform_set_drvdata(pdev, hwif); | 123 | platform_set_drvdata(pdev, hwif); |
136 | ide_proc_register_port(hwif); | ||
137 | 124 | ||
138 | return 0; | 125 | return 0; |
139 | 126 | ||
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c index b557c45a5a9d..e87cd2f16430 100644 --- a/drivers/ide/legacy/macide.c +++ b/drivers/ide/legacy/macide.c | |||
@@ -93,21 +93,21 @@ void macide_init(void) | |||
93 | 0, 0, macide_ack_intr, | 93 | 0, 0, macide_ack_intr, |
94 | // quadra_ide_iops, | 94 | // quadra_ide_iops, |
95 | IRQ_NUBUS_F); | 95 | IRQ_NUBUS_F); |
96 | index = ide_register_hw(&hw, 1, &hwif); | 96 | index = ide_register_hw(&hw, NULL, 1, &hwif); |
97 | break; | 97 | break; |
98 | case MAC_IDE_PB: | 98 | case MAC_IDE_PB: |
99 | ide_setup_ports(&hw, IDE_BASE, macide_offsets, | 99 | ide_setup_ports(&hw, IDE_BASE, macide_offsets, |
100 | 0, 0, macide_ack_intr, | 100 | 0, 0, macide_ack_intr, |
101 | // macide_pb_iops, | 101 | // macide_pb_iops, |
102 | IRQ_NUBUS_C); | 102 | IRQ_NUBUS_C); |
103 | index = ide_register_hw(&hw, 1, &hwif); | 103 | index = ide_register_hw(&hw, NULL, 1, &hwif); |
104 | break; | 104 | break; |
105 | case MAC_IDE_BABOON: | 105 | case MAC_IDE_BABOON: |
106 | ide_setup_ports(&hw, BABOON_BASE, macide_offsets, | 106 | ide_setup_ports(&hw, BABOON_BASE, macide_offsets, |
107 | 0, 0, NULL, | 107 | 0, 0, NULL, |
108 | // macide_baboon_iops, | 108 | // macide_baboon_iops, |
109 | IRQ_BABOON_1); | 109 | IRQ_BABOON_1); |
110 | index = ide_register_hw(&hw, 1, &hwif); | 110 | index = ide_register_hw(&hw, NULL, 1, &hwif); |
111 | if (index == -1) break; | 111 | if (index == -1) break; |
112 | if (macintosh_config->ident == MAC_MODEL_PB190) { | 112 | if (macintosh_config->ident == MAC_MODEL_PB190) { |
113 | 113 | ||
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c index e628a983ce33..a73db1bd482d 100644 --- a/drivers/ide/legacy/q40ide.c +++ b/drivers/ide/legacy/q40ide.c | |||
@@ -89,9 +89,8 @@ void q40_ide_setup_ports ( hw_regs_t *hw, | |||
89 | else | 89 | else |
90 | hw->io_ports[i] = Q40_ISA_IO_B(base + offsets[i]); | 90 | hw->io_ports[i] = Q40_ISA_IO_B(base + offsets[i]); |
91 | } | 91 | } |
92 | 92 | ||
93 | hw->irq = irq; | 93 | hw->irq = irq; |
94 | hw->dma = NO_DMA; | ||
95 | hw->ack_intr = ack_intr; | 94 | hw->ack_intr = ack_intr; |
96 | /* | 95 | /* |
97 | * hw->iops = iops; | 96 | * hw->iops = iops; |
@@ -102,7 +101,7 @@ void q40_ide_setup_ports ( hw_regs_t *hw, | |||
102 | 101 | ||
103 | /* | 102 | /* |
104 | * the static array is needed to have the name reported in /proc/ioports, | 103 | * the static array is needed to have the name reported in /proc/ioports, |
105 | * hwif->name unfortunately isn´t available yet | 104 | * hwif->name unfortunately isn't available yet |
106 | */ | 105 | */ |
107 | static const char *q40_ide_names[Q40IDE_NUM_HWIFS]={ | 106 | static const char *q40_ide_names[Q40IDE_NUM_HWIFS]={ |
108 | "ide0", "ide1" | 107 | "ide0", "ide1" |
@@ -142,7 +141,7 @@ void q40ide_init(void) | |||
142 | 0, NULL, | 141 | 0, NULL, |
143 | // m68kide_iops, | 142 | // m68kide_iops, |
144 | q40ide_default_irq(pcide_bases[i])); | 143 | q40ide_default_irq(pcide_bases[i])); |
145 | index = ide_register_hw(&hw, 1, &hwif); | 144 | index = ide_register_hw(&hw, NULL, 1, &hwif); |
146 | // **FIXME** | 145 | // **FIXME** |
147 | if (index != -1) | 146 | if (index != -1) |
148 | hwif->mmio = 1; | 147 | hwif->mmio = 1; |
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c index 0c81d2d0b941..912e73853faa 100644 --- a/drivers/ide/legacy/qd65xx.c +++ b/drivers/ide/legacy/qd65xx.c | |||
@@ -89,26 +89,6 @@ | |||
89 | 89 | ||
90 | static int timings[4]={-1,-1,-1,-1}; /* stores current timing for each timer */ | 90 | static int timings[4]={-1,-1,-1,-1}; /* stores current timing for each timer */ |
91 | 91 | ||
92 | static void qd_write_reg (u8 content, unsigned long reg) | ||
93 | { | ||
94 | unsigned long flags; | ||
95 | |||
96 | spin_lock_irqsave(&ide_lock, flags); | ||
97 | outb(content,reg); | ||
98 | spin_unlock_irqrestore(&ide_lock, flags); | ||
99 | } | ||
100 | |||
101 | static u8 __init qd_read_reg (unsigned long reg) | ||
102 | { | ||
103 | unsigned long flags; | ||
104 | u8 read; | ||
105 | |||
106 | spin_lock_irqsave(&ide_lock, flags); | ||
107 | read = inb(reg); | ||
108 | spin_unlock_irqrestore(&ide_lock, flags); | ||
109 | return read; | ||
110 | } | ||
111 | |||
112 | /* | 92 | /* |
113 | * qd_select: | 93 | * qd_select: |
114 | * | 94 | * |
@@ -121,7 +101,7 @@ static void qd_select (ide_drive_t *drive) | |||
121 | (QD_TIMREG(drive) & 0x02); | 101 | (QD_TIMREG(drive) & 0x02); |
122 | 102 | ||
123 | if (timings[index] != QD_TIMING(drive)) | 103 | if (timings[index] != QD_TIMING(drive)) |
124 | qd_write_reg(timings[index] = QD_TIMING(drive), QD_TIMREG(drive)); | 104 | outb(timings[index] = QD_TIMING(drive), QD_TIMREG(drive)); |
125 | } | 105 | } |
126 | 106 | ||
127 | /* | 107 | /* |
@@ -284,7 +264,7 @@ static void qd6580_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
284 | } | 264 | } |
285 | 265 | ||
286 | if (!HWIF(drive)->channel && drive->media != ide_disk) { | 266 | if (!HWIF(drive)->channel && drive->media != ide_disk) { |
287 | qd_write_reg(0x5f, QD_CONTROL_PORT); | 267 | outb(0x5f, QD_CONTROL_PORT); |
288 | printk(KERN_WARNING "%s: ATAPI: disabled read-ahead FIFO " | 268 | printk(KERN_WARNING "%s: ATAPI: disabled read-ahead FIFO " |
289 | "and post-write buffer on %s.\n", | 269 | "and post-write buffer on %s.\n", |
290 | drive->name, HWIF(drive)->name); | 270 | drive->name, HWIF(drive)->name); |
@@ -301,16 +281,15 @@ static void qd6580_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
301 | 281 | ||
302 | static int __init qd_testreg(int port) | 282 | static int __init qd_testreg(int port) |
303 | { | 283 | { |
304 | u8 savereg; | ||
305 | u8 readreg; | ||
306 | unsigned long flags; | 284 | unsigned long flags; |
285 | u8 savereg, readreg; | ||
307 | 286 | ||
308 | spin_lock_irqsave(&ide_lock, flags); | 287 | local_irq_save(flags); |
309 | savereg = inb_p(port); | 288 | savereg = inb_p(port); |
310 | outb_p(QD_TESTVAL, port); /* safe value */ | 289 | outb_p(QD_TESTVAL, port); /* safe value */ |
311 | readreg = inb_p(port); | 290 | readreg = inb_p(port); |
312 | outb(savereg, port); | 291 | outb(savereg, port); |
313 | spin_unlock_irqrestore(&ide_lock, flags); | 292 | local_irq_restore(flags); |
314 | 293 | ||
315 | if (savereg == QD_TESTVAL) { | 294 | if (savereg == QD_TESTVAL) { |
316 | printk(KERN_ERR "Outch ! the probe for qd65xx isn't reliable !\n"); | 295 | printk(KERN_ERR "Outch ! the probe for qd65xx isn't reliable !\n"); |
@@ -364,13 +343,13 @@ static void __exit qd_unsetup(ide_hwif_t *hwif) | |||
364 | 343 | ||
365 | if (set_pio_mode == (void *)qd6500_set_pio_mode) { | 344 | if (set_pio_mode == (void *)qd6500_set_pio_mode) { |
366 | // will do it for both | 345 | // will do it for both |
367 | qd_write_reg(QD6500_DEF_DATA, QD_TIMREG(&hwif->drives[0])); | 346 | outb(QD6500_DEF_DATA, QD_TIMREG(&hwif->drives[0])); |
368 | } else if (set_pio_mode == (void *)qd6580_set_pio_mode) { | 347 | } else if (set_pio_mode == (void *)qd6580_set_pio_mode) { |
369 | if (QD_CONTROL(hwif) & QD_CONTR_SEC_DISABLED) { | 348 | if (QD_CONTROL(hwif) & QD_CONTR_SEC_DISABLED) { |
370 | qd_write_reg(QD6580_DEF_DATA, QD_TIMREG(&hwif->drives[0])); | 349 | outb(QD6580_DEF_DATA, QD_TIMREG(&hwif->drives[0])); |
371 | qd_write_reg(QD6580_DEF_DATA2, QD_TIMREG(&hwif->drives[1])); | 350 | outb(QD6580_DEF_DATA2, QD_TIMREG(&hwif->drives[1])); |
372 | } else { | 351 | } else { |
373 | qd_write_reg(hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA, QD_TIMREG(&hwif->drives[0])); | 352 | outb(hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA, QD_TIMREG(&hwif->drives[0])); |
374 | } | 353 | } |
375 | } else { | 354 | } else { |
376 | printk(KERN_WARNING "Unknown qd65xx tuning fonction !\n"); | 355 | printk(KERN_WARNING "Unknown qd65xx tuning fonction !\n"); |
@@ -389,10 +368,11 @@ static void __exit qd_unsetup(ide_hwif_t *hwif) | |||
389 | static int __init qd_probe(int base) | 368 | static int __init qd_probe(int base) |
390 | { | 369 | { |
391 | ide_hwif_t *hwif; | 370 | ide_hwif_t *hwif; |
371 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
392 | u8 config; | 372 | u8 config; |
393 | u8 unit; | 373 | u8 unit; |
394 | 374 | ||
395 | config = qd_read_reg(QD_CONFIG_PORT); | 375 | config = inb(QD_CONFIG_PORT); |
396 | 376 | ||
397 | if (! ((config & QD_CONFIG_BASEPORT) >> 1 == (base == 0xb0)) ) | 377 | if (! ((config & QD_CONFIG_BASEPORT) >> 1 == (base == 0xb0)) ) |
398 | return 1; | 378 | return 1; |
@@ -419,9 +399,9 @@ static int __init qd_probe(int base) | |||
419 | 399 | ||
420 | hwif->set_pio_mode = &qd6500_set_pio_mode; | 400 | hwif->set_pio_mode = &qd6500_set_pio_mode; |
421 | 401 | ||
422 | probe_hwif_init(hwif); | 402 | idx[0] = unit; |
423 | 403 | ||
424 | ide_proc_register_port(hwif); | 404 | ide_device_add(idx); |
425 | 405 | ||
426 | return 1; | 406 | return 1; |
427 | } | 407 | } |
@@ -436,7 +416,7 @@ static int __init qd_probe(int base) | |||
436 | 416 | ||
437 | /* qd6580 found */ | 417 | /* qd6580 found */ |
438 | 418 | ||
439 | control = qd_read_reg(QD_CONTROL_PORT); | 419 | control = inb(QD_CONTROL_PORT); |
440 | 420 | ||
441 | printk(KERN_NOTICE "qd6580 at %#x\n", base); | 421 | printk(KERN_NOTICE "qd6580 at %#x\n", base); |
442 | printk(KERN_DEBUG "qd6580: config=%#x, control=%#x, ID3=%u\n", | 422 | printk(KERN_DEBUG "qd6580: config=%#x, control=%#x, ID3=%u\n", |
@@ -453,11 +433,11 @@ static int __init qd_probe(int base) | |||
453 | 433 | ||
454 | hwif->set_pio_mode = &qd6580_set_pio_mode; | 434 | hwif->set_pio_mode = &qd6580_set_pio_mode; |
455 | 435 | ||
456 | probe_hwif_init(hwif); | 436 | idx[0] = unit; |
457 | 437 | ||
458 | qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT); | 438 | ide_device_add(idx); |
459 | 439 | ||
460 | ide_proc_register_port(hwif); | 440 | outb(QD_DEF_CONTR, QD_CONTROL_PORT); |
461 | 441 | ||
462 | return 1; | 442 | return 1; |
463 | } else { | 443 | } else { |
@@ -474,19 +454,17 @@ static int __init qd_probe(int base) | |||
474 | 454 | ||
475 | hwif->set_pio_mode = &qd6580_set_pio_mode; | 455 | hwif->set_pio_mode = &qd6580_set_pio_mode; |
476 | 456 | ||
477 | probe_hwif_init(hwif); | ||
478 | |||
479 | qd_setup(mate, base, config | (control << 8), | 457 | qd_setup(mate, base, config | (control << 8), |
480 | QD6580_DEF_DATA2, QD6580_DEF_DATA2); | 458 | QD6580_DEF_DATA2, QD6580_DEF_DATA2); |
481 | 459 | ||
482 | mate->set_pio_mode = &qd6580_set_pio_mode; | 460 | mate->set_pio_mode = &qd6580_set_pio_mode; |
483 | 461 | ||
484 | probe_hwif_init(mate); | 462 | idx[0] = 0; |
463 | idx[1] = 1; | ||
485 | 464 | ||
486 | qd_write_reg(QD_DEF_CONTR,QD_CONTROL_PORT); | 465 | ide_device_add(idx); |
487 | 466 | ||
488 | ide_proc_register_port(hwif); | 467 | outb(QD_DEF_CONTR, QD_CONTROL_PORT); |
489 | ide_proc_register_port(mate); | ||
490 | 468 | ||
491 | return 0; /* no other qd65xx possible */ | 469 | return 0; /* no other qd65xx possible */ |
492 | } | 470 | } |
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c index 1151c92dd531..79577b916874 100644 --- a/drivers/ide/legacy/umc8672.c +++ b/drivers/ide/legacy/umc8672.c | |||
@@ -124,8 +124,9 @@ static void umc_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
124 | 124 | ||
125 | static int __init umc8672_probe(void) | 125 | static int __init umc8672_probe(void) |
126 | { | 126 | { |
127 | unsigned long flags; | ||
128 | ide_hwif_t *hwif, *mate; | 127 | ide_hwif_t *hwif, *mate; |
128 | unsigned long flags; | ||
129 | static u8 idx[4] = { 0, 1, 0xff, 0xff }; | ||
129 | 130 | ||
130 | if (!request_region(0x108, 2, "umc8672")) { | 131 | if (!request_region(0x108, 2, "umc8672")) { |
131 | printk(KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n"); | 132 | printk(KERN_ERR "umc8672: ports 0x108-0x109 already in use.\n"); |
@@ -158,11 +159,7 @@ static int __init umc8672_probe(void) | |||
158 | mate->mate = hwif; | 159 | mate->mate = hwif; |
159 | mate->channel = 1; | 160 | mate->channel = 1; |
160 | 161 | ||
161 | probe_hwif_init(hwif); | 162 | ide_device_add(idx); |
162 | probe_hwif_init(mate); | ||
163 | |||
164 | ide_proc_register_port(hwif); | ||
165 | ide_proc_register_port(mate); | ||
166 | 163 | ||
167 | return 0; | 164 | return 0; |
168 | } | 165 | } |
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 2f322d7e881b..1de58566e5b6 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c | |||
@@ -601,8 +601,9 @@ static int au_ide_probe(struct device *dev) | |||
601 | _auide_hwif *ahwif = &auide_hwif; | 601 | _auide_hwif *ahwif = &auide_hwif; |
602 | ide_hwif_t *hwif; | 602 | ide_hwif_t *hwif; |
603 | struct resource *res; | 603 | struct resource *res; |
604 | hw_regs_t *hw; | ||
605 | int ret = 0; | 604 | int ret = 0; |
605 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
606 | hw_regs_t hw; | ||
606 | 607 | ||
607 | #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA) | 608 | #if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA) |
608 | char *mode = "MWDMA2"; | 609 | char *mode = "MWDMA2"; |
@@ -644,12 +645,12 @@ static int au_ide_probe(struct device *dev) | |||
644 | /* FIXME: This might possibly break PCMCIA IDE devices */ | 645 | /* FIXME: This might possibly break PCMCIA IDE devices */ |
645 | 646 | ||
646 | hwif = &ide_hwifs[pdev->id]; | 647 | hwif = &ide_hwifs[pdev->id]; |
647 | hw = &hwif->hw; | 648 | hwif->irq = ahwif->irq; |
648 | hwif->irq = hw->irq = ahwif->irq; | ||
649 | hwif->chipset = ide_au1xxx; | 649 | hwif->chipset = ide_au1xxx; |
650 | 650 | ||
651 | auide_setup_ports(hw, ahwif); | 651 | memset(&hw, 0, sizeof(hw)); |
652 | memcpy(hwif->io_ports, hw->io_ports, sizeof(hwif->io_ports)); | 652 | auide_setup_ports(&hw, ahwif); |
653 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); | ||
653 | 654 | ||
654 | hwif->ultra_mask = 0x0; /* Disable Ultra DMA */ | 655 | hwif->ultra_mask = 0x0; /* Disable Ultra DMA */ |
655 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA | 656 | #ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA |
@@ -706,8 +707,10 @@ static int au_ide_probe(struct device *dev) | |||
706 | hwif->config_data = 0; /* no chipset-specific code */ | 707 | hwif->config_data = 0; /* no chipset-specific code */ |
707 | 708 | ||
708 | hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */ | 709 | hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */ |
710 | hwif->drives[1].autotune = 1; | ||
709 | #endif | 711 | #endif |
710 | hwif->drives[0].no_io_32bit = 1; | 712 | hwif->drives[0].no_io_32bit = 1; |
713 | hwif->drives[1].no_io_32bit = 1; | ||
711 | 714 | ||
712 | auide_hwif.hwif = hwif; | 715 | auide_hwif.hwif = hwif; |
713 | hwif->hwif_data = &auide_hwif; | 716 | hwif->hwif_data = &auide_hwif; |
@@ -717,9 +720,9 @@ static int au_ide_probe(struct device *dev) | |||
717 | dbdma_init_done = 1; | 720 | dbdma_init_done = 1; |
718 | #endif | 721 | #endif |
719 | 722 | ||
720 | probe_hwif_init(hwif); | 723 | idx[0] = hwif->index; |
721 | 724 | ||
722 | ide_proc_register_port(hwif); | 725 | ide_device_add(idx); |
723 | 726 | ||
724 | dev_set_drvdata(dev, hwif); | 727 | dev_set_drvdata(dev, hwif); |
725 | 728 | ||
diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c index c2e29571b007..521edd41b572 100644 --- a/drivers/ide/mips/swarm.c +++ b/drivers/ide/mips/swarm.c | |||
@@ -71,6 +71,7 @@ static int __devinit swarm_ide_probe(struct device *dev) | |||
71 | u8 __iomem *base; | 71 | u8 __iomem *base; |
72 | phys_t offset, size; | 72 | phys_t offset, size; |
73 | int i; | 73 | int i; |
74 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
74 | 75 | ||
75 | if (!SIBYTE_HAVE_IDE) | 76 | if (!SIBYTE_HAVE_IDE) |
76 | return -ENODEV; | 77 | return -ENODEV; |
@@ -119,18 +120,15 @@ static int __devinit swarm_ide_probe(struct device *dev) | |||
119 | hwif->noprobe = 0; | 120 | hwif->noprobe = 0; |
120 | 121 | ||
121 | for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) | 122 | for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) |
122 | hwif->hw.io_ports[i] = | 123 | hwif->io_ports[i] = |
123 | (unsigned long)(base + ((0x1f0 + i) << 5)); | 124 | (unsigned long)(base + ((0x1f0 + i) << 5)); |
124 | hwif->hw.io_ports[IDE_CONTROL_OFFSET] = | 125 | hwif->io_ports[IDE_CONTROL_OFFSET] = |
125 | (unsigned long)(base + (0x3f6 << 5)); | 126 | (unsigned long)(base + (0x3f6 << 5)); |
126 | hwif->hw.irq = K_INT_GB_IDE; | 127 | hwif->irq = K_INT_GB_IDE; |
127 | 128 | ||
128 | memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); | 129 | idx[0] = hwif->index; |
129 | hwif->irq = hwif->hw.irq; | ||
130 | 130 | ||
131 | probe_hwif_init(hwif); | 131 | ide_device_add(idx); |
132 | |||
133 | ide_proc_register_port(hwif); | ||
134 | 132 | ||
135 | dev_set_drvdata(dev, hwif); | 133 | dev_set_drvdata(dev, hwif); |
136 | 134 | ||
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index b3dc12a70d51..19ec421f7b9f 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/aec62xx.c Version 0.26 Sep 1, 2007 | 2 | * linux/drivers/ide/pci/aec62xx.c Version 0.27 Sep 16, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com> | 5 | * Copyright (C) 2007 MontaVista Software, Inc. <source@mvista.com> |
@@ -141,19 +141,6 @@ static void aec_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
141 | drive->hwif->set_dma_mode(drive, pio + XFER_PIO_0); | 141 | drive->hwif->set_dma_mode(drive, pio + XFER_PIO_0); |
142 | } | 142 | } |
143 | 143 | ||
144 | static void aec62xx_dma_lost_irq (ide_drive_t *drive) | ||
145 | { | ||
146 | switch (HWIF(drive)->pci_dev->device) { | ||
147 | case PCI_DEVICE_ID_ARTOP_ATP860: | ||
148 | case PCI_DEVICE_ID_ARTOP_ATP860R: | ||
149 | case PCI_DEVICE_ID_ARTOP_ATP865: | ||
150 | case PCI_DEVICE_ID_ARTOP_ATP865R: | ||
151 | printk(" AEC62XX time out "); | ||
152 | default: | ||
153 | break; | ||
154 | } | ||
155 | } | ||
156 | |||
157 | static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev, const char *name) | 144 | static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev, const char *name) |
158 | { | 145 | { |
159 | int bus_speed = system_bus_clock(); | 146 | int bus_speed = system_bus_clock(); |
@@ -195,8 +182,6 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) | |||
195 | if (hwif->dma_base == 0) | 182 | if (hwif->dma_base == 0) |
196 | return; | 183 | return; |
197 | 184 | ||
198 | hwif->dma_lost_irq = &aec62xx_dma_lost_irq; | ||
199 | |||
200 | if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) | 185 | if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) |
201 | return; | 186 | return; |
202 | 187 | ||
@@ -209,7 +194,7 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) | |||
209 | } | 194 | } |
210 | } | 195 | } |
211 | 196 | ||
212 | static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { | 197 | static const struct ide_port_info aec62xx_chipsets[] __devinitdata = { |
213 | { /* 0 */ | 198 | { /* 0 */ |
214 | .name = "AEC6210", | 199 | .name = "AEC6210", |
215 | .init_chipset = init_chipset_aec62xx, | 200 | .init_chipset = init_chipset_aec62xx, |
@@ -268,12 +253,12 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { | |||
268 | * finds a device matching our IDE device tables. | 253 | * finds a device matching our IDE device tables. |
269 | * | 254 | * |
270 | * NOTE: since we're going to modify the 'name' field for AEC-6[26]80[R] | 255 | * NOTE: since we're going to modify the 'name' field for AEC-6[26]80[R] |
271 | * chips, pass a local copy of 'struct pci_device_id' down the call chain. | 256 | * chips, pass a local copy of 'struct ide_port_info' down the call chain. |
272 | */ | 257 | */ |
273 | 258 | ||
274 | static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 259 | static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
275 | { | 260 | { |
276 | ide_pci_device_t d; | 261 | struct ide_port_info d; |
277 | u8 idx = id->driver_data; | 262 | u8 idx = id->driver_data; |
278 | 263 | ||
279 | d = aec62xx_chipsets[idx]; | 264 | d = aec62xx_chipsets[idx]; |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 8ee2b48d105d..a607dd31a64c 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/alim15x3.c Version 0.27 Aug 27 2007 | 2 | * linux/drivers/ide/pci/alim15x3.c Version 0.29 Sep 16 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1998-2000 Michel Aubry, Maintainer | 4 | * Copyright (C) 1998-2000 Michel Aubry, Maintainer |
5 | * Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer | 5 | * Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer |
@@ -492,6 +492,13 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c | |||
492 | * clear bit 7 | 492 | * clear bit 7 |
493 | */ | 493 | */ |
494 | pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F); | 494 | pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F); |
495 | /* | ||
496 | * check m1533, 0x5e, bit 1~4 == 1001 => & 00011110 = 00010010 | ||
497 | */ | ||
498 | if (m5229_revision >= 0x20 && isa_dev) { | ||
499 | pci_read_config_byte(isa_dev, 0x5e, &tmpbyte); | ||
500 | chip_is_1543c_e = ((tmpbyte & 0x1e) == 0x12) ? 1: 0; | ||
501 | } | ||
495 | goto out; | 502 | goto out; |
496 | } | 503 | } |
497 | 504 | ||
@@ -537,7 +544,30 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c | |||
537 | pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02); | 544 | pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02); |
538 | } | 545 | } |
539 | } | 546 | } |
547 | |||
540 | out: | 548 | out: |
549 | /* | ||
550 | * CD_ROM DMA on (m5229, 0x53, bit0) | ||
551 | * Enable this bit even if we want to use PIO. | ||
552 | * PIO FIFO off (m5229, 0x53, bit1) | ||
553 | * The hardware will use 0x54h and 0x55h to control PIO FIFO. | ||
554 | * (Not on later devices it seems) | ||
555 | * | ||
556 | * 0x53 changes meaning on later revs - we must no touch | ||
557 | * bit 1 on them. Need to check if 0x20 is the right break. | ||
558 | */ | ||
559 | if (m5229_revision >= 0x20) { | ||
560 | pci_read_config_byte(dev, 0x53, &tmpbyte); | ||
561 | |||
562 | if (m5229_revision <= 0x20) | ||
563 | tmpbyte = (tmpbyte & (~0x02)) | 0x01; | ||
564 | else if (m5229_revision == 0xc7 || m5229_revision == 0xc8) | ||
565 | tmpbyte |= 0x03; | ||
566 | else | ||
567 | tmpbyte |= 0x01; | ||
568 | |||
569 | pci_write_config_byte(dev, 0x53, tmpbyte); | ||
570 | } | ||
541 | pci_dev_put(north); | 571 | pci_dev_put(north); |
542 | pci_dev_put(isa_dev); | 572 | pci_dev_put(isa_dev); |
543 | local_irq_restore(flags); | 573 | local_irq_restore(flags); |
@@ -616,36 +646,8 @@ static u8 __devinit ata66_ali15x3(ide_hwif_t *hwif) | |||
616 | if ((tmpbyte & (1 << hwif->channel)) == 0) | 646 | if ((tmpbyte & (1 << hwif->channel)) == 0) |
617 | cbl = ATA_CBL_PATA80; | 647 | cbl = ATA_CBL_PATA80; |
618 | } | 648 | } |
619 | } else { | ||
620 | /* | ||
621 | * check m1533, 0x5e, bit 1~4 == 1001 => & 00011110 = 00010010 | ||
622 | */ | ||
623 | pci_read_config_byte(isa_dev, 0x5e, &tmpbyte); | ||
624 | chip_is_1543c_e = ((tmpbyte & 0x1e) == 0x12) ? 1: 0; | ||
625 | } | 649 | } |
626 | 650 | ||
627 | /* | ||
628 | * CD_ROM DMA on (m5229, 0x53, bit0) | ||
629 | * Enable this bit even if we want to use PIO | ||
630 | * PIO FIFO off (m5229, 0x53, bit1) | ||
631 | * The hardware will use 0x54h and 0x55h to control PIO FIFO | ||
632 | * (Not on later devices it seems) | ||
633 | * | ||
634 | * 0x53 changes meaning on later revs - we must no touch | ||
635 | * bit 1 on them. Need to check if 0x20 is the right break | ||
636 | */ | ||
637 | |||
638 | pci_read_config_byte(dev, 0x53, &tmpbyte); | ||
639 | |||
640 | if(m5229_revision <= 0x20) | ||
641 | tmpbyte = (tmpbyte & (~0x02)) | 0x01; | ||
642 | else if (m5229_revision == 0xc7 || m5229_revision == 0xc8) | ||
643 | tmpbyte |= 0x03; | ||
644 | else | ||
645 | tmpbyte |= 0x01; | ||
646 | |||
647 | pci_write_config_byte(dev, 0x53, tmpbyte); | ||
648 | |||
649 | local_irq_restore(flags); | 651 | local_irq_restore(flags); |
650 | 652 | ||
651 | return cbl; | 653 | return cbl; |
@@ -664,31 +666,9 @@ static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif) | |||
664 | hwif->set_dma_mode = &ali_set_dma_mode; | 666 | hwif->set_dma_mode = &ali_set_dma_mode; |
665 | hwif->udma_filter = &ali_udma_filter; | 667 | hwif->udma_filter = &ali_udma_filter; |
666 | 668 | ||
667 | /* don't use LBA48 DMA on ALi devices before rev 0xC5 */ | ||
668 | if (m5229_revision <= 0xC4) | ||
669 | hwif->host_flags |= IDE_HFLAG_NO_LBA48_DMA; | ||
670 | |||
671 | if (hwif->dma_base == 0) | 669 | if (hwif->dma_base == 0) |
672 | return; | 670 | return; |
673 | 671 | ||
674 | /* | ||
675 | * check in ->init_dma guarantees m5229_revision >= 0x20 here | ||
676 | */ | ||
677 | |||
678 | if (m5229_revision == 0x20) | ||
679 | hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA; | ||
680 | |||
681 | if (m5229_revision <= 0x20) | ||
682 | hwif->ultra_mask = 0x00; /* no udma */ | ||
683 | else if (m5229_revision < 0xC2) | ||
684 | hwif->ultra_mask = ATA_UDMA2; | ||
685 | else if (m5229_revision == 0xC2 || m5229_revision == 0xC3) | ||
686 | hwif->ultra_mask = ATA_UDMA4; | ||
687 | else if (m5229_revision == 0xC4) | ||
688 | hwif->ultra_mask = ATA_UDMA5; | ||
689 | else | ||
690 | hwif->ultra_mask = ATA_UDMA6; | ||
691 | |||
692 | hwif->dma_setup = &ali15x3_dma_setup; | 672 | hwif->dma_setup = &ali15x3_dma_setup; |
693 | 673 | ||
694 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 674 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
@@ -766,7 +746,7 @@ static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase) | |||
766 | ide_setup_dma(hwif, dmabase, 8); | 746 | ide_setup_dma(hwif, dmabase, 8); |
767 | } | 747 | } |
768 | 748 | ||
769 | static ide_pci_device_t ali15x3_chipset __devinitdata = { | 749 | static const struct ide_port_info ali15x3_chipset __devinitdata = { |
770 | .name = "ALI15X3", | 750 | .name = "ALI15X3", |
771 | .init_chipset = init_chipset_ali15x3, | 751 | .init_chipset = init_chipset_ali15x3, |
772 | .init_hwif = init_hwif_ali15x3, | 752 | .init_hwif = init_hwif_ali15x3, |
@@ -792,15 +772,34 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev | |||
792 | { }, | 772 | { }, |
793 | }; | 773 | }; |
794 | 774 | ||
795 | ide_pci_device_t *d = &ali15x3_chipset; | 775 | struct ide_port_info d = ali15x3_chipset; |
776 | u8 rev = dev->revision; | ||
796 | 777 | ||
797 | if (pci_dev_present(ati_rs100)) | 778 | if (pci_dev_present(ati_rs100)) |
798 | printk(KERN_WARNING "alim15x3: ATI Radeon IGP Northbridge is not yet fully tested.\n"); | 779 | printk(KERN_WARNING "alim15x3: ATI Radeon IGP Northbridge is not yet fully tested.\n"); |
799 | 780 | ||
781 | /* don't use LBA48 DMA on ALi devices before rev 0xC5 */ | ||
782 | if (rev <= 0xC4) | ||
783 | d.host_flags |= IDE_HFLAG_NO_LBA48_DMA; | ||
784 | |||
785 | if (rev >= 0x20) { | ||
786 | if (rev == 0x20) | ||
787 | d.host_flags |= IDE_HFLAG_NO_ATAPI_DMA; | ||
788 | |||
789 | if (rev < 0xC2) | ||
790 | d.udma_mask = ATA_UDMA2; | ||
791 | else if (rev == 0xC2 || rev == 0xC3) | ||
792 | d.udma_mask = ATA_UDMA4; | ||
793 | else if (rev == 0xC4) | ||
794 | d.udma_mask = ATA_UDMA5; | ||
795 | else | ||
796 | d.udma_mask = ATA_UDMA6; | ||
797 | } | ||
798 | |||
800 | #if defined(CONFIG_SPARC64) | 799 | #if defined(CONFIG_SPARC64) |
801 | d->init_hwif = init_hwif_common_ali15x3; | 800 | d.init_hwif = init_hwif_common_ali15x3; |
802 | #endif /* CONFIG_SPARC64 */ | 801 | #endif /* CONFIG_SPARC64 */ |
803 | return ide_setup_pci_device(dev, d); | 802 | return ide_setup_pci_device(dev, &d); |
804 | } | 803 | } |
805 | 804 | ||
806 | 805 | ||
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index 7cafefbf6c1b..8d4125ec252c 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c | |||
@@ -77,7 +77,7 @@ static struct amd_ide_chip { | |||
77 | }; | 77 | }; |
78 | 78 | ||
79 | static struct amd_ide_chip *amd_config; | 79 | static struct amd_ide_chip *amd_config; |
80 | static ide_pci_device_t *amd_chipset; | 80 | static const struct ide_port_info *amd_chipset; |
81 | static unsigned int amd_80w; | 81 | static unsigned int amd_80w; |
82 | static unsigned int amd_clock; | 82 | static unsigned int amd_clock; |
83 | 83 | ||
@@ -242,19 +242,12 @@ static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const ch | |||
242 | 242 | ||
243 | static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) | 243 | static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) |
244 | { | 244 | { |
245 | int i; | ||
246 | |||
247 | if (hwif->irq == 0) /* 0 is bogus but will do for now */ | 245 | if (hwif->irq == 0) /* 0 is bogus but will do for now */ |
248 | hwif->irq = pci_get_legacy_ide_irq(hwif->pci_dev, hwif->channel); | 246 | hwif->irq = pci_get_legacy_ide_irq(hwif->pci_dev, hwif->channel); |
249 | 247 | ||
250 | hwif->set_pio_mode = &amd_set_pio_mode; | 248 | hwif->set_pio_mode = &amd_set_pio_mode; |
251 | hwif->set_dma_mode = &amd_set_drive; | 249 | hwif->set_dma_mode = &amd_set_drive; |
252 | 250 | ||
253 | for (i = 0; i < 2; i++) { | ||
254 | hwif->drives[i].io_32bit = 1; | ||
255 | hwif->drives[i].unmask = 1; | ||
256 | } | ||
257 | |||
258 | if (!hwif->dma_base) | 251 | if (!hwif->dma_base) |
259 | return; | 252 | return; |
260 | 253 | ||
@@ -270,16 +263,21 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) | |||
270 | } | 263 | } |
271 | } | 264 | } |
272 | 265 | ||
266 | #define IDE_HFLAGS_AMD \ | ||
267 | (IDE_HFLAG_PIO_NO_BLACKLIST | \ | ||
268 | IDE_HFLAG_PIO_NO_DOWNGRADE | \ | ||
269 | IDE_HFLAG_POST_SET_MODE | \ | ||
270 | IDE_HFLAG_IO_32BIT | \ | ||
271 | IDE_HFLAG_UNMASK_IRQS | \ | ||
272 | IDE_HFLAG_BOOTABLE) | ||
273 | |||
273 | #define DECLARE_AMD_DEV(name_str) \ | 274 | #define DECLARE_AMD_DEV(name_str) \ |
274 | { \ | 275 | { \ |
275 | .name = name_str, \ | 276 | .name = name_str, \ |
276 | .init_chipset = init_chipset_amd74xx, \ | 277 | .init_chipset = init_chipset_amd74xx, \ |
277 | .init_hwif = init_hwif_amd74xx, \ | 278 | .init_hwif = init_hwif_amd74xx, \ |
278 | .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, \ | 279 | .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, \ |
279 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | \ | 280 | .host_flags = IDE_HFLAGS_AMD, \ |
280 | IDE_HFLAG_PIO_NO_DOWNGRADE | \ | ||
281 | IDE_HFLAG_POST_SET_MODE | \ | ||
282 | IDE_HFLAG_BOOTABLE, \ | ||
283 | .pio_mask = ATA_PIO5, \ | 281 | .pio_mask = ATA_PIO5, \ |
284 | .swdma_mask = ATA_SWDMA2, \ | 282 | .swdma_mask = ATA_SWDMA2, \ |
285 | .mwdma_mask = ATA_MWDMA2, \ | 283 | .mwdma_mask = ATA_MWDMA2, \ |
@@ -291,16 +289,13 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) | |||
291 | .init_chipset = init_chipset_amd74xx, \ | 289 | .init_chipset = init_chipset_amd74xx, \ |
292 | .init_hwif = init_hwif_amd74xx, \ | 290 | .init_hwif = init_hwif_amd74xx, \ |
293 | .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, \ | 291 | .enablebits = {{0x50,0x02,0x02}, {0x50,0x01,0x01}}, \ |
294 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | \ | 292 | .host_flags = IDE_HFLAGS_AMD, \ |
295 | IDE_HFLAG_PIO_NO_DOWNGRADE | \ | ||
296 | IDE_HFLAG_POST_SET_MODE | \ | ||
297 | IDE_HFLAG_BOOTABLE, \ | ||
298 | .pio_mask = ATA_PIO5, \ | 293 | .pio_mask = ATA_PIO5, \ |
299 | .swdma_mask = ATA_SWDMA2, \ | 294 | .swdma_mask = ATA_SWDMA2, \ |
300 | .mwdma_mask = ATA_MWDMA2, \ | 295 | .mwdma_mask = ATA_MWDMA2, \ |
301 | } | 296 | } |
302 | 297 | ||
303 | static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { | 298 | static const struct ide_port_info amd74xx_chipsets[] __devinitdata = { |
304 | /* 0 */ DECLARE_AMD_DEV("AMD7401"), | 299 | /* 0 */ DECLARE_AMD_DEV("AMD7401"), |
305 | /* 1 */ DECLARE_AMD_DEV("AMD7409"), | 300 | /* 1 */ DECLARE_AMD_DEV("AMD7409"), |
306 | /* 2 */ DECLARE_AMD_DEV("AMD7411"), | 301 | /* 2 */ DECLARE_AMD_DEV("AMD7411"), |
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 307843053078..ef8e0164ef7a 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -189,8 +189,7 @@ static void __devinit init_hwif_atiixp(ide_hwif_t *hwif) | |||
189 | hwif->dma_host_off = &atiixp_dma_host_off; | 189 | hwif->dma_host_off = &atiixp_dma_host_off; |
190 | } | 190 | } |
191 | 191 | ||
192 | 192 | static const struct ide_port_info atiixp_pci_info[] __devinitdata = { | |
193 | static ide_pci_device_t atiixp_pci_info[] __devinitdata = { | ||
194 | { /* 0 */ | 193 | { /* 0 */ |
195 | .name = "ATIIXP", | 194 | .name = "ATIIXP", |
196 | .init_hwif = init_hwif_atiixp, | 195 | .init_hwif = init_hwif_atiixp, |
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index f369645e4d16..4aa48104e0c1 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c | |||
@@ -185,6 +185,8 @@ static u8 recovery_counts[4] = {16, 16, 16, 16}; /* Recovery count (encoded) */ | |||
185 | 185 | ||
186 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ | 186 | #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ |
187 | 187 | ||
188 | static DEFINE_SPINLOCK(cmd640_lock); | ||
189 | |||
188 | /* | 190 | /* |
189 | * These are initialized to point at the devices we control | 191 | * These are initialized to point at the devices we control |
190 | */ | 192 | */ |
@@ -258,12 +260,12 @@ static u8 get_cmd640_reg_vlb (u16 reg) | |||
258 | 260 | ||
259 | static u8 get_cmd640_reg(u16 reg) | 261 | static u8 get_cmd640_reg(u16 reg) |
260 | { | 262 | { |
261 | u8 b; | ||
262 | unsigned long flags; | 263 | unsigned long flags; |
264 | u8 b; | ||
263 | 265 | ||
264 | spin_lock_irqsave(&ide_lock, flags); | 266 | spin_lock_irqsave(&cmd640_lock, flags); |
265 | b = __get_cmd640_reg(reg); | 267 | b = __get_cmd640_reg(reg); |
266 | spin_unlock_irqrestore(&ide_lock, flags); | 268 | spin_unlock_irqrestore(&cmd640_lock, flags); |
267 | return b; | 269 | return b; |
268 | } | 270 | } |
269 | 271 | ||
@@ -271,9 +273,9 @@ static void put_cmd640_reg(u16 reg, u8 val) | |||
271 | { | 273 | { |
272 | unsigned long flags; | 274 | unsigned long flags; |
273 | 275 | ||
274 | spin_lock_irqsave(&ide_lock, flags); | 276 | spin_lock_irqsave(&cmd640_lock, flags); |
275 | __put_cmd640_reg(reg,val); | 277 | __put_cmd640_reg(reg,val); |
276 | spin_unlock_irqrestore(&ide_lock, flags); | 278 | spin_unlock_irqrestore(&cmd640_lock, flags); |
277 | } | 279 | } |
278 | 280 | ||
279 | static int __init match_pci_cmd640_device (void) | 281 | static int __init match_pci_cmd640_device (void) |
@@ -351,7 +353,7 @@ static int __init secondary_port_responding (void) | |||
351 | { | 353 | { |
352 | unsigned long flags; | 354 | unsigned long flags; |
353 | 355 | ||
354 | spin_lock_irqsave(&ide_lock, flags); | 356 | spin_lock_irqsave(&cmd640_lock, flags); |
355 | 357 | ||
356 | outb_p(0x0a, 0x170 + IDE_SELECT_OFFSET); /* select drive0 */ | 358 | outb_p(0x0a, 0x170 + IDE_SELECT_OFFSET); /* select drive0 */ |
357 | udelay(100); | 359 | udelay(100); |
@@ -359,11 +361,11 @@ static int __init secondary_port_responding (void) | |||
359 | outb_p(0x1a, 0x170 + IDE_SELECT_OFFSET); /* select drive1 */ | 361 | outb_p(0x1a, 0x170 + IDE_SELECT_OFFSET); /* select drive1 */ |
360 | udelay(100); | 362 | udelay(100); |
361 | if ((inb_p(0x170 + IDE_SELECT_OFFSET) & 0x1f) != 0x1a) { | 363 | if ((inb_p(0x170 + IDE_SELECT_OFFSET) & 0x1f) != 0x1a) { |
362 | spin_unlock_irqrestore(&ide_lock, flags); | 364 | spin_unlock_irqrestore(&cmd640_lock, flags); |
363 | return 0; /* nothing responded */ | 365 | return 0; /* nothing responded */ |
364 | } | 366 | } |
365 | } | 367 | } |
366 | spin_unlock_irqrestore(&ide_lock, flags); | 368 | spin_unlock_irqrestore(&cmd640_lock, flags); |
367 | return 1; /* success */ | 369 | return 1; /* success */ |
368 | } | 370 | } |
369 | 371 | ||
@@ -440,11 +442,11 @@ static void __init setup_device_ptrs (void) | |||
440 | static void set_prefetch_mode (unsigned int index, int mode) | 442 | static void set_prefetch_mode (unsigned int index, int mode) |
441 | { | 443 | { |
442 | ide_drive_t *drive = cmd_drives[index]; | 444 | ide_drive_t *drive = cmd_drives[index]; |
445 | unsigned long flags; | ||
443 | int reg = prefetch_regs[index]; | 446 | int reg = prefetch_regs[index]; |
444 | u8 b; | 447 | u8 b; |
445 | unsigned long flags; | ||
446 | 448 | ||
447 | spin_lock_irqsave(&ide_lock, flags); | 449 | spin_lock_irqsave(&cmd640_lock, flags); |
448 | b = __get_cmd640_reg(reg); | 450 | b = __get_cmd640_reg(reg); |
449 | if (mode) { /* want prefetch on? */ | 451 | if (mode) { /* want prefetch on? */ |
450 | #if CMD640_PREFETCH_MASKS | 452 | #if CMD640_PREFETCH_MASKS |
@@ -460,7 +462,7 @@ static void set_prefetch_mode (unsigned int index, int mode) | |||
460 | b |= prefetch_masks[index]; /* disable prefetch */ | 462 | b |= prefetch_masks[index]; /* disable prefetch */ |
461 | } | 463 | } |
462 | __put_cmd640_reg(reg, b); | 464 | __put_cmd640_reg(reg, b); |
463 | spin_unlock_irqrestore(&ide_lock, flags); | 465 | spin_unlock_irqrestore(&cmd640_lock, flags); |
464 | } | 466 | } |
465 | 467 | ||
466 | /* | 468 | /* |
@@ -561,7 +563,7 @@ static void program_drive_counts (unsigned int index) | |||
561 | /* | 563 | /* |
562 | * Now that everything is ready, program the new timings | 564 | * Now that everything is ready, program the new timings |
563 | */ | 565 | */ |
564 | spin_lock_irqsave(&ide_lock, flags); | 566 | spin_lock_irqsave(&cmd640_lock, flags); |
565 | /* | 567 | /* |
566 | * Program the address_setup clocks into ARTTIM reg, | 568 | * Program the address_setup clocks into ARTTIM reg, |
567 | * and then the active/recovery counts into the DRWTIM reg | 569 | * and then the active/recovery counts into the DRWTIM reg |
@@ -570,7 +572,7 @@ static void program_drive_counts (unsigned int index) | |||
570 | setup_count |= __get_cmd640_reg(arttim_regs[index]) & 0x3f; | 572 | setup_count |= __get_cmd640_reg(arttim_regs[index]) & 0x3f; |
571 | __put_cmd640_reg(arttim_regs[index], setup_count); | 573 | __put_cmd640_reg(arttim_regs[index], setup_count); |
572 | __put_cmd640_reg(drwtim_regs[index], pack_nibbles(active_count, recovery_count)); | 574 | __put_cmd640_reg(drwtim_regs[index], pack_nibbles(active_count, recovery_count)); |
573 | spin_unlock_irqrestore(&ide_lock, flags); | 575 | spin_unlock_irqrestore(&cmd640_lock, flags); |
574 | } | 576 | } |
575 | 577 | ||
576 | /* | 578 | /* |
@@ -670,20 +672,20 @@ static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
670 | 672 | ||
671 | static int pci_conf1(void) | 673 | static int pci_conf1(void) |
672 | { | 674 | { |
673 | u32 tmp; | ||
674 | unsigned long flags; | 675 | unsigned long flags; |
676 | u32 tmp; | ||
675 | 677 | ||
676 | spin_lock_irqsave(&ide_lock, flags); | 678 | spin_lock_irqsave(&cmd640_lock, flags); |
677 | outb(0x01, 0xCFB); | 679 | outb(0x01, 0xCFB); |
678 | tmp = inl(0xCF8); | 680 | tmp = inl(0xCF8); |
679 | outl(0x80000000, 0xCF8); | 681 | outl(0x80000000, 0xCF8); |
680 | if (inl(0xCF8) == 0x80000000) { | 682 | if (inl(0xCF8) == 0x80000000) { |
681 | outl(tmp, 0xCF8); | 683 | outl(tmp, 0xCF8); |
682 | spin_unlock_irqrestore(&ide_lock, flags); | 684 | spin_unlock_irqrestore(&cmd640_lock, flags); |
683 | return 1; | 685 | return 1; |
684 | } | 686 | } |
685 | outl(tmp, 0xCF8); | 687 | outl(tmp, 0xCF8); |
686 | spin_unlock_irqrestore(&ide_lock, flags); | 688 | spin_unlock_irqrestore(&cmd640_lock, flags); |
687 | return 0; | 689 | return 0; |
688 | } | 690 | } |
689 | 691 | ||
@@ -691,15 +693,15 @@ static int pci_conf2(void) | |||
691 | { | 693 | { |
692 | unsigned long flags; | 694 | unsigned long flags; |
693 | 695 | ||
694 | spin_lock_irqsave(&ide_lock, flags); | 696 | spin_lock_irqsave(&cmd640_lock, flags); |
695 | outb(0x00, 0xCFB); | 697 | outb(0x00, 0xCFB); |
696 | outb(0x00, 0xCF8); | 698 | outb(0x00, 0xCF8); |
697 | outb(0x00, 0xCFA); | 699 | outb(0x00, 0xCFA); |
698 | if (inb(0xCF8) == 0x00 && inb(0xCF8) == 0x00) { | 700 | if (inb(0xCF8) == 0x00 && inb(0xCF8) == 0x00) { |
699 | spin_unlock_irqrestore(&ide_lock, flags); | 701 | spin_unlock_irqrestore(&cmd640_lock, flags); |
700 | return 1; | 702 | return 1; |
701 | } | 703 | } |
702 | spin_unlock_irqrestore(&ide_lock, flags); | 704 | spin_unlock_irqrestore(&cmd640_lock, flags); |
703 | return 0; | 705 | return 0; |
704 | } | 706 | } |
705 | 707 | ||
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index adee2ef6fd71..ea0143ef5fe5 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -535,7 +535,6 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif) | |||
535 | hwif->ide_dma_test_irq = &cmd648_ide_dma_test_irq; | 535 | hwif->ide_dma_test_irq = &cmd648_ide_dma_test_irq; |
536 | break; | 536 | break; |
537 | case PCI_DEVICE_ID_CMD_646: | 537 | case PCI_DEVICE_ID_CMD_646: |
538 | hwif->chipset = ide_cmd646; | ||
539 | if (dev->revision == 0x01) { | 538 | if (dev->revision == 0x01) { |
540 | hwif->ide_dma_end = &cmd646_1_ide_dma_end; | 539 | hwif->ide_dma_end = &cmd646_1_ide_dma_end; |
541 | break; | 540 | break; |
@@ -549,7 +548,7 @@ static void __devinit init_hwif_cmd64x(ide_hwif_t *hwif) | |||
549 | } | 548 | } |
550 | } | 549 | } |
551 | 550 | ||
552 | static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { | 551 | static const struct ide_port_info cmd64x_chipsets[] __devinitdata = { |
553 | { /* 0 */ | 552 | { /* 0 */ |
554 | .name = "CMD643", | 553 | .name = "CMD643", |
555 | .init_chipset = init_chipset_cmd64x, | 554 | .init_chipset = init_chipset_cmd64x, |
@@ -573,6 +572,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { | |||
573 | .init_chipset = init_chipset_cmd64x, | 572 | .init_chipset = init_chipset_cmd64x, |
574 | .init_hwif = init_hwif_cmd64x, | 573 | .init_hwif = init_hwif_cmd64x, |
575 | .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, | 574 | .enablebits = {{0x51,0x04,0x04}, {0x51,0x08,0x08}}, |
575 | .chipset = ide_cmd646, | ||
576 | .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, | 576 | .host_flags = IDE_HFLAG_ABUSE_PREFETCH | IDE_HFLAG_BOOTABLE, |
577 | .pio_mask = ATA_PIO5, | 577 | .pio_mask = ATA_PIO5, |
578 | .mwdma_mask = ATA_MWDMA2, | 578 | .mwdma_mask = ATA_MWDMA2, |
@@ -591,7 +591,7 @@ static ide_pci_device_t cmd64x_chipsets[] __devinitdata = { | |||
591 | 591 | ||
592 | static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 592 | static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
593 | { | 593 | { |
594 | ide_pci_device_t d; | 594 | struct ide_port_info d; |
595 | u8 idx = id->driver_data; | 595 | u8 idx = id->driver_data; |
596 | 596 | ||
597 | d = cmd64x_chipsets[idx]; | 597 | d = cmd64x_chipsets[idx]; |
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index aa98e817d385..0466462fd21b 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -141,7 +141,7 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif) | |||
141 | .pio_mask = ATA_PIO4, \ | 141 | .pio_mask = ATA_PIO4, \ |
142 | } | 142 | } |
143 | 143 | ||
144 | static ide_pci_device_t cyrix_chipsets[] __devinitdata = { | 144 | static const struct ide_port_info cyrix_chipsets[] __devinitdata = { |
145 | /* 0 */ DECLARE_CS_DEV("Cyrix 5510"), | 145 | /* 0 */ DECLARE_CS_DEV("Cyrix 5510"), |
146 | /* 1 */ DECLARE_CS_DEV("Cyrix 5520") | 146 | /* 1 */ DECLARE_CS_DEV("Cyrix 5520") |
147 | }; | 147 | }; |
@@ -154,9 +154,8 @@ static ide_pci_device_t cyrix_chipsets[] __devinitdata = { | |||
154 | 154 | ||
155 | static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 155 | static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
156 | { | 156 | { |
157 | ide_hwif_t *hwif = NULL, *mate = NULL; | 157 | const struct ide_port_info *d = &cyrix_chipsets[id->driver_data]; |
158 | ata_index_t index; | 158 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
159 | ide_pci_device_t *d = &cyrix_chipsets[id->driver_data]; | ||
160 | 159 | ||
161 | ide_setup_pci_noise(dev, d); | 160 | ide_setup_pci_noise(dev, d); |
162 | 161 | ||
@@ -172,29 +171,14 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic | |||
172 | return -ENODEV; | 171 | return -ENODEV; |
173 | } | 172 | } |
174 | 173 | ||
175 | index.all = 0xf0f0; | ||
176 | |||
177 | /* | 174 | /* |
178 | * Now the chipset is configured we can let the core | 175 | * Now the chipset is configured we can let the core |
179 | * do all the device setup for us | 176 | * do all the device setup for us |
180 | */ | 177 | */ |
181 | 178 | ||
182 | ide_pci_setup_ports(dev, d, 14, &index); | 179 | ide_pci_setup_ports(dev, d, 14, &idx[0]); |
183 | |||
184 | if ((index.b.low & 0xf0) != 0xf0) | ||
185 | hwif = &ide_hwifs[index.b.low]; | ||
186 | if ((index.b.high & 0xf0) != 0xf0) | ||
187 | mate = &ide_hwifs[index.b.high]; | ||
188 | |||
189 | if (hwif) | ||
190 | probe_hwif_init(hwif); | ||
191 | if (mate) | ||
192 | probe_hwif_init(mate); | ||
193 | 180 | ||
194 | if (hwif) | 181 | ide_device_add(idx); |
195 | ide_proc_register_port(hwif); | ||
196 | if (mate) | ||
197 | ide_proc_register_port(mate); | ||
198 | 182 | ||
199 | return 0; | 183 | return 0; |
200 | } | 184 | } |
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c index ba0c6eba024b..599408952bd4 100644 --- a/drivers/ide/pci/cs5530.c +++ b/drivers/ide/pci/cs5530.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/cs5530.c Version 0.76 Aug 3 2007 | 2 | * linux/drivers/ide/pci/cs5530.c Version 0.77 Sep 24 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2000 Mark Lord <mlord@pobox.com> | 5 | * Copyright (C) 2000 Mark Lord <mlord@pobox.com> |
@@ -146,7 +146,6 @@ static void cs5530_set_dma_mode(ide_drive_t *drive, const u8 mode) | |||
146 | static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const char *name) | 146 | static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const char *name) |
147 | { | 147 | { |
148 | struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; | 148 | struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; |
149 | unsigned long flags; | ||
150 | 149 | ||
151 | if (pci_resource_start(dev, 4) == 0) | 150 | if (pci_resource_start(dev, 4) == 0) |
152 | return -EFAULT; | 151 | return -EFAULT; |
@@ -171,9 +170,6 @@ static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const ch | |||
171 | goto out; | 170 | goto out; |
172 | } | 171 | } |
173 | 172 | ||
174 | spin_lock_irqsave(&ide_lock, flags); | ||
175 | /* all CPUs (there should only be one CPU with this chipset) */ | ||
176 | |||
177 | /* | 173 | /* |
178 | * Enable BusMaster and MemoryWriteAndInvalidate for the cs5530: | 174 | * Enable BusMaster and MemoryWriteAndInvalidate for the cs5530: |
179 | * --> OR 0x14 into 16-bit PCI COMMAND reg of function 0 of the cs5530 | 175 | * --> OR 0x14 into 16-bit PCI COMMAND reg of function 0 of the cs5530 |
@@ -224,8 +220,6 @@ static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const ch | |||
224 | pci_write_config_byte(master_0, 0x42, 0x00); | 220 | pci_write_config_byte(master_0, 0x42, 0x00); |
225 | pci_write_config_byte(master_0, 0x43, 0xc1); | 221 | pci_write_config_byte(master_0, 0x43, 0xc1); |
226 | 222 | ||
227 | spin_unlock_irqrestore(&ide_lock, flags); | ||
228 | |||
229 | out: | 223 | out: |
230 | pci_dev_put(master_0); | 224 | pci_dev_put(master_0); |
231 | pci_dev_put(cs5530_0); | 225 | pci_dev_put(cs5530_0); |
@@ -261,7 +255,7 @@ static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif) | |||
261 | hwif->udma_filter = cs5530_udma_filter; | 255 | hwif->udma_filter = cs5530_udma_filter; |
262 | } | 256 | } |
263 | 257 | ||
264 | static ide_pci_device_t cs5530_chipset __devinitdata = { | 258 | static const struct ide_port_info cs5530_chipset __devinitdata = { |
265 | .name = "CS5530", | 259 | .name = "CS5530", |
266 | .init_chipset = init_chipset_cs5530, | 260 | .init_chipset = init_chipset_cs5530, |
267 | .init_hwif = init_hwif_cs5530, | 261 | .init_hwif = init_hwif_cs5530, |
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 5ac82ffa5c09..9094916e3780 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c | |||
@@ -186,7 +186,7 @@ static void __devinit init_hwif_cs5535(ide_hwif_t *hwif) | |||
186 | hwif->cbl = cs5535_cable_detect(hwif->pci_dev); | 186 | hwif->cbl = cs5535_cable_detect(hwif->pci_dev); |
187 | } | 187 | } |
188 | 188 | ||
189 | static ide_pci_device_t cs5535_chipset __devinitdata = { | 189 | static const struct ide_port_info cs5535_chipset __devinitdata = { |
190 | .name = "CS5535", | 190 | .name = "CS5535", |
191 | .init_hwif = init_hwif_cs5535, | 191 | .init_hwif = init_hwif_cs5535, |
192 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE | | 192 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_POST_SET_MODE | |
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index efc20bd97fd5..3ef4fc10fe2c 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
@@ -428,7 +428,6 @@ static unsigned int __devinit init_chipset_cy82c693(struct pci_dev *dev, const c | |||
428 | */ | 428 | */ |
429 | static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif) | 429 | static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif) |
430 | { | 430 | { |
431 | hwif->chipset = ide_cy82c693; | ||
432 | hwif->set_pio_mode = &cy82c693_set_pio_mode; | 431 | hwif->set_pio_mode = &cy82c693_set_pio_mode; |
433 | 432 | ||
434 | if (hwif->dma_base == 0) | 433 | if (hwif->dma_base == 0) |
@@ -449,11 +448,12 @@ static void __devinit init_iops_cy82c693(ide_hwif_t *hwif) | |||
449 | } | 448 | } |
450 | } | 449 | } |
451 | 450 | ||
452 | static ide_pci_device_t cy82c693_chipset __devinitdata = { | 451 | static const struct ide_port_info cy82c693_chipset __devinitdata = { |
453 | .name = "CY82C693", | 452 | .name = "CY82C693", |
454 | .init_chipset = init_chipset_cy82c693, | 453 | .init_chipset = init_chipset_cy82c693, |
455 | .init_iops = init_iops_cy82c693, | 454 | .init_iops = init_iops_cy82c693, |
456 | .init_hwif = init_hwif_cy82c693, | 455 | .init_hwif = init_hwif_cy82c693, |
456 | .chipset = ide_cy82c693, | ||
457 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 457 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
458 | IDE_HFLAG_BOOTABLE, | 458 | IDE_HFLAG_BOOTABLE, |
459 | .pio_mask = ATA_PIO4, | 459 | .pio_mask = ATA_PIO4, |
diff --git a/drivers/ide/pci/delkin_cb.c b/drivers/ide/pci/delkin_cb.c index 46f4a888c037..83829081640a 100644 --- a/drivers/ide/pci/delkin_cb.c +++ b/drivers/ide/pci/delkin_cb.c | |||
@@ -80,7 +80,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) | |||
80 | hw.irq = dev->irq; | 80 | hw.irq = dev->irq; |
81 | hw.chipset = ide_pci; /* this enables IRQ sharing */ | 81 | hw.chipset = ide_pci; /* this enables IRQ sharing */ |
82 | 82 | ||
83 | rc = ide_register_hw_with_fixup(&hw, 0, &hwif, ide_undecoded_slave); | 83 | rc = ide_register_hw(&hw, &ide_undecoded_slave, 0, &hwif); |
84 | if (rc < 0) { | 84 | if (rc < 0) { |
85 | printk(KERN_ERR "delkin_cb: ide_register_hw failed (%d)\n", rc); | 85 | printk(KERN_ERR "delkin_cb: ide_register_hw failed (%d)\n", rc); |
86 | pci_disable_device(dev); | 86 | pci_disable_device(dev); |
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index 51165832e7f2..f44d70852c3c 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
@@ -54,37 +54,24 @@ __setup("all-generic-ide", ide_generic_all_on); | |||
54 | module_param_named(all_generic_ide, ide_generic_all, bool, 0444); | 54 | module_param_named(all_generic_ide, ide_generic_all, bool, 0444); |
55 | MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers."); | 55 | MODULE_PARM_DESC(all_generic_ide, "IDE generic will claim all unknown PCI IDE storage controllers."); |
56 | 56 | ||
57 | static void __devinit init_hwif_generic (ide_hwif_t *hwif) | 57 | #define IDE_HFLAGS_UMC (IDE_HFLAG_NO_DMA | IDE_HFLAG_FORCE_LEGACY_IRQS) |
58 | { | ||
59 | switch(hwif->pci_dev->device) { | ||
60 | case PCI_DEVICE_ID_UMC_UM8673F: | ||
61 | case PCI_DEVICE_ID_UMC_UM8886A: | ||
62 | case PCI_DEVICE_ID_UMC_UM8886BF: | ||
63 | hwif->irq = hwif->channel ? 15 : 14; | ||
64 | break; | ||
65 | default: | ||
66 | break; | ||
67 | } | ||
68 | } | ||
69 | 58 | ||
70 | #define DECLARE_GENERIC_PCI_DEV(name_str, dma_setting) \ | 59 | #define DECLARE_GENERIC_PCI_DEV(name_str, extra_flags) \ |
71 | { \ | 60 | { \ |
72 | .name = name_str, \ | 61 | .name = name_str, \ |
73 | .init_hwif = init_hwif_generic, \ | ||
74 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | \ | 62 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | \ |
75 | dma_setting | \ | 63 | extra_flags | \ |
76 | IDE_HFLAG_BOOTABLE, \ | 64 | IDE_HFLAG_BOOTABLE, \ |
77 | .swdma_mask = ATA_SWDMA2, \ | 65 | .swdma_mask = ATA_SWDMA2, \ |
78 | .mwdma_mask = ATA_MWDMA2, \ | 66 | .mwdma_mask = ATA_MWDMA2, \ |
79 | .udma_mask = ATA_UDMA6, \ | 67 | .udma_mask = ATA_UDMA6, \ |
80 | } | 68 | } |
81 | 69 | ||
82 | static ide_pci_device_t generic_chipsets[] __devinitdata = { | 70 | static const struct ide_port_info generic_chipsets[] __devinitdata = { |
83 | /* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", 0), | 71 | /* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", 0), |
84 | 72 | ||
85 | { /* 1 */ | 73 | { /* 1 */ |
86 | .name = "NS87410", | 74 | .name = "NS87410", |
87 | .init_hwif = init_hwif_generic, | ||
88 | .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, | 75 | .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, |
89 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 76 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
90 | IDE_HFLAG_BOOTABLE, | 77 | IDE_HFLAG_BOOTABLE, |
@@ -95,16 +82,15 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { | |||
95 | 82 | ||
96 | /* 2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI", 0), | 83 | /* 2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI", 0), |
97 | /* 3 */ DECLARE_GENERIC_PCI_DEV("HT6565", 0), | 84 | /* 3 */ DECLARE_GENERIC_PCI_DEV("HT6565", 0), |
98 | /* 4 */ DECLARE_GENERIC_PCI_DEV("UM8673F", IDE_HFLAG_NO_DMA), | 85 | /* 4 */ DECLARE_GENERIC_PCI_DEV("UM8673F", IDE_HFLAGS_UMC), |
99 | /* 5 */ DECLARE_GENERIC_PCI_DEV("UM8886A", IDE_HFLAG_NO_DMA), | 86 | /* 5 */ DECLARE_GENERIC_PCI_DEV("UM8886A", IDE_HFLAGS_UMC), |
100 | /* 6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF", IDE_HFLAG_NO_DMA), | 87 | /* 6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF", IDE_HFLAGS_UMC), |
101 | /* 7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE", 0), | 88 | /* 7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE", 0), |
102 | /* 8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE", IDE_HFLAG_NO_AUTODMA), | 89 | /* 8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE", IDE_HFLAG_NO_AUTODMA), |
103 | /* 9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V", IDE_HFLAG_NO_AUTODMA), | 90 | /* 9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V", IDE_HFLAG_NO_AUTODMA), |
104 | 91 | ||
105 | { /* 10 */ | 92 | { /* 10 */ |
106 | .name = "VIA8237SATA", | 93 | .name = "VIA8237SATA", |
107 | .init_hwif = init_hwif_generic, | ||
108 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 94 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
109 | IDE_HFLAG_OFF_BOARD, | 95 | IDE_HFLAG_OFF_BOARD, |
110 | .swdma_mask = ATA_SWDMA2, | 96 | .swdma_mask = ATA_SWDMA2, |
@@ -118,7 +104,6 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { | |||
118 | 104 | ||
119 | { /* 14 */ | 105 | { /* 14 */ |
120 | .name = "Revolution", | 106 | .name = "Revolution", |
121 | .init_hwif = init_hwif_generic, | ||
122 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 107 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
123 | IDE_HFLAG_OFF_BOARD, | 108 | IDE_HFLAG_OFF_BOARD, |
124 | .swdma_mask = ATA_SWDMA2, | 109 | .swdma_mask = ATA_SWDMA2, |
@@ -138,7 +123,7 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = { | |||
138 | 123 | ||
139 | static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 124 | static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
140 | { | 125 | { |
141 | ide_pci_device_t *d = &generic_chipsets[id->driver_data]; | 126 | const struct ide_port_info *d = &generic_chipsets[id->driver_data]; |
142 | int ret = -ENODEV; | 127 | int ret = -ENODEV; |
143 | 128 | ||
144 | /* Don't use the generic entry unless instructed to do so */ | 129 | /* Don't use the generic entry unless instructed to do so */ |
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c index 67af1a7dde30..ae6307fae4f9 100644 --- a/drivers/ide/pci/hpt34x.c +++ b/drivers/ide/pci/hpt34x.c | |||
@@ -129,7 +129,7 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif) | |||
129 | hwif->set_dma_mode = &hpt34x_set_mode; | 129 | hwif->set_dma_mode = &hpt34x_set_mode; |
130 | } | 130 | } |
131 | 131 | ||
132 | static ide_pci_device_t hpt34x_chipsets[] __devinitdata = { | 132 | static const struct ide_port_info hpt34x_chipsets[] __devinitdata = { |
133 | { /* 0 */ | 133 | { /* 0 */ |
134 | .name = "HPT343", | 134 | .name = "HPT343", |
135 | .init_chipset = init_chipset_hpt34x, | 135 | .init_chipset = init_chipset_hpt34x, |
@@ -158,7 +158,7 @@ static ide_pci_device_t hpt34x_chipsets[] __devinitdata = { | |||
158 | 158 | ||
159 | static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 159 | static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
160 | { | 160 | { |
161 | ide_pci_device_t *d; | 161 | const struct ide_port_info *d; |
162 | u16 pcicmd = 0; | 162 | u16 pcicmd = 0; |
163 | 163 | ||
164 | pci_read_config_word(dev, PCI_COMMAND, &pcicmd); | 164 | pci_read_config_word(dev, PCI_COMMAND, &pcicmd); |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 18f5b7ddaee6..612b795241bf 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1425,7 +1425,7 @@ static int __devinit hpt36x_init(struct pci_dev *dev, struct pci_dev *dev2) | |||
1425 | return 0; | 1425 | return 0; |
1426 | } | 1426 | } |
1427 | 1427 | ||
1428 | static ide_pci_device_t hpt366_chipsets[] __devinitdata = { | 1428 | static const struct ide_port_info hpt366_chipsets[] __devinitdata = { |
1429 | { /* 0 */ | 1429 | { /* 0 */ |
1430 | .name = "HPT36x", | 1430 | .name = "HPT36x", |
1431 | .init_chipset = init_chipset_hpt366, | 1431 | .init_chipset = init_chipset_hpt366, |
@@ -1510,7 +1510,7 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic | |||
1510 | { | 1510 | { |
1511 | struct hpt_info *info = NULL; | 1511 | struct hpt_info *info = NULL; |
1512 | struct pci_dev *dev2 = NULL; | 1512 | struct pci_dev *dev2 = NULL; |
1513 | ide_pci_device_t d; | 1513 | struct ide_port_info d; |
1514 | u8 idx = id->driver_data; | 1514 | u8 idx = id->driver_data; |
1515 | u8 rev = dev->revision; | 1515 | u8 rev = dev->revision; |
1516 | 1516 | ||
diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c index dfbe605120cb..90b52ed37bfc 100644 --- a/drivers/ide/pci/it8213.c +++ b/drivers/ide/pci/it8213.c | |||
@@ -193,7 +193,7 @@ static void __devinit init_hwif_it8213(ide_hwif_t *hwif) | |||
193 | .udma_mask = ATA_UDMA6, \ | 193 | .udma_mask = ATA_UDMA6, \ |
194 | } | 194 | } |
195 | 195 | ||
196 | static ide_pci_device_t it8213_chipsets[] __devinitdata = { | 196 | static const struct ide_port_info it8213_chipsets[] __devinitdata = { |
197 | /* 0 */ DECLARE_ITE_DEV("IT8213"), | 197 | /* 0 */ DECLARE_ITE_DEV("IT8213"), |
198 | }; | 198 | }; |
199 | 199 | ||
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index ec45b7247209..5c9975435319 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c | |||
@@ -95,7 +95,7 @@ struct it821x_dev | |||
95 | 95 | ||
96 | /* | 96 | /* |
97 | * We allow users to force the card into non raid mode without | 97 | * We allow users to force the card into non raid mode without |
98 | * flashing the alternative BIOS. This is also neccessary right now | 98 | * flashing the alternative BIOS. This is also necessary right now |
99 | * for embedded platforms that cannot run a PC BIOS but are using this | 99 | * for embedded platforms that cannot run a PC BIOS but are using this |
100 | * device. | 100 | * device. |
101 | */ | 101 | */ |
@@ -564,7 +564,7 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) | |||
564 | 564 | ||
565 | /* | 565 | /* |
566 | * Not in the docs but according to the reference driver | 566 | * Not in the docs but according to the reference driver |
567 | * this is neccessary. | 567 | * this is necessary. |
568 | */ | 568 | */ |
569 | 569 | ||
570 | pci_read_config_byte(hwif->pci_dev, 0x08, &conf); | 570 | pci_read_config_byte(hwif->pci_dev, 0x08, &conf); |
@@ -638,7 +638,7 @@ static unsigned int __devinit init_chipset_it821x(struct pci_dev *dev, const cha | |||
638 | .pio_mask = ATA_PIO4, \ | 638 | .pio_mask = ATA_PIO4, \ |
639 | } | 639 | } |
640 | 640 | ||
641 | static ide_pci_device_t it821x_chipsets[] __devinitdata = { | 641 | static const struct ide_port_info it821x_chipsets[] __devinitdata = { |
642 | /* 0 */ DECLARE_ITE_DEV("IT8212"), | 642 | /* 0 */ DECLARE_ITE_DEV("IT8212"), |
643 | }; | 643 | }; |
644 | 644 | ||
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c index 2eeff670d9a6..bdf64d997708 100644 --- a/drivers/ide/pci/jmicron.c +++ b/drivers/ide/pci/jmicron.c | |||
@@ -118,7 +118,7 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif) | |||
118 | hwif->cbl = ata66_jmicron(hwif); | 118 | hwif->cbl = ata66_jmicron(hwif); |
119 | } | 119 | } |
120 | 120 | ||
121 | static ide_pci_device_t jmicron_chipset __devinitdata = { | 121 | static const struct ide_port_info jmicron_chipset __devinitdata = { |
122 | .name = "JMB", | 122 | .name = "JMB", |
123 | .init_hwif = init_hwif_jmicron, | 123 | .init_hwif = init_hwif_jmicron, |
124 | .host_flags = IDE_HFLAG_BOOTABLE, | 124 | .host_flags = IDE_HFLAG_BOOTABLE, |
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index d21b58923829..d4df4642dbb5 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -260,7 +260,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | |||
260 | hwif->ide_dma_end = &ns87415_ide_dma_end; | 260 | hwif->ide_dma_end = &ns87415_ide_dma_end; |
261 | } | 261 | } |
262 | 262 | ||
263 | static ide_pci_device_t ns87415_chipset __devinitdata = { | 263 | static const struct ide_port_info ns87415_chipset __devinitdata = { |
264 | .name = "NS87415", | 264 | .name = "NS87415", |
265 | #ifdef CONFIG_SUPERIO | 265 | #ifdef CONFIG_SUPERIO |
266 | .init_iops = init_iops_ns87415, | 266 | .init_iops = init_iops_ns87415, |
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c index 3573ffeaaa34..8953d9c3926f 100644 --- a/drivers/ide/pci/opti621.c +++ b/drivers/ide/pci/opti621.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/opti621.c Version 0.8 Aug 27, 2007 | 2 | * linux/drivers/ide/pci/opti621.c Version 0.9 Sep 24, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1996-1998 Linus Torvalds & authors (see below) | 4 | * Copyright (C) 1996-1998 Linus Torvalds & authors (see below) |
5 | */ | 5 | */ |
@@ -133,6 +133,8 @@ static int reg_base; | |||
133 | #define PIO_NOT_EXIST 254 | 133 | #define PIO_NOT_EXIST 254 |
134 | #define PIO_DONT_KNOW 255 | 134 | #define PIO_DONT_KNOW 255 |
135 | 135 | ||
136 | static DEFINE_SPINLOCK(opti621_lock); | ||
137 | |||
136 | /* there are stored pio numbers from other calls of opti621_set_pio_mode */ | 138 | /* there are stored pio numbers from other calls of opti621_set_pio_mode */ |
137 | static void compute_pios(ide_drive_t *drive, const u8 pio) | 139 | static void compute_pios(ide_drive_t *drive, const u8 pio) |
138 | /* Store values into drive->drive_data | 140 | /* Store values into drive->drive_data |
@@ -278,7 +280,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
278 | second.recovery_time, drdy); | 280 | second.recovery_time, drdy); |
279 | #endif | 281 | #endif |
280 | 282 | ||
281 | spin_lock_irqsave(&ide_lock, flags); | 283 | spin_lock_irqsave(&opti621_lock, flags); |
282 | 284 | ||
283 | reg_base = hwif->io_ports[IDE_DATA_OFFSET]; | 285 | reg_base = hwif->io_ports[IDE_DATA_OFFSET]; |
284 | 286 | ||
@@ -317,7 +319,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
317 | /* and read prefetch for both drives */ | 319 | /* and read prefetch for both drives */ |
318 | write_reg(misc, MISC_REG); | 320 | write_reg(misc, MISC_REG); |
319 | 321 | ||
320 | spin_unlock_irqrestore(&ide_lock, flags); | 322 | spin_unlock_irqrestore(&opti621_lock, flags); |
321 | } | 323 | } |
322 | 324 | ||
323 | /* | 325 | /* |
@@ -331,7 +333,7 @@ static void __devinit init_hwif_opti621 (ide_hwif_t *hwif) | |||
331 | hwif->set_pio_mode = &opti621_set_pio_mode; | 333 | hwif->set_pio_mode = &opti621_set_pio_mode; |
332 | } | 334 | } |
333 | 335 | ||
334 | static ide_pci_device_t opti621_chipsets[] __devinitdata = { | 336 | static const struct ide_port_info opti621_chipsets[] __devinitdata = { |
335 | { /* 0 */ | 337 | { /* 0 */ |
336 | .name = "OPTI621", | 338 | .name = "OPTI621", |
337 | .init_hwif = init_hwif_opti621, | 339 | .init_hwif = init_hwif_opti621, |
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index d1e7823454f3..4234efeba606 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -513,7 +513,7 @@ static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev) | |||
513 | .udma_mask = udma, \ | 513 | .udma_mask = udma, \ |
514 | } | 514 | } |
515 | 515 | ||
516 | static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | 516 | static const struct ide_port_info pdcnew_chipsets[] __devinitdata = { |
517 | /* 0 */ DECLARE_PDCNEW_DEV("PDC20268", ATA_UDMA5), | 517 | /* 0 */ DECLARE_PDCNEW_DEV("PDC20268", ATA_UDMA5), |
518 | /* 1 */ DECLARE_PDCNEW_DEV("PDC20269", ATA_UDMA6), | 518 | /* 1 */ DECLARE_PDCNEW_DEV("PDC20269", ATA_UDMA6), |
519 | /* 2 */ DECLARE_PDCNEW_DEV("PDC20270", ATA_UDMA5), | 519 | /* 2 */ DECLARE_PDCNEW_DEV("PDC20270", ATA_UDMA5), |
@@ -534,7 +534,7 @@ static ide_pci_device_t pdcnew_chipsets[] __devinitdata = { | |||
534 | 534 | ||
535 | static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 535 | static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
536 | { | 536 | { |
537 | ide_pci_device_t *d; | 537 | const struct ide_port_info *d; |
538 | struct pci_dev *bridge = dev->bus->self; | 538 | struct pci_dev *bridge = dev->bus->self; |
539 | u8 idx = id->driver_data; | 539 | u8 idx = id->driver_data; |
540 | 540 | ||
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 29306121dc4a..e09742e2ba59 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -302,13 +302,6 @@ static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, | |||
302 | 302 | ||
303 | static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) | 303 | static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) |
304 | { | 304 | { |
305 | struct pci_dev *dev = hwif->pci_dev; | ||
306 | |||
307 | /* PDC20265 has problems with large LBA48 requests */ | ||
308 | if ((dev->device == PCI_DEVICE_ID_PROMISE_20267) || | ||
309 | (dev->device == PCI_DEVICE_ID_PROMISE_20265)) | ||
310 | hwif->rqsize = 256; | ||
311 | |||
312 | hwif->set_pio_mode = &pdc202xx_set_pio_mode; | 305 | hwif->set_pio_mode = &pdc202xx_set_pio_mode; |
313 | hwif->set_dma_mode = &pdc202xx_set_mode; | 306 | hwif->set_dma_mode = &pdc202xx_set_mode; |
314 | 307 | ||
@@ -382,7 +375,7 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev, | |||
382 | } | 375 | } |
383 | } | 376 | } |
384 | 377 | ||
385 | #define DECLARE_PDC2026X_DEV(name_str, udma) \ | 378 | #define DECLARE_PDC2026X_DEV(name_str, udma, extra_flags) \ |
386 | { \ | 379 | { \ |
387 | .name = name_str, \ | 380 | .name = name_str, \ |
388 | .init_chipset = init_chipset_pdc202xx, \ | 381 | .init_chipset = init_chipset_pdc202xx, \ |
@@ -390,13 +383,14 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev, | |||
390 | .init_dma = init_dma_pdc202xx, \ | 383 | .init_dma = init_dma_pdc202xx, \ |
391 | .extra = 48, \ | 384 | .extra = 48, \ |
392 | .host_flags = IDE_HFLAG_ERROR_STOPS_FIFO | \ | 385 | .host_flags = IDE_HFLAG_ERROR_STOPS_FIFO | \ |
386 | extra_flags | \ | ||
393 | IDE_HFLAG_OFF_BOARD, \ | 387 | IDE_HFLAG_OFF_BOARD, \ |
394 | .pio_mask = ATA_PIO4, \ | 388 | .pio_mask = ATA_PIO4, \ |
395 | .mwdma_mask = ATA_MWDMA2, \ | 389 | .mwdma_mask = ATA_MWDMA2, \ |
396 | .udma_mask = udma, \ | 390 | .udma_mask = udma, \ |
397 | } | 391 | } |
398 | 392 | ||
399 | static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { | 393 | static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = { |
400 | { /* 0 */ | 394 | { /* 0 */ |
401 | .name = "PDC20246", | 395 | .name = "PDC20246", |
402 | .init_chipset = init_chipset_pdc202xx, | 396 | .init_chipset = init_chipset_pdc202xx, |
@@ -410,10 +404,10 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { | |||
410 | .udma_mask = ATA_UDMA2, | 404 | .udma_mask = ATA_UDMA2, |
411 | }, | 405 | }, |
412 | 406 | ||
413 | /* 1 */ DECLARE_PDC2026X_DEV("PDC20262", ATA_UDMA4), | 407 | /* 1 */ DECLARE_PDC2026X_DEV("PDC20262", ATA_UDMA4, 0), |
414 | /* 2 */ DECLARE_PDC2026X_DEV("PDC20263", ATA_UDMA4), | 408 | /* 2 */ DECLARE_PDC2026X_DEV("PDC20263", ATA_UDMA4, 0), |
415 | /* 3 */ DECLARE_PDC2026X_DEV("PDC20265", ATA_UDMA5), | 409 | /* 3 */ DECLARE_PDC2026X_DEV("PDC20265", ATA_UDMA5, IDE_HFLAG_RQSIZE_256), |
416 | /* 4 */ DECLARE_PDC2026X_DEV("PDC20267", ATA_UDMA5), | 410 | /* 4 */ DECLARE_PDC2026X_DEV("PDC20267", ATA_UDMA5, IDE_HFLAG_RQSIZE_256), |
417 | }; | 411 | }; |
418 | 412 | ||
419 | /** | 413 | /** |
@@ -427,7 +421,7 @@ static ide_pci_device_t pdc202xx_chipsets[] __devinitdata = { | |||
427 | 421 | ||
428 | static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 422 | static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
429 | { | 423 | { |
430 | ide_pci_device_t *d; | 424 | const struct ide_port_info *d; |
431 | u8 idx = id->driver_data; | 425 | u8 idx = id->driver_data; |
432 | 426 | ||
433 | d = &pdc202xx_chipsets[idx]; | 427 | d = &pdc202xx_chipsets[idx]; |
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index ec0c6e96a213..9329d4a810e5 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c | |||
@@ -396,7 +396,7 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif) | |||
396 | .udma_mask = udma, \ | 396 | .udma_mask = udma, \ |
397 | } | 397 | } |
398 | 398 | ||
399 | static ide_pci_device_t piix_pci_info[] __devinitdata = { | 399 | static const struct ide_port_info piix_pci_info[] __devinitdata = { |
400 | /* 0 */ DECLARE_PIIX_DEV("PIIXa", 0x00), /* no udma */ | 400 | /* 0 */ DECLARE_PIIX_DEV("PIIXa", 0x00), /* no udma */ |
401 | /* 1 */ DECLARE_PIIX_DEV("PIIXb", 0x00), /* no udma */ | 401 | /* 1 */ DECLARE_PIIX_DEV("PIIXb", 0x00), /* no udma */ |
402 | 402 | ||
@@ -449,9 +449,7 @@ static ide_pci_device_t piix_pci_info[] __devinitdata = { | |||
449 | 449 | ||
450 | static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 450 | static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
451 | { | 451 | { |
452 | ide_pci_device_t *d = &piix_pci_info[id->driver_data]; | 452 | return ide_setup_pci_device(dev, &piix_pci_info[id->driver_data]); |
453 | |||
454 | return ide_setup_pci_device(dev, d); | ||
455 | } | 453 | } |
456 | 454 | ||
457 | /** | 455 | /** |
diff --git a/drivers/ide/pci/rz1000.c b/drivers/ide/pci/rz1000.c index dd2583ef1ad7..6b10ae260fa2 100644 --- a/drivers/ide/pci/rz1000.c +++ b/drivers/ide/pci/rz1000.c | |||
@@ -35,13 +35,13 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif) | |||
35 | u16 reg; | 35 | u16 reg; |
36 | struct pci_dev *dev = hwif->pci_dev; | 36 | struct pci_dev *dev = hwif->pci_dev; |
37 | 37 | ||
38 | hwif->chipset = ide_rz1000; | ||
39 | if (!pci_read_config_word (dev, 0x40, ®) && | 38 | if (!pci_read_config_word (dev, 0x40, ®) && |
40 | !pci_write_config_word(dev, 0x40, reg & 0xdfff)) { | 39 | !pci_write_config_word(dev, 0x40, reg & 0xdfff)) { |
41 | printk(KERN_INFO "%s: disabled chipset read-ahead " | 40 | printk(KERN_INFO "%s: disabled chipset read-ahead " |
42 | "(buggy RZ1000/RZ1001)\n", hwif->name); | 41 | "(buggy RZ1000/RZ1001)\n", hwif->name); |
43 | } else { | 42 | } else { |
44 | hwif->serialized = 1; | 43 | if (hwif->mate) |
44 | hwif->mate->serialized = hwif->serialized = 1; | ||
45 | hwif->drives[0].no_unmask = 1; | 45 | hwif->drives[0].no_unmask = 1; |
46 | hwif->drives[1].no_unmask = 1; | 46 | hwif->drives[1].no_unmask = 1; |
47 | printk(KERN_INFO "%s: serialized, disabled unmasking " | 47 | printk(KERN_INFO "%s: serialized, disabled unmasking " |
@@ -49,9 +49,10 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif) | |||
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
52 | static ide_pci_device_t rz1000_chipset __devinitdata = { | 52 | static const struct ide_port_info rz1000_chipset __devinitdata = { |
53 | .name = "RZ100x", | 53 | .name = "RZ100x", |
54 | .init_hwif = init_hwif_rz1000, | 54 | .init_hwif = init_hwif_rz1000, |
55 | .chipset = ide_rz1000, | ||
55 | .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_BOOTABLE, | 56 | .host_flags = IDE_HFLAG_NO_DMA | IDE_HFLAG_BOOTABLE, |
56 | }; | 57 | }; |
57 | 58 | ||
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index b2423e03bf36..d2c8b5524f28 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -372,7 +372,7 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif) | |||
372 | hwif->ide_dma_end = &sc1200_ide_dma_end; | 372 | hwif->ide_dma_end = &sc1200_ide_dma_end; |
373 | } | 373 | } |
374 | 374 | ||
375 | static ide_pci_device_t sc1200_chipset __devinitdata = { | 375 | static const struct ide_port_info sc1200_chipset __devinitdata = { |
376 | .name = "SC1200", | 376 | .name = "SC1200", |
377 | .init_hwif = init_hwif_sc1200, | 377 | .init_hwif = init_hwif_sc1200, |
378 | .host_flags = IDE_HFLAG_SERIALIZE | | 378 | .host_flags = IDE_HFLAG_SERIALIZE | |
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index ae9b50331d2a..ebb7132b9b84 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -538,12 +538,13 @@ static int setup_mmio_scc (struct pci_dev *dev, const char *name) | |||
538 | /** | 538 | /** |
539 | * init_setup_scc - set up an SCC PATA Controller | 539 | * init_setup_scc - set up an SCC PATA Controller |
540 | * @dev: PCI device | 540 | * @dev: PCI device |
541 | * @d: IDE PCI device | 541 | * @d: IDE port info |
542 | * | 542 | * |
543 | * Perform the initial set up for this device. | 543 | * Perform the initial set up for this device. |
544 | */ | 544 | */ |
545 | 545 | ||
546 | static int __devinit init_setup_scc(struct pci_dev *dev, ide_pci_device_t *d) | 546 | static int __devinit init_setup_scc(struct pci_dev *dev, |
547 | const struct ide_port_info *d) | ||
547 | { | 548 | { |
548 | unsigned long ctl_base; | 549 | unsigned long ctl_base; |
549 | unsigned long dma_base; | 550 | unsigned long dma_base; |
@@ -702,7 +703,7 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif) | |||
702 | .pio_mask = ATA_PIO4, \ | 703 | .pio_mask = ATA_PIO4, \ |
703 | } | 704 | } |
704 | 705 | ||
705 | static ide_pci_device_t scc_chipsets[] __devinitdata = { | 706 | static const struct ide_port_info scc_chipsets[] __devinitdata = { |
706 | /* 0 */ DECLARE_SCC_DEV("sccIDE"), | 707 | /* 0 */ DECLARE_SCC_DEV("sccIDE"), |
707 | }; | 708 | }; |
708 | 709 | ||
@@ -717,9 +718,7 @@ static ide_pci_device_t scc_chipsets[] __devinitdata = { | |||
717 | 718 | ||
718 | static int __devinit scc_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 719 | static int __devinit scc_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
719 | { | 720 | { |
720 | ide_pci_device_t *d = &scc_chipsets[id->driver_data]; | 721 | return init_setup_scc(dev, &scc_chipsets[id->driver_data]); |
721 | |||
722 | return init_setup_scc(dev, d); | ||
723 | } | 722 | } |
724 | 723 | ||
725 | /** | 724 | /** |
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index a3d880e21d0b..a7280311357b 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -158,13 +158,6 @@ static void svwks_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
158 | 158 | ||
159 | u8 ultra_enable = 0, ultra_timing = 0, dma_timing = 0; | 159 | u8 ultra_enable = 0, ultra_timing = 0, dma_timing = 0; |
160 | 160 | ||
161 | /* If we are about to put a disk into UDMA mode we screwed up. | ||
162 | Our code assumes we never _ever_ do this on an OSB4 */ | ||
163 | |||
164 | if(dev->device == PCI_DEVICE_ID_SERVERWORKS_OSB4 && | ||
165 | drive->media == ide_disk && speed >= XFER_UDMA_0) | ||
166 | BUG(); | ||
167 | |||
168 | pci_read_config_byte(dev, (0x56|hwif->channel), &ultra_timing); | 161 | pci_read_config_byte(dev, (0x56|hwif->channel), &ultra_timing); |
169 | pci_read_config_byte(dev, 0x54, &ultra_enable); | 162 | pci_read_config_byte(dev, 0x54, &ultra_enable); |
170 | 163 | ||
@@ -373,7 +366,7 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif) | |||
373 | } | 366 | } |
374 | } | 367 | } |
375 | 368 | ||
376 | static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | 369 | static const struct ide_port_info serverworks_chipsets[] __devinitdata = { |
377 | { /* 0 */ | 370 | { /* 0 */ |
378 | .name = "SvrWks OSB4", | 371 | .name = "SvrWks OSB4", |
379 | .init_chipset = init_chipset_svwks, | 372 | .init_chipset = init_chipset_svwks, |
@@ -430,7 +423,7 @@ static ide_pci_device_t serverworks_chipsets[] __devinitdata = { | |||
430 | 423 | ||
431 | static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 424 | static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
432 | { | 425 | { |
433 | ide_pci_device_t d; | 426 | struct ide_port_info d; |
434 | u8 idx = id->driver_data; | 427 | u8 idx = id->driver_data; |
435 | 428 | ||
436 | d = serverworks_chipsets[idx]; | 429 | d = serverworks_chipsets[idx]; |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 5af74ea1d46e..de820aa58cd0 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -614,6 +614,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
614 | void __iomem *virt_base; | 614 | void __iomem *virt_base; |
615 | ide_hwif_t *hwif; | 615 | ide_hwif_t *hwif; |
616 | int h; | 616 | int h; |
617 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
617 | 618 | ||
618 | /* | 619 | /* |
619 | * Find an empty HWIF; if none available, return -ENOMEM. | 620 | * Find an empty HWIF; if none available, return -ENOMEM. |
@@ -654,10 +655,12 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
654 | } | 655 | } |
655 | 656 | ||
656 | if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) { | 657 | if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) { |
658 | hw_regs_t hw; | ||
659 | |||
657 | /* Initialize the IO registers */ | 660 | /* Initialize the IO registers */ |
658 | sgiioc4_init_hwif_ports(&hwif->hw, cmd_base, ctl, irqport); | 661 | memset(&hw, 0, sizeof(hw)); |
659 | memcpy(hwif->io_ports, hwif->hw.io_ports, | 662 | sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport); |
660 | sizeof (hwif->io_ports)); | 663 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); |
661 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; | 664 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; |
662 | } | 665 | } |
663 | 666 | ||
@@ -679,11 +682,10 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
679 | 682 | ||
680 | ide_init_sgiioc4(hwif); | 683 | ide_init_sgiioc4(hwif); |
681 | 684 | ||
682 | if (probe_hwif_init(hwif)) | 685 | idx[0] = hwif->index; |
683 | return -EIO; | ||
684 | 686 | ||
685 | /* Create /proc/ide entries */ | 687 | if (ide_device_add(idx)) |
686 | ide_proc_register_port(hwif); | 688 | return -EIO; |
687 | 689 | ||
688 | return 0; | 690 | return 0; |
689 | } | 691 | } |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 689786df1ede..6d99441c605b 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/siimage.c Version 1.17 Oct 18 2007 | 2 | * linux/drivers/ide/pci/siimage.c Version 1.18 Oct 18 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2003 Red Hat <alan@redhat.com> | 5 | * Copyright (C) 2003 Red Hat <alan@redhat.com> |
@@ -26,7 +26,7 @@ | |||
26 | * | 26 | * |
27 | * If you have strange problems with nVidia chipset systems please | 27 | * If you have strange problems with nVidia chipset systems please |
28 | * see the SI support documentation and update your system BIOS | 28 | * see the SI support documentation and update your system BIOS |
29 | * if neccessary | 29 | * if necessary |
30 | * | 30 | * |
31 | * The Dell DRAC4 has some interesting features including effectively hot | 31 | * The Dell DRAC4 has some interesting features including effectively hot |
32 | * unplugging/replugging the virtual CD interface when the DRAC is reset. | 32 | * unplugging/replugging the virtual CD interface when the DRAC is reset. |
@@ -57,8 +57,8 @@ | |||
57 | 57 | ||
58 | static int pdev_is_sata(struct pci_dev *pdev) | 58 | static int pdev_is_sata(struct pci_dev *pdev) |
59 | { | 59 | { |
60 | switch(pdev->device) | 60 | #ifdef CONFIG_BLK_DEV_IDE_SATA |
61 | { | 61 | switch(pdev->device) { |
62 | case PCI_DEVICE_ID_SII_3112: | 62 | case PCI_DEVICE_ID_SII_3112: |
63 | case PCI_DEVICE_ID_SII_1210SA: | 63 | case PCI_DEVICE_ID_SII_1210SA: |
64 | return 1; | 64 | return 1; |
@@ -66,9 +66,10 @@ static int pdev_is_sata(struct pci_dev *pdev) | |||
66 | return 0; | 66 | return 0; |
67 | } | 67 | } |
68 | BUG(); | 68 | BUG(); |
69 | #endif | ||
69 | return 0; | 70 | return 0; |
70 | } | 71 | } |
71 | 72 | ||
72 | /** | 73 | /** |
73 | * is_sata - check if hwif is SATA | 74 | * is_sata - check if hwif is SATA |
74 | * @hwif: interface to check | 75 | * @hwif: interface to check |
@@ -136,7 +137,7 @@ static inline unsigned long siimage_seldev(ide_drive_t *drive, int r) | |||
136 | * SI3112 SATA controller life is a bit simpler. | 137 | * SI3112 SATA controller life is a bit simpler. |
137 | */ | 138 | */ |
138 | 139 | ||
139 | static u8 sil_udma_filter(ide_drive_t *drive) | 140 | static u8 sil_pata_udma_filter(ide_drive_t *drive) |
140 | { | 141 | { |
141 | ide_hwif_t *hwif = drive->hwif; | 142 | ide_hwif_t *hwif = drive->hwif; |
142 | unsigned long base = (unsigned long) hwif->hwif_data; | 143 | unsigned long base = (unsigned long) hwif->hwif_data; |
@@ -147,23 +148,23 @@ static u8 sil_udma_filter(ide_drive_t *drive) | |||
147 | else | 148 | else |
148 | pci_read_config_byte(hwif->pci_dev, 0x8A, &scsc); | 149 | pci_read_config_byte(hwif->pci_dev, 0x8A, &scsc); |
149 | 150 | ||
150 | if (is_sata(hwif)) { | ||
151 | mask = strstr(drive->id->model, "Maxtor") ? 0x3f : 0x7f; | ||
152 | goto out; | ||
153 | } | ||
154 | |||
155 | if ((scsc & 0x30) == 0x10) /* 133 */ | 151 | if ((scsc & 0x30) == 0x10) /* 133 */ |
156 | mask = 0x7f; | 152 | mask = ATA_UDMA6; |
157 | else if ((scsc & 0x30) == 0x20) /* 2xPCI */ | 153 | else if ((scsc & 0x30) == 0x20) /* 2xPCI */ |
158 | mask = 0x7f; | 154 | mask = ATA_UDMA6; |
159 | else if ((scsc & 0x30) == 0x00) /* 100 */ | 155 | else if ((scsc & 0x30) == 0x00) /* 100 */ |
160 | mask = 0x3f; | 156 | mask = ATA_UDMA5; |
161 | else /* Disabled ? */ | 157 | else /* Disabled ? */ |
162 | BUG(); | 158 | BUG(); |
163 | out: | 159 | |
164 | return mask; | 160 | return mask; |
165 | } | 161 | } |
166 | 162 | ||
163 | static u8 sil_sata_udma_filter(ide_drive_t *drive) | ||
164 | { | ||
165 | return strstr(drive->id->model, "Maxtor") ? ATA_UDMA5 : ATA_UDMA6; | ||
166 | } | ||
167 | |||
167 | /** | 168 | /** |
168 | * sil_set_pio_mode - set host controller for PIO mode | 169 | * sil_set_pio_mode - set host controller for PIO mode |
169 | * @drive: drive | 170 | * @drive: drive |
@@ -340,10 +341,11 @@ static int siimage_io_ide_dma_test_irq (ide_drive_t *drive) | |||
340 | static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive) | 341 | static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive) |
341 | { | 342 | { |
342 | ide_hwif_t *hwif = HWIF(drive); | 343 | ide_hwif_t *hwif = HWIF(drive); |
343 | unsigned long base = (unsigned long)hwif->hwif_data; | ||
344 | unsigned long addr = siimage_selreg(hwif, 0x1); | 344 | unsigned long addr = siimage_selreg(hwif, 0x1); |
345 | 345 | ||
346 | if (SATA_ERROR_REG) { | 346 | if (SATA_ERROR_REG) { |
347 | unsigned long base = (unsigned long)hwif->hwif_data; | ||
348 | |||
347 | u32 ext_stat = readl((void __iomem *)(base + 0x10)); | 349 | u32 ext_stat = readl((void __iomem *)(base + 0x10)); |
348 | u8 watchdog = 0; | 350 | u8 watchdog = 0; |
349 | if (ext_stat & ((hwif->channel) ? 0x40 : 0x10)) { | 351 | if (ext_stat & ((hwif->channel) ? 0x40 : 0x10)) { |
@@ -376,7 +378,7 @@ static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive) | |||
376 | } | 378 | } |
377 | 379 | ||
378 | /** | 380 | /** |
379 | * siimage_busproc - bus isolation ioctl | 381 | * sil_sata_busproc - bus isolation IOCTL |
380 | * @drive: drive to isolate/restore | 382 | * @drive: drive to isolate/restore |
381 | * @state: bus state to set | 383 | * @state: bus state to set |
382 | * | 384 | * |
@@ -384,8 +386,8 @@ static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive) | |||
384 | * SATA controller the work required is quite limited, we | 386 | * SATA controller the work required is quite limited, we |
385 | * just have to clean up the statistics | 387 | * just have to clean up the statistics |
386 | */ | 388 | */ |
387 | 389 | ||
388 | static int siimage_busproc (ide_drive_t * drive, int state) | 390 | static int sil_sata_busproc(ide_drive_t * drive, int state) |
389 | { | 391 | { |
390 | ide_hwif_t *hwif = HWIF(drive); | 392 | ide_hwif_t *hwif = HWIF(drive); |
391 | u32 stat_config = 0; | 393 | u32 stat_config = 0; |
@@ -417,14 +419,14 @@ static int siimage_busproc (ide_drive_t * drive, int state) | |||
417 | } | 419 | } |
418 | 420 | ||
419 | /** | 421 | /** |
420 | * siimage_reset_poll - wait for sata reset | 422 | * sil_sata_reset_poll - wait for SATA reset |
421 | * @drive: drive we are resetting | 423 | * @drive: drive we are resetting |
422 | * | 424 | * |
423 | * Poll the SATA phy and see whether it has come back from the dead | 425 | * Poll the SATA phy and see whether it has come back from the dead |
424 | * yet. | 426 | * yet. |
425 | */ | 427 | */ |
426 | 428 | ||
427 | static int siimage_reset_poll (ide_drive_t *drive) | 429 | static int sil_sata_reset_poll(ide_drive_t *drive) |
428 | { | 430 | { |
429 | if (SATA_STATUS_REG) { | 431 | if (SATA_STATUS_REG) { |
430 | ide_hwif_t *hwif = HWIF(drive); | 432 | ide_hwif_t *hwif = HWIF(drive); |
@@ -436,27 +438,22 @@ static int siimage_reset_poll (ide_drive_t *drive) | |||
436 | HWGROUP(drive)->polling = 0; | 438 | HWGROUP(drive)->polling = 0; |
437 | return ide_started; | 439 | return ide_started; |
438 | } | 440 | } |
439 | return 0; | ||
440 | } else { | ||
441 | return 0; | ||
442 | } | 441 | } |
442 | |||
443 | return 0; | ||
443 | } | 444 | } |
444 | 445 | ||
445 | /** | 446 | /** |
446 | * siimage_pre_reset - reset hook | 447 | * sil_sata_pre_reset - reset hook |
447 | * @drive: IDE device being reset | 448 | * @drive: IDE device being reset |
448 | * | 449 | * |
449 | * For the SATA devices we need to handle recalibration/geometry | 450 | * For the SATA devices we need to handle recalibration/geometry |
450 | * differently | 451 | * differently |
451 | */ | 452 | */ |
452 | |||
453 | static void siimage_pre_reset (ide_drive_t *drive) | ||
454 | { | ||
455 | if (drive->media != ide_disk) | ||
456 | return; | ||
457 | 453 | ||
458 | if (is_sata(HWIF(drive))) | 454 | static void sil_sata_pre_reset(ide_drive_t *drive) |
459 | { | 455 | { |
456 | if (drive->media == ide_disk) { | ||
460 | drive->special.b.set_geometry = 0; | 457 | drive->special.b.set_geometry = 0; |
461 | drive->special.b.recalibrate = 0; | 458 | drive->special.b.recalibrate = 0; |
462 | } | 459 | } |
@@ -502,7 +499,6 @@ static void siimage_reset (ide_drive_t *drive) | |||
502 | drive->failures++; | 499 | drive->failures++; |
503 | } | 500 | } |
504 | } | 501 | } |
505 | |||
506 | } | 502 | } |
507 | 503 | ||
508 | /** | 504 | /** |
@@ -758,16 +754,11 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
758 | hwif->sata_misc[SATA_IEN_OFFSET] = base + 0x148; | 754 | hwif->sata_misc[SATA_IEN_OFFSET] = base + 0x148; |
759 | } | 755 | } |
760 | 756 | ||
761 | hw.irq = hwif->pci_dev->irq; | 757 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); |
762 | 758 | ||
763 | memcpy(&hwif->hw, &hw, sizeof(hw)); | 759 | hwif->irq = dev->irq; |
764 | memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->hw.io_ports)); | ||
765 | 760 | ||
766 | hwif->irq = hw.irq; | 761 | hwif->dma_base = (unsigned long)addr + (ch ? 0x08 : 0x00); |
767 | |||
768 | base = (unsigned long) addr; | ||
769 | |||
770 | hwif->dma_base = base + (ch ? 0x08 : 0x00); | ||
771 | 762 | ||
772 | hwif->mmio = 1; | 763 | hwif->mmio = 1; |
773 | } | 764 | } |
@@ -864,28 +855,31 @@ static u8 __devinit ata66_siimage(ide_hwif_t *hwif) | |||
864 | 855 | ||
865 | static void __devinit init_hwif_siimage(ide_hwif_t *hwif) | 856 | static void __devinit init_hwif_siimage(ide_hwif_t *hwif) |
866 | { | 857 | { |
858 | u8 sata = is_sata(hwif); | ||
859 | |||
867 | hwif->resetproc = &siimage_reset; | 860 | hwif->resetproc = &siimage_reset; |
868 | hwif->set_pio_mode = &sil_set_pio_mode; | 861 | hwif->set_pio_mode = &sil_set_pio_mode; |
869 | hwif->set_dma_mode = &sil_set_dma_mode; | 862 | hwif->set_dma_mode = &sil_set_dma_mode; |
870 | hwif->reset_poll = &siimage_reset_poll; | ||
871 | hwif->pre_reset = &siimage_pre_reset; | ||
872 | hwif->udma_filter = &sil_udma_filter; | ||
873 | 863 | ||
874 | if(is_sata(hwif)) { | 864 | if (sata) { |
875 | static int first = 1; | 865 | static int first = 1; |
876 | 866 | ||
877 | hwif->busproc = &siimage_busproc; | 867 | hwif->busproc = &sil_sata_busproc; |
868 | hwif->reset_poll = &sil_sata_reset_poll; | ||
869 | hwif->pre_reset = &sil_sata_pre_reset; | ||
870 | hwif->udma_filter = &sil_sata_udma_filter; | ||
878 | 871 | ||
879 | if (first) { | 872 | if (first) { |
880 | printk(KERN_INFO "siimage: For full SATA support you should use the libata sata_sil module.\n"); | 873 | printk(KERN_INFO "siimage: For full SATA support you should use the libata sata_sil module.\n"); |
881 | first = 0; | 874 | first = 0; |
882 | } | 875 | } |
883 | } | 876 | } else |
877 | hwif->udma_filter = &sil_pata_udma_filter; | ||
884 | 878 | ||
885 | if (hwif->dma_base == 0) | 879 | if (hwif->dma_base == 0) |
886 | return; | 880 | return; |
887 | 881 | ||
888 | if (is_sata(hwif)) | 882 | if (sata) |
889 | hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA; | 883 | hwif->host_flags |= IDE_HFLAG_NO_ATAPI_DMA; |
890 | 884 | ||
891 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 885 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
@@ -911,7 +905,7 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) | |||
911 | .udma_mask = ATA_UDMA6, \ | 905 | .udma_mask = ATA_UDMA6, \ |
912 | } | 906 | } |
913 | 907 | ||
914 | static ide_pci_device_t siimage_chipsets[] __devinitdata = { | 908 | static const struct ide_port_info siimage_chipsets[] __devinitdata = { |
915 | /* 0 */ DECLARE_SII_DEV("SiI680"), | 909 | /* 0 */ DECLARE_SII_DEV("SiI680"), |
916 | /* 1 */ DECLARE_SII_DEV("SiI3112 Serial ATA"), | 910 | /* 1 */ DECLARE_SII_DEV("SiI3112 Serial ATA"), |
917 | /* 2 */ DECLARE_SII_DEV("Adaptec AAR-1210SA") | 911 | /* 2 */ DECLARE_SII_DEV("Adaptec AAR-1210SA") |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index c1d280b06391..6b7bb53acefd 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -264,7 +264,7 @@ static void sis_ata133_program_timings(ide_drive_t *drive, const u8 mode) | |||
264 | if (mode >= XFER_MW_DMA_0) { | 264 | if (mode >= XFER_MW_DMA_0) { |
265 | t1 &= ~0x04; /* disable UDMA */ | 265 | t1 &= ~0x04; /* disable UDMA */ |
266 | idx = mode - XFER_MW_DMA_0 + 5; | 266 | idx = mode - XFER_MW_DMA_0 + 5; |
267 | } | 267 | } else |
268 | idx = mode - XFER_PIO_0; | 268 | idx = mode - XFER_PIO_0; |
269 | t1 |= ini_time_value[clk][idx] << 12; | 269 | t1 |= ini_time_value[clk][idx] << 12; |
270 | t1 |= act_time_value[clk][idx] << 16; | 270 | t1 |= act_time_value[clk][idx] << 16; |
@@ -579,7 +579,7 @@ static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif) | |||
579 | hwif->cbl = ata66_sis5513(hwif); | 579 | hwif->cbl = ata66_sis5513(hwif); |
580 | } | 580 | } |
581 | 581 | ||
582 | static ide_pci_device_t sis5513_chipset __devinitdata = { | 582 | static const struct ide_port_info sis5513_chipset __devinitdata = { |
583 | .name = "SIS5513", | 583 | .name = "SIS5513", |
584 | .init_chipset = init_chipset_sis5513, | 584 | .init_chipset = init_chipset_sis5513, |
585 | .init_hwif = init_hwif_sis5513, | 585 | .init_hwif = init_hwif_sis5513, |
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index 0dce459b1269..147d783f7529 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c | |||
@@ -361,13 +361,6 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif) | |||
361 | hwif->selectproc = &sl82c105_selectproc; | 361 | hwif->selectproc = &sl82c105_selectproc; |
362 | hwif->resetproc = &sl82c105_resetproc; | 362 | hwif->resetproc = &sl82c105_resetproc; |
363 | 363 | ||
364 | /* | ||
365 | * We support 32-bit I/O on this interface, and | ||
366 | * it doesn't have problems with interrupts. | ||
367 | */ | ||
368 | hwif->drives[0].io_32bit = hwif->drives[1].io_32bit = 1; | ||
369 | hwif->drives[0].unmask = hwif->drives[1].unmask = 1; | ||
370 | |||
371 | if (!hwif->dma_base) | 364 | if (!hwif->dma_base) |
372 | return; | 365 | return; |
373 | 366 | ||
@@ -394,12 +387,15 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif) | |||
394 | hwif->serialized = hwif->mate->serialized = 1; | 387 | hwif->serialized = hwif->mate->serialized = 1; |
395 | } | 388 | } |
396 | 389 | ||
397 | static ide_pci_device_t sl82c105_chipset __devinitdata = { | 390 | static const struct ide_port_info sl82c105_chipset __devinitdata = { |
398 | .name = "W82C105", | 391 | .name = "W82C105", |
399 | .init_chipset = init_chipset_sl82c105, | 392 | .init_chipset = init_chipset_sl82c105, |
400 | .init_hwif = init_hwif_sl82c105, | 393 | .init_hwif = init_hwif_sl82c105, |
401 | .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, | 394 | .enablebits = {{0x40,0x01,0x01}, {0x40,0x10,0x10}}, |
402 | .host_flags = IDE_HFLAG_NO_AUTODMA | IDE_HFLAG_BOOTABLE, | 395 | .host_flags = IDE_HFLAG_IO_32BIT | |
396 | IDE_HFLAG_UNMASK_IRQS | | ||
397 | IDE_HFLAG_NO_AUTODMA | | ||
398 | IDE_HFLAG_BOOTABLE, | ||
403 | .pio_mask = ATA_PIO5, | 399 | .pio_mask = ATA_PIO5, |
404 | }; | 400 | }; |
405 | 401 | ||
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 4f22dffdf8ef..eb4445b229ed 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/slc90e66.c Version 0.18 Aug 9, 2007 | 2 | * linux/drivers/ide/pci/slc90e66.c Version 0.19 Sep 24, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> | 5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> |
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #include <asm/io.h> | 22 | #include <asm/io.h> |
23 | 23 | ||
24 | static DEFINE_SPINLOCK(slc90e66_lock); | ||
25 | |||
24 | static void slc90e66_set_pio_mode(ide_drive_t *drive, const u8 pio) | 26 | static void slc90e66_set_pio_mode(ide_drive_t *drive, const u8 pio) |
25 | { | 27 | { |
26 | ide_hwif_t *hwif = HWIF(drive); | 28 | ide_hwif_t *hwif = HWIF(drive); |
@@ -40,7 +42,7 @@ static void slc90e66_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
40 | { 2, 1 }, | 42 | { 2, 1 }, |
41 | { 2, 3 }, }; | 43 | { 2, 3 }, }; |
42 | 44 | ||
43 | spin_lock_irqsave(&ide_lock, flags); | 45 | spin_lock_irqsave(&slc90e66_lock, flags); |
44 | pci_read_config_word(dev, master_port, &master_data); | 46 | pci_read_config_word(dev, master_port, &master_data); |
45 | 47 | ||
46 | if (pio > 1) | 48 | if (pio > 1) |
@@ -71,7 +73,7 @@ static void slc90e66_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
71 | pci_write_config_word(dev, master_port, master_data); | 73 | pci_write_config_word(dev, master_port, master_data); |
72 | if (is_slave) | 74 | if (is_slave) |
73 | pci_write_config_byte(dev, slave_port, slave_data); | 75 | pci_write_config_byte(dev, slave_port, slave_data); |
74 | spin_unlock_irqrestore(&ide_lock, flags); | 76 | spin_unlock_irqrestore(&slc90e66_lock, flags); |
75 | } | 77 | } |
76 | 78 | ||
77 | static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) | 79 | static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) |
@@ -146,7 +148,7 @@ static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif) | |||
146 | hwif->cbl = (reg47 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; | 148 | hwif->cbl = (reg47 & mask) ? ATA_CBL_PATA40 : ATA_CBL_PATA80; |
147 | } | 149 | } |
148 | 150 | ||
149 | static ide_pci_device_t slc90e66_chipset __devinitdata = { | 151 | static const struct ide_port_info slc90e66_chipset __devinitdata = { |
150 | .name = "SLC90E66", | 152 | .name = "SLC90E66", |
151 | .init_hwif = init_hwif_slc90e66, | 153 | .init_hwif = init_hwif_slc90e66, |
152 | .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, | 154 | .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, |
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c index 631506e9b5d2..a66ebd14664e 100644 --- a/drivers/ide/pci/tc86c001.c +++ b/drivers/ide/pci/tc86c001.c | |||
@@ -218,7 +218,7 @@ static unsigned int __devinit init_chipset_tc86c001(struct pci_dev *dev, | |||
218 | return err; | 218 | return err; |
219 | } | 219 | } |
220 | 220 | ||
221 | static ide_pci_device_t tc86c001_chipset __devinitdata = { | 221 | static const struct ide_port_info tc86c001_chipset __devinitdata = { |
222 | .name = "TC86C001", | 222 | .name = "TC86C001", |
223 | .init_chipset = init_chipset_tc86c001, | 223 | .init_chipset = init_chipset_tc86c001, |
224 | .init_hwif = init_hwif_tc86c001, | 224 | .init_hwif = init_hwif_tc86c001, |
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index 30b52f62699a..a227c41d23a3 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -102,7 +102,7 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif) | |||
102 | hwif->set_dma_mode = &triflex_set_mode; | 102 | hwif->set_dma_mode = &triflex_set_mode; |
103 | } | 103 | } |
104 | 104 | ||
105 | static ide_pci_device_t triflex_device __devinitdata = { | 105 | static const struct ide_port_info triflex_device __devinitdata = { |
106 | .name = "TRIFLEX", | 106 | .name = "TRIFLEX", |
107 | .init_hwif = init_hwif_triflex, | 107 | .init_hwif = init_hwif_triflex, |
108 | .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, | 108 | .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, |
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index 140d486f6237..5011ba22e36c 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c | |||
@@ -250,7 +250,6 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) | |||
250 | u8 reg = 0; | 250 | u8 reg = 0; |
251 | struct pci_dev *dev = hwif->pci_dev; | 251 | struct pci_dev *dev = hwif->pci_dev; |
252 | 252 | ||
253 | hwif->chipset = ide_trm290; | ||
254 | cfgbase = pci_resource_start(dev, 4); | 253 | cfgbase = pci_resource_start(dev, 4); |
255 | if ((dev->class & 5) && cfgbase) { | 254 | if ((dev->class & 5) && cfgbase) { |
256 | hwif->config_data = cfgbase; | 255 | hwif->config_data = cfgbase; |
@@ -320,9 +319,10 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif) | |||
320 | #endif | 319 | #endif |
321 | } | 320 | } |
322 | 321 | ||
323 | static ide_pci_device_t trm290_chipset __devinitdata = { | 322 | static const struct ide_port_info trm290_chipset __devinitdata = { |
324 | .name = "TRM290", | 323 | .name = "TRM290", |
325 | .init_hwif = init_hwif_trm290, | 324 | .init_hwif = init_hwif_trm290, |
325 | .chipset = ide_trm290, | ||
326 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA | | 326 | .host_flags = IDE_HFLAG_NO_ATAPI_DMA | |
327 | #if 0 /* play it safe for now */ | 327 | #if 0 /* play it safe for now */ |
328 | IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 328 | IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index c8022a92a0e3..a0d3c16b68ec 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * Version 3.49 | 3 | * Version 3.50 |
4 | * | 4 | * |
5 | * VIA IDE driver for Linux. Supported southbridges: | 5 | * VIA IDE driver for Linux. Supported southbridges: |
6 | * | 6 | * |
@@ -422,65 +422,40 @@ static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif) | |||
422 | 422 | ||
423 | static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) | 423 | static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) |
424 | { | 424 | { |
425 | struct via82cxxx_dev *vdev = pci_get_drvdata(hwif->pci_dev); | ||
426 | int i; | ||
427 | |||
428 | hwif->set_pio_mode = &via_set_pio_mode; | 425 | hwif->set_pio_mode = &via_set_pio_mode; |
429 | hwif->set_dma_mode = &via_set_drive; | 426 | hwif->set_dma_mode = &via_set_drive; |
430 | 427 | ||
431 | #ifdef CONFIG_PPC_CHRP | ||
432 | if(machine_is(chrp) && _chrp_type == _CHRP_Pegasos) { | ||
433 | hwif->irq = hwif->channel ? 15 : 14; | ||
434 | } | ||
435 | #endif | ||
436 | |||
437 | for (i = 0; i < 2; i++) { | ||
438 | hwif->drives[i].io_32bit = 1; | ||
439 | hwif->drives[i].unmask = (vdev->via_config->flags & VIA_NO_UNMASK) ? 0 : 1; | ||
440 | } | ||
441 | |||
442 | if (!hwif->dma_base) | 428 | if (!hwif->dma_base) |
443 | return; | 429 | return; |
444 | 430 | ||
445 | hwif->ultra_mask = vdev->via_config->udma_mask; | ||
446 | |||
447 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) | 431 | if (hwif->cbl != ATA_CBL_PATA40_SHORT) |
448 | hwif->cbl = via82cxxx_cable_detect(hwif); | 432 | hwif->cbl = via82cxxx_cable_detect(hwif); |
449 | } | 433 | } |
450 | 434 | ||
451 | static ide_pci_device_t via82cxxx_chipsets[] __devinitdata = { | 435 | static const struct ide_port_info via82cxxx_chipset __devinitdata = { |
452 | { /* 0 */ | 436 | .name = "VP_IDE", |
453 | .name = "VP_IDE", | 437 | .init_chipset = init_chipset_via82cxxx, |
454 | .init_chipset = init_chipset_via82cxxx, | 438 | .init_hwif = init_hwif_via82cxxx, |
455 | .init_hwif = init_hwif_via82cxxx, | 439 | .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, |
456 | .enablebits = {{0x40,0x02,0x02}, {0x40,0x01,0x01}}, | 440 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | |
457 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | | 441 | IDE_HFLAG_PIO_NO_DOWNGRADE | |
458 | IDE_HFLAG_PIO_NO_DOWNGRADE | | 442 | IDE_HFLAG_POST_SET_MODE | |
459 | IDE_HFLAG_POST_SET_MODE | | 443 | IDE_HFLAG_IO_32BIT | |
460 | IDE_HFLAG_NO_AUTODMA | | 444 | IDE_HFLAG_BOOTABLE, |
461 | IDE_HFLAG_BOOTABLE, | 445 | .pio_mask = ATA_PIO5, |
462 | .pio_mask = ATA_PIO5, | 446 | .swdma_mask = ATA_SWDMA2, |
463 | .swdma_mask = ATA_SWDMA2, | 447 | .mwdma_mask = ATA_MWDMA2, |
464 | .mwdma_mask = ATA_MWDMA2, | ||
465 | },{ /* 1 */ | ||
466 | .name = "VP_IDE", | ||
467 | .init_chipset = init_chipset_via82cxxx, | ||
468 | .init_hwif = init_hwif_via82cxxx, | ||
469 | .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}}, | ||
470 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | | ||
471 | IDE_HFLAG_PIO_NO_DOWNGRADE | | ||
472 | IDE_HFLAG_POST_SET_MODE | | ||
473 | IDE_HFLAG_BOOTABLE, | ||
474 | .pio_mask = ATA_PIO5, | ||
475 | .swdma_mask = ATA_SWDMA2, | ||
476 | .mwdma_mask = ATA_MWDMA2, | ||
477 | } | ||
478 | }; | 448 | }; |
479 | 449 | ||
480 | static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 450 | static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
481 | { | 451 | { |
482 | struct pci_dev *isa = NULL; | 452 | struct pci_dev *isa = NULL; |
483 | struct via_isa_bridge *via_config; | 453 | struct via_isa_bridge *via_config; |
454 | u8 idx = id->driver_data; | ||
455 | struct ide_port_info d; | ||
456 | |||
457 | d = via82cxxx_chipset; | ||
458 | |||
484 | /* | 459 | /* |
485 | * Find the ISA bridge and check we know what it is. | 460 | * Find the ISA bridge and check we know what it is. |
486 | */ | 461 | */ |
@@ -490,7 +465,23 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i | |||
490 | printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n"); | 465 | printk(KERN_WARNING "VP_IDE: Unknown VIA SouthBridge, disabling DMA.\n"); |
491 | return -ENODEV; | 466 | return -ENODEV; |
492 | } | 467 | } |
493 | return ide_setup_pci_device(dev, &via82cxxx_chipsets[id->driver_data]); | 468 | |
469 | if (idx == 0) | ||
470 | d.host_flags |= IDE_HFLAG_NO_AUTODMA; | ||
471 | else | ||
472 | d.enablebits[1].reg = d.enablebits[0].reg = 0; | ||
473 | |||
474 | if ((via_config->flags & VIA_NO_UNMASK) == 0) | ||
475 | d.host_flags |= IDE_HFLAG_UNMASK_IRQS; | ||
476 | |||
477 | #ifdef CONFIG_PPC_CHRP | ||
478 | if (machine_is(chrp) && _chrp_type == _CHRP_Pegasos) | ||
479 | d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS; | ||
480 | #endif | ||
481 | |||
482 | d.udma_mask = via_config->udma_mask; | ||
483 | |||
484 | return ide_setup_pci_device(dev, &d); | ||
494 | } | 485 | } |
495 | 486 | ||
496 | static const struct pci_device_id via_pci_tbl[] = { | 487 | static const struct pci_device_id via_pci_tbl[] = { |
diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c index df2e92034f5d..5f0da35ab5ad 100644 --- a/drivers/ide/ppc/mpc8xx.c +++ b/drivers/ide/ppc/mpc8xx.c | |||
@@ -316,8 +316,8 @@ m8xx_ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port, | |||
316 | 316 | ||
317 | ide_hwifs[data_port].pio_mask = ATA_PIO4; | 317 | ide_hwifs[data_port].pio_mask = ATA_PIO4; |
318 | ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode; | 318 | ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode; |
319 | ide_hwifs[data_port].ack_intr = (ide_ack_intr_t *)ide_interrupt_ack; | ||
319 | 320 | ||
320 | hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack; | ||
321 | /* Enable Harddisk Interrupt, | 321 | /* Enable Harddisk Interrupt, |
322 | * and make it edge sensitive | 322 | * and make it edge sensitive |
323 | */ | 323 | */ |
@@ -402,8 +402,8 @@ void m8xx_ide_init_hwif_ports (hw_regs_t *hw, | |||
402 | 402 | ||
403 | ide_hwifs[data_port].pio_mask = ATA_PIO4; | 403 | ide_hwifs[data_port].pio_mask = ATA_PIO4; |
404 | ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode; | 404 | ide_hwifs[data_port].set_pio_mode = m8xx_ide_set_pio_mode; |
405 | ide_hwifs[data_port].ack_intr = (ide_ack_intr_t *)ide_interrupt_ack; | ||
405 | 406 | ||
406 | hw->ack_intr = (ide_ack_intr_t *) ide_interrupt_ack; | ||
407 | /* Enable Harddisk Interrupt, | 407 | /* Enable Harddisk Interrupt, |
408 | * and make it edge sensitive | 408 | * and make it edge sensitive |
409 | */ | 409 | */ |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index c55479356768..816b5311dad6 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1039,6 +1039,8 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | |||
1039 | { | 1039 | { |
1040 | struct device_node *np = pmif->node; | 1040 | struct device_node *np = pmif->node; |
1041 | const int *bidp; | 1041 | const int *bidp; |
1042 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
1043 | hw_regs_t hw; | ||
1042 | 1044 | ||
1043 | pmif->cable_80 = 0; | 1045 | pmif->cable_80 = 0; |
1044 | pmif->broken_dma = pmif->broken_dma_warn = 0; | 1046 | pmif->broken_dma = pmif->broken_dma_warn = 0; |
@@ -1124,8 +1126,9 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | |||
1124 | /* Tell common code _not_ to mess with resources */ | 1126 | /* Tell common code _not_ to mess with resources */ |
1125 | hwif->mmio = 1; | 1127 | hwif->mmio = 1; |
1126 | hwif->hwif_data = pmif; | 1128 | hwif->hwif_data = pmif; |
1127 | pmac_ide_init_hwif_ports(&hwif->hw, pmif->regbase, 0, &hwif->irq); | 1129 | memset(&hw, 0, sizeof(hw)); |
1128 | memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); | 1130 | pmac_ide_init_hwif_ports(&hw, pmif->regbase, 0, &hwif->irq); |
1131 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); | ||
1129 | hwif->chipset = ide_pmac; | 1132 | hwif->chipset = ide_pmac; |
1130 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET] || pmif->mediabay; | 1133 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET] || pmif->mediabay; |
1131 | hwif->hold = pmif->mediabay; | 1134 | hwif->hold = pmif->mediabay; |
@@ -1163,10 +1166,9 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | |||
1163 | pmac_ide_setup_dma(pmif, hwif); | 1166 | pmac_ide_setup_dma(pmif, hwif); |
1164 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | 1167 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ |
1165 | 1168 | ||
1166 | /* We probe the hwif now */ | 1169 | idx[0] = hwif->index; |
1167 | probe_hwif_init(hwif); | ||
1168 | 1170 | ||
1169 | ide_proc_register_port(hwif); | 1171 | ide_device_add(idx); |
1170 | 1172 | ||
1171 | return 0; | 1173 | return 0; |
1172 | } | 1174 | } |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index fff567bcedbe..02d14bf85ab2 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -147,15 +147,15 @@ static int ide_setup_pci_baseregs (struct pci_dev *dev, const char *name) | |||
147 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 147 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
148 | /** | 148 | /** |
149 | * ide_get_or_set_dma_base - setup BMIBA | 149 | * ide_get_or_set_dma_base - setup BMIBA |
150 | * @d: IDE pci device data | 150 | * @d: IDE port info |
151 | * @hwif: Interface | 151 | * @hwif: IDE interface |
152 | * | 152 | * |
153 | * Fetch the DMA Bus-Master-I/O-Base-Address (BMIBA) from PCI space. | 153 | * Fetch the DMA Bus-Master-I/O-Base-Address (BMIBA) from PCI space. |
154 | * Where a device has a partner that is already in DMA mode we check | 154 | * Where a device has a partner that is already in DMA mode we check |
155 | * and enforce IDE simplex rules. | 155 | * and enforce IDE simplex rules. |
156 | */ | 156 | */ |
157 | 157 | ||
158 | static unsigned long ide_get_or_set_dma_base(ide_pci_device_t *d, ide_hwif_t *hwif) | 158 | static unsigned long ide_get_or_set_dma_base(const struct ide_port_info *d, ide_hwif_t *hwif) |
159 | { | 159 | { |
160 | unsigned long dma_base = 0; | 160 | unsigned long dma_base = 0; |
161 | struct pci_dev *dev = hwif->pci_dev; | 161 | struct pci_dev *dev = hwif->pci_dev; |
@@ -225,10 +225,11 @@ static unsigned long ide_get_or_set_dma_base(ide_pci_device_t *d, ide_hwif_t *hw | |||
225 | } | 225 | } |
226 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 226 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ |
227 | 227 | ||
228 | void ide_setup_pci_noise (struct pci_dev *dev, ide_pci_device_t *d) | 228 | void ide_setup_pci_noise(struct pci_dev *dev, const struct ide_port_info *d) |
229 | { | 229 | { |
230 | printk(KERN_INFO "%s: IDE controller at PCI slot %s\n", | 230 | printk(KERN_INFO "%s: IDE controller (0x%04x:0x%04x rev 0x%02x) at " |
231 | d->name, pci_name(dev)); | 231 | " PCI slot %s\n", d->name, dev->vendor, dev->device, |
232 | dev->revision, pci_name(dev)); | ||
232 | } | 233 | } |
233 | 234 | ||
234 | EXPORT_SYMBOL_GPL(ide_setup_pci_noise); | 235 | EXPORT_SYMBOL_GPL(ide_setup_pci_noise); |
@@ -237,15 +238,15 @@ EXPORT_SYMBOL_GPL(ide_setup_pci_noise); | |||
237 | /** | 238 | /** |
238 | * ide_pci_enable - do PCI enables | 239 | * ide_pci_enable - do PCI enables |
239 | * @dev: PCI device | 240 | * @dev: PCI device |
240 | * @d: IDE pci device data | 241 | * @d: IDE port info |
241 | * | 242 | * |
242 | * Enable the IDE PCI device. We attempt to enable the device in full | 243 | * Enable the IDE PCI device. We attempt to enable the device in full |
243 | * but if that fails then we only need BAR4 so we will enable that. | 244 | * but if that fails then we only need BAR4 so we will enable that. |
244 | * | 245 | * |
245 | * Returns zero on success or an error code | 246 | * Returns zero on success or an error code |
246 | */ | 247 | */ |
247 | 248 | ||
248 | static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d) | 249 | static int ide_pci_enable(struct pci_dev *dev, const struct ide_port_info *d) |
249 | { | 250 | { |
250 | int ret; | 251 | int ret; |
251 | 252 | ||
@@ -260,9 +261,9 @@ static int ide_pci_enable(struct pci_dev *dev, ide_pci_device_t *d) | |||
260 | } | 261 | } |
261 | 262 | ||
262 | /* | 263 | /* |
263 | * assume all devices can do 32-bit dma for now. we can add a | 264 | * assume all devices can do 32-bit DMA for now, we can add |
264 | * dma mask field to the ide_pci_device_t if we need it (or let | 265 | * a DMA mask field to the struct ide_port_info if we need it |
265 | * lower level driver set the dma mask) | 266 | * (or let lower level driver set the DMA mask) |
266 | */ | 267 | */ |
267 | ret = pci_set_dma_mask(dev, DMA_32BIT_MASK); | 268 | ret = pci_set_dma_mask(dev, DMA_32BIT_MASK); |
268 | if (ret < 0) { | 269 | if (ret < 0) { |
@@ -284,13 +285,13 @@ out: | |||
284 | /** | 285 | /** |
285 | * ide_pci_configure - configure an unconfigured device | 286 | * ide_pci_configure - configure an unconfigured device |
286 | * @dev: PCI device | 287 | * @dev: PCI device |
287 | * @d: IDE pci device data | 288 | * @d: IDE port info |
288 | * | 289 | * |
289 | * Enable and configure the PCI device we have been passed. | 290 | * Enable and configure the PCI device we have been passed. |
290 | * Returns zero on success or an error code. | 291 | * Returns zero on success or an error code. |
291 | */ | 292 | */ |
292 | 293 | ||
293 | static int ide_pci_configure(struct pci_dev *dev, ide_pci_device_t *d) | 294 | static int ide_pci_configure(struct pci_dev *dev, const struct ide_port_info *d) |
294 | { | 295 | { |
295 | u16 pcicmd = 0; | 296 | u16 pcicmd = 0; |
296 | /* | 297 | /* |
@@ -318,15 +319,15 @@ static int ide_pci_configure(struct pci_dev *dev, ide_pci_device_t *d) | |||
318 | 319 | ||
319 | /** | 320 | /** |
320 | * ide_pci_check_iomem - check a register is I/O | 321 | * ide_pci_check_iomem - check a register is I/O |
321 | * @dev: pci device | 322 | * @dev: PCI device |
322 | * @d: ide_pci_device | 323 | * @d: IDE port info |
323 | * @bar: bar number | 324 | * @bar: BAR number |
324 | * | 325 | * |
325 | * Checks if a BAR is configured and points to MMIO space. If so | 326 | * Checks if a BAR is configured and points to MMIO space. If so |
326 | * print an error and return an error code. Otherwise return 0 | 327 | * print an error and return an error code. Otherwise return 0 |
327 | */ | 328 | */ |
328 | 329 | ||
329 | static int ide_pci_check_iomem(struct pci_dev *dev, ide_pci_device_t *d, int bar) | 330 | static int ide_pci_check_iomem(struct pci_dev *dev, const struct ide_port_info *d, int bar) |
330 | { | 331 | { |
331 | ulong flags = pci_resource_flags(dev, bar); | 332 | ulong flags = pci_resource_flags(dev, bar); |
332 | 333 | ||
@@ -348,7 +349,7 @@ static int ide_pci_check_iomem(struct pci_dev *dev, ide_pci_device_t *d, int bar | |||
348 | /** | 349 | /** |
349 | * ide_hwif_configure - configure an IDE interface | 350 | * ide_hwif_configure - configure an IDE interface |
350 | * @dev: PCI device holding interface | 351 | * @dev: PCI device holding interface |
351 | * @d: IDE pci data | 352 | * @d: IDE port info |
352 | * @mate: Paired interface if any | 353 | * @mate: Paired interface if any |
353 | * | 354 | * |
354 | * Perform the initial set up for the hardware interface structure. This | 355 | * Perform the initial set up for the hardware interface structure. This |
@@ -357,8 +358,8 @@ static int ide_pci_check_iomem(struct pci_dev *dev, ide_pci_device_t *d, int bar | |||
357 | * | 358 | * |
358 | * Returns the new hardware interface structure, or NULL on a failure | 359 | * Returns the new hardware interface structure, or NULL on a failure |
359 | */ | 360 | */ |
360 | 361 | ||
361 | static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *mate, int port, int irq) | 362 | static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, const struct ide_port_info *d, ide_hwif_t *mate, int port, int irq) |
362 | { | 363 | { |
363 | unsigned long ctl = 0, base = 0; | 364 | unsigned long ctl = 0, base = 0; |
364 | ide_hwif_t *hwif; | 365 | ide_hwif_t *hwif; |
@@ -387,19 +388,20 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, | |||
387 | return NULL; /* no room in ide_hwifs[] */ | 388 | return NULL; /* no room in ide_hwifs[] */ |
388 | if (hwif->io_ports[IDE_DATA_OFFSET] != base || | 389 | if (hwif->io_ports[IDE_DATA_OFFSET] != base || |
389 | hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) { | 390 | hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) { |
390 | memset(&hwif->hw, 0, sizeof(hwif->hw)); | 391 | hw_regs_t hw; |
391 | #ifndef IDE_ARCH_OBSOLETE_INIT | 392 | |
392 | ide_std_init_ports(&hwif->hw, base, (ctl | 2)); | 393 | memset(&hw, 0, sizeof(hw)); |
393 | hwif->hw.io_ports[IDE_IRQ_OFFSET] = 0; | 394 | #ifndef CONFIG_IDE_ARCH_OBSOLETE_INIT |
395 | ide_std_init_ports(&hw, base, ctl | 2); | ||
394 | #else | 396 | #else |
395 | ide_init_hwif_ports(&hwif->hw, base, (ctl | 2), NULL); | 397 | ide_init_hwif_ports(&hw, base, ctl | 2, NULL); |
396 | #endif | 398 | #endif |
397 | memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); | 399 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); |
398 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; | 400 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; |
399 | } | 401 | } |
400 | hwif->chipset = ide_pci; | 402 | hwif->chipset = d->chipset ? d->chipset : ide_pci; |
401 | hwif->pci_dev = dev; | 403 | hwif->pci_dev = dev; |
402 | hwif->cds = (struct ide_pci_device_s *) d; | 404 | hwif->cds = d; |
403 | hwif->channel = port; | 405 | hwif->channel = port; |
404 | 406 | ||
405 | if (!hwif->irq) | 407 | if (!hwif->irq) |
@@ -414,21 +416,17 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, | |||
414 | /** | 416 | /** |
415 | * ide_hwif_setup_dma - configure DMA interface | 417 | * ide_hwif_setup_dma - configure DMA interface |
416 | * @dev: PCI device | 418 | * @dev: PCI device |
417 | * @d: IDE pci data | 419 | * @d: IDE port info |
418 | * @hwif: Hardware interface we are configuring | 420 | * @hwif: IDE interface |
419 | * | 421 | * |
420 | * Set up the DMA base for the interface. Enable the master bits as | 422 | * Set up the DMA base for the interface. Enable the master bits as |
421 | * necessary and attempt to bring the device DMA into a ready to use | 423 | * necessary and attempt to bring the device DMA into a ready to use |
422 | * state | 424 | * state |
423 | */ | 425 | */ |
424 | 426 | ||
425 | #ifndef CONFIG_BLK_DEV_IDEDMA_PCI | 427 | static void ide_hwif_setup_dma(struct pci_dev *dev, const struct ide_port_info *d, ide_hwif_t *hwif) |
426 | static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif) | ||
427 | { | ||
428 | } | ||
429 | #else | ||
430 | static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif) | ||
431 | { | 428 | { |
429 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | ||
432 | u16 pcicmd; | 430 | u16 pcicmd; |
433 | 431 | ||
434 | pci_read_config_word(dev, PCI_COMMAND, &pcicmd); | 432 | pci_read_config_word(dev, PCI_COMMAND, &pcicmd); |
@@ -460,13 +458,13 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi | |||
460 | "(BIOS)\n", hwif->name, d->name); | 458 | "(BIOS)\n", hwif->name, d->name); |
461 | } | 459 | } |
462 | } | 460 | } |
463 | } | ||
464 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/ | 461 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/ |
462 | } | ||
465 | 463 | ||
466 | /** | 464 | /** |
467 | * ide_setup_pci_controller - set up IDE PCI | 465 | * ide_setup_pci_controller - set up IDE PCI |
468 | * @dev: PCI device | 466 | * @dev: PCI device |
469 | * @d: IDE PCI data | 467 | * @d: IDE port info |
470 | * @noisy: verbose flag | 468 | * @noisy: verbose flag |
471 | * @config: returned as 1 if we configured the hardware | 469 | * @config: returned as 1 if we configured the hardware |
472 | * | 470 | * |
@@ -474,8 +472,8 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi | |||
474 | * up the PCI side of the device, checks that the device is enabled | 472 | * up the PCI side of the device, checks that the device is enabled |
475 | * and enables it if need be | 473 | * and enables it if need be |
476 | */ | 474 | */ |
477 | 475 | ||
478 | static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, int noisy, int *config) | 476 | static int ide_setup_pci_controller(struct pci_dev *dev, const struct ide_port_info *d, int noisy, int *config) |
479 | { | 477 | { |
480 | int ret; | 478 | int ret; |
481 | u16 pcicmd; | 479 | u16 pcicmd; |
@@ -500,9 +498,6 @@ static int ide_setup_pci_controller(struct pci_dev *dev, ide_pci_device_t *d, in | |||
500 | printk(KERN_INFO "%s: device enabled (Linux)\n", d->name); | 498 | printk(KERN_INFO "%s: device enabled (Linux)\n", d->name); |
501 | } | 499 | } |
502 | 500 | ||
503 | if (noisy) | ||
504 | printk(KERN_INFO "%s: chipset revision %d\n", | ||
505 | d->name, dev->revision); | ||
506 | out: | 501 | out: |
507 | return ret; | 502 | return ret; |
508 | } | 503 | } |
@@ -510,9 +505,9 @@ out: | |||
510 | /** | 505 | /** |
511 | * ide_pci_setup_ports - configure ports/devices on PCI IDE | 506 | * ide_pci_setup_ports - configure ports/devices on PCI IDE |
512 | * @dev: PCI device | 507 | * @dev: PCI device |
513 | * @d: IDE pci device info | 508 | * @d: IDE port info |
514 | * @pciirq: IRQ line | 509 | * @pciirq: IRQ line |
515 | * @index: ata index to update | 510 | * @idx: ATA index table to update |
516 | * | 511 | * |
517 | * Scan the interfaces attached to this device and do any | 512 | * Scan the interfaces attached to this device and do any |
518 | * necessary per port setup. Attach the devices and ask the | 513 | * necessary per port setup. Attach the devices and ask the |
@@ -522,26 +517,25 @@ out: | |||
522 | * but is also used directly as a helper function by some controllers | 517 | * but is also used directly as a helper function by some controllers |
523 | * where the chipset setup is not the default PCI IDE one. | 518 | * where the chipset setup is not the default PCI IDE one. |
524 | */ | 519 | */ |
525 | 520 | ||
526 | void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, ata_index_t *index) | 521 | void ide_pci_setup_ports(struct pci_dev *dev, const struct ide_port_info *d, int pciirq, u8 *idx) |
527 | { | 522 | { |
528 | int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port; | 523 | int channels = (d->host_flags & IDE_HFLAG_SINGLE) ? 1 : 2, port; |
529 | int at_least_one_hwif_enabled = 0; | ||
530 | ide_hwif_t *hwif, *mate = NULL; | 524 | ide_hwif_t *hwif, *mate = NULL; |
531 | u8 tmp; | 525 | u8 tmp; |
532 | 526 | ||
533 | index->all = 0xf0f0; | ||
534 | |||
535 | /* | 527 | /* |
536 | * Set up the IDE ports | 528 | * Set up the IDE ports |
537 | */ | 529 | */ |
538 | 530 | ||
539 | for (port = 0; port < channels; ++port) { | 531 | for (port = 0; port < channels; ++port) { |
540 | ide_pci_enablebit_t *e = &(d->enablebits[port]); | 532 | const ide_pci_enablebit_t *e = &(d->enablebits[port]); |
541 | 533 | ||
542 | if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) || | 534 | if (e->reg && (pci_read_config_byte(dev, e->reg, &tmp) || |
543 | (tmp & e->mask) != e->val)) | 535 | (tmp & e->mask) != e->val)) { |
536 | printk(KERN_INFO "%s: IDE port disabled\n", d->name); | ||
544 | continue; /* port not enabled */ | 537 | continue; /* port not enabled */ |
538 | } | ||
545 | 539 | ||
546 | if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL) | 540 | if ((hwif = ide_hwif_configure(dev, d, mate, port, pciirq)) == NULL) |
547 | continue; | 541 | continue; |
@@ -549,11 +543,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a | |||
549 | /* setup proper ancestral information */ | 543 | /* setup proper ancestral information */ |
550 | hwif->gendev.parent = &dev->dev; | 544 | hwif->gendev.parent = &dev->dev; |
551 | 545 | ||
552 | if (hwif->channel) { | 546 | *(idx + port) = hwif->index; |
553 | index->b.high = hwif->index; | ||
554 | } else { | ||
555 | index->b.low = hwif->index; | ||
556 | } | ||
557 | 547 | ||
558 | 548 | ||
559 | if (d->init_iops) | 549 | if (d->init_iops) |
@@ -562,15 +552,28 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a | |||
562 | if ((d->host_flags & IDE_HFLAG_NO_DMA) == 0) | 552 | if ((d->host_flags & IDE_HFLAG_NO_DMA) == 0) |
563 | ide_hwif_setup_dma(dev, d, hwif); | 553 | ide_hwif_setup_dma(dev, d, hwif); |
564 | 554 | ||
565 | if ((d->host_flags & IDE_HFLAG_LEGACY_IRQS) && hwif->irq == 0) | 555 | if ((!hwif->irq && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) || |
556 | (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS)) | ||
566 | hwif->irq = port ? 15 : 14; | 557 | hwif->irq = port ? 15 : 14; |
567 | 558 | ||
559 | hwif->fixup = d->fixup; | ||
560 | |||
568 | hwif->host_flags = d->host_flags; | 561 | hwif->host_flags = d->host_flags; |
569 | hwif->pio_mask = d->pio_mask; | 562 | hwif->pio_mask = d->pio_mask; |
570 | 563 | ||
571 | if ((d->host_flags & IDE_HFLAG_SERIALIZE) && hwif->mate) | 564 | if ((d->host_flags & IDE_HFLAG_SERIALIZE) && hwif->mate) |
572 | hwif->mate->serialized = hwif->serialized = 1; | 565 | hwif->mate->serialized = hwif->serialized = 1; |
573 | 566 | ||
567 | if (d->host_flags & IDE_HFLAG_IO_32BIT) { | ||
568 | hwif->drives[0].io_32bit = 1; | ||
569 | hwif->drives[1].io_32bit = 1; | ||
570 | } | ||
571 | |||
572 | if (d->host_flags & IDE_HFLAG_UNMASK_IRQS) { | ||
573 | hwif->drives[0].unmask = 1; | ||
574 | hwif->drives[1].unmask = 1; | ||
575 | } | ||
576 | |||
574 | if (hwif->dma_base) { | 577 | if (hwif->dma_base) { |
575 | hwif->swdma_mask = d->swdma_mask; | 578 | hwif->swdma_mask = d->swdma_mask; |
576 | hwif->mwdma_mask = d->mwdma_mask; | 579 | hwif->mwdma_mask = d->mwdma_mask; |
@@ -580,6 +583,9 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a | |||
580 | hwif->drives[0].autotune = 1; | 583 | hwif->drives[0].autotune = 1; |
581 | hwif->drives[1].autotune = 1; | 584 | hwif->drives[1].autotune = 1; |
582 | 585 | ||
586 | if (d->host_flags & IDE_HFLAG_RQSIZE_256) | ||
587 | hwif->rqsize = 256; | ||
588 | |||
583 | if (d->init_hwif) | 589 | if (d->init_hwif) |
584 | /* Call chipset-specific routine | 590 | /* Call chipset-specific routine |
585 | * for each enabled hwif | 591 | * for each enabled hwif |
@@ -587,10 +593,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a | |||
587 | d->init_hwif(hwif); | 593 | d->init_hwif(hwif); |
588 | 594 | ||
589 | mate = hwif; | 595 | mate = hwif; |
590 | at_least_one_hwif_enabled = 1; | ||
591 | } | 596 | } |
592 | if (!at_least_one_hwif_enabled) | ||
593 | printk(KERN_INFO "%s: neither IDE port enabled (BIOS)\n", d->name); | ||
594 | } | 597 | } |
595 | 598 | ||
596 | EXPORT_SYMBOL_GPL(ide_pci_setup_ports); | 599 | EXPORT_SYMBOL_GPL(ide_pci_setup_ports); |
@@ -602,13 +605,13 @@ EXPORT_SYMBOL_GPL(ide_pci_setup_ports); | |||
602 | * | 605 | * |
603 | * One thing that is not standardized is the location of the | 606 | * One thing that is not standardized is the location of the |
604 | * primary/secondary interface "enable/disable" bits. For chipsets that | 607 | * primary/secondary interface "enable/disable" bits. For chipsets that |
605 | * we "know" about, this information is in the ide_pci_device_t struct; | 608 | * we "know" about, this information is in the struct ide_port_info; |
606 | * for all other chipsets, we just assume both interfaces are enabled. | 609 | * for all other chipsets, we just assume both interfaces are enabled. |
607 | */ | 610 | */ |
608 | static int do_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d, | 611 | static int do_ide_setup_pci_device(struct pci_dev *dev, |
609 | ata_index_t *index, u8 noisy) | 612 | const struct ide_port_info *d, |
613 | u8 *idx, u8 noisy) | ||
610 | { | 614 | { |
611 | static ata_index_t ata_index = { .b = { .low = 0xff, .high = 0xff } }; | ||
612 | int tried_config = 0; | 615 | int tried_config = 0; |
613 | int pciirq, ret; | 616 | int pciirq, ret; |
614 | 617 | ||
@@ -658,51 +661,35 @@ static int do_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d, | |||
658 | 661 | ||
659 | /* FIXME: silent failure can happen */ | 662 | /* FIXME: silent failure can happen */ |
660 | 663 | ||
661 | *index = ata_index; | 664 | ide_pci_setup_ports(dev, d, pciirq, idx); |
662 | ide_pci_setup_ports(dev, d, pciirq, index); | ||
663 | out: | 665 | out: |
664 | return ret; | 666 | return ret; |
665 | } | 667 | } |
666 | 668 | ||
667 | int ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d) | 669 | int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d) |
668 | { | 670 | { |
669 | ide_hwif_t *hwif = NULL, *mate = NULL; | 671 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
670 | ata_index_t index_list; | ||
671 | int ret; | 672 | int ret; |
672 | 673 | ||
673 | ret = do_ide_setup_pci_device(dev, d, &index_list, 1); | 674 | ret = do_ide_setup_pci_device(dev, d, &idx[0], 1); |
674 | if (ret < 0) | ||
675 | goto out; | ||
676 | 675 | ||
677 | if ((index_list.b.low & 0xf0) != 0xf0) | 676 | if (ret >= 0) |
678 | hwif = &ide_hwifs[index_list.b.low]; | 677 | ide_device_add(idx); |
679 | if ((index_list.b.high & 0xf0) != 0xf0) | ||
680 | mate = &ide_hwifs[index_list.b.high]; | ||
681 | 678 | ||
682 | if (hwif) | ||
683 | probe_hwif_init_with_fixup(hwif, d->fixup); | ||
684 | if (mate) | ||
685 | probe_hwif_init_with_fixup(mate, d->fixup); | ||
686 | |||
687 | if (hwif) | ||
688 | ide_proc_register_port(hwif); | ||
689 | if (mate) | ||
690 | ide_proc_register_port(mate); | ||
691 | out: | ||
692 | return ret; | 679 | return ret; |
693 | } | 680 | } |
694 | 681 | ||
695 | EXPORT_SYMBOL_GPL(ide_setup_pci_device); | 682 | EXPORT_SYMBOL_GPL(ide_setup_pci_device); |
696 | 683 | ||
697 | int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2, | 684 | int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2, |
698 | ide_pci_device_t *d) | 685 | const struct ide_port_info *d) |
699 | { | 686 | { |
700 | struct pci_dev *pdev[] = { dev1, dev2 }; | 687 | struct pci_dev *pdev[] = { dev1, dev2 }; |
701 | ata_index_t index_list[2]; | ||
702 | int ret, i; | 688 | int ret, i; |
689 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
703 | 690 | ||
704 | for (i = 0; i < 2; i++) { | 691 | for (i = 0; i < 2; i++) { |
705 | ret = do_ide_setup_pci_device(pdev[i], d, index_list + i, !i); | 692 | ret = do_ide_setup_pci_device(pdev[i], d, &idx[i*2], !i); |
706 | /* | 693 | /* |
707 | * FIXME: Mom, mom, they stole me the helper function to undo | 694 | * FIXME: Mom, mom, they stole me the helper function to undo |
708 | * do_ide_setup_pci_device() on the first device! | 695 | * do_ide_setup_pci_device() on the first device! |
@@ -711,25 +698,7 @@ int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2, | |||
711 | goto out; | 698 | goto out; |
712 | } | 699 | } |
713 | 700 | ||
714 | for (i = 0; i < 2; i++) { | 701 | ide_device_add(idx); |
715 | u8 idx[2] = { index_list[i].b.low, index_list[i].b.high }; | ||
716 | int j; | ||
717 | |||
718 | for (j = 0; j < 2; j++) { | ||
719 | if ((idx[j] & 0xf0) != 0xf0) | ||
720 | probe_hwif_init(ide_hwifs + idx[j]); | ||
721 | } | ||
722 | } | ||
723 | |||
724 | for (i = 0; i < 2; i++) { | ||
725 | u8 idx[2] = { index_list[i].b.low, index_list[i].b.high }; | ||
726 | int j; | ||
727 | |||
728 | for (j = 0; j < 2; j++) { | ||
729 | if ((idx[j] & 0xf0) != 0xf0) | ||
730 | ide_proc_register_port(ide_hwifs + idx[j]); | ||
731 | } | ||
732 | } | ||
733 | out: | 702 | out: |
734 | return ret; | 703 | return ret; |
735 | } | 704 | } |
@@ -754,9 +723,6 @@ static LIST_HEAD(ide_pci_drivers); | |||
754 | * hands the controllers off to the core PCI code to do the rest of | 723 | * hands the controllers off to the core PCI code to do the rest of |
755 | * the work. | 724 | * the work. |
756 | * | 725 | * |
757 | * The driver_data of the driver table must point to an ide_pci_device_t | ||
758 | * describing the interface. | ||
759 | * | ||
760 | * Returns are the same as for pci_register_driver | 726 | * Returns are the same as for pci_register_driver |
761 | */ | 727 | */ |
762 | 728 | ||
diff --git a/drivers/input/fixp-arith.h b/drivers/input/fixp-arith.h index ed3d2da0c485..3089d7382325 100644 --- a/drivers/input/fixp-arith.h +++ b/drivers/input/fixp-arith.h | |||
@@ -24,7 +24,7 @@ | |||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
25 | * | 25 | * |
26 | * Should you need to contact me, the author, you can do so by | 26 | * Should you need to contact me, the author, you can do so by |
27 | * e-mail - mail your message to <deneux@ifrance.com> | 27 | * e-mail - mail your message to <johann.deneux@gmail.com> |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index ec1b6cfefcd3..bfc6061f1554 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
@@ -136,7 +136,8 @@ static int gameport_measure_speed(struct gameport *gameport) | |||
136 | } | 136 | } |
137 | 137 | ||
138 | gameport_close(gameport); | 138 | gameport_close(gameport); |
139 | return (cpu_data[raw_smp_processor_id()].loops_per_jiffy * (unsigned long)HZ / (1000 / 50)) / (tx < 1 ? 1 : tx); | 139 | return (cpu_data(raw_smp_processor_id()).loops_per_jiffy * |
140 | (unsigned long)HZ / (1000 / 50)) / (tx < 1 ? 1 : tx); | ||
140 | 141 | ||
141 | #else | 142 | #else |
142 | 143 | ||
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index 27fc475bd3a1..a6ca9d5e252f 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Copyright (c) 1999-2001 Vojtech Pavlik | 4 | * Copyright (c) 1999-2001 Vojtech Pavlik |
5 | * | 5 | * |
6 | * Based on the work of: | 6 | * Based on the work of: |
7 | * Andree Borrmann Mats Sjövall | 7 | * Andree Borrmann Mats Sjövall |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* | 10 | /* |
diff --git a/drivers/input/joystick/iforce/Makefile b/drivers/input/joystick/iforce/Makefile index 17ae42bf9ffd..74daff49ab6e 100644 --- a/drivers/input/joystick/iforce/Makefile +++ b/drivers/input/joystick/iforce/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the I-Force driver | 2 | # Makefile for the I-Force driver |
3 | # | 3 | # |
4 | # By Johann Deneux <deneux@ifrance.com> | 4 | # By Johann Deneux <johann.deneux@gmail.com> |
5 | # | 5 | # |
6 | 6 | ||
7 | # Goal definition | 7 | # Goal definition |
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index 76f1969552c5..babc913d5492 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * OMAP Keypad Driver | 4 | * OMAP Keypad Driver |
5 | * | 5 | * |
6 | * Copyright (C) 2003 Nokia Corporation | 6 | * Copyright (C) 2003 Nokia Corporation |
7 | * Written by Timo Teräs <ext-timo.teras@nokia.com> | 7 | * Written by Timo Teräs <ext-timo.teras@nokia.com> |
8 | * | 8 | * |
9 | * Added support for H2 & H3 Keypad | 9 | * Added support for H2 & H3 Keypad |
10 | * Copyright (C) 2004 Texas Instruments | 10 | * Copyright (C) 2004 Texas Instruments |
@@ -481,6 +481,6 @@ static void __exit omap_kp_exit(void) | |||
481 | module_init(omap_kp_init); | 481 | module_init(omap_kp_init); |
482 | module_exit(omap_kp_exit); | 482 | module_exit(omap_kp_exit); |
483 | 483 | ||
484 | MODULE_AUTHOR("Timo Teräs"); | 484 | MODULE_AUTHOR("Timo Teräs"); |
485 | MODULE_DESCRIPTION("OMAP Keypad Driver"); | 485 | MODULE_DESCRIPTION("OMAP Keypad Driver"); |
486 | MODULE_LICENSE("GPL"); | 486 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 7acc6351bb44..8f5c7b90187d 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig | |||
@@ -70,9 +70,9 @@ config INPUT_WISTRON_BTNS | |||
70 | select LEDS_CLASS | 70 | select LEDS_CLASS |
71 | select CHECK_SIGNATURE | 71 | select CHECK_SIGNATURE |
72 | help | 72 | help |
73 | Say Y here for support of Winstron laptop button interface, used on | 73 | Say Y here for support of Wistron laptop button interfaces, used on |
74 | laptops of various brands, including Acer and Fujitsu-Siemens. If | 74 | laptops of various brands, including Acer and Fujitsu-Siemens. If |
75 | available, mail and wifi leds will be controlable via /sys/class/leds. | 75 | available, mail and wifi LEDs will be controllable via /sys/class/leds. |
76 | 76 | ||
77 | To compile this driver as a module, choose M here: the module will | 77 | To compile this driver as a module, choose M here: the module will |
78 | be called wistron_btns. | 78 | be called wistron_btns. |
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index da316d13d7f5..21a9c0b69a1f 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c | |||
@@ -906,7 +906,7 @@ static void psmouse_activate(struct psmouse *psmouse) | |||
906 | 906 | ||
907 | /* | 907 | /* |
908 | * psmouse_deactivate() puts the mouse into poll mode so that we don't get motion | 908 | * psmouse_deactivate() puts the mouse into poll mode so that we don't get motion |
909 | * reports from it unless we explicitely request it. | 909 | * reports from it unless we explicitly request it. |
910 | */ | 910 | */ |
911 | 911 | ||
912 | static void psmouse_deactivate(struct psmouse *psmouse) | 912 | static void psmouse_deactivate(struct psmouse *psmouse) |
diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c index 4a321576f345..404eedd5ffa2 100644 --- a/drivers/input/mouse/vsxxxaa.c +++ b/drivers/input/mouse/vsxxxaa.c | |||
@@ -330,7 +330,7 @@ vsxxxaa_handle_POR_packet (struct vsxxxaa *mouse) | |||
330 | 330 | ||
331 | /* | 331 | /* |
332 | * Check for Power-On-Reset packets. These are sent out | 332 | * Check for Power-On-Reset packets. These are sent out |
333 | * after plugging the mouse in, or when explicitely | 333 | * after plugging the mouse in, or when explicitly |
334 | * requested by sending 'T'. | 334 | * requested by sending 'T'. |
335 | * | 335 | * |
336 | * [0]: 1 0 1 0 R3 R2 R1 R0 | 336 | * [0]: 1 0 1 0 R3 R2 R1 R0 |
diff --git a/drivers/isdn/act2000/act2000_isa.c b/drivers/isdn/act2000/act2000_isa.c index 09ea50dd3459..819ea85576a3 100644 --- a/drivers/isdn/act2000/act2000_isa.c +++ b/drivers/isdn/act2000/act2000_isa.c | |||
@@ -126,7 +126,7 @@ act2000_isa_enable_irq(act2000_card * card) | |||
126 | 126 | ||
127 | /* | 127 | /* |
128 | * Install interrupt handler, enable irq on card. | 128 | * Install interrupt handler, enable irq on card. |
129 | * If irq is -1, choose next free irq, else irq is given explicitely. | 129 | * If irq is -1, choose next free irq, else irq is given explicitly. |
130 | */ | 130 | */ |
131 | int | 131 | int |
132 | act2000_isa_config_irq(act2000_card * card, short irq) | 132 | act2000_isa_config_irq(act2000_card * card, short irq) |
diff --git a/drivers/isdn/hardware/eicon/capifunc.c b/drivers/isdn/hardware/eicon/capifunc.c index 82edc1c1db7a..4d425c644d41 100644 --- a/drivers/isdn/hardware/eicon/capifunc.c +++ b/drivers/isdn/hardware/eicon/capifunc.c | |||
@@ -321,7 +321,7 @@ void sendf(APPL * appl, word command, dword Id, word Number, byte * format, ...) | |||
321 | DBG_BLK((((char *)(long)GET_DWORD(&msg.info.data_b3_ind.Data)) + i, | 321 | DBG_BLK((((char *)(long)GET_DWORD(&msg.info.data_b3_ind.Data)) + i, |
322 | ((dlength - i) < 256) ? (dlength - i) : 256)) | 322 | ((dlength - i) < 256) ? (dlength - i) : 256)) |
323 | if (!(myDriverDebugHandle.dbgMask & DL_PRV0)) | 323 | if (!(myDriverDebugHandle.dbgMask & DL_PRV0)) |
324 | break; /* not more if not explicitely requested */ | 324 | break; /* not more if not explicitly requested */ |
325 | } | 325 | } |
326 | } | 326 | } |
327 | break; | 327 | break; |
@@ -965,7 +965,7 @@ static u16 diva_send_message(struct capi_ctr *ctrl, | |||
965 | ((GET_WORD(&msg->info.data_b3_req.Data_Length) - j) < | 965 | ((GET_WORD(&msg->info.data_b3_req.Data_Length) - j) < |
966 | 256) ? (GET_WORD(&msg->info.data_b3_req.Data_Length) - j) : 256)) | 966 | 256) ? (GET_WORD(&msg->info.data_b3_req.Data_Length) - j) : 256)) |
967 | if (!(myDriverDebugHandle.dbgMask & DL_PRV0)) | 967 | if (!(myDriverDebugHandle.dbgMask & DL_PRV0)) |
968 | break; /* not more if not explicitely requested */ | 968 | break; /* not more if not explicitly requested */ |
969 | } | 969 | } |
970 | } | 970 | } |
971 | #endif | 971 | #endif |
diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c index 3b19caeba258..c0d7036404a5 100644 --- a/drivers/isdn/hisax/amd7930_fn.c +++ b/drivers/isdn/hisax/amd7930_fn.c | |||
@@ -767,7 +767,7 @@ Amd7930_init(struct IsdnCardState *cs) | |||
767 | /* read */ | 767 | /* read */ |
768 | if (*ptr++ >= 0x100) { | 768 | if (*ptr++ >= 0x100) { |
769 | if (cmd < 8) | 769 | if (cmd < 8) |
770 | /* setzt Register zurück */ | 770 | /* reset register */ |
771 | rByteAMD(cs, cmd); | 771 | rByteAMD(cs, cmd); |
772 | else { | 772 | else { |
773 | wByteAMD(cs, 0x00, cmd); | 773 | wByteAMD(cs, 0x00, cmd); |
diff --git a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c index b73027ff50e8..39f421ed8de8 100644 --- a/drivers/isdn/hisax/enternow_pci.c +++ b/drivers/isdn/hisax/enternow_pci.c | |||
@@ -75,16 +75,16 @@ | |||
75 | static const char *enternow_pci_rev = "$Revision: 1.1.4.5 $"; | 75 | static const char *enternow_pci_rev = "$Revision: 1.1.4.5 $"; |
76 | 76 | ||
77 | 77 | ||
78 | /* für PowerISDN PCI */ | 78 | /* for PowerISDN PCI */ |
79 | #define TJ_AMD_IRQ 0x20 | 79 | #define TJ_AMD_IRQ 0x20 |
80 | #define TJ_LED1 0x40 | 80 | #define TJ_LED1 0x40 |
81 | #define TJ_LED2 0x80 | 81 | #define TJ_LED2 0x80 |
82 | 82 | ||
83 | 83 | ||
84 | /* Das Fenster zum AMD... | 84 | /* The window to [the] AMD [chip]... |
85 | * Ab Adresse hw.njet.base + TJ_AMD_PORT werden vom AMD jeweils 8 Bit in | 85 | * From address hw.njet.base + TJ_AMD_PORT onwards, the AMD |
86 | * den TigerJet i/o-Raum gemappt | 86 | * maps [consecutive/multiple] 8 bits into the TigerJet I/O space |
87 | * -> 0x01 des AMD bei hw.njet.base + 0C4 */ | 87 | * -> 0x01 of the AMD at hw.njet.base + 0C4 */ |
88 | #define TJ_AMD_PORT 0xC0 | 88 | #define TJ_AMD_PORT 0xC0 |
89 | 89 | ||
90 | 90 | ||
@@ -96,11 +96,11 @@ static const char *enternow_pci_rev = "$Revision: 1.1.4.5 $"; | |||
96 | static unsigned char | 96 | static unsigned char |
97 | ReadByteAmd7930(struct IsdnCardState *cs, unsigned char offset) | 97 | ReadByteAmd7930(struct IsdnCardState *cs, unsigned char offset) |
98 | { | 98 | { |
99 | /* direktes Register */ | 99 | /* direct register */ |
100 | if(offset < 8) | 100 | if(offset < 8) |
101 | return (inb(cs->hw.njet.isac + 4*offset)); | 101 | return (inb(cs->hw.njet.isac + 4*offset)); |
102 | 102 | ||
103 | /* indirektes Register */ | 103 | /* indirect register */ |
104 | else { | 104 | else { |
105 | outb(offset, cs->hw.njet.isac + 4*AMD_CR); | 105 | outb(offset, cs->hw.njet.isac + 4*AMD_CR); |
106 | return(inb(cs->hw.njet.isac + 4*AMD_DR)); | 106 | return(inb(cs->hw.njet.isac + 4*AMD_DR)); |
@@ -111,11 +111,11 @@ ReadByteAmd7930(struct IsdnCardState *cs, unsigned char offset) | |||
111 | static void | 111 | static void |
112 | WriteByteAmd7930(struct IsdnCardState *cs, unsigned char offset, unsigned char value) | 112 | WriteByteAmd7930(struct IsdnCardState *cs, unsigned char offset, unsigned char value) |
113 | { | 113 | { |
114 | /* direktes Register */ | 114 | /* direct register */ |
115 | if(offset < 8) | 115 | if(offset < 8) |
116 | outb(value, cs->hw.njet.isac + 4*offset); | 116 | outb(value, cs->hw.njet.isac + 4*offset); |
117 | 117 | ||
118 | /* indirektes Register */ | 118 | /* indirect register */ |
119 | else { | 119 | else { |
120 | outb(offset, cs->hw.njet.isac + 4*AMD_CR); | 120 | outb(offset, cs->hw.njet.isac + 4*AMD_CR); |
121 | outb(value, cs->hw.njet.isac + 4*AMD_DR); | 121 | outb(value, cs->hw.njet.isac + 4*AMD_DR); |
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 077080aca799..fba8b624ffcf 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* $Id: hfc_pci.c,v 1.48.2.4 2004/02/11 13:21:33 keil Exp $ | 1 | /* $Id: hfc_pci.c,v 1.48.2.4 2004/02/11 13:21:33 keil Exp $ |
2 | * | 2 | * |
3 | * low level driver for CCD´s hfc-pci based cards | 3 | * low level driver for CCD's hfc-pci based cards |
4 | * | 4 | * |
5 | * Author Werner Cornelius | 5 | * Author Werner Cornelius |
6 | * based on existing driver for CCD hfc ISA cards | 6 | * based on existing driver for CCD hfc ISA cards |
diff --git a/drivers/isdn/hisax/isdnhdlc.c b/drivers/isdn/hisax/isdnhdlc.c index 268dced6c34a..c69a77a80062 100644 --- a/drivers/isdn/hisax/isdnhdlc.c +++ b/drivers/isdn/hisax/isdnhdlc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * isdnhdlc.c -- General purpose ISDN HDLC decoder. | 2 | * isdnhdlc.c -- General purpose ISDN HDLC decoder. |
3 | * | 3 | * |
4 | *Copyright (C) 2002 Wolfgang Mües <wolfgang@iksw-muees.de> | 4 | *Copyright (C) 2002 Wolfgang Mües <wolfgang@iksw-muees.de> |
5 | * 2001 Frode Isaksen <fisaksen@bewan.com> | 5 | * 2001 Frode Isaksen <fisaksen@bewan.com> |
6 | * 2001 Kai Germaschewski <kai.germaschewski@gmx.de> | 6 | * 2001 Kai Germaschewski <kai.germaschewski@gmx.de> |
7 | * | 7 | * |
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | /*-------------------------------------------------------------------*/ | 28 | /*-------------------------------------------------------------------*/ |
29 | 29 | ||
30 | MODULE_AUTHOR("Wolfgang Mües <wolfgang@iksw-muees.de>, " | 30 | MODULE_AUTHOR("Wolfgang Mües <wolfgang@iksw-muees.de>, " |
31 | "Frode Isaksen <fisaksen@bewan.com>, " | 31 | "Frode Isaksen <fisaksen@bewan.com>, " |
32 | "Kai Germaschewski <kai.germaschewski@gmx.de>"); | 32 | "Kai Germaschewski <kai.germaschewski@gmx.de>"); |
33 | MODULE_DESCRIPTION("General purpose ISDN HDLC decoder"); | 33 | MODULE_DESCRIPTION("General purpose ISDN HDLC decoder"); |
diff --git a/drivers/isdn/hisax/isdnhdlc.h b/drivers/isdn/hisax/isdnhdlc.h index 45167d2f8fb0..cf0a95a24015 100644 --- a/drivers/isdn/hisax/isdnhdlc.h +++ b/drivers/isdn/hisax/isdnhdlc.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * Neccessary because some ISDN devices don't have HDLC | 5 | * Neccessary because some ISDN devices don't have HDLC |
6 | * controllers. Also included: a bit reversal table. | 6 | * controllers. Also included: a bit reversal table. |
7 | * | 7 | * |
8 | *Copyright (C) 2002 Wolfgang Mües <wolfgang@iksw-muees.de> | 8 | *Copyright (C) 2002 Wolfgang Mües <wolfgang@iksw-muees.de> |
9 | * 2001 Frode Isaksen <fisaksen@bewan.com> | 9 | * 2001 Frode Isaksen <fisaksen@bewan.com> |
10 | * 2001 Kai Germaschewski <kai.germaschewski@gmx.de> | 10 | * 2001 Kai Germaschewski <kai.germaschewski@gmx.de> |
11 | * | 11 | * |
diff --git a/drivers/isdn/hisax/jade.c b/drivers/isdn/hisax/jade.c index 43d61d1bc5b6..70840a710acf 100644 --- a/drivers/isdn/hisax/jade.c +++ b/drivers/isdn/hisax/jade.c | |||
@@ -304,7 +304,7 @@ initjade(struct IsdnCardState *cs) | |||
304 | cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0x00); | 304 | cs->BC_Write_Reg(cs, 1, jade_HDLC_IMR, 0x00); |
305 | /* Setup host access to hdlc controller */ | 305 | /* Setup host access to hdlc controller */ |
306 | jade_write_indirect(cs, jade_HDLCCNTRACCESS, (jadeINDIRECT_HAH1|jadeINDIRECT_HAH2)); | 306 | jade_write_indirect(cs, jade_HDLCCNTRACCESS, (jadeINDIRECT_HAH1|jadeINDIRECT_HAH2)); |
307 | /* Unmask HDLC int (don´t forget DSP int later on)*/ | 307 | /* Unmask HDLC int (don't forget DSP int later on)*/ |
308 | cs->BC_Write_Reg(cs, -1,jade_INT, (jadeINT_HDLC1|jadeINT_HDLC2)); | 308 | cs->BC_Write_Reg(cs, -1,jade_INT, (jadeINT_HDLC1|jadeINT_HDLC2)); |
309 | 309 | ||
310 | /* once again TRANSPARENT */ | 310 | /* once again TRANSPARENT */ |
diff --git a/drivers/isdn/pcbit/capi.c b/drivers/isdn/pcbit/capi.c index 7b55e151f1b0..ac5a91ccde81 100644 --- a/drivers/isdn/pcbit/capi.c +++ b/drivers/isdn/pcbit/capi.c | |||
@@ -15,9 +15,9 @@ | |||
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Documentation: | 17 | * Documentation: |
18 | * - "Common ISDN API - Perfil Português - Versão 2.1", | 18 | * - "Common ISDN API - Perfil Português - Versão 2.1", |
19 | * Telecom Portugal, Fev 1992. | 19 | * Telecom Portugal, Fev 1992. |
20 | * - "Common ISDN API - Especificação de protocolos para | 20 | * - "Common ISDN API - Especificação de protocolos para |
21 | * acesso aos canais B", Inesc, Jan 1994. | 21 | * acesso aos canais B", Inesc, Jan 1994. |
22 | */ | 22 | */ |
23 | 23 | ||
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c index 50914439d861..0fd640751294 100644 --- a/drivers/leds/leds-s3c24xx.c +++ b/drivers/leds/leds-s3c24xx.c | |||
@@ -43,7 +43,7 @@ static void s3c24xx_led_set(struct led_classdev *led_cdev, | |||
43 | struct s3c24xx_gpio_led *led = to_gpio(led_cdev); | 43 | struct s3c24xx_gpio_led *led = to_gpio(led_cdev); |
44 | struct s3c24xx_led_platdata *pd = led->pdata; | 44 | struct s3c24xx_led_platdata *pd = led->pdata; |
45 | 45 | ||
46 | /* there will be a sort delay between setting the output and | 46 | /* there will be a short delay between setting the output and |
47 | * going from output to input when using tristate. */ | 47 | * going from output to input when using tristate. */ |
48 | 48 | ||
49 | s3c2410_gpio_setpin(pd->gpio, (value ? 1 : 0) ^ | 49 | s3c2410_gpio_setpin(pd->gpio, (value ? 1 : 0) ^ |
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index c803d2bba65d..48d647abea46 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -563,7 +563,7 @@ static void media_bay_step(int i) | |||
563 | ide_init_hwif_ports(&hw, (unsigned long) bay->cd_base, (unsigned long) 0, NULL); | 563 | ide_init_hwif_ports(&hw, (unsigned long) bay->cd_base, (unsigned long) 0, NULL); |
564 | hw.irq = bay->cd_irq; | 564 | hw.irq = bay->cd_irq; |
565 | hw.chipset = ide_pmac; | 565 | hw.chipset = ide_pmac; |
566 | bay->cd_index = ide_register_hw(&hw, 0, NULL); | 566 | bay->cd_index = ide_register_hw(&hw, NULL, 0, NULL); |
567 | pmu_resume(); | 567 | pmu_resume(); |
568 | } | 568 | } |
569 | if (bay->cd_index == -1) { | 569 | if (bay->cd_index == -1) { |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index f7c509b7a8ea..dc741d3a4531 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -1521,7 +1521,7 @@ pmu_sr_intr(void) | |||
1521 | req = current_req; | 1521 | req = current_req; |
1522 | /* | 1522 | /* |
1523 | * For PMU sleep and freq change requests, we lock the | 1523 | * For PMU sleep and freq change requests, we lock the |
1524 | * PMU until it's explicitely unlocked. This avoids any | 1524 | * PMU until it's explicitly unlocked. This avoids any |
1525 | * spurrious event polling getting in | 1525 | * spurrious event polling getting in |
1526 | */ | 1526 | */ |
1527 | current_req = req->next; | 1527 | current_req = req->next; |
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index 34a8c60a254a..9b6fbf044fd8 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig | |||
@@ -267,6 +267,12 @@ config DM_MULTIPATH_RDAC | |||
267 | ---help--- | 267 | ---help--- |
268 | Multipath support for LSI/Engenio RDAC. | 268 | Multipath support for LSI/Engenio RDAC. |
269 | 269 | ||
270 | config DM_MULTIPATH_HP | ||
271 | tristate "HP MSA multipath support (EXPERIMENTAL)" | ||
272 | depends on DM_MULTIPATH && BLK_DEV_DM && EXPERIMENTAL | ||
273 | ---help--- | ||
274 | Multipath support for HP MSA (Active/Passive) series hardware. | ||
275 | |||
270 | config DM_DELAY | 276 | config DM_DELAY |
271 | tristate "I/O delaying target (EXPERIMENTAL)" | 277 | tristate "I/O delaying target (EXPERIMENTAL)" |
272 | depends on BLK_DEV_DM && EXPERIMENTAL | 278 | depends on BLK_DEV_DM && EXPERIMENTAL |
@@ -276,4 +282,10 @@ config DM_DELAY | |||
276 | 282 | ||
277 | If unsure, say N. | 283 | If unsure, say N. |
278 | 284 | ||
285 | config DM_UEVENT | ||
286 | bool "DM uevents (EXPERIMENTAL)" | ||
287 | depends on BLK_DEV_DM && EXPERIMENTAL | ||
288 | ---help--- | ||
289 | Generate udev events for DM events. | ||
290 | |||
279 | endif # MD | 291 | endif # MD |
diff --git a/drivers/md/Makefile b/drivers/md/Makefile index c49366cdc05d..d9aa7edb8780 100644 --- a/drivers/md/Makefile +++ b/drivers/md/Makefile | |||
@@ -8,6 +8,7 @@ dm-multipath-objs := dm-hw-handler.o dm-path-selector.o dm-mpath.o | |||
8 | dm-snapshot-objs := dm-snap.o dm-exception-store.o | 8 | dm-snapshot-objs := dm-snap.o dm-exception-store.o |
9 | dm-mirror-objs := dm-log.o dm-raid1.o | 9 | dm-mirror-objs := dm-log.o dm-raid1.o |
10 | dm-rdac-objs := dm-mpath-rdac.o | 10 | dm-rdac-objs := dm-mpath-rdac.o |
11 | dm-hp-sw-objs := dm-mpath-hp-sw.o | ||
11 | md-mod-objs := md.o bitmap.o | 12 | md-mod-objs := md.o bitmap.o |
12 | raid456-objs := raid5.o raid6algos.o raid6recov.o raid6tables.o \ | 13 | raid456-objs := raid5.o raid6algos.o raid6recov.o raid6tables.o \ |
13 | raid6int1.o raid6int2.o raid6int4.o \ | 14 | raid6int1.o raid6int2.o raid6int4.o \ |
@@ -35,6 +36,7 @@ obj-$(CONFIG_DM_CRYPT) += dm-crypt.o | |||
35 | obj-$(CONFIG_DM_DELAY) += dm-delay.o | 36 | obj-$(CONFIG_DM_DELAY) += dm-delay.o |
36 | obj-$(CONFIG_DM_MULTIPATH) += dm-multipath.o dm-round-robin.o | 37 | obj-$(CONFIG_DM_MULTIPATH) += dm-multipath.o dm-round-robin.o |
37 | obj-$(CONFIG_DM_MULTIPATH_EMC) += dm-emc.o | 38 | obj-$(CONFIG_DM_MULTIPATH_EMC) += dm-emc.o |
39 | obj-$(CONFIG_DM_MULTIPATH_HP) += dm-hp-sw.o | ||
38 | obj-$(CONFIG_DM_MULTIPATH_RDAC) += dm-rdac.o | 40 | obj-$(CONFIG_DM_MULTIPATH_RDAC) += dm-rdac.o |
39 | obj-$(CONFIG_DM_SNAPSHOT) += dm-snapshot.o | 41 | obj-$(CONFIG_DM_SNAPSHOT) += dm-snapshot.o |
40 | obj-$(CONFIG_DM_MIRROR) += dm-mirror.o | 42 | obj-$(CONFIG_DM_MIRROR) += dm-mirror.o |
@@ -48,6 +50,10 @@ ifeq ($(CONFIG_ALTIVEC),y) | |||
48 | altivec_flags := -maltivec -mabi=altivec | 50 | altivec_flags := -maltivec -mabi=altivec |
49 | endif | 51 | endif |
50 | 52 | ||
53 | ifeq ($(CONFIG_DM_UEVENT),y) | ||
54 | dm-mod-objs += dm-uevent.o | ||
55 | endif | ||
56 | |||
51 | targets += raid6int1.c | 57 | targets += raid6int1.c |
52 | $(obj)/raid6int1.c: UNROLL := 1 | 58 | $(obj)/raid6int1.c: UNROLL := 1 |
53 | $(obj)/raid6int1.c: $(src)/raid6int.uc $(src)/unroll.pl FORCE | 59 | $(obj)/raid6int1.c: $(src)/raid6int.uc $(src)/unroll.pl FORCE |
diff --git a/drivers/md/dm-bio-list.h b/drivers/md/dm-bio-list.h index 3f7b827649e3..d4509be0fe67 100644 --- a/drivers/md/dm-bio-list.h +++ b/drivers/md/dm-bio-list.h | |||
@@ -21,11 +21,6 @@ static inline int bio_list_empty(const struct bio_list *bl) | |||
21 | return bl->head == NULL; | 21 | return bl->head == NULL; |
22 | } | 22 | } |
23 | 23 | ||
24 | #define BIO_LIST_INIT { .head = NULL, .tail = NULL } | ||
25 | |||
26 | #define BIO_LIST(bl) \ | ||
27 | struct bio_list bl = BIO_LIST_INIT | ||
28 | |||
29 | static inline void bio_list_init(struct bio_list *bl) | 24 | static inline void bio_list_init(struct bio_list *bl) |
30 | { | 25 | { |
31 | bl->head = bl->tail = NULL; | 26 | bl->head = bl->tail = NULL; |
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 64fee90bb68b..0eb5416798bd 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c | |||
@@ -36,7 +36,6 @@ struct dm_crypt_io { | |||
36 | struct work_struct work; | 36 | struct work_struct work; |
37 | atomic_t pending; | 37 | atomic_t pending; |
38 | int error; | 38 | int error; |
39 | int post_process; | ||
40 | }; | 39 | }; |
41 | 40 | ||
42 | /* | 41 | /* |
@@ -57,7 +56,7 @@ struct crypt_config; | |||
57 | 56 | ||
58 | struct crypt_iv_operations { | 57 | struct crypt_iv_operations { |
59 | int (*ctr)(struct crypt_config *cc, struct dm_target *ti, | 58 | int (*ctr)(struct crypt_config *cc, struct dm_target *ti, |
60 | const char *opts); | 59 | const char *opts); |
61 | void (*dtr)(struct crypt_config *cc); | 60 | void (*dtr)(struct crypt_config *cc); |
62 | const char *(*status)(struct crypt_config *cc); | 61 | const char *(*status)(struct crypt_config *cc); |
63 | int (*generator)(struct crypt_config *cc, u8 *iv, sector_t sector); | 62 | int (*generator)(struct crypt_config *cc, u8 *iv, sector_t sector); |
@@ -80,6 +79,8 @@ struct crypt_config { | |||
80 | mempool_t *page_pool; | 79 | mempool_t *page_pool; |
81 | struct bio_set *bs; | 80 | struct bio_set *bs; |
82 | 81 | ||
82 | struct workqueue_struct *io_queue; | ||
83 | struct workqueue_struct *crypt_queue; | ||
83 | /* | 84 | /* |
84 | * crypto related data | 85 | * crypto related data |
85 | */ | 86 | */ |
@@ -112,7 +113,7 @@ static void clone_init(struct dm_crypt_io *, struct bio *); | |||
112 | * Different IV generation algorithms: | 113 | * Different IV generation algorithms: |
113 | * | 114 | * |
114 | * plain: the initial vector is the 32-bit little-endian version of the sector | 115 | * plain: the initial vector is the 32-bit little-endian version of the sector |
115 | * number, padded with zeros if neccessary. | 116 | * number, padded with zeros if necessary. |
116 | * | 117 | * |
117 | * essiv: "encrypted sector|salt initial vector", the sector number is | 118 | * essiv: "encrypted sector|salt initial vector", the sector number is |
118 | * encrypted with the bulk cipher using a salt as key. The salt | 119 | * encrypted with the bulk cipher using a salt as key. The salt |
@@ -137,7 +138,7 @@ static int crypt_iv_plain_gen(struct crypt_config *cc, u8 *iv, sector_t sector) | |||
137 | } | 138 | } |
138 | 139 | ||
139 | static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, | 140 | static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, |
140 | const char *opts) | 141 | const char *opts) |
141 | { | 142 | { |
142 | struct crypto_cipher *essiv_tfm; | 143 | struct crypto_cipher *essiv_tfm; |
143 | struct crypto_hash *hash_tfm; | 144 | struct crypto_hash *hash_tfm; |
@@ -175,6 +176,7 @@ static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, | |||
175 | 176 | ||
176 | if (err) { | 177 | if (err) { |
177 | ti->error = "Error calculating hash in ESSIV"; | 178 | ti->error = "Error calculating hash in ESSIV"; |
179 | kfree(salt); | ||
178 | return err; | 180 | return err; |
179 | } | 181 | } |
180 | 182 | ||
@@ -188,7 +190,7 @@ static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, | |||
188 | if (crypto_cipher_blocksize(essiv_tfm) != | 190 | if (crypto_cipher_blocksize(essiv_tfm) != |
189 | crypto_blkcipher_ivsize(cc->tfm)) { | 191 | crypto_blkcipher_ivsize(cc->tfm)) { |
190 | ti->error = "Block size of ESSIV cipher does " | 192 | ti->error = "Block size of ESSIV cipher does " |
191 | "not match IV size of block cipher"; | 193 | "not match IV size of block cipher"; |
192 | crypto_free_cipher(essiv_tfm); | 194 | crypto_free_cipher(essiv_tfm); |
193 | kfree(salt); | 195 | kfree(salt); |
194 | return -EINVAL; | 196 | return -EINVAL; |
@@ -319,10 +321,10 @@ crypt_convert_scatterlist(struct crypt_config *cc, struct scatterlist *out, | |||
319 | return r; | 321 | return r; |
320 | } | 322 | } |
321 | 323 | ||
322 | static void | 324 | static void crypt_convert_init(struct crypt_config *cc, |
323 | crypt_convert_init(struct crypt_config *cc, struct convert_context *ctx, | 325 | struct convert_context *ctx, |
324 | struct bio *bio_out, struct bio *bio_in, | 326 | struct bio *bio_out, struct bio *bio_in, |
325 | sector_t sector, int write) | 327 | sector_t sector, int write) |
326 | { | 328 | { |
327 | ctx->bio_in = bio_in; | 329 | ctx->bio_in = bio_in; |
328 | ctx->bio_out = bio_out; | 330 | ctx->bio_out = bio_out; |
@@ -338,7 +340,7 @@ crypt_convert_init(struct crypt_config *cc, struct convert_context *ctx, | |||
338 | * Encrypt / decrypt data from one bio to another one (can be the same one) | 340 | * Encrypt / decrypt data from one bio to another one (can be the same one) |
339 | */ | 341 | */ |
340 | static int crypt_convert(struct crypt_config *cc, | 342 | static int crypt_convert(struct crypt_config *cc, |
341 | struct convert_context *ctx) | 343 | struct convert_context *ctx) |
342 | { | 344 | { |
343 | int r = 0; | 345 | int r = 0; |
344 | 346 | ||
@@ -370,7 +372,7 @@ static int crypt_convert(struct crypt_config *cc, | |||
370 | } | 372 | } |
371 | 373 | ||
372 | r = crypt_convert_scatterlist(cc, &sg_out, &sg_in, sg_in.length, | 374 | r = crypt_convert_scatterlist(cc, &sg_out, &sg_in, sg_in.length, |
373 | ctx->write, ctx->sector); | 375 | ctx->write, ctx->sector); |
374 | if (r < 0) | 376 | if (r < 0) |
375 | break; | 377 | break; |
376 | 378 | ||
@@ -380,13 +382,13 @@ static int crypt_convert(struct crypt_config *cc, | |||
380 | return r; | 382 | return r; |
381 | } | 383 | } |
382 | 384 | ||
383 | static void dm_crypt_bio_destructor(struct bio *bio) | 385 | static void dm_crypt_bio_destructor(struct bio *bio) |
384 | { | 386 | { |
385 | struct dm_crypt_io *io = bio->bi_private; | 387 | struct dm_crypt_io *io = bio->bi_private; |
386 | struct crypt_config *cc = io->target->private; | 388 | struct crypt_config *cc = io->target->private; |
387 | 389 | ||
388 | bio_free(bio, cc->bs); | 390 | bio_free(bio, cc->bs); |
389 | } | 391 | } |
390 | 392 | ||
391 | /* | 393 | /* |
392 | * Generate a new unfragmented bio with the given size | 394 | * Generate a new unfragmented bio with the given size |
@@ -458,7 +460,7 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone) | |||
458 | * One of the bios was finished. Check for completion of | 460 | * One of the bios was finished. Check for completion of |
459 | * the whole request and correctly clean up the buffer. | 461 | * the whole request and correctly clean up the buffer. |
460 | */ | 462 | */ |
461 | static void dec_pending(struct dm_crypt_io *io, int error) | 463 | static void crypt_dec_pending(struct dm_crypt_io *io, int error) |
462 | { | 464 | { |
463 | struct crypt_config *cc = (struct crypt_config *) io->target->private; | 465 | struct crypt_config *cc = (struct crypt_config *) io->target->private; |
464 | 466 | ||
@@ -474,18 +476,36 @@ static void dec_pending(struct dm_crypt_io *io, int error) | |||
474 | } | 476 | } |
475 | 477 | ||
476 | /* | 478 | /* |
477 | * kcryptd: | 479 | * kcryptd/kcryptd_io: |
478 | * | 480 | * |
479 | * Needed because it would be very unwise to do decryption in an | 481 | * Needed because it would be very unwise to do decryption in an |
480 | * interrupt context. | 482 | * interrupt context. |
483 | * | ||
484 | * kcryptd performs the actual encryption or decryption. | ||
485 | * | ||
486 | * kcryptd_io performs the IO submission. | ||
487 | * | ||
488 | * They must be separated as otherwise the final stages could be | ||
489 | * starved by new requests which can block in the first stages due | ||
490 | * to memory allocation. | ||
481 | */ | 491 | */ |
482 | static struct workqueue_struct *_kcryptd_workqueue; | ||
483 | static void kcryptd_do_work(struct work_struct *work); | 492 | static void kcryptd_do_work(struct work_struct *work); |
493 | static void kcryptd_do_crypt(struct work_struct *work); | ||
484 | 494 | ||
485 | static void kcryptd_queue_io(struct dm_crypt_io *io) | 495 | static void kcryptd_queue_io(struct dm_crypt_io *io) |
486 | { | 496 | { |
497 | struct crypt_config *cc = io->target->private; | ||
498 | |||
487 | INIT_WORK(&io->work, kcryptd_do_work); | 499 | INIT_WORK(&io->work, kcryptd_do_work); |
488 | queue_work(_kcryptd_workqueue, &io->work); | 500 | queue_work(cc->io_queue, &io->work); |
501 | } | ||
502 | |||
503 | static void kcryptd_queue_crypt(struct dm_crypt_io *io) | ||
504 | { | ||
505 | struct crypt_config *cc = io->target->private; | ||
506 | |||
507 | INIT_WORK(&io->work, kcryptd_do_crypt); | ||
508 | queue_work(cc->crypt_queue, &io->work); | ||
489 | } | 509 | } |
490 | 510 | ||
491 | static void crypt_endio(struct bio *clone, int error) | 511 | static void crypt_endio(struct bio *clone, int error) |
@@ -508,13 +528,12 @@ static void crypt_endio(struct bio *clone, int error) | |||
508 | } | 528 | } |
509 | 529 | ||
510 | bio_put(clone); | 530 | bio_put(clone); |
511 | io->post_process = 1; | 531 | kcryptd_queue_crypt(io); |
512 | kcryptd_queue_io(io); | ||
513 | return; | 532 | return; |
514 | 533 | ||
515 | out: | 534 | out: |
516 | bio_put(clone); | 535 | bio_put(clone); |
517 | dec_pending(io, error); | 536 | crypt_dec_pending(io, error); |
518 | } | 537 | } |
519 | 538 | ||
520 | static void clone_init(struct dm_crypt_io *io, struct bio *clone) | 539 | static void clone_init(struct dm_crypt_io *io, struct bio *clone) |
@@ -544,7 +563,7 @@ static void process_read(struct dm_crypt_io *io) | |||
544 | */ | 563 | */ |
545 | clone = bio_alloc_bioset(GFP_NOIO, bio_segments(base_bio), cc->bs); | 564 | clone = bio_alloc_bioset(GFP_NOIO, bio_segments(base_bio), cc->bs); |
546 | if (unlikely(!clone)) { | 565 | if (unlikely(!clone)) { |
547 | dec_pending(io, -ENOMEM); | 566 | crypt_dec_pending(io, -ENOMEM); |
548 | return; | 567 | return; |
549 | } | 568 | } |
550 | 569 | ||
@@ -579,7 +598,7 @@ static void process_write(struct dm_crypt_io *io) | |||
579 | while (remaining) { | 598 | while (remaining) { |
580 | clone = crypt_alloc_buffer(io, remaining); | 599 | clone = crypt_alloc_buffer(io, remaining); |
581 | if (unlikely(!clone)) { | 600 | if (unlikely(!clone)) { |
582 | dec_pending(io, -ENOMEM); | 601 | crypt_dec_pending(io, -ENOMEM); |
583 | return; | 602 | return; |
584 | } | 603 | } |
585 | 604 | ||
@@ -589,7 +608,7 @@ static void process_write(struct dm_crypt_io *io) | |||
589 | if (unlikely(crypt_convert(cc, &ctx) < 0)) { | 608 | if (unlikely(crypt_convert(cc, &ctx) < 0)) { |
590 | crypt_free_buffer_pages(cc, clone); | 609 | crypt_free_buffer_pages(cc, clone); |
591 | bio_put(clone); | 610 | bio_put(clone); |
592 | dec_pending(io, -EIO); | 611 | crypt_dec_pending(io, -EIO); |
593 | return; | 612 | return; |
594 | } | 613 | } |
595 | 614 | ||
@@ -624,17 +643,23 @@ static void process_read_endio(struct dm_crypt_io *io) | |||
624 | crypt_convert_init(cc, &ctx, io->base_bio, io->base_bio, | 643 | crypt_convert_init(cc, &ctx, io->base_bio, io->base_bio, |
625 | io->base_bio->bi_sector - io->target->begin, 0); | 644 | io->base_bio->bi_sector - io->target->begin, 0); |
626 | 645 | ||
627 | dec_pending(io, crypt_convert(cc, &ctx)); | 646 | crypt_dec_pending(io, crypt_convert(cc, &ctx)); |
628 | } | 647 | } |
629 | 648 | ||
630 | static void kcryptd_do_work(struct work_struct *work) | 649 | static void kcryptd_do_work(struct work_struct *work) |
631 | { | 650 | { |
632 | struct dm_crypt_io *io = container_of(work, struct dm_crypt_io, work); | 651 | struct dm_crypt_io *io = container_of(work, struct dm_crypt_io, work); |
633 | 652 | ||
634 | if (io->post_process) | 653 | if (bio_data_dir(io->base_bio) == READ) |
635 | process_read_endio(io); | ||
636 | else if (bio_data_dir(io->base_bio) == READ) | ||
637 | process_read(io); | 654 | process_read(io); |
655 | } | ||
656 | |||
657 | static void kcryptd_do_crypt(struct work_struct *work) | ||
658 | { | ||
659 | struct dm_crypt_io *io = container_of(work, struct dm_crypt_io, work); | ||
660 | |||
661 | if (bio_data_dir(io->base_bio) == READ) | ||
662 | process_read_endio(io); | ||
638 | else | 663 | else |
639 | process_write(io); | 664 | process_write(io); |
640 | } | 665 | } |
@@ -690,7 +715,7 @@ static int crypt_set_key(struct crypt_config *cc, char *key) | |||
690 | cc->key_size = key_size; /* initial settings */ | 715 | cc->key_size = key_size; /* initial settings */ |
691 | 716 | ||
692 | if ((!key_size && strcmp(key, "-")) || | 717 | if ((!key_size && strcmp(key, "-")) || |
693 | (key_size && crypt_decode_key(cc->key, key, key_size) < 0)) | 718 | (key_size && crypt_decode_key(cc->key, key, key_size) < 0)) |
694 | return -EINVAL; | 719 | return -EINVAL; |
695 | 720 | ||
696 | set_bit(DM_CRYPT_KEY_VALID, &cc->flags); | 721 | set_bit(DM_CRYPT_KEY_VALID, &cc->flags); |
@@ -746,7 +771,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
746 | 771 | ||
747 | if (crypt_set_key(cc, argv[1])) { | 772 | if (crypt_set_key(cc, argv[1])) { |
748 | ti->error = "Error decoding key"; | 773 | ti->error = "Error decoding key"; |
749 | goto bad1; | 774 | goto bad_cipher; |
750 | } | 775 | } |
751 | 776 | ||
752 | /* Compatiblity mode for old dm-crypt cipher strings */ | 777 | /* Compatiblity mode for old dm-crypt cipher strings */ |
@@ -757,19 +782,19 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
757 | 782 | ||
758 | if (strcmp(chainmode, "ecb") && !ivmode) { | 783 | if (strcmp(chainmode, "ecb") && !ivmode) { |
759 | ti->error = "This chaining mode requires an IV mechanism"; | 784 | ti->error = "This chaining mode requires an IV mechanism"; |
760 | goto bad1; | 785 | goto bad_cipher; |
761 | } | 786 | } |
762 | 787 | ||
763 | if (snprintf(cc->cipher, CRYPTO_MAX_ALG_NAME, "%s(%s)", chainmode, | 788 | if (snprintf(cc->cipher, CRYPTO_MAX_ALG_NAME, "%s(%s)", |
764 | cipher) >= CRYPTO_MAX_ALG_NAME) { | 789 | chainmode, cipher) >= CRYPTO_MAX_ALG_NAME) { |
765 | ti->error = "Chain mode + cipher name is too long"; | 790 | ti->error = "Chain mode + cipher name is too long"; |
766 | goto bad1; | 791 | goto bad_cipher; |
767 | } | 792 | } |
768 | 793 | ||
769 | tfm = crypto_alloc_blkcipher(cc->cipher, 0, CRYPTO_ALG_ASYNC); | 794 | tfm = crypto_alloc_blkcipher(cc->cipher, 0, CRYPTO_ALG_ASYNC); |
770 | if (IS_ERR(tfm)) { | 795 | if (IS_ERR(tfm)) { |
771 | ti->error = "Error allocating crypto tfm"; | 796 | ti->error = "Error allocating crypto tfm"; |
772 | goto bad1; | 797 | goto bad_cipher; |
773 | } | 798 | } |
774 | 799 | ||
775 | strcpy(cc->cipher, cipher); | 800 | strcpy(cc->cipher, cipher); |
@@ -793,18 +818,18 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
793 | cc->iv_gen_ops = &crypt_iv_null_ops; | 818 | cc->iv_gen_ops = &crypt_iv_null_ops; |
794 | else { | 819 | else { |
795 | ti->error = "Invalid IV mode"; | 820 | ti->error = "Invalid IV mode"; |
796 | goto bad2; | 821 | goto bad_ivmode; |
797 | } | 822 | } |
798 | 823 | ||
799 | if (cc->iv_gen_ops && cc->iv_gen_ops->ctr && | 824 | if (cc->iv_gen_ops && cc->iv_gen_ops->ctr && |
800 | cc->iv_gen_ops->ctr(cc, ti, ivopts) < 0) | 825 | cc->iv_gen_ops->ctr(cc, ti, ivopts) < 0) |
801 | goto bad2; | 826 | goto bad_ivmode; |
802 | 827 | ||
803 | cc->iv_size = crypto_blkcipher_ivsize(tfm); | 828 | cc->iv_size = crypto_blkcipher_ivsize(tfm); |
804 | if (cc->iv_size) | 829 | if (cc->iv_size) |
805 | /* at least a 64 bit sector number should fit in our buffer */ | 830 | /* at least a 64 bit sector number should fit in our buffer */ |
806 | cc->iv_size = max(cc->iv_size, | 831 | cc->iv_size = max(cc->iv_size, |
807 | (unsigned int)(sizeof(u64) / sizeof(u8))); | 832 | (unsigned int)(sizeof(u64) / sizeof(u8))); |
808 | else { | 833 | else { |
809 | if (cc->iv_gen_ops) { | 834 | if (cc->iv_gen_ops) { |
810 | DMWARN("Selected cipher does not support IVs"); | 835 | DMWARN("Selected cipher does not support IVs"); |
@@ -817,13 +842,13 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
817 | cc->io_pool = mempool_create_slab_pool(MIN_IOS, _crypt_io_pool); | 842 | cc->io_pool = mempool_create_slab_pool(MIN_IOS, _crypt_io_pool); |
818 | if (!cc->io_pool) { | 843 | if (!cc->io_pool) { |
819 | ti->error = "Cannot allocate crypt io mempool"; | 844 | ti->error = "Cannot allocate crypt io mempool"; |
820 | goto bad3; | 845 | goto bad_slab_pool; |
821 | } | 846 | } |
822 | 847 | ||
823 | cc->page_pool = mempool_create_page_pool(MIN_POOL_PAGES, 0); | 848 | cc->page_pool = mempool_create_page_pool(MIN_POOL_PAGES, 0); |
824 | if (!cc->page_pool) { | 849 | if (!cc->page_pool) { |
825 | ti->error = "Cannot allocate page mempool"; | 850 | ti->error = "Cannot allocate page mempool"; |
826 | goto bad4; | 851 | goto bad_page_pool; |
827 | } | 852 | } |
828 | 853 | ||
829 | cc->bs = bioset_create(MIN_IOS, MIN_IOS); | 854 | cc->bs = bioset_create(MIN_IOS, MIN_IOS); |
@@ -834,25 +859,25 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
834 | 859 | ||
835 | if (crypto_blkcipher_setkey(tfm, cc->key, key_size) < 0) { | 860 | if (crypto_blkcipher_setkey(tfm, cc->key, key_size) < 0) { |
836 | ti->error = "Error setting key"; | 861 | ti->error = "Error setting key"; |
837 | goto bad5; | 862 | goto bad_device; |
838 | } | 863 | } |
839 | 864 | ||
840 | if (sscanf(argv[2], "%llu", &tmpll) != 1) { | 865 | if (sscanf(argv[2], "%llu", &tmpll) != 1) { |
841 | ti->error = "Invalid iv_offset sector"; | 866 | ti->error = "Invalid iv_offset sector"; |
842 | goto bad5; | 867 | goto bad_device; |
843 | } | 868 | } |
844 | cc->iv_offset = tmpll; | 869 | cc->iv_offset = tmpll; |
845 | 870 | ||
846 | if (sscanf(argv[4], "%llu", &tmpll) != 1) { | 871 | if (sscanf(argv[4], "%llu", &tmpll) != 1) { |
847 | ti->error = "Invalid device sector"; | 872 | ti->error = "Invalid device sector"; |
848 | goto bad5; | 873 | goto bad_device; |
849 | } | 874 | } |
850 | cc->start = tmpll; | 875 | cc->start = tmpll; |
851 | 876 | ||
852 | if (dm_get_device(ti, argv[3], cc->start, ti->len, | 877 | if (dm_get_device(ti, argv[3], cc->start, ti->len, |
853 | dm_table_get_mode(ti->table), &cc->dev)) { | 878 | dm_table_get_mode(ti->table), &cc->dev)) { |
854 | ti->error = "Device lookup failed"; | 879 | ti->error = "Device lookup failed"; |
855 | goto bad5; | 880 | goto bad_device; |
856 | } | 881 | } |
857 | 882 | ||
858 | if (ivmode && cc->iv_gen_ops) { | 883 | if (ivmode && cc->iv_gen_ops) { |
@@ -861,27 +886,45 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
861 | cc->iv_mode = kmalloc(strlen(ivmode) + 1, GFP_KERNEL); | 886 | cc->iv_mode = kmalloc(strlen(ivmode) + 1, GFP_KERNEL); |
862 | if (!cc->iv_mode) { | 887 | if (!cc->iv_mode) { |
863 | ti->error = "Error kmallocing iv_mode string"; | 888 | ti->error = "Error kmallocing iv_mode string"; |
864 | goto bad5; | 889 | goto bad_ivmode_string; |
865 | } | 890 | } |
866 | strcpy(cc->iv_mode, ivmode); | 891 | strcpy(cc->iv_mode, ivmode); |
867 | } else | 892 | } else |
868 | cc->iv_mode = NULL; | 893 | cc->iv_mode = NULL; |
869 | 894 | ||
895 | cc->io_queue = create_singlethread_workqueue("kcryptd_io"); | ||
896 | if (!cc->io_queue) { | ||
897 | ti->error = "Couldn't create kcryptd io queue"; | ||
898 | goto bad_io_queue; | ||
899 | } | ||
900 | |||
901 | cc->crypt_queue = create_singlethread_workqueue("kcryptd"); | ||
902 | if (!cc->crypt_queue) { | ||
903 | ti->error = "Couldn't create kcryptd queue"; | ||
904 | goto bad_crypt_queue; | ||
905 | } | ||
906 | |||
870 | ti->private = cc; | 907 | ti->private = cc; |
871 | return 0; | 908 | return 0; |
872 | 909 | ||
873 | bad5: | 910 | bad_crypt_queue: |
911 | destroy_workqueue(cc->io_queue); | ||
912 | bad_io_queue: | ||
913 | kfree(cc->iv_mode); | ||
914 | bad_ivmode_string: | ||
915 | dm_put_device(ti, cc->dev); | ||
916 | bad_device: | ||
874 | bioset_free(cc->bs); | 917 | bioset_free(cc->bs); |
875 | bad_bs: | 918 | bad_bs: |
876 | mempool_destroy(cc->page_pool); | 919 | mempool_destroy(cc->page_pool); |
877 | bad4: | 920 | bad_page_pool: |
878 | mempool_destroy(cc->io_pool); | 921 | mempool_destroy(cc->io_pool); |
879 | bad3: | 922 | bad_slab_pool: |
880 | if (cc->iv_gen_ops && cc->iv_gen_ops->dtr) | 923 | if (cc->iv_gen_ops && cc->iv_gen_ops->dtr) |
881 | cc->iv_gen_ops->dtr(cc); | 924 | cc->iv_gen_ops->dtr(cc); |
882 | bad2: | 925 | bad_ivmode: |
883 | crypto_free_blkcipher(tfm); | 926 | crypto_free_blkcipher(tfm); |
884 | bad1: | 927 | bad_cipher: |
885 | /* Must zero key material before freeing */ | 928 | /* Must zero key material before freeing */ |
886 | memset(cc, 0, sizeof(*cc) + cc->key_size * sizeof(u8)); | 929 | memset(cc, 0, sizeof(*cc) + cc->key_size * sizeof(u8)); |
887 | kfree(cc); | 930 | kfree(cc); |
@@ -892,7 +935,8 @@ static void crypt_dtr(struct dm_target *ti) | |||
892 | { | 935 | { |
893 | struct crypt_config *cc = (struct crypt_config *) ti->private; | 936 | struct crypt_config *cc = (struct crypt_config *) ti->private; |
894 | 937 | ||
895 | flush_workqueue(_kcryptd_workqueue); | 938 | destroy_workqueue(cc->io_queue); |
939 | destroy_workqueue(cc->crypt_queue); | ||
896 | 940 | ||
897 | bioset_free(cc->bs); | 941 | bioset_free(cc->bs); |
898 | mempool_destroy(cc->page_pool); | 942 | mempool_destroy(cc->page_pool); |
@@ -918,9 +962,13 @@ static int crypt_map(struct dm_target *ti, struct bio *bio, | |||
918 | io = mempool_alloc(cc->io_pool, GFP_NOIO); | 962 | io = mempool_alloc(cc->io_pool, GFP_NOIO); |
919 | io->target = ti; | 963 | io->target = ti; |
920 | io->base_bio = bio; | 964 | io->base_bio = bio; |
921 | io->error = io->post_process = 0; | 965 | io->error = 0; |
922 | atomic_set(&io->pending, 0); | 966 | atomic_set(&io->pending, 0); |
923 | kcryptd_queue_io(io); | 967 | |
968 | if (bio_data_dir(io->base_bio) == READ) | ||
969 | kcryptd_queue_io(io); | ||
970 | else | ||
971 | kcryptd_queue_crypt(io); | ||
924 | 972 | ||
925 | return DM_MAPIO_SUBMITTED; | 973 | return DM_MAPIO_SUBMITTED; |
926 | } | 974 | } |
@@ -1037,25 +1085,12 @@ static int __init dm_crypt_init(void) | |||
1037 | if (!_crypt_io_pool) | 1085 | if (!_crypt_io_pool) |
1038 | return -ENOMEM; | 1086 | return -ENOMEM; |
1039 | 1087 | ||
1040 | _kcryptd_workqueue = create_workqueue("kcryptd"); | ||
1041 | if (!_kcryptd_workqueue) { | ||
1042 | r = -ENOMEM; | ||
1043 | DMERR("couldn't create kcryptd"); | ||
1044 | goto bad1; | ||
1045 | } | ||
1046 | |||
1047 | r = dm_register_target(&crypt_target); | 1088 | r = dm_register_target(&crypt_target); |
1048 | if (r < 0) { | 1089 | if (r < 0) { |
1049 | DMERR("register failed %d", r); | 1090 | DMERR("register failed %d", r); |
1050 | goto bad2; | 1091 | kmem_cache_destroy(_crypt_io_pool); |
1051 | } | 1092 | } |
1052 | 1093 | ||
1053 | return 0; | ||
1054 | |||
1055 | bad2: | ||
1056 | destroy_workqueue(_kcryptd_workqueue); | ||
1057 | bad1: | ||
1058 | kmem_cache_destroy(_crypt_io_pool); | ||
1059 | return r; | 1094 | return r; |
1060 | } | 1095 | } |
1061 | 1096 | ||
@@ -1066,7 +1101,6 @@ static void __exit dm_crypt_exit(void) | |||
1066 | if (r < 0) | 1101 | if (r < 0) |
1067 | DMERR("unregister failed %d", r); | 1102 | DMERR("unregister failed %d", r); |
1068 | 1103 | ||
1069 | destroy_workqueue(_kcryptd_workqueue); | ||
1070 | kmem_cache_destroy(_crypt_io_pool); | 1104 | kmem_cache_destroy(_crypt_io_pool); |
1071 | } | 1105 | } |
1072 | 1106 | ||
diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c index 6928c136d3c5..bdd37f881c42 100644 --- a/drivers/md/dm-delay.c +++ b/drivers/md/dm-delay.c | |||
@@ -83,7 +83,7 @@ static struct bio *flush_delayed_bios(struct delay_c *dc, int flush_all) | |||
83 | struct dm_delay_info *delayed, *next; | 83 | struct dm_delay_info *delayed, *next; |
84 | unsigned long next_expires = 0; | 84 | unsigned long next_expires = 0; |
85 | int start_timer = 0; | 85 | int start_timer = 0; |
86 | BIO_LIST(flush_bios); | 86 | struct bio_list flush_bios = { }; |
87 | 87 | ||
88 | mutex_lock(&delayed_bios_lock); | 88 | mutex_lock(&delayed_bios_lock); |
89 | list_for_each_entry_safe(delayed, next, &dc->delayed_bios, list) { | 89 | list_for_each_entry_safe(delayed, next, &dc->delayed_bios, list) { |
@@ -163,34 +163,32 @@ static int delay_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
163 | goto bad; | 163 | goto bad; |
164 | } | 164 | } |
165 | 165 | ||
166 | if (argc == 3) { | 166 | dc->dev_write = NULL; |
167 | dc->dev_write = NULL; | 167 | if (argc == 3) |
168 | goto out; | 168 | goto out; |
169 | } | ||
170 | 169 | ||
171 | if (sscanf(argv[4], "%llu", &tmpll) != 1) { | 170 | if (sscanf(argv[4], "%llu", &tmpll) != 1) { |
172 | ti->error = "Invalid write device sector"; | 171 | ti->error = "Invalid write device sector"; |
173 | goto bad; | 172 | goto bad_dev_read; |
174 | } | 173 | } |
175 | dc->start_write = tmpll; | 174 | dc->start_write = tmpll; |
176 | 175 | ||
177 | if (sscanf(argv[5], "%u", &dc->write_delay) != 1) { | 176 | if (sscanf(argv[5], "%u", &dc->write_delay) != 1) { |
178 | ti->error = "Invalid write delay"; | 177 | ti->error = "Invalid write delay"; |
179 | goto bad; | 178 | goto bad_dev_read; |
180 | } | 179 | } |
181 | 180 | ||
182 | if (dm_get_device(ti, argv[3], dc->start_write, ti->len, | 181 | if (dm_get_device(ti, argv[3], dc->start_write, ti->len, |
183 | dm_table_get_mode(ti->table), &dc->dev_write)) { | 182 | dm_table_get_mode(ti->table), &dc->dev_write)) { |
184 | ti->error = "Write device lookup failed"; | 183 | ti->error = "Write device lookup failed"; |
185 | dm_put_device(ti, dc->dev_read); | 184 | goto bad_dev_read; |
186 | goto bad; | ||
187 | } | 185 | } |
188 | 186 | ||
189 | out: | 187 | out: |
190 | dc->delayed_pool = mempool_create_slab_pool(128, delayed_cache); | 188 | dc->delayed_pool = mempool_create_slab_pool(128, delayed_cache); |
191 | if (!dc->delayed_pool) { | 189 | if (!dc->delayed_pool) { |
192 | DMERR("Couldn't create delayed bio pool."); | 190 | DMERR("Couldn't create delayed bio pool."); |
193 | goto bad; | 191 | goto bad_dev_write; |
194 | } | 192 | } |
195 | 193 | ||
196 | setup_timer(&dc->delay_timer, handle_delayed_timer, (unsigned long)dc); | 194 | setup_timer(&dc->delay_timer, handle_delayed_timer, (unsigned long)dc); |
@@ -203,6 +201,11 @@ out: | |||
203 | ti->private = dc; | 201 | ti->private = dc; |
204 | return 0; | 202 | return 0; |
205 | 203 | ||
204 | bad_dev_write: | ||
205 | if (dc->dev_write) | ||
206 | dm_put_device(ti, dc->dev_write); | ||
207 | bad_dev_read: | ||
208 | dm_put_device(ti, dc->dev_read); | ||
206 | bad: | 209 | bad: |
207 | kfree(dc); | 210 | kfree(dc); |
208 | return -EINVAL; | 211 | return -EINVAL; |
@@ -305,7 +308,7 @@ static int delay_status(struct dm_target *ti, status_type_t type, | |||
305 | (unsigned long long) dc->start_read, | 308 | (unsigned long long) dc->start_read, |
306 | dc->read_delay); | 309 | dc->read_delay); |
307 | if (dc->dev_write) | 310 | if (dc->dev_write) |
308 | DMEMIT("%s %llu %u", dc->dev_write->name, | 311 | DMEMIT(" %s %llu %u", dc->dev_write->name, |
309 | (unsigned long long) dc->start_write, | 312 | (unsigned long long) dc->start_write, |
310 | dc->write_delay); | 313 | dc->write_delay); |
311 | break; | 314 | break; |
diff --git a/drivers/md/dm-emc.c b/drivers/md/dm-emc.c index 342517261ece..6b91b9ab1d41 100644 --- a/drivers/md/dm-emc.c +++ b/drivers/md/dm-emc.c | |||
@@ -81,7 +81,7 @@ static struct bio *get_failover_bio(struct dm_path *path, unsigned data_size) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | if (bio_add_page(bio, page, data_size, 0) != data_size) { | 83 | if (bio_add_page(bio, page, data_size, 0) != data_size) { |
84 | DMERR("get_failover_bio: alloc_page() failed."); | 84 | DMERR("get_failover_bio: bio_add_page() failed."); |
85 | __free_page(page); | 85 | __free_page(page); |
86 | bio_put(bio); | 86 | bio_put(bio); |
87 | return NULL; | 87 | return NULL; |
@@ -211,12 +211,10 @@ fail_path: | |||
211 | 211 | ||
212 | static struct emc_handler *alloc_emc_handler(void) | 212 | static struct emc_handler *alloc_emc_handler(void) |
213 | { | 213 | { |
214 | struct emc_handler *h = kmalloc(sizeof(*h), GFP_KERNEL); | 214 | struct emc_handler *h = kzalloc(sizeof(*h), GFP_KERNEL); |
215 | 215 | ||
216 | if (h) { | 216 | if (h) |
217 | memset(h, 0, sizeof(*h)); | ||
218 | spin_lock_init(&h->lock); | 217 | spin_lock_init(&h->lock); |
219 | } | ||
220 | 218 | ||
221 | return h; | 219 | return h; |
222 | } | 220 | } |
diff --git a/drivers/md/dm-hw-handler.c b/drivers/md/dm-hw-handler.c index baafaaba4d4b..2ee84d8aa0bf 100644 --- a/drivers/md/dm-hw-handler.c +++ b/drivers/md/dm-hw-handler.c | |||
@@ -91,12 +91,10 @@ void dm_put_hw_handler(struct hw_handler_type *hwht) | |||
91 | 91 | ||
92 | static struct hwh_internal *_alloc_hw_handler(struct hw_handler_type *hwht) | 92 | static struct hwh_internal *_alloc_hw_handler(struct hw_handler_type *hwht) |
93 | { | 93 | { |
94 | struct hwh_internal *hwhi = kmalloc(sizeof(*hwhi), GFP_KERNEL); | 94 | struct hwh_internal *hwhi = kzalloc(sizeof(*hwhi), GFP_KERNEL); |
95 | 95 | ||
96 | if (hwhi) { | 96 | if (hwhi) |
97 | memset(hwhi, 0, sizeof(*hwhi)); | ||
98 | hwhi->hwht = *hwht; | 97 | hwhi->hwht = *hwht; |
99 | } | ||
100 | 98 | ||
101 | return hwhi; | 99 | return hwhi; |
102 | } | 100 | } |
diff --git a/drivers/md/dm-hw-handler.h b/drivers/md/dm-hw-handler.h index e0832e6fcf36..46809dcb121a 100644 --- a/drivers/md/dm-hw-handler.h +++ b/drivers/md/dm-hw-handler.h | |||
@@ -58,5 +58,6 @@ unsigned dm_scsi_err_handler(struct hw_handler *hwh, struct bio *bio); | |||
58 | #define MP_FAIL_PATH 1 | 58 | #define MP_FAIL_PATH 1 |
59 | #define MP_BYPASS_PG 2 | 59 | #define MP_BYPASS_PG 2 |
60 | #define MP_ERROR_IO 4 /* Don't retry this I/O */ | 60 | #define MP_ERROR_IO 4 /* Don't retry this I/O */ |
61 | #define MP_RETRY 8 | ||
61 | 62 | ||
62 | #endif | 63 | #endif |
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index b441d82c338a..138200bf5e0b 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -700,7 +700,7 @@ static int dev_rename(struct dm_ioctl *param, size_t param_size) | |||
700 | int r; | 700 | int r; |
701 | char *new_name = (char *) param + param->data_start; | 701 | char *new_name = (char *) param + param->data_start; |
702 | 702 | ||
703 | if (new_name < (char *) (param + 1) || | 703 | if (new_name < (char *) param->data || |
704 | invalid_str(new_name, (void *) param + param_size)) { | 704 | invalid_str(new_name, (void *) param + param_size)) { |
705 | DMWARN("Invalid new logical volume name supplied."); | 705 | DMWARN("Invalid new logical volume name supplied."); |
706 | return -EINVAL; | 706 | return -EINVAL; |
@@ -726,7 +726,7 @@ static int dev_set_geometry(struct dm_ioctl *param, size_t param_size) | |||
726 | if (!md) | 726 | if (!md) |
727 | return -ENXIO; | 727 | return -ENXIO; |
728 | 728 | ||
729 | if (geostr < (char *) (param + 1) || | 729 | if (geostr < (char *) param->data || |
730 | invalid_str(geostr, (void *) param + param_size)) { | 730 | invalid_str(geostr, (void *) param + param_size)) { |
731 | DMWARN("Invalid geometry supplied."); | 731 | DMWARN("Invalid geometry supplied."); |
732 | goto out; | 732 | goto out; |
@@ -1233,7 +1233,7 @@ static int target_message(struct dm_ioctl *param, size_t param_size) | |||
1233 | if (r) | 1233 | if (r) |
1234 | goto out; | 1234 | goto out; |
1235 | 1235 | ||
1236 | if (tmsg < (struct dm_target_msg *) (param + 1) || | 1236 | if (tmsg < (struct dm_target_msg *) param->data || |
1237 | invalid_str(tmsg->message, (void *) param + param_size)) { | 1237 | invalid_str(tmsg->message, (void *) param + param_size)) { |
1238 | DMWARN("Invalid target message parameters."); | 1238 | DMWARN("Invalid target message parameters."); |
1239 | r = -EINVAL; | 1239 | r = -EINVAL; |
@@ -1358,7 +1358,7 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl **param) | |||
1358 | if (tmp.data_size < sizeof(tmp)) | 1358 | if (tmp.data_size < sizeof(tmp)) |
1359 | return -EINVAL; | 1359 | return -EINVAL; |
1360 | 1360 | ||
1361 | dmi = (struct dm_ioctl *) vmalloc(tmp.data_size); | 1361 | dmi = vmalloc(tmp.data_size); |
1362 | if (!dmi) | 1362 | if (!dmi) |
1363 | return -ENOMEM; | 1363 | return -ENOMEM; |
1364 | 1364 | ||
@@ -1515,3 +1515,35 @@ void dm_interface_exit(void) | |||
1515 | 1515 | ||
1516 | dm_hash_exit(); | 1516 | dm_hash_exit(); |
1517 | } | 1517 | } |
1518 | |||
1519 | /** | ||
1520 | * dm_copy_name_and_uuid - Copy mapped device name & uuid into supplied buffers | ||
1521 | * @md: Pointer to mapped_device | ||
1522 | * @name: Buffer (size DM_NAME_LEN) for name | ||
1523 | * @uuid: Buffer (size DM_UUID_LEN) for uuid or empty string if uuid not defined | ||
1524 | */ | ||
1525 | int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid) | ||
1526 | { | ||
1527 | int r = 0; | ||
1528 | struct hash_cell *hc; | ||
1529 | |||
1530 | if (!md) | ||
1531 | return -ENXIO; | ||
1532 | |||
1533 | dm_get(md); | ||
1534 | down_read(&_hash_lock); | ||
1535 | hc = dm_get_mdptr(md); | ||
1536 | if (!hc || hc->md != md) { | ||
1537 | r = -ENXIO; | ||
1538 | goto out; | ||
1539 | } | ||
1540 | |||
1541 | strcpy(name, hc->name); | ||
1542 | strcpy(uuid, hc->uuid ? : ""); | ||
1543 | |||
1544 | out: | ||
1545 | up_read(&_hash_lock); | ||
1546 | dm_put(md); | ||
1547 | |||
1548 | return r; | ||
1549 | } | ||
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index a66428d860fe..072ee4353eab 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c | |||
@@ -696,7 +696,7 @@ static struct dirty_log_type _disk_type = { | |||
696 | .module = THIS_MODULE, | 696 | .module = THIS_MODULE, |
697 | .ctr = disk_ctr, | 697 | .ctr = disk_ctr, |
698 | .dtr = disk_dtr, | 698 | .dtr = disk_dtr, |
699 | .suspend = disk_flush, | 699 | .postsuspend = disk_flush, |
700 | .resume = disk_resume, | 700 | .resume = disk_resume, |
701 | .get_region_size = core_get_region_size, | 701 | .get_region_size = core_get_region_size, |
702 | .is_clean = core_is_clean, | 702 | .is_clean = core_is_clean, |
diff --git a/drivers/md/dm-log.h b/drivers/md/dm-log.h index 86a301c8daf1..3fae87eb5963 100644 --- a/drivers/md/dm-log.h +++ b/drivers/md/dm-log.h | |||
@@ -32,7 +32,8 @@ struct dirty_log_type { | |||
32 | * There are times when we don't want the log to touch | 32 | * There are times when we don't want the log to touch |
33 | * the disk. | 33 | * the disk. |
34 | */ | 34 | */ |
35 | int (*suspend)(struct dirty_log *log); | 35 | int (*presuspend)(struct dirty_log *log); |
36 | int (*postsuspend)(struct dirty_log *log); | ||
36 | int (*resume)(struct dirty_log *log); | 37 | int (*resume)(struct dirty_log *log); |
37 | 38 | ||
38 | /* | 39 | /* |
diff --git a/drivers/md/dm-mpath-hp-sw.c b/drivers/md/dm-mpath-hp-sw.c new file mode 100644 index 000000000000..204bf42c9449 --- /dev/null +++ b/drivers/md/dm-mpath-hp-sw.c | |||
@@ -0,0 +1,248 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2005 Mike Christie, All rights reserved. | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All rights reserved. | ||
4 | * Authors: Mike Christie | ||
5 | * Dave Wysochanski | ||
6 | * | ||
7 | * This file is released under the GPL. | ||
8 | * | ||
9 | * This module implements the specific path activation code for | ||
10 | * HP StorageWorks and FSC FibreCat Asymmetric (Active/Passive) | ||
11 | * storage arrays. | ||
12 | * These storage arrays have controller-based failover, not | ||
13 | * LUN-based failover. However, LUN-based failover is the design | ||
14 | * of dm-multipath. Thus, this module is written for LUN-based failover. | ||
15 | */ | ||
16 | #include <linux/blkdev.h> | ||
17 | #include <linux/list.h> | ||
18 | #include <linux/types.h> | ||
19 | #include <scsi/scsi.h> | ||
20 | #include <scsi/scsi_cmnd.h> | ||
21 | #include <scsi/scsi_dbg.h> | ||
22 | |||
23 | #include "dm.h" | ||
24 | #include "dm-hw-handler.h" | ||
25 | |||
26 | #define DM_MSG_PREFIX "multipath hp-sw" | ||
27 | #define DM_HP_HWH_NAME "hp-sw" | ||
28 | #define DM_HP_HWH_VER "1.0.0" | ||
29 | |||
30 | struct hp_sw_context { | ||
31 | unsigned char sense[SCSI_SENSE_BUFFERSIZE]; | ||
32 | }; | ||
33 | |||
34 | /* | ||
35 | * hp_sw_error_is_retryable - Is an HP-specific check condition retryable? | ||
36 | * @req: path activation request | ||
37 | * | ||
38 | * Examine error codes of request and determine whether the error is retryable. | ||
39 | * Some error codes are already retried by scsi-ml (see | ||
40 | * scsi_decide_disposition), but some HP specific codes are not. | ||
41 | * The intent of this routine is to supply the logic for the HP specific | ||
42 | * check conditions. | ||
43 | * | ||
44 | * Returns: | ||
45 | * 1 - command completed with retryable error | ||
46 | * 0 - command completed with non-retryable error | ||
47 | * | ||
48 | * Possible optimizations | ||
49 | * 1. More hardware-specific error codes | ||
50 | */ | ||
51 | static int hp_sw_error_is_retryable(struct request *req) | ||
52 | { | ||
53 | /* | ||
54 | * NOT_READY is known to be retryable | ||
55 | * For now we just dump out the sense data and call it retryable | ||
56 | */ | ||
57 | if (status_byte(req->errors) == CHECK_CONDITION) | ||
58 | __scsi_print_sense(DM_HP_HWH_NAME, req->sense, req->sense_len); | ||
59 | |||
60 | /* | ||
61 | * At this point we don't have complete information about all the error | ||
62 | * codes from this hardware, so we are just conservative and retry | ||
63 | * when in doubt. | ||
64 | */ | ||
65 | return 1; | ||
66 | } | ||
67 | |||
68 | /* | ||
69 | * hp_sw_end_io - Completion handler for HP path activation. | ||
70 | * @req: path activation request | ||
71 | * @error: scsi-ml error | ||
72 | * | ||
73 | * Check sense data, free request structure, and notify dm that | ||
74 | * pg initialization has completed. | ||
75 | * | ||
76 | * Context: scsi-ml softirq | ||
77 | * | ||
78 | */ | ||
79 | static void hp_sw_end_io(struct request *req, int error) | ||
80 | { | ||
81 | struct dm_path *path = req->end_io_data; | ||
82 | unsigned err_flags = 0; | ||
83 | |||
84 | if (!error) { | ||
85 | DMDEBUG("%s path activation command - success", | ||
86 | path->dev->name); | ||
87 | goto out; | ||
88 | } | ||
89 | |||
90 | if (hp_sw_error_is_retryable(req)) { | ||
91 | DMDEBUG("%s path activation command - retry", | ||
92 | path->dev->name); | ||
93 | err_flags = MP_RETRY; | ||
94 | goto out; | ||
95 | } | ||
96 | |||
97 | DMWARN("%s path activation fail - error=0x%x", | ||
98 | path->dev->name, error); | ||
99 | err_flags = MP_FAIL_PATH; | ||
100 | |||
101 | out: | ||
102 | req->end_io_data = NULL; | ||
103 | __blk_put_request(req->q, req); | ||
104 | dm_pg_init_complete(path, err_flags); | ||
105 | } | ||
106 | |||
107 | /* | ||
108 | * hp_sw_get_request - Allocate an HP specific path activation request | ||
109 | * @path: path on which request will be sent (needed for request queue) | ||
110 | * | ||
111 | * The START command is used for path activation request. | ||
112 | * These arrays are controller-based failover, not LUN based. | ||
113 | * One START command issued to a single path will fail over all | ||
114 | * LUNs for the same controller. | ||
115 | * | ||
116 | * Possible optimizations | ||
117 | * 1. Make timeout configurable | ||
118 | * 2. Preallocate request | ||
119 | */ | ||
120 | static struct request *hp_sw_get_request(struct dm_path *path) | ||
121 | { | ||
122 | struct request *req; | ||
123 | struct block_device *bdev = path->dev->bdev; | ||
124 | struct request_queue *q = bdev_get_queue(bdev); | ||
125 | struct hp_sw_context *h = path->hwhcontext; | ||
126 | |||
127 | req = blk_get_request(q, WRITE, GFP_NOIO); | ||
128 | if (!req) | ||
129 | goto out; | ||
130 | |||
131 | req->timeout = 60 * HZ; | ||
132 | |||
133 | req->errors = 0; | ||
134 | req->cmd_type = REQ_TYPE_BLOCK_PC; | ||
135 | req->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE; | ||
136 | req->end_io_data = path; | ||
137 | req->sense = h->sense; | ||
138 | memset(req->sense, 0, SCSI_SENSE_BUFFERSIZE); | ||
139 | |||
140 | memset(&req->cmd, 0, BLK_MAX_CDB); | ||
141 | req->cmd[0] = START_STOP; | ||
142 | req->cmd[4] = 1; | ||
143 | req->cmd_len = COMMAND_SIZE(req->cmd[0]); | ||
144 | |||
145 | out: | ||
146 | return req; | ||
147 | } | ||
148 | |||
149 | /* | ||
150 | * hp_sw_pg_init - HP path activation implementation. | ||
151 | * @hwh: hardware handler specific data | ||
152 | * @bypassed: unused; is the path group bypassed? (see dm-mpath.c) | ||
153 | * @path: path to send initialization command | ||
154 | * | ||
155 | * Send an HP-specific path activation command on 'path'. | ||
156 | * Do not try to optimize in any way, just send the activation command. | ||
157 | * More than one path activation command may be sent to the same controller. | ||
158 | * This seems to work fine for basic failover support. | ||
159 | * | ||
160 | * Possible optimizations | ||
161 | * 1. Detect an in-progress activation request and avoid submitting another one | ||
162 | * 2. Model the controller and only send a single activation request at a time | ||
163 | * 3. Determine the state of a path before sending an activation request | ||
164 | * | ||
165 | * Context: kmpathd (see process_queued_ios() in dm-mpath.c) | ||
166 | */ | ||
167 | static void hp_sw_pg_init(struct hw_handler *hwh, unsigned bypassed, | ||
168 | struct dm_path *path) | ||
169 | { | ||
170 | struct request *req; | ||
171 | struct hp_sw_context *h; | ||
172 | |||
173 | path->hwhcontext = hwh->context; | ||
174 | h = hwh->context; | ||
175 | |||
176 | req = hp_sw_get_request(path); | ||
177 | if (!req) { | ||
178 | DMERR("%s path activation command - allocation fail", | ||
179 | path->dev->name); | ||
180 | goto retry; | ||
181 | } | ||
182 | |||
183 | DMDEBUG("%s path activation command - sent", path->dev->name); | ||
184 | |||
185 | blk_execute_rq_nowait(req->q, NULL, req, 1, hp_sw_end_io); | ||
186 | return; | ||
187 | |||
188 | retry: | ||
189 | dm_pg_init_complete(path, MP_RETRY); | ||
190 | } | ||
191 | |||
192 | static int hp_sw_create(struct hw_handler *hwh, unsigned argc, char **argv) | ||
193 | { | ||
194 | struct hp_sw_context *h; | ||
195 | |||
196 | h = kmalloc(sizeof(*h), GFP_KERNEL); | ||
197 | if (!h) | ||
198 | return -ENOMEM; | ||
199 | |||
200 | hwh->context = h; | ||
201 | |||
202 | return 0; | ||
203 | } | ||
204 | |||
205 | static void hp_sw_destroy(struct hw_handler *hwh) | ||
206 | { | ||
207 | struct hp_sw_context *h = hwh->context; | ||
208 | |||
209 | kfree(h); | ||
210 | } | ||
211 | |||
212 | static struct hw_handler_type hp_sw_hwh = { | ||
213 | .name = DM_HP_HWH_NAME, | ||
214 | .module = THIS_MODULE, | ||
215 | .create = hp_sw_create, | ||
216 | .destroy = hp_sw_destroy, | ||
217 | .pg_init = hp_sw_pg_init, | ||
218 | }; | ||
219 | |||
220 | static int __init hp_sw_init(void) | ||
221 | { | ||
222 | int r; | ||
223 | |||
224 | r = dm_register_hw_handler(&hp_sw_hwh); | ||
225 | if (r < 0) | ||
226 | DMERR("register failed %d", r); | ||
227 | else | ||
228 | DMINFO("version " DM_HP_HWH_VER " loaded"); | ||
229 | |||
230 | return r; | ||
231 | } | ||
232 | |||
233 | static void __exit hp_sw_exit(void) | ||
234 | { | ||
235 | int r; | ||
236 | |||
237 | r = dm_unregister_hw_handler(&hp_sw_hwh); | ||
238 | if (r < 0) | ||
239 | DMERR("unregister failed %d", r); | ||
240 | } | ||
241 | |||
242 | module_init(hp_sw_init); | ||
243 | module_exit(hp_sw_exit); | ||
244 | |||
245 | MODULE_DESCRIPTION("DM Multipath HP StorageWorks / FSC FibreCat (A/P) support"); | ||
246 | MODULE_AUTHOR("Mike Christie, Dave Wysochanski <dm-devel@redhat.com>"); | ||
247 | MODULE_LICENSE("GPL"); | ||
248 | MODULE_VERSION(DM_HP_HWH_VER); | ||
diff --git a/drivers/md/dm-mpath-rdac.c b/drivers/md/dm-mpath-rdac.c index 16b161345775..e04eb5c697fb 100644 --- a/drivers/md/dm-mpath-rdac.c +++ b/drivers/md/dm-mpath-rdac.c | |||
@@ -664,20 +664,21 @@ static struct hw_handler_type rdac_handler = { | |||
664 | 664 | ||
665 | static int __init rdac_init(void) | 665 | static int __init rdac_init(void) |
666 | { | 666 | { |
667 | int r = dm_register_hw_handler(&rdac_handler); | 667 | int r; |
668 | |||
669 | if (r < 0) { | ||
670 | DMERR("%s: register failed %d", RDAC_DM_HWH_NAME, r); | ||
671 | return r; | ||
672 | } | ||
673 | 668 | ||
674 | rdac_wkqd = create_singlethread_workqueue("rdac_wkqd"); | 669 | rdac_wkqd = create_singlethread_workqueue("rdac_wkqd"); |
675 | if (!rdac_wkqd) { | 670 | if (!rdac_wkqd) { |
676 | DMERR("Failed to create workqueue rdac_wkqd."); | 671 | DMERR("Failed to create workqueue rdac_wkqd."); |
677 | dm_unregister_hw_handler(&rdac_handler); | ||
678 | return -ENOMEM; | 672 | return -ENOMEM; |
679 | } | 673 | } |
680 | 674 | ||
675 | r = dm_register_hw_handler(&rdac_handler); | ||
676 | if (r < 0) { | ||
677 | DMERR("%s: register failed %d", RDAC_DM_HWH_NAME, r); | ||
678 | destroy_workqueue(rdac_wkqd); | ||
679 | return r; | ||
680 | } | ||
681 | |||
681 | DMINFO("%s: version %s loaded", RDAC_DM_HWH_NAME, RDAC_DM_HWH_VER); | 682 | DMINFO("%s: version %s loaded", RDAC_DM_HWH_NAME, RDAC_DM_HWH_VER); |
682 | return 0; | 683 | return 0; |
683 | } | 684 | } |
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 31056abca89d..24b2b1e32fae 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include "dm-hw-handler.h" | 10 | #include "dm-hw-handler.h" |
11 | #include "dm-bio-list.h" | 11 | #include "dm-bio-list.h" |
12 | #include "dm-bio-record.h" | 12 | #include "dm-bio-record.h" |
13 | #include "dm-uevent.h" | ||
13 | 14 | ||
14 | #include <linux/ctype.h> | 15 | #include <linux/ctype.h> |
15 | #include <linux/init.h> | 16 | #include <linux/init.h> |
@@ -75,6 +76,8 @@ struct multipath { | |||
75 | unsigned queue_io; /* Must we queue all I/O? */ | 76 | unsigned queue_io; /* Must we queue all I/O? */ |
76 | unsigned queue_if_no_path; /* Queue I/O if last path fails? */ | 77 | unsigned queue_if_no_path; /* Queue I/O if last path fails? */ |
77 | unsigned saved_queue_if_no_path;/* Saved state during suspension */ | 78 | unsigned saved_queue_if_no_path;/* Saved state during suspension */ |
79 | unsigned pg_init_retries; /* Number of times to retry pg_init */ | ||
80 | unsigned pg_init_count; /* Number of times pg_init called */ | ||
78 | 81 | ||
79 | struct work_struct process_queued_ios; | 82 | struct work_struct process_queued_ios; |
80 | struct bio_list queued_ios; | 83 | struct bio_list queued_ios; |
@@ -225,6 +228,8 @@ static void __switch_pg(struct multipath *m, struct pgpath *pgpath) | |||
225 | m->pg_init_required = 0; | 228 | m->pg_init_required = 0; |
226 | m->queue_io = 0; | 229 | m->queue_io = 0; |
227 | } | 230 | } |
231 | |||
232 | m->pg_init_count = 0; | ||
228 | } | 233 | } |
229 | 234 | ||
230 | static int __choose_path_in_pg(struct multipath *m, struct priority_group *pg) | 235 | static int __choose_path_in_pg(struct multipath *m, struct priority_group *pg) |
@@ -424,6 +429,7 @@ static void process_queued_ios(struct work_struct *work) | |||
424 | must_queue = 0; | 429 | must_queue = 0; |
425 | 430 | ||
426 | if (m->pg_init_required && !m->pg_init_in_progress) { | 431 | if (m->pg_init_required && !m->pg_init_in_progress) { |
432 | m->pg_init_count++; | ||
427 | m->pg_init_required = 0; | 433 | m->pg_init_required = 0; |
428 | m->pg_init_in_progress = 1; | 434 | m->pg_init_in_progress = 1; |
429 | init_required = 1; | 435 | init_required = 1; |
@@ -689,9 +695,11 @@ static int parse_features(struct arg_set *as, struct multipath *m) | |||
689 | int r; | 695 | int r; |
690 | unsigned argc; | 696 | unsigned argc; |
691 | struct dm_target *ti = m->ti; | 697 | struct dm_target *ti = m->ti; |
698 | const char *param_name; | ||
692 | 699 | ||
693 | static struct param _params[] = { | 700 | static struct param _params[] = { |
694 | {0, 1, "invalid number of feature args"}, | 701 | {0, 3, "invalid number of feature args"}, |
702 | {1, 50, "pg_init_retries must be between 1 and 50"}, | ||
695 | }; | 703 | }; |
696 | 704 | ||
697 | r = read_param(_params, shift(as), &argc, &ti->error); | 705 | r = read_param(_params, shift(as), &argc, &ti->error); |
@@ -701,12 +709,28 @@ static int parse_features(struct arg_set *as, struct multipath *m) | |||
701 | if (!argc) | 709 | if (!argc) |
702 | return 0; | 710 | return 0; |
703 | 711 | ||
704 | if (!strnicmp(shift(as), MESG_STR("queue_if_no_path"))) | 712 | do { |
705 | return queue_if_no_path(m, 1, 0); | 713 | param_name = shift(as); |
706 | else { | 714 | argc--; |
715 | |||
716 | if (!strnicmp(param_name, MESG_STR("queue_if_no_path"))) { | ||
717 | r = queue_if_no_path(m, 1, 0); | ||
718 | continue; | ||
719 | } | ||
720 | |||
721 | if (!strnicmp(param_name, MESG_STR("pg_init_retries")) && | ||
722 | (argc >= 1)) { | ||
723 | r = read_param(_params + 1, shift(as), | ||
724 | &m->pg_init_retries, &ti->error); | ||
725 | argc--; | ||
726 | continue; | ||
727 | } | ||
728 | |||
707 | ti->error = "Unrecognised multipath feature request"; | 729 | ti->error = "Unrecognised multipath feature request"; |
708 | return -EINVAL; | 730 | r = -EINVAL; |
709 | } | 731 | } while (argc && !r); |
732 | |||
733 | return r; | ||
710 | } | 734 | } |
711 | 735 | ||
712 | static int multipath_ctr(struct dm_target *ti, unsigned int argc, | 736 | static int multipath_ctr(struct dm_target *ti, unsigned int argc, |
@@ -834,6 +858,9 @@ static int fail_path(struct pgpath *pgpath) | |||
834 | if (pgpath == m->current_pgpath) | 858 | if (pgpath == m->current_pgpath) |
835 | m->current_pgpath = NULL; | 859 | m->current_pgpath = NULL; |
836 | 860 | ||
861 | dm_path_uevent(DM_UEVENT_PATH_FAILED, m->ti, | ||
862 | pgpath->path.dev->name, m->nr_valid_paths); | ||
863 | |||
837 | queue_work(kmultipathd, &m->trigger_event); | 864 | queue_work(kmultipathd, &m->trigger_event); |
838 | 865 | ||
839 | out: | 866 | out: |
@@ -873,6 +900,9 @@ static int reinstate_path(struct pgpath *pgpath) | |||
873 | if (!m->nr_valid_paths++ && m->queue_size) | 900 | if (!m->nr_valid_paths++ && m->queue_size) |
874 | queue_work(kmultipathd, &m->process_queued_ios); | 901 | queue_work(kmultipathd, &m->process_queued_ios); |
875 | 902 | ||
903 | dm_path_uevent(DM_UEVENT_PATH_REINSTATED, m->ti, | ||
904 | pgpath->path.dev->name, m->nr_valid_paths); | ||
905 | |||
876 | queue_work(kmultipathd, &m->trigger_event); | 906 | queue_work(kmultipathd, &m->trigger_event); |
877 | 907 | ||
878 | out: | 908 | out: |
@@ -976,6 +1006,26 @@ static int bypass_pg_num(struct multipath *m, const char *pgstr, int bypassed) | |||
976 | } | 1006 | } |
977 | 1007 | ||
978 | /* | 1008 | /* |
1009 | * Should we retry pg_init immediately? | ||
1010 | */ | ||
1011 | static int pg_init_limit_reached(struct multipath *m, struct pgpath *pgpath) | ||
1012 | { | ||
1013 | unsigned long flags; | ||
1014 | int limit_reached = 0; | ||
1015 | |||
1016 | spin_lock_irqsave(&m->lock, flags); | ||
1017 | |||
1018 | if (m->pg_init_count <= m->pg_init_retries) | ||
1019 | m->pg_init_required = 1; | ||
1020 | else | ||
1021 | limit_reached = 1; | ||
1022 | |||
1023 | spin_unlock_irqrestore(&m->lock, flags); | ||
1024 | |||
1025 | return limit_reached; | ||
1026 | } | ||
1027 | |||
1028 | /* | ||
979 | * pg_init must call this when it has completed its initialisation | 1029 | * pg_init must call this when it has completed its initialisation |
980 | */ | 1030 | */ |
981 | void dm_pg_init_complete(struct dm_path *path, unsigned err_flags) | 1031 | void dm_pg_init_complete(struct dm_path *path, unsigned err_flags) |
@@ -985,8 +1035,14 @@ void dm_pg_init_complete(struct dm_path *path, unsigned err_flags) | |||
985 | struct multipath *m = pg->m; | 1035 | struct multipath *m = pg->m; |
986 | unsigned long flags; | 1036 | unsigned long flags; |
987 | 1037 | ||
988 | /* We insist on failing the path if the PG is already bypassed. */ | 1038 | /* |
989 | if (err_flags && pg->bypassed) | 1039 | * If requested, retry pg_init until maximum number of retries exceeded. |
1040 | * If retry not requested and PG already bypassed, always fail the path. | ||
1041 | */ | ||
1042 | if (err_flags & MP_RETRY) { | ||
1043 | if (pg_init_limit_reached(m, pgpath)) | ||
1044 | err_flags |= MP_FAIL_PATH; | ||
1045 | } else if (err_flags && pg->bypassed) | ||
990 | err_flags |= MP_FAIL_PATH; | 1046 | err_flags |= MP_FAIL_PATH; |
991 | 1047 | ||
992 | if (err_flags & MP_FAIL_PATH) | 1048 | if (err_flags & MP_FAIL_PATH) |
@@ -996,7 +1052,7 @@ void dm_pg_init_complete(struct dm_path *path, unsigned err_flags) | |||
996 | bypass_pg(m, pg, 1); | 1052 | bypass_pg(m, pg, 1); |
997 | 1053 | ||
998 | spin_lock_irqsave(&m->lock, flags); | 1054 | spin_lock_irqsave(&m->lock, flags); |
999 | if (err_flags) { | 1055 | if (err_flags & ~MP_RETRY) { |
1000 | m->current_pgpath = NULL; | 1056 | m->current_pgpath = NULL; |
1001 | m->current_pg = NULL; | 1057 | m->current_pg = NULL; |
1002 | } else if (!m->pg_init_required) | 1058 | } else if (!m->pg_init_required) |
@@ -1148,11 +1204,15 @@ static int multipath_status(struct dm_target *ti, status_type_t type, | |||
1148 | 1204 | ||
1149 | /* Features */ | 1205 | /* Features */ |
1150 | if (type == STATUSTYPE_INFO) | 1206 | if (type == STATUSTYPE_INFO) |
1151 | DMEMIT("1 %u ", m->queue_size); | 1207 | DMEMIT("2 %u %u ", m->queue_size, m->pg_init_count); |
1152 | else if (m->queue_if_no_path) | 1208 | else { |
1153 | DMEMIT("1 queue_if_no_path "); | 1209 | DMEMIT("%u ", m->queue_if_no_path + |
1154 | else | 1210 | (m->pg_init_retries > 0) * 2); |
1155 | DMEMIT("0 "); | 1211 | if (m->queue_if_no_path) |
1212 | DMEMIT("queue_if_no_path "); | ||
1213 | if (m->pg_init_retries) | ||
1214 | DMEMIT("pg_init_retries %u ", m->pg_init_retries); | ||
1215 | } | ||
1156 | 1216 | ||
1157 | if (hwh->type && hwh->type->status) | 1217 | if (hwh->type && hwh->type->status) |
1158 | sz += hwh->type->status(hwh, type, result + sz, maxlen - sz); | 1218 | sz += hwh->type->status(hwh, type, result + sz, maxlen - sz); |
diff --git a/drivers/md/dm-path-selector.c b/drivers/md/dm-path-selector.c index f10a0c89b3f4..ca1bb636a3e4 100644 --- a/drivers/md/dm-path-selector.c +++ b/drivers/md/dm-path-selector.c | |||
@@ -94,12 +94,10 @@ out: | |||
94 | 94 | ||
95 | static struct ps_internal *_alloc_path_selector(struct path_selector_type *pst) | 95 | static struct ps_internal *_alloc_path_selector(struct path_selector_type *pst) |
96 | { | 96 | { |
97 | struct ps_internal *psi = kmalloc(sizeof(*psi), GFP_KERNEL); | 97 | struct ps_internal *psi = kzalloc(sizeof(*psi), GFP_KERNEL); |
98 | 98 | ||
99 | if (psi) { | 99 | if (psi) |
100 | memset(psi, 0, sizeof(*psi)); | ||
101 | psi->pst = *pst; | 100 | psi->pst = *pst; |
102 | } | ||
103 | 101 | ||
104 | return psi; | 102 | return psi; |
105 | } | 103 | } |
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index d09ff15490a5..31123d4a6b9c 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/time.h> | 19 | #include <linux/time.h> |
20 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
21 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
22 | #include <linux/log2.h> | ||
22 | 23 | ||
23 | #define DM_MSG_PREFIX "raid1" | 24 | #define DM_MSG_PREFIX "raid1" |
24 | #define DM_IO_PAGES 64 | 25 | #define DM_IO_PAGES 64 |
@@ -113,6 +114,7 @@ struct region { | |||
113 | * Mirror set structures. | 114 | * Mirror set structures. |
114 | *---------------------------------------------------------------*/ | 115 | *---------------------------------------------------------------*/ |
115 | struct mirror { | 116 | struct mirror { |
117 | struct mirror_set *ms; | ||
116 | atomic_t error_count; | 118 | atomic_t error_count; |
117 | struct dm_dev *dev; | 119 | struct dm_dev *dev; |
118 | sector_t offset; | 120 | sector_t offset; |
@@ -974,6 +976,7 @@ static struct mirror_set *alloc_context(unsigned int nr_mirrors, | |||
974 | 976 | ||
975 | if (rh_init(&ms->rh, ms, dl, region_size, ms->nr_regions)) { | 977 | if (rh_init(&ms->rh, ms, dl, region_size, ms->nr_regions)) { |
976 | ti->error = "Error creating dirty region hash"; | 978 | ti->error = "Error creating dirty region hash"; |
979 | dm_io_client_destroy(ms->io_client); | ||
977 | kfree(ms); | 980 | kfree(ms); |
978 | return NULL; | 981 | return NULL; |
979 | } | 982 | } |
@@ -994,7 +997,7 @@ static void free_context(struct mirror_set *ms, struct dm_target *ti, | |||
994 | 997 | ||
995 | static inline int _check_region_size(struct dm_target *ti, uint32_t size) | 998 | static inline int _check_region_size(struct dm_target *ti, uint32_t size) |
996 | { | 999 | { |
997 | return !(size % (PAGE_SIZE >> 9) || (size & (size - 1)) || | 1000 | return !(size % (PAGE_SIZE >> 9) || !is_power_of_2(size) || |
998 | size > ti->len); | 1001 | size > ti->len); |
999 | } | 1002 | } |
1000 | 1003 | ||
@@ -1015,6 +1018,7 @@ static int get_mirror(struct mirror_set *ms, struct dm_target *ti, | |||
1015 | return -ENXIO; | 1018 | return -ENXIO; |
1016 | } | 1019 | } |
1017 | 1020 | ||
1021 | ms->mirror[mirror].ms = ms; | ||
1018 | ms->mirror[mirror].offset = offset; | 1022 | ms->mirror[mirror].offset = offset; |
1019 | 1023 | ||
1020 | return 0; | 1024 | return 0; |
@@ -1163,16 +1167,14 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
1163 | ms->kmirrord_wq = create_singlethread_workqueue("kmirrord"); | 1167 | ms->kmirrord_wq = create_singlethread_workqueue("kmirrord"); |
1164 | if (!ms->kmirrord_wq) { | 1168 | if (!ms->kmirrord_wq) { |
1165 | DMERR("couldn't start kmirrord"); | 1169 | DMERR("couldn't start kmirrord"); |
1166 | free_context(ms, ti, m); | 1170 | r = -ENOMEM; |
1167 | return -ENOMEM; | 1171 | goto err_free_context; |
1168 | } | 1172 | } |
1169 | INIT_WORK(&ms->kmirrord_work, do_mirror); | 1173 | INIT_WORK(&ms->kmirrord_work, do_mirror); |
1170 | 1174 | ||
1171 | r = parse_features(ms, argc, argv, &args_used); | 1175 | r = parse_features(ms, argc, argv, &args_used); |
1172 | if (r) { | 1176 | if (r) |
1173 | free_context(ms, ti, ms->nr_mirrors); | 1177 | goto err_destroy_wq; |
1174 | return r; | ||
1175 | } | ||
1176 | 1178 | ||
1177 | argv += args_used; | 1179 | argv += args_used; |
1178 | argc -= args_used; | 1180 | argc -= args_used; |
@@ -1188,19 +1190,22 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
1188 | 1190 | ||
1189 | if (argc) { | 1191 | if (argc) { |
1190 | ti->error = "Too many mirror arguments"; | 1192 | ti->error = "Too many mirror arguments"; |
1191 | free_context(ms, ti, ms->nr_mirrors); | 1193 | r = -EINVAL; |
1192 | return -EINVAL; | 1194 | goto err_destroy_wq; |
1193 | } | 1195 | } |
1194 | 1196 | ||
1195 | r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client); | 1197 | r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client); |
1196 | if (r) { | 1198 | if (r) |
1197 | destroy_workqueue(ms->kmirrord_wq); | 1199 | goto err_destroy_wq; |
1198 | free_context(ms, ti, ms->nr_mirrors); | ||
1199 | return r; | ||
1200 | } | ||
1201 | 1200 | ||
1202 | wake(ms); | 1201 | wake(ms); |
1203 | return 0; | 1202 | return 0; |
1203 | |||
1204 | err_destroy_wq: | ||
1205 | destroy_workqueue(ms->kmirrord_wq); | ||
1206 | err_free_context: | ||
1207 | free_context(ms, ti, ms->nr_mirrors); | ||
1208 | return r; | ||
1204 | } | 1209 | } |
1205 | 1210 | ||
1206 | static void mirror_dtr(struct dm_target *ti) | 1211 | static void mirror_dtr(struct dm_target *ti) |
@@ -1302,7 +1307,7 @@ static void mirror_postsuspend(struct dm_target *ti) | |||
1302 | wait_event(_kmirrord_recovery_stopped, | 1307 | wait_event(_kmirrord_recovery_stopped, |
1303 | !atomic_read(&ms->rh.recovery_in_flight)); | 1308 | !atomic_read(&ms->rh.recovery_in_flight)); |
1304 | 1309 | ||
1305 | if (log->type->suspend && log->type->suspend(log)) | 1310 | if (log->type->postsuspend && log->type->postsuspend(log)) |
1306 | /* FIXME: need better error handling */ | 1311 | /* FIXME: need better error handling */ |
1307 | DMWARN("log suspend failed"); | 1312 | DMWARN("log suspend failed"); |
1308 | } | 1313 | } |
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 98a633f3d6b0..cee16fadd9ee 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/vmalloc.h> | 19 | #include <linux/vmalloc.h> |
20 | #include <linux/log2.h> | ||
20 | 21 | ||
21 | #include "dm-snap.h" | 22 | #include "dm-snap.h" |
22 | #include "dm-bio-list.h" | 23 | #include "dm-bio-list.h" |
@@ -415,7 +416,7 @@ static int set_chunk_size(struct dm_snapshot *s, const char *chunk_size_arg, | |||
415 | chunk_size = round_up(chunk_size, PAGE_SIZE >> 9); | 416 | chunk_size = round_up(chunk_size, PAGE_SIZE >> 9); |
416 | 417 | ||
417 | /* Check chunk_size is a power of 2 */ | 418 | /* Check chunk_size is a power of 2 */ |
418 | if (chunk_size & (chunk_size - 1)) { | 419 | if (!is_power_of_2(chunk_size)) { |
419 | *error = "Chunk size is not a power of 2"; | 420 | *error = "Chunk size is not a power of 2"; |
420 | return -EINVAL; | 421 | return -EINVAL; |
421 | } | 422 | } |
diff --git a/drivers/md/dm-stripe.c b/drivers/md/dm-stripe.c index 51f5e0760012..969944a8aba2 100644 --- a/drivers/md/dm-stripe.c +++ b/drivers/md/dm-stripe.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/blkdev.h> | 11 | #include <linux/blkdev.h> |
12 | #include <linux/bio.h> | 12 | #include <linux/bio.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/log2.h> | ||
14 | 15 | ||
15 | #define DM_MSG_PREFIX "striped" | 16 | #define DM_MSG_PREFIX "striped" |
16 | 17 | ||
@@ -99,7 +100,7 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
99 | /* | 100 | /* |
100 | * chunk_size is a power of two | 101 | * chunk_size is a power of two |
101 | */ | 102 | */ |
102 | if (!chunk_size || (chunk_size & (chunk_size - 1)) || | 103 | if (!is_power_of_2(chunk_size) || |
103 | (chunk_size < (PAGE_SIZE >> SECTOR_SHIFT))) { | 104 | (chunk_size < (PAGE_SIZE >> SECTOR_SHIFT))) { |
104 | ti->error = "Invalid chunk size"; | 105 | ti->error = "Invalid chunk size"; |
105 | return -EINVAL; | 106 | return -EINVAL; |
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index fbe477bb2c68..8939e6105088 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -213,12 +213,11 @@ static int alloc_targets(struct dm_table *t, unsigned int num) | |||
213 | int dm_table_create(struct dm_table **result, int mode, | 213 | int dm_table_create(struct dm_table **result, int mode, |
214 | unsigned num_targets, struct mapped_device *md) | 214 | unsigned num_targets, struct mapped_device *md) |
215 | { | 215 | { |
216 | struct dm_table *t = kmalloc(sizeof(*t), GFP_KERNEL); | 216 | struct dm_table *t = kzalloc(sizeof(*t), GFP_KERNEL); |
217 | 217 | ||
218 | if (!t) | 218 | if (!t) |
219 | return -ENOMEM; | 219 | return -ENOMEM; |
220 | 220 | ||
221 | memset(t, 0, sizeof(*t)); | ||
222 | INIT_LIST_HEAD(&t->devices); | 221 | INIT_LIST_HEAD(&t->devices); |
223 | atomic_set(&t->holders, 1); | 222 | atomic_set(&t->holders, 1); |
224 | 223 | ||
diff --git a/drivers/md/dm-target.c b/drivers/md/dm-target.c index 477a041a41cf..835cf95b857f 100644 --- a/drivers/md/dm-target.c +++ b/drivers/md/dm-target.c | |||
@@ -88,12 +88,10 @@ void dm_put_target_type(struct target_type *t) | |||
88 | 88 | ||
89 | static struct tt_internal *alloc_target(struct target_type *t) | 89 | static struct tt_internal *alloc_target(struct target_type *t) |
90 | { | 90 | { |
91 | struct tt_internal *ti = kmalloc(sizeof(*ti), GFP_KERNEL); | 91 | struct tt_internal *ti = kzalloc(sizeof(*ti), GFP_KERNEL); |
92 | 92 | ||
93 | if (ti) { | 93 | if (ti) |
94 | memset(ti, 0, sizeof(*ti)); | ||
95 | ti->tt = *t; | 94 | ti->tt = *t; |
96 | } | ||
97 | 95 | ||
98 | return ti; | 96 | return ti; |
99 | } | 97 | } |
diff --git a/drivers/md/dm-uevent.c b/drivers/md/dm-uevent.c new file mode 100644 index 000000000000..50377e5dc2a3 --- /dev/null +++ b/drivers/md/dm-uevent.c | |||
@@ -0,0 +1,222 @@ | |||
1 | /* | ||
2 | * Device Mapper Uevent Support (dm-uevent) | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but | ||
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | * | ||
18 | * Copyright IBM Corporation, 2007 | ||
19 | * Author: Mike Anderson <andmike@linux.vnet.ibm.com> | ||
20 | */ | ||
21 | #include <linux/list.h> | ||
22 | #include <linux/slab.h> | ||
23 | #include <linux/kobject.h> | ||
24 | #include <linux/dm-ioctl.h> | ||
25 | |||
26 | #include "dm.h" | ||
27 | #include "dm-uevent.h" | ||
28 | |||
29 | #define DM_MSG_PREFIX "uevent" | ||
30 | |||
31 | static const struct { | ||
32 | enum dm_uevent_type type; | ||
33 | enum kobject_action action; | ||
34 | char *name; | ||
35 | } _dm_uevent_type_names[] = { | ||
36 | {DM_UEVENT_PATH_FAILED, KOBJ_CHANGE, "PATH_FAILED"}, | ||
37 | {DM_UEVENT_PATH_REINSTATED, KOBJ_CHANGE, "PATH_REINSTATED"}, | ||
38 | }; | ||
39 | |||
40 | static struct kmem_cache *_dm_event_cache; | ||
41 | |||
42 | struct dm_uevent { | ||
43 | struct mapped_device *md; | ||
44 | enum kobject_action action; | ||
45 | struct kobj_uevent_env ku_env; | ||
46 | struct list_head elist; | ||
47 | char name[DM_NAME_LEN]; | ||
48 | char uuid[DM_UUID_LEN]; | ||
49 | }; | ||
50 | |||
51 | static void dm_uevent_free(struct dm_uevent *event) | ||
52 | { | ||
53 | kmem_cache_free(_dm_event_cache, event); | ||
54 | } | ||
55 | |||
56 | static struct dm_uevent *dm_uevent_alloc(struct mapped_device *md) | ||
57 | { | ||
58 | struct dm_uevent *event; | ||
59 | |||
60 | event = kmem_cache_zalloc(_dm_event_cache, GFP_ATOMIC); | ||
61 | if (!event) | ||
62 | return NULL; | ||
63 | |||
64 | INIT_LIST_HEAD(&event->elist); | ||
65 | event->md = md; | ||
66 | |||
67 | return event; | ||
68 | } | ||
69 | |||
70 | static struct dm_uevent *dm_build_path_uevent(struct mapped_device *md, | ||
71 | struct dm_target *ti, | ||
72 | enum kobject_action action, | ||
73 | const char *dm_action, | ||
74 | const char *path, | ||
75 | unsigned nr_valid_paths) | ||
76 | { | ||
77 | struct dm_uevent *event; | ||
78 | |||
79 | event = dm_uevent_alloc(md); | ||
80 | if (!event) { | ||
81 | DMERR("%s: dm_uevent_alloc() failed", __FUNCTION__); | ||
82 | goto err_nomem; | ||
83 | } | ||
84 | |||
85 | event->action = action; | ||
86 | |||
87 | if (add_uevent_var(&event->ku_env, "DM_TARGET=%s", ti->type->name)) { | ||
88 | DMERR("%s: add_uevent_var() for DM_TARGET failed", | ||
89 | __FUNCTION__); | ||
90 | goto err_add; | ||
91 | } | ||
92 | |||
93 | if (add_uevent_var(&event->ku_env, "DM_ACTION=%s", dm_action)) { | ||
94 | DMERR("%s: add_uevent_var() for DM_ACTION failed", | ||
95 | __FUNCTION__); | ||
96 | goto err_add; | ||
97 | } | ||
98 | |||
99 | if (add_uevent_var(&event->ku_env, "DM_SEQNUM=%u", | ||
100 | dm_next_uevent_seq(md))) { | ||
101 | DMERR("%s: add_uevent_var() for DM_SEQNUM failed", | ||
102 | __FUNCTION__); | ||
103 | goto err_add; | ||
104 | } | ||
105 | |||
106 | if (add_uevent_var(&event->ku_env, "DM_PATH=%s", path)) { | ||
107 | DMERR("%s: add_uevent_var() for DM_PATH failed", __FUNCTION__); | ||
108 | goto err_add; | ||
109 | } | ||
110 | |||
111 | if (add_uevent_var(&event->ku_env, "DM_NR_VALID_PATHS=%d", | ||
112 | nr_valid_paths)) { | ||
113 | DMERR("%s: add_uevent_var() for DM_NR_VALID_PATHS failed", | ||
114 | __FUNCTION__); | ||
115 | goto err_add; | ||
116 | } | ||
117 | |||
118 | return event; | ||
119 | |||
120 | err_add: | ||
121 | dm_uevent_free(event); | ||
122 | err_nomem: | ||
123 | return ERR_PTR(-ENOMEM); | ||
124 | } | ||
125 | |||
126 | /** | ||
127 | * dm_send_uevents - send uevents for given list | ||
128 | * | ||
129 | * @events: list of events to send | ||
130 | * @kobj: kobject generating event | ||
131 | * | ||
132 | */ | ||
133 | void dm_send_uevents(struct list_head *events, struct kobject *kobj) | ||
134 | { | ||
135 | int r; | ||
136 | struct dm_uevent *event, *next; | ||
137 | |||
138 | list_for_each_entry_safe(event, next, events, elist) { | ||
139 | list_del_init(&event->elist); | ||
140 | |||
141 | /* | ||
142 | * Need to call dm_copy_name_and_uuid from here for now. | ||
143 | * Context of previous var adds and locking used for | ||
144 | * hash_cell not compatable. | ||
145 | */ | ||
146 | if (dm_copy_name_and_uuid(event->md, event->name, | ||
147 | event->uuid)) { | ||
148 | DMERR("%s: dm_copy_name_and_uuid() failed", | ||
149 | __FUNCTION__); | ||
150 | goto uevent_free; | ||
151 | } | ||
152 | |||
153 | if (add_uevent_var(&event->ku_env, "DM_NAME=%s", event->name)) { | ||
154 | DMERR("%s: add_uevent_var() for DM_NAME failed", | ||
155 | __FUNCTION__); | ||
156 | goto uevent_free; | ||
157 | } | ||
158 | |||
159 | if (add_uevent_var(&event->ku_env, "DM_UUID=%s", event->uuid)) { | ||
160 | DMERR("%s: add_uevent_var() for DM_UUID failed", | ||
161 | __FUNCTION__); | ||
162 | goto uevent_free; | ||
163 | } | ||
164 | |||
165 | r = kobject_uevent_env(kobj, event->action, event->ku_env.envp); | ||
166 | if (r) | ||
167 | DMERR("%s: kobject_uevent_env failed", __FUNCTION__); | ||
168 | uevent_free: | ||
169 | dm_uevent_free(event); | ||
170 | } | ||
171 | } | ||
172 | EXPORT_SYMBOL_GPL(dm_send_uevents); | ||
173 | |||
174 | /** | ||
175 | * dm_path_uevent - called to create a new path event and queue it | ||
176 | * | ||
177 | * @event_type: path event type enum | ||
178 | * @ti: pointer to a dm_target | ||
179 | * @path: string containing pathname | ||
180 | * @nr_valid_paths: number of valid paths remaining | ||
181 | * | ||
182 | */ | ||
183 | void dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti, | ||
184 | const char *path, unsigned nr_valid_paths) | ||
185 | { | ||
186 | struct mapped_device *md = dm_table_get_md(ti->table); | ||
187 | struct dm_uevent *event; | ||
188 | |||
189 | if (event_type >= ARRAY_SIZE(_dm_uevent_type_names)) { | ||
190 | DMERR("%s: Invalid event_type %d", __FUNCTION__, event_type); | ||
191 | goto out; | ||
192 | } | ||
193 | |||
194 | event = dm_build_path_uevent(md, ti, | ||
195 | _dm_uevent_type_names[event_type].action, | ||
196 | _dm_uevent_type_names[event_type].name, | ||
197 | path, nr_valid_paths); | ||
198 | if (IS_ERR(event)) | ||
199 | goto out; | ||
200 | |||
201 | dm_uevent_add(md, &event->elist); | ||
202 | |||
203 | out: | ||
204 | dm_put(md); | ||
205 | } | ||
206 | EXPORT_SYMBOL_GPL(dm_path_uevent); | ||
207 | |||
208 | int dm_uevent_init(void) | ||
209 | { | ||
210 | _dm_event_cache = KMEM_CACHE(dm_uevent, 0); | ||
211 | if (!_dm_event_cache) | ||
212 | return -ENOMEM; | ||
213 | |||
214 | DMINFO("version 1.0.3"); | ||
215 | |||
216 | return 0; | ||
217 | } | ||
218 | |||
219 | void dm_uevent_exit(void) | ||
220 | { | ||
221 | kmem_cache_destroy(_dm_event_cache); | ||
222 | } | ||
diff --git a/drivers/md/dm-uevent.h b/drivers/md/dm-uevent.h new file mode 100644 index 000000000000..2eccc8bd671a --- /dev/null +++ b/drivers/md/dm-uevent.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * Device Mapper Uevent Support | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but | ||
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | * | ||
18 | * Copyright IBM Corporation, 2007 | ||
19 | * Author: Mike Anderson <andmike@linux.vnet.ibm.com> | ||
20 | */ | ||
21 | #ifndef DM_UEVENT_H | ||
22 | #define DM_UEVENT_H | ||
23 | |||
24 | enum dm_uevent_type { | ||
25 | DM_UEVENT_PATH_FAILED, | ||
26 | DM_UEVENT_PATH_REINSTATED, | ||
27 | }; | ||
28 | |||
29 | #ifdef CONFIG_DM_UEVENT | ||
30 | |||
31 | extern int dm_uevent_init(void); | ||
32 | extern void dm_uevent_exit(void); | ||
33 | extern void dm_send_uevents(struct list_head *events, struct kobject *kobj); | ||
34 | extern void dm_path_uevent(enum dm_uevent_type event_type, | ||
35 | struct dm_target *ti, const char *path, | ||
36 | unsigned nr_valid_paths); | ||
37 | |||
38 | #else | ||
39 | |||
40 | static inline int dm_uevent_init(void) | ||
41 | { | ||
42 | return 0; | ||
43 | } | ||
44 | static inline void dm_uevent_exit(void) | ||
45 | { | ||
46 | } | ||
47 | static inline void dm_send_uevents(struct list_head *events, | ||
48 | struct kobject *kobj) | ||
49 | { | ||
50 | } | ||
51 | static inline void dm_path_uevent(enum dm_uevent_type event_type, | ||
52 | struct dm_target *ti, const char *path, | ||
53 | unsigned nr_valid_paths) | ||
54 | { | ||
55 | } | ||
56 | |||
57 | #endif /* CONFIG_DM_UEVENT */ | ||
58 | |||
59 | #endif /* DM_UEVENT_H */ | ||
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index d837d37f6209..07cbbb8eb3e0 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include "dm.h" | 8 | #include "dm.h" |
9 | #include "dm-bio-list.h" | 9 | #include "dm-bio-list.h" |
10 | #include "dm-uevent.h" | ||
10 | 11 | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
@@ -112,6 +113,9 @@ struct mapped_device { | |||
112 | */ | 113 | */ |
113 | atomic_t event_nr; | 114 | atomic_t event_nr; |
114 | wait_queue_head_t eventq; | 115 | wait_queue_head_t eventq; |
116 | atomic_t uevent_seq; | ||
117 | struct list_head uevent_list; | ||
118 | spinlock_t uevent_lock; /* Protect access to uevent_list */ | ||
115 | 119 | ||
116 | /* | 120 | /* |
117 | * freeze/thaw support require holding onto a super block | 121 | * freeze/thaw support require holding onto a super block |
@@ -143,11 +147,19 @@ static int __init local_init(void) | |||
143 | return -ENOMEM; | 147 | return -ENOMEM; |
144 | } | 148 | } |
145 | 149 | ||
150 | r = dm_uevent_init(); | ||
151 | if (r) { | ||
152 | kmem_cache_destroy(_tio_cache); | ||
153 | kmem_cache_destroy(_io_cache); | ||
154 | return r; | ||
155 | } | ||
156 | |||
146 | _major = major; | 157 | _major = major; |
147 | r = register_blkdev(_major, _name); | 158 | r = register_blkdev(_major, _name); |
148 | if (r < 0) { | 159 | if (r < 0) { |
149 | kmem_cache_destroy(_tio_cache); | 160 | kmem_cache_destroy(_tio_cache); |
150 | kmem_cache_destroy(_io_cache); | 161 | kmem_cache_destroy(_io_cache); |
162 | dm_uevent_exit(); | ||
151 | return r; | 163 | return r; |
152 | } | 164 | } |
153 | 165 | ||
@@ -162,6 +174,7 @@ static void local_exit(void) | |||
162 | kmem_cache_destroy(_tio_cache); | 174 | kmem_cache_destroy(_tio_cache); |
163 | kmem_cache_destroy(_io_cache); | 175 | kmem_cache_destroy(_io_cache); |
164 | unregister_blkdev(_major, _name); | 176 | unregister_blkdev(_major, _name); |
177 | dm_uevent_exit(); | ||
165 | 178 | ||
166 | _major = 0; | 179 | _major = 0; |
167 | 180 | ||
@@ -751,15 +764,13 @@ static void __clone_and_map(struct clone_info *ci) | |||
751 | /* | 764 | /* |
752 | * Split the bio into several clones. | 765 | * Split the bio into several clones. |
753 | */ | 766 | */ |
754 | static void __split_bio(struct mapped_device *md, struct bio *bio) | 767 | static int __split_bio(struct mapped_device *md, struct bio *bio) |
755 | { | 768 | { |
756 | struct clone_info ci; | 769 | struct clone_info ci; |
757 | 770 | ||
758 | ci.map = dm_get_table(md); | 771 | ci.map = dm_get_table(md); |
759 | if (!ci.map) { | 772 | if (unlikely(!ci.map)) |
760 | bio_io_error(bio); | 773 | return -EIO; |
761 | return; | ||
762 | } | ||
763 | 774 | ||
764 | ci.md = md; | 775 | ci.md = md; |
765 | ci.bio = bio; | 776 | ci.bio = bio; |
@@ -779,6 +790,8 @@ static void __split_bio(struct mapped_device *md, struct bio *bio) | |||
779 | /* drop the extra reference count */ | 790 | /* drop the extra reference count */ |
780 | dec_pending(ci.io, 0); | 791 | dec_pending(ci.io, 0); |
781 | dm_table_put(ci.map); | 792 | dm_table_put(ci.map); |
793 | |||
794 | return 0; | ||
782 | } | 795 | } |
783 | /*----------------------------------------------------------------- | 796 | /*----------------------------------------------------------------- |
784 | * CRUD END | 797 | * CRUD END |
@@ -790,7 +803,7 @@ static void __split_bio(struct mapped_device *md, struct bio *bio) | |||
790 | */ | 803 | */ |
791 | static int dm_request(struct request_queue *q, struct bio *bio) | 804 | static int dm_request(struct request_queue *q, struct bio *bio) |
792 | { | 805 | { |
793 | int r; | 806 | int r = -EIO; |
794 | int rw = bio_data_dir(bio); | 807 | int rw = bio_data_dir(bio); |
795 | struct mapped_device *md = q->queuedata; | 808 | struct mapped_device *md = q->queuedata; |
796 | 809 | ||
@@ -815,18 +828,11 @@ static int dm_request(struct request_queue *q, struct bio *bio) | |||
815 | while (test_bit(DMF_BLOCK_IO, &md->flags)) { | 828 | while (test_bit(DMF_BLOCK_IO, &md->flags)) { |
816 | up_read(&md->io_lock); | 829 | up_read(&md->io_lock); |
817 | 830 | ||
818 | if (bio_rw(bio) == READA) { | 831 | if (bio_rw(bio) != READA) |
819 | bio_io_error(bio); | 832 | r = queue_io(md, bio); |
820 | return 0; | ||
821 | } | ||
822 | |||
823 | r = queue_io(md, bio); | ||
824 | if (r < 0) { | ||
825 | bio_io_error(bio); | ||
826 | return 0; | ||
827 | 833 | ||
828 | } else if (r == 0) | 834 | if (r <= 0) |
829 | return 0; /* deferred successfully */ | 835 | goto out_req; |
830 | 836 | ||
831 | /* | 837 | /* |
832 | * We're in a while loop, because someone could suspend | 838 | * We're in a while loop, because someone could suspend |
@@ -835,8 +841,13 @@ static int dm_request(struct request_queue *q, struct bio *bio) | |||
835 | down_read(&md->io_lock); | 841 | down_read(&md->io_lock); |
836 | } | 842 | } |
837 | 843 | ||
838 | __split_bio(md, bio); | 844 | r = __split_bio(md, bio); |
839 | up_read(&md->io_lock); | 845 | up_read(&md->io_lock); |
846 | |||
847 | out_req: | ||
848 | if (r < 0) | ||
849 | bio_io_error(bio); | ||
850 | |||
840 | return 0; | 851 | return 0; |
841 | } | 852 | } |
842 | 853 | ||
@@ -977,6 +988,9 @@ static struct mapped_device *alloc_dev(int minor) | |||
977 | atomic_set(&md->holders, 1); | 988 | atomic_set(&md->holders, 1); |
978 | atomic_set(&md->open_count, 0); | 989 | atomic_set(&md->open_count, 0); |
979 | atomic_set(&md->event_nr, 0); | 990 | atomic_set(&md->event_nr, 0); |
991 | atomic_set(&md->uevent_seq, 0); | ||
992 | INIT_LIST_HEAD(&md->uevent_list); | ||
993 | spin_lock_init(&md->uevent_lock); | ||
980 | 994 | ||
981 | md->queue = blk_alloc_queue(GFP_KERNEL); | 995 | md->queue = blk_alloc_queue(GFP_KERNEL); |
982 | if (!md->queue) | 996 | if (!md->queue) |
@@ -1044,12 +1058,14 @@ static struct mapped_device *alloc_dev(int minor) | |||
1044 | return NULL; | 1058 | return NULL; |
1045 | } | 1059 | } |
1046 | 1060 | ||
1061 | static void unlock_fs(struct mapped_device *md); | ||
1062 | |||
1047 | static void free_dev(struct mapped_device *md) | 1063 | static void free_dev(struct mapped_device *md) |
1048 | { | 1064 | { |
1049 | int minor = md->disk->first_minor; | 1065 | int minor = md->disk->first_minor; |
1050 | 1066 | ||
1051 | if (md->suspended_bdev) { | 1067 | if (md->suspended_bdev) { |
1052 | thaw_bdev(md->suspended_bdev, NULL); | 1068 | unlock_fs(md); |
1053 | bdput(md->suspended_bdev); | 1069 | bdput(md->suspended_bdev); |
1054 | } | 1070 | } |
1055 | mempool_destroy(md->tio_pool); | 1071 | mempool_destroy(md->tio_pool); |
@@ -1073,8 +1089,16 @@ static void free_dev(struct mapped_device *md) | |||
1073 | */ | 1089 | */ |
1074 | static void event_callback(void *context) | 1090 | static void event_callback(void *context) |
1075 | { | 1091 | { |
1092 | unsigned long flags; | ||
1093 | LIST_HEAD(uevents); | ||
1076 | struct mapped_device *md = (struct mapped_device *) context; | 1094 | struct mapped_device *md = (struct mapped_device *) context; |
1077 | 1095 | ||
1096 | spin_lock_irqsave(&md->uevent_lock, flags); | ||
1097 | list_splice_init(&md->uevent_list, &uevents); | ||
1098 | spin_unlock_irqrestore(&md->uevent_lock, flags); | ||
1099 | |||
1100 | dm_send_uevents(&uevents, &md->disk->kobj); | ||
1101 | |||
1078 | atomic_inc(&md->event_nr); | 1102 | atomic_inc(&md->event_nr); |
1079 | wake_up(&md->eventq); | 1103 | wake_up(&md->eventq); |
1080 | } | 1104 | } |
@@ -1233,7 +1257,8 @@ static void __flush_deferred_io(struct mapped_device *md, struct bio *c) | |||
1233 | while (c) { | 1257 | while (c) { |
1234 | n = c->bi_next; | 1258 | n = c->bi_next; |
1235 | c->bi_next = NULL; | 1259 | c->bi_next = NULL; |
1236 | __split_bio(md, c); | 1260 | if (__split_bio(md, c)) |
1261 | bio_io_error(c); | ||
1237 | c = n; | 1262 | c = n; |
1238 | } | 1263 | } |
1239 | } | 1264 | } |
@@ -1491,6 +1516,11 @@ out: | |||
1491 | /*----------------------------------------------------------------- | 1516 | /*----------------------------------------------------------------- |
1492 | * Event notification. | 1517 | * Event notification. |
1493 | *---------------------------------------------------------------*/ | 1518 | *---------------------------------------------------------------*/ |
1519 | uint32_t dm_next_uevent_seq(struct mapped_device *md) | ||
1520 | { | ||
1521 | return atomic_add_return(1, &md->uevent_seq); | ||
1522 | } | ||
1523 | |||
1494 | uint32_t dm_get_event_nr(struct mapped_device *md) | 1524 | uint32_t dm_get_event_nr(struct mapped_device *md) |
1495 | { | 1525 | { |
1496 | return atomic_read(&md->event_nr); | 1526 | return atomic_read(&md->event_nr); |
@@ -1502,6 +1532,15 @@ int dm_wait_event(struct mapped_device *md, int event_nr) | |||
1502 | (event_nr != atomic_read(&md->event_nr))); | 1532 | (event_nr != atomic_read(&md->event_nr))); |
1503 | } | 1533 | } |
1504 | 1534 | ||
1535 | void dm_uevent_add(struct mapped_device *md, struct list_head *elist) | ||
1536 | { | ||
1537 | unsigned long flags; | ||
1538 | |||
1539 | spin_lock_irqsave(&md->uevent_lock, flags); | ||
1540 | list_add(elist, &md->uevent_list); | ||
1541 | spin_unlock_irqrestore(&md->uevent_lock, flags); | ||
1542 | } | ||
1543 | |||
1505 | /* | 1544 | /* |
1506 | * The gendisk is only valid as long as you have a reference | 1545 | * The gendisk is only valid as long as you have a reference |
1507 | * count on 'md'. | 1546 | * count on 'md'. |
diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c index 7e052378c47e..f3831f31223e 100644 --- a/drivers/md/kcopyd.c +++ b/drivers/md/kcopyd.c | |||
@@ -198,7 +198,7 @@ struct kcopyd_job { | |||
198 | * These fields are only used if the job has been split | 198 | * These fields are only used if the job has been split |
199 | * into more manageable parts. | 199 | * into more manageable parts. |
200 | */ | 200 | */ |
201 | struct semaphore lock; | 201 | struct mutex lock; |
202 | atomic_t sub_jobs; | 202 | atomic_t sub_jobs; |
203 | sector_t progress; | 203 | sector_t progress; |
204 | }; | 204 | }; |
@@ -456,7 +456,7 @@ static void segment_complete(int read_err, | |||
456 | sector_t count = 0; | 456 | sector_t count = 0; |
457 | struct kcopyd_job *job = (struct kcopyd_job *) context; | 457 | struct kcopyd_job *job = (struct kcopyd_job *) context; |
458 | 458 | ||
459 | down(&job->lock); | 459 | mutex_lock(&job->lock); |
460 | 460 | ||
461 | /* update the error */ | 461 | /* update the error */ |
462 | if (read_err) | 462 | if (read_err) |
@@ -480,7 +480,7 @@ static void segment_complete(int read_err, | |||
480 | job->progress += count; | 480 | job->progress += count; |
481 | } | 481 | } |
482 | } | 482 | } |
483 | up(&job->lock); | 483 | mutex_unlock(&job->lock); |
484 | 484 | ||
485 | if (count) { | 485 | if (count) { |
486 | int i; | 486 | int i; |
@@ -562,7 +562,7 @@ int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from, | |||
562 | dispatch_job(job); | 562 | dispatch_job(job); |
563 | 563 | ||
564 | else { | 564 | else { |
565 | init_MUTEX(&job->lock); | 565 | mutex_init(&job->lock); |
566 | job->progress = 0; | 566 | job->progress = 0; |
567 | split_job(job); | 567 | split_job(job); |
568 | } | 568 | } |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 16775a0df7f6..85478d6a9c1a 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Better read-balancing code written by Mika Kuoppala <miku@iki.fi>, 2000 | 10 | * Better read-balancing code written by Mika Kuoppala <miku@iki.fi>, 2000 |
11 | * | 11 | * |
12 | * Fixes to reconstruction by Jakob Østergaard" <jakob@ostenfeld.dk> | 12 | * Fixes to reconstruction by Jakob Østergaard" <jakob@ostenfeld.dk> |
13 | * Various fixes by Neil Brown <neilb@cse.unsw.edu.au> | 13 | * Various fixes by Neil Brown <neilb@cse.unsw.edu.au> |
14 | * | 14 | * |
15 | * Changes by Peter T. Breuer <ptb@it.uc3m.es> 31/1/2003 to support | 15 | * Changes by Peter T. Breuer <ptb@it.uc3m.es> 31/1/2003 to support |
diff --git a/drivers/media/common/saa7146_hlp.c b/drivers/media/common/saa7146_hlp.c index d2905720eb74..9c905399a233 100644 --- a/drivers/media/common/saa7146_hlp.c +++ b/drivers/media/common/saa7146_hlp.c | |||
@@ -312,7 +312,7 @@ static int sort_and_eliminate(u32* values, int* count) | |||
312 | return -EINVAL; | 312 | return -EINVAL; |
313 | } | 313 | } |
314 | 314 | ||
315 | /* bubble sort the first ´count´ items of the array ´values´ */ | 315 | /* bubble sort the first @count items of the array @values */ |
316 | for( top = *count; top > 0; top--) { | 316 | for( top = *count; top > 0; top--) { |
317 | for( low = 0, high = 1; high < top; low++, high++) { | 317 | for( low = 0, high = 1; high < top; low++, high++) { |
318 | if( values[low] > values[high] ) { | 318 | if( values[low] > values[high] ) { |
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c index eca602d9b3de..85e36a1d6d78 100644 --- a/drivers/media/dvb/bt8xx/bt878.c +++ b/drivers/media/dvb/bt8xx/bt878.c | |||
@@ -280,7 +280,7 @@ static irqreturn_t bt878_irq(int irq, void *dev_id) | |||
280 | if (!(astat = (stat & mask))) | 280 | if (!(astat = (stat & mask))) |
281 | return IRQ_NONE; /* this interrupt is not for me */ | 281 | return IRQ_NONE; /* this interrupt is not for me */ |
282 | /* dprintk("bt878(%d) debug: irq count %d, stat 0x%8.8x, mask 0x%8.8x\n",bt->nr,count,stat,mask); */ | 282 | /* dprintk("bt878(%d) debug: irq count %d, stat 0x%8.8x, mask 0x%8.8x\n",bt->nr,count,stat,mask); */ |
283 | btwrite(astat, BT878_AINT_STAT); /* try to clear interupt condition */ | 283 | btwrite(astat, BT878_AINT_STAT); /* try to clear interrupt condition */ |
284 | 284 | ||
285 | 285 | ||
286 | if (astat & (BT878_ASCERR | BT878_AOCERR)) { | 286 | if (astat & (BT878_ASCERR | BT878_AOCERR)) { |
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index 154a7ce7cb82..a05e5c182288 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * TerraTec Cinergy T²/qanu USB2 DVB-T adapter. | 2 | * TerraTec Cinergy T²/qanu USB2 DVB-T adapter. |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Daniel Mack <daniel@qanu.de> and | 4 | * Copyright (C) 2004 Daniel Mack <daniel@qanu.de> and |
5 | * Holger Waechtler <holger@qanu.de> | 5 | * Holger Waechtler <holger@qanu.de> |
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index 288e79f2cb0f..7902ae1d9a18 100644 --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | |||
@@ -128,7 +128,7 @@ struct ttusb { | |||
128 | struct dvb_frontend* fe; | 128 | struct dvb_frontend* fe; |
129 | }; | 129 | }; |
130 | 130 | ||
131 | /* ugly workaround ... don't know why it's neccessary to read */ | 131 | /* ugly workaround ... don't know why it's necessary to read */ |
132 | /* all result codes. */ | 132 | /* all result codes. */ |
133 | 133 | ||
134 | #define DEBUG 0 | 134 | #define DEBUG 0 |
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c index dd6a7d68b07f..3abd9fa54d2c 100644 --- a/drivers/media/video/bt8xx/bttv-cards.c +++ b/drivers/media/video/bt8xx/bttv-cards.c | |||
@@ -1259,7 +1259,7 @@ struct tvcard bttv_tvcards[] = { | |||
1259 | .has_radio = 1, | 1259 | .has_radio = 1, |
1260 | }, | 1260 | }, |
1261 | [BTTV_BOARD_LIFETEC_9415] = { | 1261 | [BTTV_BOARD_LIFETEC_9415] = { |
1262 | /* Tim Röstermundt <rosterm@uni-muenster.de> | 1262 | /* Tim Röstermundt <rosterm@uni-muenster.de> |
1263 | in de.comp.os.unix.linux.hardware: | 1263 | in de.comp.os.unix.linux.hardware: |
1264 | options bttv card=0 pll=1 radio=1 gpiomask=0x18e0 | 1264 | options bttv card=0 pll=1 radio=1 gpiomask=0x18e0 |
1265 | gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff | 1265 | gpiomux =0x44c71f,0x44d71f,0,0x44d71f,0x44dfff |
@@ -2824,7 +2824,7 @@ struct tvcard bttv_tvcards[] = { | |||
2824 | }, | 2824 | }, |
2825 | /* ---- card 0x8b ---------------------------------- */ | 2825 | /* ---- card 0x8b ---------------------------------- */ |
2826 | [BTTV_BOARD_PV_M4900] = { | 2826 | [BTTV_BOARD_PV_M4900] = { |
2827 | /* Sérgio Fortier <sergiofortier@yahoo.com.br> */ | 2827 | /* Sérgio Fortier <sergiofortier@yahoo.com.br> */ |
2828 | .name = "Prolink PixelView PlayTV MPEG2 PV-M4900", | 2828 | .name = "Prolink PixelView PlayTV MPEG2 PV-M4900", |
2829 | .video_inputs = 3, | 2829 | .video_inputs = 3, |
2830 | .audio_inputs = 1, | 2830 | .audio_inputs = 1, |
@@ -4709,18 +4709,18 @@ adtvk503_audio(struct bttv *btv, struct video_audio *v, int set) | |||
4709 | * | 4709 | * |
4710 | * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin. | 4710 | * The board hardwire Y0 (xpoint) to MUX1 and MUXOUT to Yin. |
4711 | * GPIO pins are wired as: | 4711 | * GPIO pins are wired as: |
4712 | * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroler) | 4712 | * GPIO[0:3] - AX[0:3] (xpoint) - P1[0:3] (microcontroller) |
4713 | * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroler) | 4713 | * GPIO[4:6] - AY[0:2] (xpoint) - P1[4:6] (microcontroller) |
4714 | * GPIO[7] - DATA (xpoint) - P1[7] (microcontroler) | 4714 | * GPIO[7] - DATA (xpoint) - P1[7] (microcontroller) |
4715 | * GPIO[8] - - P3[5] (microcontroler) | 4715 | * GPIO[8] - - P3[5] (microcontroller) |
4716 | * GPIO[9] - RESET (xpoint) - P3[6] (microcontroler) | 4716 | * GPIO[9] - RESET (xpoint) - P3[6] (microcontroller) |
4717 | * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroler) | 4717 | * GPIO[10] - STROBE (xpoint) - P3[7] (microcontroller) |
4718 | * GPINTR - - P3[4] (microcontroler) | 4718 | * GPINTR - - P3[4] (microcontroller) |
4719 | * | 4719 | * |
4720 | * The microcontroler is a 80C32 like. It should be possible to change xpoint | 4720 | * The microcontroller is a 80C32 like. It should be possible to change xpoint |
4721 | * configuration either directly (as we are doing) or using the microcontroler | 4721 | * configuration either directly (as we are doing) or using the microcontroller |
4722 | * which is also wired to I2C interface. I have no further info on the | 4722 | * which is also wired to I2C interface. I have no further info on the |
4723 | * microcontroler features, one would need to disassembly the firmware. | 4723 | * microcontroller features, one would need to disassembly the firmware. |
4724 | * note: the vendor refused to give any information on this product, all | 4724 | * note: the vendor refused to give any information on this product, all |
4725 | * that stuff was found using a multimeter! :) | 4725 | * that stuff was found using a multimeter! :) |
4726 | */ | 4726 | */ |
@@ -4788,7 +4788,7 @@ static void tibetCS16_init(struct bttv *btv) | |||
4788 | * The analog switch is controlled by the "master", but the detection order | 4788 | * The analog switch is controlled by the "master", but the detection order |
4789 | * of the four BT878A chips is in an order which I just don't understand. | 4789 | * of the four BT878A chips is in an order which I just don't understand. |
4790 | * The "master" is actually the second controller to be detected. The | 4790 | * The "master" is actually the second controller to be detected. The |
4791 | * logic on the board uses logical numbers for the 4 controlers, but | 4791 | * logic on the board uses logical numbers for the 4 controllers, but |
4792 | * those numbers are different from the detection sequence. When working | 4792 | * those numbers are different from the detection sequence. When working |
4793 | * with the analog switch, we need to "map" from the detection sequence | 4793 | * with the analog switch, we need to "map" from the detection sequence |
4794 | * over to the board's logical controller number. This mapping sequence | 4794 | * over to the board's logical controller number. This mapping sequence |
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index b8d5327c438d..e467682aabd7 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -907,7 +907,7 @@ static int em28xx_set_fmt(struct em28xx *dev, unsigned int cmd, struct v4l2_form | |||
907 | 907 | ||
908 | /* stop io in case it is already in progress */ | 908 | /* stop io in case it is already in progress */ |
909 | if (dev->stream == STREAM_ON) { | 909 | if (dev->stream == STREAM_ON) { |
910 | em28xx_videodbg("VIDIOC_SET_FMT: interupting stream\n"); | 910 | em28xx_videodbg("VIDIOC_SET_FMT: interrupting stream\n"); |
911 | if ((ret = em28xx_stream_interrupt(dev))) | 911 | if ((ret = em28xx_stream_interrupt(dev))) |
912 | return ret; | 912 | return ret; |
913 | } | 913 | } |
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index 7533fc203319..69283926a8dc 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net> | 4 | * Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net> |
5 | * | 5 | * |
6 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> | 6 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> |
7 | * | 7 | * |
8 | * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> | 8 | * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> |
9 | * | 9 | * |
diff --git a/drivers/media/video/meye.h b/drivers/media/video/meye.h index 323d0074120d..d535748df445 100644 --- a/drivers/media/video/meye.h +++ b/drivers/media/video/meye.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net> | 4 | * Copyright (C) 2001-2004 Stelian Pop <stelian@popies.net> |
5 | * | 5 | * |
6 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> | 6 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> |
7 | * | 7 | * |
8 | * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> | 8 | * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> |
9 | * | 9 | * |
diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index e20aa3612a7c..ad0232935df6 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c | |||
@@ -196,10 +196,10 @@ static int i2c_senddata(struct saa5246a_device *t, ...) | |||
196 | return i2c_sendbuf(t, buf[0], ct-1, buf+1); | 196 | return i2c_sendbuf(t, buf[0], ct-1, buf+1); |
197 | } | 197 | } |
198 | 198 | ||
199 | /* Get count number of bytes from I²C-device at address adr, store them in buf. | 199 | /* Get count number of bytes from I²C-device at address adr, store them in buf. |
200 | * Start & stop handshaking is done by this routine, ack will be sent after the | 200 | * Start & stop handshaking is done by this routine, ack will be sent after the |
201 | * last byte to inhibit further sending of data. If uaccess is 'true', data is | 201 | * last byte to inhibit further sending of data. If uaccess is 'true', data is |
202 | * written to user-space with put_user. Returns -1 if I²C-device didn't send | 202 | * written to user-space with put_user. Returns -1 if I²C-device didn't send |
203 | * acknowledge, 0 otherwise | 203 | * acknowledge, 0 otherwise |
204 | */ | 204 | */ |
205 | static int i2c_getdata(struct saa5246a_device *t, int count, u8 *buf) | 205 | static int i2c_getdata(struct saa5246a_device *t, int count, u8 *buf) |
diff --git a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c index 17f1e2e9a66b..94bb59a32b17 100644 --- a/drivers/media/video/saa5249.c +++ b/drivers/media/video/saa5249.c | |||
@@ -291,10 +291,10 @@ static int i2c_senddata(struct saa5249_device *t, ...) | |||
291 | return i2c_sendbuf(t, buf[0], ct-1, buf+1); | 291 | return i2c_sendbuf(t, buf[0], ct-1, buf+1); |
292 | } | 292 | } |
293 | 293 | ||
294 | /* Get count number of bytes from I²C-device at address adr, store them in buf. Start & stop | 294 | /* Get count number of bytes from I²C-device at address adr, store them in buf. Start & stop |
295 | * handshaking is done by this routine, ack will be sent after the last byte to inhibit further | 295 | * handshaking is done by this routine, ack will be sent after the last byte to inhibit further |
296 | * sending of data. If uaccess is 'true', data is written to user-space with put_user. | 296 | * sending of data. If uaccess is 'true', data is written to user-space with put_user. |
297 | * Returns -1 if I²C-device didn't send acknowledge, 0 otherwise | 297 | * Returns -1 if I²C-device didn't send acknowledge, 0 otherwise |
298 | */ | 298 | */ |
299 | 299 | ||
300 | static int i2c_getdata(struct saa5249_device *t, int count, u8 *buf) | 300 | static int i2c_getdata(struct saa5249_device *t, int count, u8 *buf) |
diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c index ff555129c82f..db3c9e3deb26 100644 --- a/drivers/media/video/usbvideo/vicam.c +++ b/drivers/media/video/usbvideo/vicam.c | |||
@@ -955,7 +955,7 @@ read_frame(struct vicam_camera *cam, int framenum) | |||
955 | request[7] = realShutter >> 8; | 955 | request[7] = realShutter >> 8; |
956 | } | 956 | } |
957 | 957 | ||
958 | // Per John Markus Bjørndalen, byte at index 8 causes problems if it isn't 0 | 958 | // Per John Markus Bjørndalen, byte at index 8 causes problems if it isn't 0 |
959 | request[8] = 0; | 959 | request[8] = 0; |
960 | // bytes 9-15 do not seem to affect exposure or image quality | 960 | // bytes 9-15 do not seem to affect exposure or image quality |
961 | 961 | ||
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index c3440b280d20..321249240d05 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -37,7 +37,7 @@ | |||
37 | * Video4linux 1/2 integration by Justin Schoeman | 37 | * Video4linux 1/2 integration by Justin Schoeman |
38 | * <justin@suntiger.ee.up.ac.za> | 38 | * <justin@suntiger.ee.up.ac.za> |
39 | * 2.4 PROCFS support ported from 2.4 kernels by | 39 | * 2.4 PROCFS support ported from 2.4 kernels by |
40 | * Iñaki García Etxebarria <garetxe@euskalnet.net> | 40 | * Iñaki GarcÃa Etxebarria <garetxe@euskalnet.net> |
41 | * Makefile fix by "W. Michael Petullo" <mike@flyn.org> | 41 | * Makefile fix by "W. Michael Petullo" <mike@flyn.org> |
42 | * 2.4 devfs support ported from 2.4 kernels by | 42 | * 2.4 devfs support ported from 2.4 kernels by |
43 | * Dan Merillat <dan@merillat.org> | 43 | * Dan Merillat <dan@merillat.org> |
diff --git a/drivers/message/i2o/README b/drivers/message/i2o/README index a81f851f7b5d..911fc3021e3b 100644 --- a/drivers/message/i2o/README +++ b/drivers/message/i2o/README | |||
@@ -30,13 +30,13 @@ Juha Sievanen, University of Helsinki Finland | |||
30 | Bug fixes | 30 | Bug fixes |
31 | Core code extensions | 31 | Core code extensions |
32 | 32 | ||
33 | Auvo Häkkinen, University of Helsinki Finland | 33 | Auvo Häkkinen, University of Helsinki Finland |
34 | LAN OSM code | 34 | LAN OSM code |
35 | /Proc interface to LAN class | 35 | /Proc interface to LAN class |
36 | Bug fixes | 36 | Bug fixes |
37 | Core code extensions | 37 | Core code extensions |
38 | 38 | ||
39 | Taneli Vähäkangas, University of Helsinki Finland | 39 | Taneli Vähäkangas, University of Helsinki Finland |
40 | Fixes to i2o_config | 40 | Fixes to i2o_config |
41 | 41 | ||
42 | CREDITS | 42 | CREDITS |
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index ce8f1a34ed21..6cbcc21de518 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c | |||
@@ -15,8 +15,8 @@ | |||
15 | * | 15 | * |
16 | * Fixes/additions: | 16 | * Fixes/additions: |
17 | * Philipp Rumpf | 17 | * Philipp Rumpf |
18 | * Juha Sievänen <Juha.Sievanen@cs.Helsinki.FI> | 18 | * Juha Sievänen <Juha.Sievanen@cs.Helsinki.FI> |
19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> | 19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> |
20 | * Deepak Saxena <deepak@plexity.net> | 20 | * Deepak Saxena <deepak@plexity.net> |
21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> | 21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> |
22 | * Alan Cox <alan@redhat.com>: | 22 | * Alan Cox <alan@redhat.com>: |
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index 84e046e94f5f..c0fb77dc19bb 100644 --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c | |||
@@ -10,12 +10,12 @@ | |||
10 | * Added basic ioctl() support | 10 | * Added basic ioctl() support |
11 | * Deepak Saxena (06/07/1999): | 11 | * Deepak Saxena (06/07/1999): |
12 | * Added software download ioctl (still testing) | 12 | * Added software download ioctl (still testing) |
13 | * Auvo Häkkinen (09/10/1999): | 13 | * Auvo Häkkinen (09/10/1999): |
14 | * Changes to i2o_cfg_reply(), ioctl_parms() | 14 | * Changes to i2o_cfg_reply(), ioctl_parms() |
15 | * Added ioct_validate() | 15 | * Added ioct_validate() |
16 | * Taneli Vähäkangas (09/30/1999): | 16 | * Taneli Vähäkangas (09/30/1999): |
17 | * Fixed ioctl_swdl() | 17 | * Fixed ioctl_swdl() |
18 | * Taneli Vähäkangas (10/04/1999): | 18 | * Taneli Vähäkangas (10/04/1999): |
19 | * Changed ioctl_swdl(), implemented ioctl_swul() and ioctl_swdel() | 19 | * Changed ioctl_swdl(), implemented ioctl_swul() and ioctl_swdel() |
20 | * Deepak Saxena (11/18/1999): | 20 | * Deepak Saxena (11/18/1999): |
21 | * Added event managmenet support | 21 | * Added event managmenet support |
diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c index 06892ac2286e..6fdd072201f9 100644 --- a/drivers/message/i2o/i2o_proc.c +++ b/drivers/message/i2o/i2o_proc.c | |||
@@ -19,8 +19,8 @@ | |||
19 | * | 19 | * |
20 | * | 20 | * |
21 | * Fixes/additions: | 21 | * Fixes/additions: |
22 | * Juha Sievänen (Juha.Sievanen@cs.Helsinki.FI), | 22 | * Juha Sievänen (Juha.Sievanen@cs.Helsinki.FI), |
23 | * Auvo Häkkinen (Auvo.Hakkinen@cs.Helsinki.FI) | 23 | * Auvo Häkkinen (Auvo.Hakkinen@cs.Helsinki.FI) |
24 | * University of Helsinki, Department of Computer Science | 24 | * University of Helsinki, Department of Computer Science |
25 | * LAN entries | 25 | * LAN entries |
26 | * Markus Lidel <Markus.Lidel@shadowconnect.com> | 26 | * Markus Lidel <Markus.Lidel@shadowconnect.com> |
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c index a1ec16a075c6..7814a06ae970 100644 --- a/drivers/message/i2o/iop.c +++ b/drivers/message/i2o/iop.c | |||
@@ -15,8 +15,8 @@ | |||
15 | * | 15 | * |
16 | * Fixes/additions: | 16 | * Fixes/additions: |
17 | * Philipp Rumpf | 17 | * Philipp Rumpf |
18 | * Juha Sievänen <Juha.Sievanen@cs.Helsinki.FI> | 18 | * Juha Sievänen <Juha.Sievanen@cs.Helsinki.FI> |
19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> | 19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> |
20 | * Deepak Saxena <deepak@plexity.net> | 20 | * Deepak Saxena <deepak@plexity.net> |
21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> | 21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> |
22 | * Alan Cox <alan@redhat.com>: | 22 | * Alan Cox <alan@redhat.com>: |
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c index 3661e6e065d2..685a89547a51 100644 --- a/drivers/message/i2o/pci.c +++ b/drivers/message/i2o/pci.c | |||
@@ -15,8 +15,8 @@ | |||
15 | * | 15 | * |
16 | * Fixes/additions: | 16 | * Fixes/additions: |
17 | * Philipp Rumpf | 17 | * Philipp Rumpf |
18 | * Juha Sievänen <Juha.Sievanen@cs.Helsinki.FI> | 18 | * Juha Sievänen <Juha.Sievanen@cs.Helsinki.FI> |
19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> | 19 | * Auvo Häkkinen <Auvo.Hakkinen@cs.Helsinki.FI> |
20 | * Deepak Saxena <deepak@plexity.net> | 20 | * Deepak Saxena <deepak@plexity.net> |
21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> | 21 | * Boji T Kannanthanam <boji.t.kannanthanam@intel.com> |
22 | * Alan Cox <alan@redhat.com>: | 22 | * Alan Cox <alan@redhat.com>: |
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index a20a51efe118..25716193a534 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
@@ -10,8 +10,8 @@ config MFD_SM501 | |||
10 | ---help--- | 10 | ---help--- |
11 | This is the core driver for the Silicon Motion SM501 multimedia | 11 | This is the core driver for the Silicon Motion SM501 multimedia |
12 | companion chip. This device is a multifunction device which may | 12 | companion chip. This device is a multifunction device which may |
13 | provide numerous interfaces including USB host controller USB gadget, | 13 | provide numerous interfaces including USB host controller, USB gadget, |
14 | Asyncronous Serial ports, Audio functions and a dual display video | 14 | asynchronous serial ports, audio functions, and a dual display video |
15 | interface. The device may be connected by PCI or local bus with | 15 | interface. The device may be connected by PCI or local bus with |
16 | varying functions enabled. | 16 | varying functions enabled. |
17 | 17 | ||
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index cf02ddc3436f..b5e67c0ff433 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
@@ -180,7 +180,7 @@ config THINKPAD_ACPI | |||
180 | For more information about this driver see | 180 | For more information about this driver see |
181 | <file:Documentation/thinkpad-acpi.txt> and <http://ibm-acpi.sf.net/> . | 181 | <file:Documentation/thinkpad-acpi.txt> and <http://ibm-acpi.sf.net/> . |
182 | 182 | ||
183 | This driver was formely known as ibm-acpi. | 183 | This driver was formerly known as ibm-acpi. |
184 | 184 | ||
185 | If you have an IBM or Lenovo ThinkPad laptop, say Y or M here. | 185 | If you have an IBM or Lenovo ThinkPad laptop, say Y or M here. |
186 | 186 | ||
@@ -214,7 +214,7 @@ config THINKPAD_ACPI_BAY | |||
214 | default y | 214 | default y |
215 | ---help--- | 215 | ---help--- |
216 | Allows the thinkpad_acpi driver to handle removable bays. It will | 216 | Allows the thinkpad_acpi driver to handle removable bays. It will |
217 | eletrically disable the device in the bay, and also generate | 217 | electrically disable the device in the bay, and also generate |
218 | notifications when the bay lever is ejected or inserted. | 218 | notifications when the bay lever is ejected or inserted. |
219 | 219 | ||
220 | If you are not sure, say Y here. | 220 | If you are not sure, say Y here. |
diff --git a/drivers/misc/ibmasm/remote.c b/drivers/misc/ibmasm/remote.c index 1d9defb1a10c..477bb43c899c 100644 --- a/drivers/misc/ibmasm/remote.c +++ b/drivers/misc/ibmasm/remote.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * | 17 | * |
18 | * Copyright (C) IBM Corporation, 2004 | 18 | * Copyright (C) IBM Corporation, 2004 |
19 | * | 19 | * |
20 | * Authors: Max Asböck <amax@us.ibm.com> | 20 | * Authors: Max Asböck <amax@us.ibm.com> |
21 | * Vernon Mauery <vernux@us.ibm.com> | 21 | * Vernon Mauery <vernux@us.ibm.com> |
22 | * | 22 | * |
23 | */ | 23 | */ |
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 1bfbb87e5793..bb13858f60a1 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * | 14 | * |
15 | * Copyright (C) 2005 Narayanan R S <nars@kadamba.org> | 15 | * Copyright (C) 2005 Narayanan R S <nars@kadamba.org> |
16 | * | 16 | * |
17 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> | 17 | * Copyright (C) 2001-2002 Alcôve <www.alcove.com> |
18 | * | 18 | * |
19 | * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> | 19 | * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> |
20 | * | 20 | * |
@@ -277,7 +277,7 @@ static void do_sony_laptop_release_key(struct work_struct *work) | |||
277 | static DECLARE_WORK(sony_laptop_release_key_work, | 277 | static DECLARE_WORK(sony_laptop_release_key_work, |
278 | do_sony_laptop_release_key); | 278 | do_sony_laptop_release_key); |
279 | 279 | ||
280 | /* forward event to the input subsytem */ | 280 | /* forward event to the input subsystem */ |
281 | static void sony_laptop_report_input_event(u8 event) | 281 | static void sony_laptop_report_input_event(u8 event) |
282 | { | 282 | { |
283 | struct input_dev *jog_dev = sony_laptop_input.jog_dev; | 283 | struct input_dev *jog_dev = sony_laptop_input.jog_dev; |
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index 2a2a125b0c76..a592fc04cf78 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig | |||
@@ -54,7 +54,7 @@ config MTD_PHYSMAP_BANKWIDTH | |||
54 | help | 54 | help |
55 | This is the total width of the data bus of the flash devices | 55 | This is the total width of the data bus of the flash devices |
56 | in octets. For example, if you have a data bus width of 32 | 56 | in octets. For example, if you have a data bus width of 32 |
57 | bits, you would set the bus width octect value to 4. This is | 57 | bits, you would set the bus width octet value to 4. This is |
58 | used internally by the CFI drivers. | 58 | used internally by the CFI drivers. |
59 | Ignore this option if you use run-time physmap configuration | 59 | Ignore this option if you use run-time physmap configuration |
60 | (i.e., run-time calling physmap_configure()). | 60 | (i.e., run-time calling physmap_configure()). |
@@ -73,12 +73,12 @@ config MTD_PMC_MSP_EVM | |||
73 | depends on PMC_MSP && MTD_CFI | 73 | depends on PMC_MSP && MTD_CFI |
74 | select MTD_PARTITIONS | 74 | select MTD_PARTITIONS |
75 | help | 75 | help |
76 | This provides a 'mapping' driver which support the way | 76 | This provides a 'mapping' driver which supports the way |
77 | in which user-programmable flash chips are connected on the | 77 | in which user-programmable flash chips are connected on the |
78 | PMC-Sierra MSP eval/demo boards | 78 | PMC-Sierra MSP eval/demo boards. |
79 | 79 | ||
80 | choice | 80 | choice |
81 | prompt "Maximum mappable memory avialable for flash IO" | 81 | prompt "Maximum mappable memory available for flash IO" |
82 | depends on MTD_PMC_MSP_EVM | 82 | depends on MTD_PMC_MSP_EVM |
83 | default MSP_FLASH_MAP_LIMIT_32M | 83 | default MSP_FLASH_MAP_LIMIT_32M |
84 | 84 | ||
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 973b684c11e3..eef6fecfff2a 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -73,7 +73,7 @@ | |||
73 | 73 | ||
74 | Jean-Jacques Michel - bug fix | 74 | Jean-Jacques Michel - bug fix |
75 | 75 | ||
76 | Tobias Ringström - Rx interrupt status checking suggestion | 76 | Tobias Ringström - Rx interrupt status checking suggestion |
77 | 77 | ||
78 | Andrew Morton - Clear blocked signals, avoid | 78 | Andrew Morton - Clear blocked signals, avoid |
79 | buffer overrun setting current->comm. | 79 | buffer overrun setting current->comm. |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 83d52c8acab0..ce34b539bf38 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -855,7 +855,7 @@ config BFIN_MAC_USE_L1 | |||
855 | depends on BFIN_MAC && BF537 | 855 | depends on BFIN_MAC && BF537 |
856 | default y | 856 | default y |
857 | help | 857 | help |
858 | To get maximum network performace, you should use L1 memory as rx/tx buffers. | 858 | To get maximum network performance, you should use L1 memory as rx/tx buffers. |
859 | Say N here if you want to reserve L1 memory for other uses. | 859 | Say N here if you want to reserve L1 memory for other uses. |
860 | 860 | ||
861 | config BFIN_TX_DESC_NUM | 861 | config BFIN_TX_DESC_NUM |
@@ -1293,9 +1293,6 @@ config PCNET32_NAPI | |||
1293 | deployed on potentially unfriendly networks (e.g. in a firewall), | 1293 | deployed on potentially unfriendly networks (e.g. in a firewall), |
1294 | then say Y here. | 1294 | then say Y here. |
1295 | 1295 | ||
1296 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
1297 | information. | ||
1298 | |||
1299 | If in doubt, say N. | 1296 | If in doubt, say N. |
1300 | 1297 | ||
1301 | config AMD8111_ETH | 1298 | config AMD8111_ETH |
@@ -1313,7 +1310,7 @@ config AMD8111_ETH | |||
1313 | will be called amd8111e. | 1310 | will be called amd8111e. |
1314 | 1311 | ||
1315 | config AMD8111E_NAPI | 1312 | config AMD8111E_NAPI |
1316 | bool "Enable NAPI support" | 1313 | bool "Use RX polling (NAPI)" |
1317 | depends on AMD8111_ETH | 1314 | depends on AMD8111_ETH |
1318 | help | 1315 | help |
1319 | NAPI is a new driver API designed to reduce CPU and interrupt load | 1316 | NAPI is a new driver API designed to reduce CPU and interrupt load |
@@ -1324,9 +1321,6 @@ config AMD8111E_NAPI | |||
1324 | deployed on potentially unfriendly networks (e.g. in a firewall), | 1321 | deployed on potentially unfriendly networks (e.g. in a firewall), |
1325 | then say Y here. | 1322 | then say Y here. |
1326 | 1323 | ||
1327 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
1328 | information. | ||
1329 | |||
1330 | If in doubt, say N. | 1324 | If in doubt, say N. |
1331 | 1325 | ||
1332 | config ADAPTEC_STARFIRE | 1326 | config ADAPTEC_STARFIRE |
@@ -1355,9 +1349,6 @@ config ADAPTEC_STARFIRE_NAPI | |||
1355 | deployed on potentially unfriendly networks (e.g. in a firewall), | 1349 | deployed on potentially unfriendly networks (e.g. in a firewall), |
1356 | then say Y here. | 1350 | then say Y here. |
1357 | 1351 | ||
1358 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
1359 | information. | ||
1360 | |||
1361 | If in doubt, say N. | 1352 | If in doubt, say N. |
1362 | 1353 | ||
1363 | config AC3200 | 1354 | config AC3200 |
@@ -1431,7 +1422,7 @@ config FORCEDETH | |||
1431 | called forcedeth. | 1422 | called forcedeth. |
1432 | 1423 | ||
1433 | config FORCEDETH_NAPI | 1424 | config FORCEDETH_NAPI |
1434 | bool "Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)" | 1425 | bool "Use Rx Polling (NAPI) (EXPERIMENTAL)" |
1435 | depends on FORCEDETH && EXPERIMENTAL | 1426 | depends on FORCEDETH && EXPERIMENTAL |
1436 | help | 1427 | help |
1437 | NAPI is a new driver API designed to reduce CPU and interrupt load | 1428 | NAPI is a new driver API designed to reduce CPU and interrupt load |
@@ -1442,9 +1433,6 @@ config FORCEDETH_NAPI | |||
1442 | deployed on potentially unfriendly networks (e.g. in a firewall), | 1433 | deployed on potentially unfriendly networks (e.g. in a firewall), |
1443 | then say Y here. | 1434 | then say Y here. |
1444 | 1435 | ||
1445 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
1446 | information. | ||
1447 | |||
1448 | If in doubt, say N. | 1436 | If in doubt, say N. |
1449 | 1437 | ||
1450 | config CS89x0 | 1438 | config CS89x0 |
@@ -1756,9 +1744,6 @@ config VIA_RHINE_NAPI | |||
1756 | deployed on potentially unfriendly networks (e.g. in a firewall), | 1744 | deployed on potentially unfriendly networks (e.g. in a firewall), |
1757 | then say Y here. | 1745 | then say Y here. |
1758 | 1746 | ||
1759 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
1760 | information. | ||
1761 | |||
1762 | config LAN_SAA9730 | 1747 | config LAN_SAA9730 |
1763 | bool "Philips SAA9730 Ethernet support" | 1748 | bool "Philips SAA9730 Ethernet support" |
1764 | depends on NET_PCI && PCI && MIPS_ATLAS | 1749 | depends on NET_PCI && PCI && MIPS_ATLAS |
@@ -2003,9 +1988,6 @@ config E1000_NAPI | |||
2003 | deployed on potentially unfriendly networks (e.g. in a firewall), | 1988 | deployed on potentially unfriendly networks (e.g. in a firewall), |
2004 | then say Y here. | 1989 | then say Y here. |
2005 | 1990 | ||
2006 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
2007 | information. | ||
2008 | |||
2009 | If in doubt, say N. | 1991 | If in doubt, say N. |
2010 | 1992 | ||
2011 | config E1000_DISABLE_PACKET_SPLIT | 1993 | config E1000_DISABLE_PACKET_SPLIT |
@@ -2099,7 +2081,7 @@ config R8169 | |||
2099 | will be called r8169. This is recommended. | 2081 | will be called r8169. This is recommended. |
2100 | 2082 | ||
2101 | config R8169_NAPI | 2083 | config R8169_NAPI |
2102 | bool "Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)" | 2084 | bool "Use Rx Polling (NAPI) (EXPERIMENTAL)" |
2103 | depends on R8169 && EXPERIMENTAL | 2085 | depends on R8169 && EXPERIMENTAL |
2104 | help | 2086 | help |
2105 | NAPI is a new driver API designed to reduce CPU and interrupt load | 2087 | NAPI is a new driver API designed to reduce CPU and interrupt load |
@@ -2110,9 +2092,6 @@ config R8169_NAPI | |||
2110 | deployed on potentially unfriendly networks (e.g. in a firewall), | 2092 | deployed on potentially unfriendly networks (e.g. in a firewall), |
2111 | then say Y here. | 2093 | then say Y here. |
2112 | 2094 | ||
2113 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
2114 | information. | ||
2115 | |||
2116 | If in doubt, say N. | 2095 | If in doubt, say N. |
2117 | 2096 | ||
2118 | config R8169_VLAN | 2097 | config R8169_VLAN |
@@ -2364,7 +2343,7 @@ config GIANFAR | |||
2364 | and MPC86xx family of chips, and the FEC on the 8540. | 2343 | and MPC86xx family of chips, and the FEC on the 8540. |
2365 | 2344 | ||
2366 | config GFAR_NAPI | 2345 | config GFAR_NAPI |
2367 | bool "NAPI Support" | 2346 | bool "Use Rx Polling (NAPI)" |
2368 | depends on GIANFAR | 2347 | depends on GIANFAR |
2369 | 2348 | ||
2370 | config UCC_GETH | 2349 | config UCC_GETH |
@@ -2376,7 +2355,7 @@ config UCC_GETH | |||
2376 | which is available on some Freescale SOCs. | 2355 | which is available on some Freescale SOCs. |
2377 | 2356 | ||
2378 | config UGETH_NAPI | 2357 | config UGETH_NAPI |
2379 | bool "NAPI Support" | 2358 | bool "Use Rx Polling (NAPI)" |
2380 | depends on UCC_GETH | 2359 | depends on UCC_GETH |
2381 | 2360 | ||
2382 | config UGETH_MAGIC_PACKET | 2361 | config UGETH_MAGIC_PACKET |
@@ -2494,7 +2473,7 @@ config CHELSIO_T3 | |||
2494 | 2473 | ||
2495 | config EHEA | 2474 | config EHEA |
2496 | tristate "eHEA Ethernet support" | 2475 | tristate "eHEA Ethernet support" |
2497 | depends on IBMEBUS | 2476 | depends on IBMEBUS && INET |
2498 | select INET_LRO | 2477 | select INET_LRO |
2499 | ---help--- | 2478 | ---help--- |
2500 | This driver supports the IBM pSeries eHEA ethernet adapter. | 2479 | This driver supports the IBM pSeries eHEA ethernet adapter. |
@@ -2559,9 +2538,6 @@ config IXGB_NAPI | |||
2559 | deployed on potentially unfriendly networks (e.g. in a firewall), | 2538 | deployed on potentially unfriendly networks (e.g. in a firewall), |
2560 | then say Y here. | 2539 | then say Y here. |
2561 | 2540 | ||
2562 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
2563 | information. | ||
2564 | |||
2565 | If in doubt, say N. | 2541 | If in doubt, say N. |
2566 | 2542 | ||
2567 | config S2IO | 2543 | config S2IO |
@@ -2584,14 +2560,11 @@ config S2IO_NAPI | |||
2584 | deployed on potentially unfriendly networks (e.g. in a firewall), | 2560 | deployed on potentially unfriendly networks (e.g. in a firewall), |
2585 | then say Y here. | 2561 | then say Y here. |
2586 | 2562 | ||
2587 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
2588 | information. | ||
2589 | |||
2590 | If in doubt, say N. | 2563 | If in doubt, say N. |
2591 | 2564 | ||
2592 | config MYRI10GE | 2565 | config MYRI10GE |
2593 | tristate "Myricom Myri-10G Ethernet support" | 2566 | tristate "Myricom Myri-10G Ethernet support" |
2594 | depends on PCI | 2567 | depends on PCI && INET |
2595 | select FW_LOADER | 2568 | select FW_LOADER |
2596 | select CRC32 | 2569 | select CRC32 |
2597 | select INET_LRO | 2570 | select INET_LRO |
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 1cc74ec88a58..eebf5bb2b03a 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -1111,7 +1111,7 @@ static struct net_device_stats *amd8111e_get_stats(struct net_device * dev) | |||
1111 | 1111 | ||
1112 | return new_stats; | 1112 | return new_stats; |
1113 | } | 1113 | } |
1114 | /* This function recalculate the interupt coalescing mode on every interrupt | 1114 | /* This function recalculate the interrupt coalescing mode on every interrupt |
1115 | according to the datarate and the packet rate. | 1115 | according to the datarate and the packet rate. |
1116 | */ | 1116 | */ |
1117 | static int amd8111e_calc_coalesce(struct net_device *dev) | 1117 | static int amd8111e_calc_coalesce(struct net_device *dev) |
diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c index 3fa3bccd1adb..10f3a196be32 100644 --- a/drivers/net/ariadne.c +++ b/drivers/net/ariadne.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Amiga Linux/m68k Ariadne Ethernet Driver | 2 | * Amiga Linux/m68k Ariadne Ethernet Driver |
3 | * | 3 | * |
4 | * © Copyright 1995-2003 by Geert Uytterhoeven (geert@linux-m68k.org) | 4 | * © Copyright 1995-2003 by Geert Uytterhoeven (geert@linux-m68k.org) |
5 | * Peter De Schrijver (p2@mind.be) | 5 | * Peter De Schrijver (p2@mind.be) |
6 | * | 6 | * |
7 | * --------------------------------------------------------------------------- | 7 | * --------------------------------------------------------------------------- |
diff --git a/drivers/net/ariadne.h b/drivers/net/ariadne.h index f7913d5a39f1..bb613f292e04 100644 --- a/drivers/net/ariadne.h +++ b/drivers/net/ariadne.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Amiga Linux/m68k Ariadne Ethernet Driver | 2 | * Amiga Linux/m68k Ariadne Ethernet Driver |
3 | * | 3 | * |
4 | * © Copyright 1995 by Geert Uytterhoeven (geert@linux-m68k.org) | 4 | * © Copyright 1995 by Geert Uytterhoeven (geert@linux-m68k.org) |
5 | * Peter De Schrijver | 5 | * Peter De Schrijver |
6 | * (Peter.DeSchrijver@linux.cc.kuleuven.ac.be) | 6 | * (Peter.DeSchrijver@linux.cc.kuleuven.ac.be) |
7 | * | 7 | * |
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 185f98e3964c..504b7ce2747d 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -542,7 +542,7 @@ static struct { | |||
542 | static int num_ifs; | 542 | static int num_ifs; |
543 | 543 | ||
544 | /* | 544 | /* |
545 | * Setup the base address and interupt of the Au1xxx ethernet macs | 545 | * Setup the base address and interrupt of the Au1xxx ethernet macs |
546 | * based on cpu type and whether the interface is enabled in sys_pinfunc | 546 | * based on cpu type and whether the interface is enabled in sys_pinfunc |
547 | * register. The last interface is enabled if SYS_PF_NI2 (bit 4) is 0. | 547 | * register. The last interface is enabled if SYS_PF_NI2 (bit 4) is 0. |
548 | */ | 548 | */ |
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 80c0c8c415ed..855dc10ffa1b 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -55,7 +55,7 @@ static int expected_refcount = -1; | |||
55 | static struct class *netdev_class; | 55 | static struct class *netdev_class; |
56 | /*--------------------------- Data Structures -----------------------------*/ | 56 | /*--------------------------- Data Structures -----------------------------*/ |
57 | 57 | ||
58 | /* Bonding sysfs lock. Why can't we just use the subsytem lock? | 58 | /* Bonding sysfs lock. Why can't we just use the subsystem lock? |
59 | * Because kobject_register tries to acquire the subsystem lock. If | 59 | * Because kobject_register tries to acquire the subsystem lock. If |
60 | * we already hold the lock (which we would if the user was creating | 60 | * we already hold the lock (which we would if the user was creating |
61 | * a new bond through the sysfs interface), we deadlock. | 61 | * a new bond through the sysfs interface), we deadlock. |
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 27ac010900ab..3286d2a0a870 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c | |||
@@ -542,7 +542,8 @@ dm9000_probe(struct platform_device *pdev) | |||
542 | 542 | ||
543 | if (id_val != DM9000_ID) { | 543 | if (id_val != DM9000_ID) { |
544 | printk("%s: wrong id: 0x%08x\n", CARDNAME, id_val); | 544 | printk("%s: wrong id: 0x%08x\n", CARDNAME, id_val); |
545 | goto release; | 545 | ret = -ENODEV; |
546 | goto out; | ||
546 | } | 547 | } |
547 | 548 | ||
548 | /* from this point we assume that we have found a DM9000 */ | 549 | /* from this point we assume that we have found a DM9000 */ |
@@ -602,8 +603,7 @@ dm9000_probe(struct platform_device *pdev) | |||
602 | } | 603 | } |
603 | return 0; | 604 | return 0; |
604 | 605 | ||
605 | release: | 606 | out: |
606 | out: | ||
607 | printk("%s: not found (%d).\n", CARDNAME, ret); | 607 | printk("%s: not found (%d).\n", CARDNAME, ret); |
608 | 608 | ||
609 | dm9000_release_board(pdev, db); | 609 | dm9000_release_board(pdev, db); |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 64f35e20fd48..3dbaec680b46 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1324,7 +1324,7 @@ static inline int e100_exec_cb_wait(struct nic *nic, struct sk_buff *skb, | |||
1324 | if (!--counter) break; | 1324 | if (!--counter) break; |
1325 | } | 1325 | } |
1326 | 1326 | ||
1327 | /* ack any interupts, something could have been set */ | 1327 | /* ack any interrupts, something could have been set */ |
1328 | iowrite8(~0, &nic->csr->scb.stat_ack); | 1328 | iowrite8(~0, &nic->csr->scb.stat_ack); |
1329 | 1329 | ||
1330 | /* if the command failed, or is not OK, notify and return */ | 1330 | /* if the command failed, or is not OK, notify and return */ |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 047263830e6a..f1ce348470cc 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -3590,7 +3590,7 @@ e1000_update_stats(struct e1000_adapter *adapter) | |||
3590 | 3590 | ||
3591 | spin_lock_irqsave(&adapter->stats_lock, flags); | 3591 | spin_lock_irqsave(&adapter->stats_lock, flags); |
3592 | 3592 | ||
3593 | /* these counters are modified from e1000_adjust_tbi_stats, | 3593 | /* these counters are modified from e1000_tbi_adjust_stats, |
3594 | * called from the interrupt context, so they must only | 3594 | * called from the interrupt context, so they must only |
3595 | * be written while holding adapter->stats_lock | 3595 | * be written while holding adapter->stats_lock |
3596 | */ | 3596 | */ |
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index 43f7647ff246..7bb9c728a1d3 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c | |||
@@ -111,7 +111,6 @@ MODULE_AUTHOR("Myson or whoever"); | |||
111 | MODULE_DESCRIPTION("Myson MTD-8xx 100/10M Ethernet PCI Adapter Driver"); | 111 | MODULE_DESCRIPTION("Myson MTD-8xx 100/10M Ethernet PCI Adapter Driver"); |
112 | MODULE_LICENSE("GPL"); | 112 | MODULE_LICENSE("GPL"); |
113 | module_param(max_interrupt_work, int, 0); | 113 | module_param(max_interrupt_work, int, 0); |
114 | //MODULE_PARM(min_pci_latency, "i"); | ||
115 | module_param(debug, int, 0); | 114 | module_param(debug, int, 0); |
116 | module_param(rx_copybreak, int, 0); | 115 | module_param(rx_copybreak, int, 0); |
117 | module_param(multicast_filter_limit, int, 0); | 116 | module_param(multicast_filter_limit, int, 0); |
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index ad9e327c3b03..e0119f6a3319 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * devices like TTY. It interfaces between a raw TTY and the | 3 | * devices like TTY. It interfaces between a raw TTY and the |
4 | * kernel's AX.25 protocol layers. | 4 | * kernel's AX.25 protocol layers. |
5 | * | 5 | * |
6 | * Authors: Andreas Könsgen <ajk@iehk.rwth-aachen.de> | 6 | * Authors: Andreas Könsgen <ajk@iehk.rwth-aachen.de> |
7 | * Ralf Baechle DL5RB <ralf@linux-mips.org> | 7 | * Ralf Baechle DL5RB <ralf@linux-mips.org> |
8 | * | 8 | * |
9 | * Quite a lot of stuff "stolen" by Joerg Reuter from slip.c, written by | 9 | * Quite a lot of stuff "stolen" by Joerg Reuter from slip.c, written by |
diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig index 36d2c7d4f4d0..62d5d5cfd6a6 100644 --- a/drivers/net/hamradio/Kconfig +++ b/drivers/net/hamradio/Kconfig | |||
@@ -64,7 +64,7 @@ config DMASCC | |||
64 | dmascc. If you don't pass any parameter to the driver, all | 64 | dmascc. If you don't pass any parameter to the driver, all |
65 | possible I/O addresses are probed. This could irritate other devices | 65 | possible I/O addresses are probed. This could irritate other devices |
66 | that are currently not in use. You may specify the list of addresses | 66 | that are currently not in use. You may specify the list of addresses |
67 | to be probed by "dmascc=addr1,addr2,..." (when compiled into the | 67 | to be probed by "dmascc.io=addr1,addr2,..." (when compiled into the |
68 | kernel image) or "io=addr1,addr2,..." (when loaded as a module). The | 68 | kernel image) or "io=addr1,addr2,..." (when loaded as a module). The |
69 | network interfaces will be called dmascc0 and dmascc1 for the board | 69 | network interfaces will be called dmascc0 and dmascc1 for the board |
70 | detected first, dmascc2 and dmascc3 for the second one, and so on. | 70 | detected first, dmascc2 and dmascc3 for the second one, and so on. |
diff --git a/drivers/net/irda/actisys-sir.c b/drivers/net/irda/actisys-sir.c index ccf6ec548a64..736d2473b7e1 100644 --- a/drivers/net/irda/actisys-sir.c +++ b/drivers/net/irda/actisys-sir.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * published by the Free Software Foundation; either version 2 of | 21 | * published by the Free Software Foundation; either version 2 of |
22 | * the License, or (at your option) any later version. | 22 | * the License, or (at your option) any later version. |
23 | * | 23 | * |
24 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 24 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
25 | * provide warranty for any of this software. This material is | 25 | * provide warranty for any of this software. This material is |
26 | * provided "AS-IS" and at no charge. | 26 | * provided "AS-IS" and at no charge. |
27 | * | 27 | * |
diff --git a/drivers/net/irda/actisys.c b/drivers/net/irda/actisys.c index b2e31f4a384c..ae0b80a5680c 100644 --- a/drivers/net/irda/actisys.c +++ b/drivers/net/irda/actisys.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * published by the Free Software Foundation; either version 2 of | 19 | * published by the Free Software Foundation; either version 2 of |
20 | * the License, or (at your option) any later version. | 20 | * the License, or (at your option) any later version. |
21 | * | 21 | * |
22 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 22 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
23 | * provide warranty for any of this software. This material is | 23 | * provide warranty for any of this software. This material is |
24 | * provided "AS-IS" and at no charge. | 24 | * provided "AS-IS" and at no charge. |
25 | * | 25 | * |
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index a82d8f98383d..1257e1a7e819 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -595,7 +595,7 @@ toshoboe_startchip (struct toshoboe_cb *self) | |||
595 | OUTB ((physaddr >> 18) & 0xff, OBOE_RING_BASE1); | 595 | OUTB ((physaddr >> 18) & 0xff, OBOE_RING_BASE1); |
596 | OUTB ((physaddr >> 26) & 0x3f, OBOE_RING_BASE2); | 596 | OUTB ((physaddr >> 26) & 0x3f, OBOE_RING_BASE2); |
597 | 597 | ||
598 | /*Enable DMA controler in byte mode and RX */ | 598 | /*Enable DMA controller in byte mode and RX */ |
599 | OUTB (CONFIG0H_DMA_ON, OBOE_CONFIG0H); | 599 | OUTB (CONFIG0H_DMA_ON, OBOE_CONFIG0H); |
600 | 600 | ||
601 | /* Start up the clocks */ | 601 | /* Start up the clocks */ |
diff --git a/drivers/net/irda/girbil-sir.c b/drivers/net/irda/girbil-sir.c index 0d2fe87fb9b7..738531b16bd3 100644 --- a/drivers/net/irda/girbil-sir.c +++ b/drivers/net/irda/girbil-sir.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | * | 18 | * |
19 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
20 | * provide warranty for any of this software. This material is | 20 | * provide warranty for any of this software. This material is |
21 | * provided "AS-IS" and at no charge. | 21 | * provided "AS-IS" and at no charge. |
22 | * | 22 | * |
diff --git a/drivers/net/irda/girbil.c b/drivers/net/irda/girbil.c index 248aeb0c726c..1f57391a618b 100644 --- a/drivers/net/irda/girbil.c +++ b/drivers/net/irda/girbil.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | * | 18 | * |
19 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
20 | * provide warranty for any of this software. This material is | 20 | * provide warranty for any of this software. This material is |
21 | * provided "AS-IS" and at no charge. | 21 | * provided "AS-IS" and at no charge. |
22 | * | 22 | * |
diff --git a/drivers/net/irda/irport.h b/drivers/net/irda/irport.h index 3f46b84c6c85..66fc2433e97d 100644 --- a/drivers/net/irda/irport.h +++ b/drivers/net/irda/irport.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * published by the Free Software Foundation; either version 2 of | 17 | * published by the Free Software Foundation; either version 2 of |
18 | * the License, or (at your option) any later version. | 18 | * the License, or (at your option) any later version. |
19 | * | 19 | * |
20 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 20 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
21 | * provide warranty for any of this software. This material is | 21 | * provide warranty for any of this software. This material is |
22 | * provided "AS-IS" and at no charge. | 22 | * provided "AS-IS" and at no charge. |
23 | * | 23 | * |
diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c index 6f5f697ec9f8..2c6f7be36e8a 100644 --- a/drivers/net/irda/irtty-sir.c +++ b/drivers/net/irda/irtty-sir.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 23 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
24 | * provide warranty for any of this software. This material is | 24 | * provide warranty for any of this software. This material is |
25 | * provided "AS-IS" and at no charge. | 25 | * provided "AS-IS" and at no charge. |
26 | * | 26 | * |
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c index 12b9378c587f..a873d2b315ca 100644 --- a/drivers/net/irda/nsc-ircc.c +++ b/drivers/net/irda/nsc-ircc.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 23 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
24 | * provide warranty for any of this software. This material is | 24 | * provide warranty for any of this software. This material is |
25 | * provided "AS-IS" and at no charge. | 25 | * provided "AS-IS" and at no charge. |
26 | * | 26 | * |
diff --git a/drivers/net/irda/nsc-ircc.h b/drivers/net/irda/nsc-ircc.h index dacf671abcd6..bbdc97ff83ca 100644 --- a/drivers/net/irda/nsc-ircc.h +++ b/drivers/net/irda/nsc-ircc.h | |||
@@ -19,7 +19,7 @@ | |||
19 | * published by the Free Software Foundation; either version 2 of | 19 | * published by the Free Software Foundation; either version 2 of |
20 | * the License, or (at your option) any later version. | 20 | * the License, or (at your option) any later version. |
21 | * | 21 | * |
22 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 22 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
23 | * provide warranty for any of this software. This material is | 23 | * provide warranty for any of this software. This material is |
24 | * provided "AS-IS" and at no charge. | 24 | * provided "AS-IS" and at no charge. |
25 | * | 25 | * |
diff --git a/drivers/net/irda/tekram-sir.c b/drivers/net/irda/tekram-sir.c index 0dd6bc7af3f2..d1ce5ae6a172 100644 --- a/drivers/net/irda/tekram-sir.c +++ b/drivers/net/irda/tekram-sir.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
diff --git a/drivers/net/irda/tekram.c b/drivers/net/irda/tekram.c index 8f6258221cb0..9bfd2441adbf 100644 --- a/drivers/net/irda/tekram.c +++ b/drivers/net/irda/tekram.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | * | 18 | * |
19 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
20 | * provide warranty for any of this software. This material is | 20 | * provide warranty for any of this software. This material is |
21 | * provided "AS-IS" and at no charge. | 21 | * provided "AS-IS" and at no charge. |
22 | * | 22 | * |
diff --git a/drivers/net/irda/w83977af_ir.h b/drivers/net/irda/w83977af_ir.h index 0b7661deafee..87c3975baf62 100644 --- a/drivers/net/irda/w83977af_ir.h +++ b/drivers/net/irda/w83977af_ir.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | * | 18 | * |
19 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
20 | * provide warranty for any of this software. This material is | 20 | * provide warranty for any of this software. This material is |
21 | * provided "AS-IS" and at no charge. | 21 | * provided "AS-IS" and at no charge. |
22 | * | 22 | * |
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 50e1ec67ef9c..953117152bbd 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c | |||
@@ -996,7 +996,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev, | |||
996 | a delay. Note that pre-2.0.34 kernels had a cache-alignment bug that | 996 | a delay. Note that pre-2.0.34 kernels had a cache-alignment bug that |
997 | made udelay() unreliable. | 997 | made udelay() unreliable. |
998 | The old method of using an ISA access as a delay, __SLOW_DOWN_IO__, is | 998 | The old method of using an ISA access as a delay, __SLOW_DOWN_IO__, is |
999 | depricated. | 999 | deprecated. |
1000 | */ | 1000 | */ |
1001 | #define eeprom_delay(ee_addr) readl(ee_addr) | 1001 | #define eeprom_delay(ee_addr) readl(ee_addr) |
1002 | 1002 | ||
diff --git a/drivers/net/phy/mdio-bitbang.c b/drivers/net/phy/mdio-bitbang.c index 8cd243d92af3..2747b1f89ffe 100644 --- a/drivers/net/phy/mdio-bitbang.c +++ b/drivers/net/phy/mdio-bitbang.c | |||
@@ -185,3 +185,5 @@ void free_mdio_bitbang(struct mii_bus *bus) | |||
185 | module_put(ctrl->ops->owner); | 185 | module_put(ctrl->ops->owner); |
186 | kfree(bus); | 186 | kfree(bus); |
187 | } | 187 | } |
188 | |||
189 | MODULE_LICENSE("GPL"); | ||
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 7c60df46fc65..dd18af0ce676 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -1223,7 +1223,7 @@ static irqreturn_t smc911x_interrupt(int irq, void *dev_id) | |||
1223 | } | 1223 | } |
1224 | #endif | 1224 | #endif |
1225 | 1225 | ||
1226 | /* Handle PHY interupt condition */ | 1226 | /* Handle PHY interrupt condition */ |
1227 | if (status & INT_STS_PHY_INT_) { | 1227 | if (status & INT_STS_PHY_INT_) { |
1228 | DBG(SMC_DEBUG_MISC, "%s: PHY irq\n", dev->name); | 1228 | DBG(SMC_DEBUG_MISC, "%s: PHY irq\n", dev->name); |
1229 | smc911x_phy_interrupt(dev); | 1229 | smc911x_phy_interrupt(dev); |
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index 571060a3c91e..bccae7e5c6ad 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -1639,7 +1639,7 @@ spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg) | |||
1639 | 1639 | ||
1640 | /** | 1640 | /** |
1641 | * spider_net_interrupt - interrupt handler for spider_net | 1641 | * spider_net_interrupt - interrupt handler for spider_net |
1642 | * @irq: interupt number | 1642 | * @irq: interrupt number |
1643 | * @ptr: pointer to net_device | 1643 | * @ptr: pointer to net_device |
1644 | * @regs: PU registers | 1644 | * @regs: PU registers |
1645 | * | 1645 | * |
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 8038f2882c9b..d887c05588d5 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -1654,7 +1654,7 @@ tc35815_rx(struct net_device *dev) | |||
1654 | panic_queues(dev); | 1654 | panic_queues(dev); |
1655 | } | 1655 | } |
1656 | #endif | 1656 | #endif |
1657 | /* pass BD to controler */ | 1657 | /* pass BD to controller */ |
1658 | #ifndef TC35815_USE_PACKEDBUFFER | 1658 | #ifndef TC35815_USE_PACKEDBUFFER |
1659 | if (!lp->rx_skbs[curid].skb) { | 1659 | if (!lp->rx_skbs[curid].skb) { |
1660 | lp->rx_skbs[curid].skb = | 1660 | lp->rx_skbs[curid].skb = |
@@ -1694,7 +1694,7 @@ tc35815_rx(struct net_device *dev) | |||
1694 | } | 1694 | } |
1695 | #endif | 1695 | #endif |
1696 | for (i = 0; i < (bd_count + 1) / 2 + 1; i++) { | 1696 | for (i = 0; i < (bd_count + 1) / 2 + 1; i++) { |
1697 | /* pass FD to controler */ | 1697 | /* pass FD to controller */ |
1698 | #ifdef DEBUG | 1698 | #ifdef DEBUG |
1699 | lp->rfd_cur->fd.FDNext = cpu_to_le32(0xdeaddead); | 1699 | lp->rfd_cur->fd.FDNext = cpu_to_le32(0xdeaddead); |
1700 | #else | 1700 | #else |
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index df10af7df7b8..35d15e850075 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c | |||
@@ -1629,7 +1629,7 @@ tsi108_init_one(struct platform_device *pdev) | |||
1629 | goto register_fail; | 1629 | goto register_fail; |
1630 | } | 1630 | } |
1631 | 1631 | ||
1632 | printk(KERN_INFO "%s: Tsi108 Gigabit Ethernet, MAC: %s\n" | 1632 | printk(KERN_INFO "%s: Tsi108 Gigabit Ethernet, MAC: %s\n", |
1633 | dev->name, print_mac(mac, dev->dev_addr)); | 1633 | dev->name, print_mac(mac, dev->dev_addr)); |
1634 | #ifdef DEBUG | 1634 | #ifdef DEBUG |
1635 | data->msg_enable = DEBUG; | 1635 | data->msg_enable = DEBUG; |
diff --git a/drivers/net/tulip/Kconfig b/drivers/net/tulip/Kconfig index 1c537d5a3062..49d7a290dbbc 100644 --- a/drivers/net/tulip/Kconfig +++ b/drivers/net/tulip/Kconfig | |||
@@ -67,7 +67,7 @@ config TULIP_MMIO | |||
67 | If in doubt, say N. | 67 | If in doubt, say N. |
68 | 68 | ||
69 | config TULIP_NAPI | 69 | config TULIP_NAPI |
70 | bool "Use NAPI RX polling " | 70 | bool "Use RX polling (NAPI)" |
71 | depends on TULIP | 71 | depends on TULIP |
72 | help | 72 | help |
73 | NAPI is a new driver API designed to reduce CPU and interrupt load | 73 | NAPI is a new driver API designed to reduce CPU and interrupt load |
@@ -78,18 +78,16 @@ config TULIP_NAPI | |||
78 | deployed on potentially unfriendly networks (e.g. in a firewall), | 78 | deployed on potentially unfriendly networks (e.g. in a firewall), |
79 | then say Y here. | 79 | then say Y here. |
80 | 80 | ||
81 | See <file:Documentation/networking/NAPI_HOWTO.txt> for more | ||
82 | information. | ||
83 | |||
84 | If in doubt, say N. | 81 | If in doubt, say N. |
85 | 82 | ||
86 | config TULIP_NAPI_HW_MITIGATION | 83 | config TULIP_NAPI_HW_MITIGATION |
87 | bool "Use Interrupt Mitigation " | 84 | bool "Use Interrupt Mitigation" |
88 | depends on TULIP_NAPI | 85 | depends on TULIP_NAPI |
89 | ---help--- | 86 | ---help--- |
90 | Use HW to reduce RX interrupts. Not strict necessary since NAPI reduces | 87 | Use HW to reduce RX interrupts. Not strictly necessary since NAPI |
91 | RX interrupts but itself. Although this reduces RX interrupts even at | 88 | reduces RX interrupts by itself. Interrupt mitigation reduces RX |
92 | low levels traffic at the cost of a small latency. | 89 | interrupts even at low levels of traffic at the cost of a small |
90 | latency. | ||
93 | 91 | ||
94 | If in doubt, say Y. | 92 | If in doubt, say Y. |
95 | 93 | ||
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 3c8e3b63be07..35d0cfcf8c47 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -483,7 +483,7 @@ err_out_netdev: | |||
483 | a delay. Note that pre-2.0.34 kernels had a cache-alignment bug that | 483 | a delay. Note that pre-2.0.34 kernels had a cache-alignment bug that |
484 | made udelay() unreliable. | 484 | made udelay() unreliable. |
485 | The old method of using an ISA access as a delay, __SLOW_DOWN_IO__, is | 485 | The old method of using an ISA access as a delay, __SLOW_DOWN_IO__, is |
486 | depricated. | 486 | deprecated. |
487 | */ | 487 | */ |
488 | #define eeprom_delay(ee_addr) ioread32(ee_addr) | 488 | #define eeprom_delay(ee_addr) ioread32(ee_addr) |
489 | 489 | ||
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 8dc09a3790cb..5a96d74e4ce8 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig | |||
@@ -71,7 +71,7 @@ config USB_PEGASUS | |||
71 | select MII | 71 | select MII |
72 | ---help--- | 72 | ---help--- |
73 | Say Y here if you know you have Pegasus or Pegasus-II based adapter. | 73 | Say Y here if you know you have Pegasus or Pegasus-II based adapter. |
74 | If in doubt then look at <file:drivers/usb/net/pegasus.h> for the | 74 | If in doubt then look at <file:drivers/net/usb/pegasus.h> for the |
75 | complete list of supported devices. | 75 | complete list of supported devices. |
76 | 76 | ||
77 | If your particular adapter is not in the list and you are _sure_ it | 77 | If your particular adapter is not in the list and you are _sure_ it |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 4ae05799ac44..5c4a92de9a07 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -1648,7 +1648,7 @@ static int velocity_alloc_rx_buf(struct velocity_info *vptr, int idx) | |||
1648 | * | 1648 | * |
1649 | * Scan the queues looking for transmitted packets that | 1649 | * Scan the queues looking for transmitted packets that |
1650 | * we can complete and clean up. Update any statistics as | 1650 | * we can complete and clean up. Update any statistics as |
1651 | * neccessary/ | 1651 | * necessary/ |
1652 | */ | 1652 | */ |
1653 | 1653 | ||
1654 | static int velocity_tx_srv(struct velocity_info *vptr, u32 status) | 1654 | static int velocity_tx_srv(struct velocity_info *vptr, u32 status) |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index c141a264ac45..9d9ff76a9bc6 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include "pio.h" | 49 | #include "pio.h" |
50 | #include "sysfs.h" | 50 | #include "sysfs.h" |
51 | #include "xmit.h" | 51 | #include "xmit.h" |
52 | #include "sysfs.h" | ||
53 | #include "lo.h" | 52 | #include "lo.h" |
54 | #include "pcmcia.h" | 53 | #include "pcmcia.h" |
55 | 54 | ||
@@ -3495,7 +3494,7 @@ static int b43_start(struct ieee80211_hw *hw) | |||
3495 | struct b43_wl *wl = hw_to_b43_wl(hw); | 3494 | struct b43_wl *wl = hw_to_b43_wl(hw); |
3496 | struct b43_wldev *dev = wl->current_dev; | 3495 | struct b43_wldev *dev = wl->current_dev; |
3497 | int did_init = 0; | 3496 | int did_init = 0; |
3498 | int err; | 3497 | int err = 0; |
3499 | 3498 | ||
3500 | mutex_lock(&wl->mutex); | 3499 | mutex_lock(&wl->mutex); |
3501 | 3500 | ||
@@ -3521,7 +3520,7 @@ static int b43_start(struct ieee80211_hw *hw) | |||
3521 | return err; | 3520 | return err; |
3522 | } | 3521 | } |
3523 | 3522 | ||
3524 | void b43_stop(struct ieee80211_hw *hw) | 3523 | static void b43_stop(struct ieee80211_hw *hw) |
3525 | { | 3524 | { |
3526 | struct b43_wl *wl = hw_to_b43_wl(hw); | 3525 | struct b43_wl *wl = hw_to_b43_wl(hw); |
3527 | struct b43_wldev *dev = wl->current_dev; | 3526 | struct b43_wldev *dev = wl->current_dev; |
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c index f0749510bcd7..d09479e816cd 100644 --- a/drivers/net/wireless/b43legacy/main.c +++ b/drivers/net/wireless/b43legacy/main.c | |||
@@ -3306,7 +3306,7 @@ static int b43legacy_start(struct ieee80211_hw *hw) | |||
3306 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); | 3306 | struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw); |
3307 | struct b43legacy_wldev *dev = wl->current_dev; | 3307 | struct b43legacy_wldev *dev = wl->current_dev; |
3308 | int did_init = 0; | 3308 | int did_init = 0; |
3309 | int err; | 3309 | int err = 0; |
3310 | 3310 | ||
3311 | mutex_lock(&wl->mutex); | 3311 | mutex_lock(&wl->mutex); |
3312 | 3312 | ||
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_xmit.h b/drivers/net/wireless/bcm43xx/bcm43xx_xmit.h index 9ecf2bf0d25d..47c135a7f4dc 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_xmit.h +++ b/drivers/net/wireless/bcm43xx/bcm43xx_xmit.h | |||
@@ -87,7 +87,7 @@ void bcm43xx_generate_txhdr(struct bcm43xx_private *bcm, | |||
87 | 87 | ||
88 | /* RX header as received from the hardware. */ | 88 | /* RX header as received from the hardware. */ |
89 | struct bcm43xx_rxhdr { | 89 | struct bcm43xx_rxhdr { |
90 | /* Frame Length. Must be generated explicitely in PIO mode. */ | 90 | /* Frame Length. Must be generated explicitly in PIO mode. */ |
91 | __le16 frame_length; | 91 | __le16 frame_length; |
92 | PAD_BYTES(2); | 92 | PAD_BYTES(2); |
93 | /* Flags field 1 */ | 93 | /* Flags field 1 */ |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index c144e3cdb890..a6c7904de282 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -2089,12 +2089,46 @@ static void isr_indicate_rf_kill(struct ipw2100_priv *priv, u32 status) | |||
2089 | queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ)); | 2089 | queue_delayed_work(priv->workqueue, &priv->rf_kill, round_jiffies(HZ)); |
2090 | } | 2090 | } |
2091 | 2091 | ||
2092 | static void send_scan_event(void *data) | ||
2093 | { | ||
2094 | struct ipw2100_priv *priv = data; | ||
2095 | union iwreq_data wrqu; | ||
2096 | |||
2097 | wrqu.data.length = 0; | ||
2098 | wrqu.data.flags = 0; | ||
2099 | wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL); | ||
2100 | } | ||
2101 | |||
2102 | static void ipw2100_scan_event_later(struct work_struct *work) | ||
2103 | { | ||
2104 | send_scan_event(container_of(work, struct ipw2100_priv, | ||
2105 | scan_event_later.work)); | ||
2106 | } | ||
2107 | |||
2108 | static void ipw2100_scan_event_now(struct work_struct *work) | ||
2109 | { | ||
2110 | send_scan_event(container_of(work, struct ipw2100_priv, | ||
2111 | scan_event_now)); | ||
2112 | } | ||
2113 | |||
2092 | static void isr_scan_complete(struct ipw2100_priv *priv, u32 status) | 2114 | static void isr_scan_complete(struct ipw2100_priv *priv, u32 status) |
2093 | { | 2115 | { |
2094 | IPW_DEBUG_SCAN("scan complete\n"); | 2116 | IPW_DEBUG_SCAN("scan complete\n"); |
2095 | /* Age the scan results... */ | 2117 | /* Age the scan results... */ |
2096 | priv->ieee->scans++; | 2118 | priv->ieee->scans++; |
2097 | priv->status &= ~STATUS_SCANNING; | 2119 | priv->status &= ~STATUS_SCANNING; |
2120 | |||
2121 | /* Only userspace-requested scan completion events go out immediately */ | ||
2122 | if (!priv->user_requested_scan) { | ||
2123 | if (!delayed_work_pending(&priv->scan_event_later)) | ||
2124 | queue_delayed_work(priv->workqueue, | ||
2125 | &priv->scan_event_later, | ||
2126 | round_jiffies(msecs_to_jiffies(4000))); | ||
2127 | } else { | ||
2128 | priv->user_requested_scan = 0; | ||
2129 | cancel_delayed_work(&priv->scan_event_later); | ||
2130 | queue_work(priv->workqueue, &priv->scan_event_now); | ||
2131 | } | ||
2098 | } | 2132 | } |
2099 | 2133 | ||
2100 | #ifdef CONFIG_IPW2100_DEBUG | 2134 | #ifdef CONFIG_IPW2100_DEBUG |
@@ -4349,6 +4383,7 @@ static void ipw2100_kill_workqueue(struct ipw2100_priv *priv) | |||
4349 | cancel_delayed_work(&priv->wx_event_work); | 4383 | cancel_delayed_work(&priv->wx_event_work); |
4350 | cancel_delayed_work(&priv->hang_check); | 4384 | cancel_delayed_work(&priv->hang_check); |
4351 | cancel_delayed_work(&priv->rf_kill); | 4385 | cancel_delayed_work(&priv->rf_kill); |
4386 | cancel_delayed_work(&priv->scan_event_later); | ||
4352 | destroy_workqueue(priv->workqueue); | 4387 | destroy_workqueue(priv->workqueue); |
4353 | priv->workqueue = NULL; | 4388 | priv->workqueue = NULL; |
4354 | } | 4389 | } |
@@ -6012,7 +6047,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, | |||
6012 | * ends up causing problems. So, we just handle | 6047 | * ends up causing problems. So, we just handle |
6013 | * the WX extensions through the ipw2100_ioctl interface */ | 6048 | * the WX extensions through the ipw2100_ioctl interface */ |
6014 | 6049 | ||
6015 | /* memset() puts everything to 0, so we only have explicitely set | 6050 | /* memset() puts everything to 0, so we only have explicitly set |
6016 | * those values that need to be something else */ | 6051 | * those values that need to be something else */ |
6017 | 6052 | ||
6018 | /* If power management is turned on, default to AUTO mode */ | 6053 | /* If power management is turned on, default to AUTO mode */ |
@@ -6092,6 +6127,8 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, | |||
6092 | INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work); | 6127 | INIT_DELAYED_WORK(&priv->wx_event_work, ipw2100_wx_event_work); |
6093 | INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check); | 6128 | INIT_DELAYED_WORK(&priv->hang_check, ipw2100_hang_check); |
6094 | INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); | 6129 | INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); |
6130 | INIT_WORK(&priv->scan_event_now, ipw2100_scan_event_now); | ||
6131 | INIT_DELAYED_WORK(&priv->scan_event_later, ipw2100_scan_event_later); | ||
6095 | 6132 | ||
6096 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) | 6133 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) |
6097 | ipw2100_irq_tasklet, (unsigned long)priv); | 6134 | ipw2100_irq_tasklet, (unsigned long)priv); |
@@ -7396,6 +7433,8 @@ static int ipw2100_wx_set_scan(struct net_device *dev, | |||
7396 | } | 7433 | } |
7397 | 7434 | ||
7398 | IPW_DEBUG_WX("Initiating scan...\n"); | 7435 | IPW_DEBUG_WX("Initiating scan...\n"); |
7436 | |||
7437 | priv->user_requested_scan = 1; | ||
7399 | if (ipw2100_set_scan_options(priv) || ipw2100_start_scan(priv)) { | 7438 | if (ipw2100_set_scan_options(priv) || ipw2100_start_scan(priv)) { |
7400 | IPW_DEBUG_WX("Start scan failed.\n"); | 7439 | IPW_DEBUG_WX("Start scan failed.\n"); |
7401 | 7440 | ||
@@ -7470,7 +7509,7 @@ static int ipw2100_wx_set_power(struct net_device *dev, | |||
7470 | switch (wrqu->power.flags & IW_POWER_MODE) { | 7509 | switch (wrqu->power.flags & IW_POWER_MODE) { |
7471 | case IW_POWER_ON: /* If not specified */ | 7510 | case IW_POWER_ON: /* If not specified */ |
7472 | case IW_POWER_MODE: /* If set all mask */ | 7511 | case IW_POWER_MODE: /* If set all mask */ |
7473 | case IW_POWER_ALL_R: /* If explicitely state all */ | 7512 | case IW_POWER_ALL_R: /* If explicitly state all */ |
7474 | break; | 7513 | break; |
7475 | default: /* Otherwise we don't support it */ | 7514 | default: /* Otherwise we don't support it */ |
7476 | IPW_DEBUG_WX("SET PM Mode: %X not supported.\n", | 7515 | IPW_DEBUG_WX("SET PM Mode: %X not supported.\n", |
diff --git a/drivers/net/wireless/ipw2100.h b/drivers/net/wireless/ipw2100.h index 2b8be2418fa7..bbf1ddcafba8 100644 --- a/drivers/net/wireless/ipw2100.h +++ b/drivers/net/wireless/ipw2100.h | |||
@@ -586,6 +586,10 @@ struct ipw2100_priv { | |||
586 | struct delayed_work wx_event_work; | 586 | struct delayed_work wx_event_work; |
587 | struct delayed_work hang_check; | 587 | struct delayed_work hang_check; |
588 | struct delayed_work rf_kill; | 588 | struct delayed_work rf_kill; |
589 | struct work_struct scan_event_now; | ||
590 | struct delayed_work scan_event_later; | ||
591 | |||
592 | int user_requested_scan; | ||
589 | 593 | ||
590 | u32 interrupts; | 594 | u32 interrupts; |
591 | int tx_interrupts; | 595 | int tx_interrupts; |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index feb8fcbab2d5..e3c828401b9a 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -9603,7 +9603,7 @@ static int ipw_wx_set_power(struct net_device *dev, | |||
9603 | switch (wrqu->power.flags & IW_POWER_MODE) { | 9603 | switch (wrqu->power.flags & IW_POWER_MODE) { |
9604 | case IW_POWER_ON: /* If not specified */ | 9604 | case IW_POWER_ON: /* If not specified */ |
9605 | case IW_POWER_MODE: /* If set all mask */ | 9605 | case IW_POWER_MODE: /* If set all mask */ |
9606 | case IW_POWER_ALL_R: /* If explicitely state all */ | 9606 | case IW_POWER_ALL_R: /* If explicitly state all */ |
9607 | break; | 9607 | break; |
9608 | default: /* Otherwise we don't support it */ | 9608 | default: /* Otherwise we don't support it */ |
9609 | IPW_DEBUG_WX("SET PM Mode: %X not supported.\n", | 9609 | IPW_DEBUG_WX("SET PM Mode: %X not supported.\n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index f4aabcf480e4..262ab0b55824 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -37,9 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
39 | 39 | ||
40 | #include <net/mac80211.h> | ||
41 | #include <linux/wireless.h> | ||
42 | |||
43 | #define IWL 3945 | 40 | #define IWL 3945 |
44 | 41 | ||
45 | #include "../net/mac80211/ieee80211_rate.h" | 42 | #include "../net/mac80211/ieee80211_rate.h" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index acb38750535f..19bcb01e2784 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <net/mac80211.h> | 38 | #include <net/mac80211.h> |
39 | 39 | ||
40 | #include <linux/etherdevice.h> | 40 | #include <linux/etherdevice.h> |
41 | #include <linux/delay.h> | ||
42 | 41 | ||
43 | #define IWL 3945 | 42 | #define IWL 3945 |
44 | 43 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c index 287c75705c44..8dc78c0bf1ff 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c | |||
@@ -36,9 +36,6 @@ | |||
36 | 36 | ||
37 | #include <linux/workqueue.h> | 37 | #include <linux/workqueue.h> |
38 | 38 | ||
39 | #include <net/mac80211.h> | ||
40 | #include <linux/wireless.h> | ||
41 | |||
42 | #define IWL 4965 | 39 | #define IWL 4965 |
43 | 40 | ||
44 | #include "../net/mac80211/ieee80211_rate.h" | 41 | #include "../net/mac80211/ieee80211_rate.h" |
@@ -2024,12 +2021,18 @@ static int open_file_generic(struct inode *inode, struct file *file) | |||
2024 | static void rs_dbgfs_set_mcs(struct iwl_rate_scale_priv *rs_priv, | 2021 | static void rs_dbgfs_set_mcs(struct iwl_rate_scale_priv *rs_priv, |
2025 | struct iwl_rate *mcs, int index) | 2022 | struct iwl_rate *mcs, int index) |
2026 | { | 2023 | { |
2027 | const u32 cck_rate = 0x820A; | 2024 | u32 base_rate; |
2025 | |||
2026 | if (rs_priv->phymode == (u8) MODE_IEEE80211A) | ||
2027 | base_rate = 0x800D; | ||
2028 | else | ||
2029 | base_rate = 0x820A; | ||
2030 | |||
2028 | if (rs_priv->dbg_fixed.rate_n_flags) { | 2031 | if (rs_priv->dbg_fixed.rate_n_flags) { |
2029 | if (index < 12) | 2032 | if (index < 12) |
2030 | mcs->rate_n_flags = rs_priv->dbg_fixed.rate_n_flags; | 2033 | mcs->rate_n_flags = rs_priv->dbg_fixed.rate_n_flags; |
2031 | else | 2034 | else |
2032 | mcs->rate_n_flags = cck_rate; | 2035 | mcs->rate_n_flags = base_rate; |
2033 | IWL_DEBUG_RATE("Fixed rate ON\n"); | 2036 | IWL_DEBUG_RATE("Fixed rate ON\n"); |
2034 | return; | 2037 | return; |
2035 | } | 2038 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index b50d20267c8a..557deebca1b9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -35,9 +35,7 @@ | |||
35 | #include <linux/netdevice.h> | 35 | #include <linux/netdevice.h> |
36 | #include <linux/wireless.h> | 36 | #include <linux/wireless.h> |
37 | #include <net/mac80211.h> | 37 | #include <net/mac80211.h> |
38 | #include <linux/netdevice.h> | ||
39 | #include <linux/etherdevice.h> | 38 | #include <linux/etherdevice.h> |
40 | #include <linux/delay.h> | ||
41 | 39 | ||
42 | #define IWL 4965 | 40 | #define IWL 4965 |
43 | 41 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 75e3b5c3f155..83019d1d7ccc 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -48,8 +48,6 @@ | |||
48 | #include <linux/netdevice.h> | 48 | #include <linux/netdevice.h> |
49 | #include <linux/wireless.h> | 49 | #include <linux/wireless.h> |
50 | #include <linux/firmware.h> | 50 | #include <linux/firmware.h> |
51 | #include <linux/skbuff.h> | ||
52 | #include <linux/netdevice.h> | ||
53 | #include <linux/etherdevice.h> | 51 | #include <linux/etherdevice.h> |
54 | #include <linux/if_arp.h> | 52 | #include <linux/if_arp.h> |
55 | 53 | ||
@@ -1749,21 +1747,22 @@ static void iwl_unset_hw_setting(struct iwl_priv *priv) | |||
1749 | * return : set the bit for each supported rate insert in ie | 1747 | * return : set the bit for each supported rate insert in ie |
1750 | */ | 1748 | */ |
1751 | static u16 iwl_supported_rate_to_ie(u8 *ie, u16 supported_rate, | 1749 | static u16 iwl_supported_rate_to_ie(u8 *ie, u16 supported_rate, |
1752 | u16 basic_rate, int max_count) | 1750 | u16 basic_rate, int *left) |
1753 | { | 1751 | { |
1754 | u16 ret_rates = 0, bit; | 1752 | u16 ret_rates = 0, bit; |
1755 | int i; | 1753 | int i; |
1756 | u8 *rates; | 1754 | u8 *cnt = ie; |
1757 | 1755 | u8 *rates = ie + 1; | |
1758 | rates = &(ie[1]); | ||
1759 | 1756 | ||
1760 | for (bit = 1, i = 0; i < IWL_RATE_COUNT; i++, bit <<= 1) { | 1757 | for (bit = 1, i = 0; i < IWL_RATE_COUNT; i++, bit <<= 1) { |
1761 | if (bit & supported_rate) { | 1758 | if (bit & supported_rate) { |
1762 | ret_rates |= bit; | 1759 | ret_rates |= bit; |
1763 | rates[*ie] = iwl_rates[i].ieee | | 1760 | rates[*cnt] = iwl_rates[i].ieee | |
1764 | ((bit & basic_rate) ? 0x80 : 0x00); | 1761 | ((bit & basic_rate) ? 0x80 : 0x00); |
1765 | *ie = *ie + 1; | 1762 | (*cnt)++; |
1766 | if (*ie >= max_count) | 1763 | (*left)--; |
1764 | if ((*left <= 0) || | ||
1765 | (*cnt >= IWL_SUPPORTED_RATES_IE_LEN)) | ||
1767 | break; | 1766 | break; |
1768 | } | 1767 | } |
1769 | } | 1768 | } |
@@ -1780,7 +1779,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv, | |||
1780 | { | 1779 | { |
1781 | int len = 0; | 1780 | int len = 0; |
1782 | u8 *pos = NULL; | 1781 | u8 *pos = NULL; |
1783 | u16 ret_rates; | 1782 | u16 active_rates, ret_rates, cck_rates; |
1784 | 1783 | ||
1785 | /* Make sure there is enough space for the probe request, | 1784 | /* Make sure there is enough space for the probe request, |
1786 | * two mandatory IEs and the data */ | 1785 | * two mandatory IEs and the data */ |
@@ -1825,19 +1824,27 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv, | |||
1825 | left -= 2; | 1824 | left -= 2; |
1826 | if (left < 0) | 1825 | if (left < 0) |
1827 | return 0; | 1826 | return 0; |
1827 | |||
1828 | /* ... fill it in... */ | 1828 | /* ... fill it in... */ |
1829 | *pos++ = WLAN_EID_SUPP_RATES; | 1829 | *pos++ = WLAN_EID_SUPP_RATES; |
1830 | *pos = 0; | 1830 | *pos = 0; |
1831 | ret_rates = priv->active_rate = priv->rates_mask; | 1831 | |
1832 | priv->active_rate = priv->rates_mask; | ||
1833 | active_rates = priv->active_rate; | ||
1832 | priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK; | 1834 | priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK; |
1833 | 1835 | ||
1834 | iwl_supported_rate_to_ie(pos, priv->active_rate, | 1836 | cck_rates = IWL_CCK_RATES_MASK & active_rates; |
1835 | priv->active_rate_basic, left); | 1837 | ret_rates = iwl_supported_rate_to_ie(pos, cck_rates, |
1838 | priv->active_rate_basic, &left); | ||
1839 | active_rates &= ~ret_rates; | ||
1840 | |||
1841 | ret_rates = iwl_supported_rate_to_ie(pos, active_rates, | ||
1842 | priv->active_rate_basic, &left); | ||
1843 | active_rates &= ~ret_rates; | ||
1844 | |||
1836 | len += 2 + *pos; | 1845 | len += 2 + *pos; |
1837 | pos += (*pos) + 1; | 1846 | pos += (*pos) + 1; |
1838 | ret_rates = ~ret_rates & priv->active_rate; | 1847 | if (active_rates == 0) |
1839 | |||
1840 | if (ret_rates == 0) | ||
1841 | goto fill_end; | 1848 | goto fill_end; |
1842 | 1849 | ||
1843 | /* fill in supported extended rate */ | 1850 | /* fill in supported extended rate */ |
@@ -1848,7 +1855,8 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv, | |||
1848 | /* ... fill it in... */ | 1855 | /* ... fill it in... */ |
1849 | *pos++ = WLAN_EID_EXT_SUPP_RATES; | 1856 | *pos++ = WLAN_EID_EXT_SUPP_RATES; |
1850 | *pos = 0; | 1857 | *pos = 0; |
1851 | iwl_supported_rate_to_ie(pos, ret_rates, priv->active_rate_basic, left); | 1858 | iwl_supported_rate_to_ie(pos, active_rates, |
1859 | priv->active_rate_basic, &left); | ||
1852 | if (*pos > 0) | 1860 | if (*pos > 0) |
1853 | len += 2 + *pos; | 1861 | len += 2 + *pos; |
1854 | 1862 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index b1a6e39f7821..5e1279263b22 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -48,8 +48,6 @@ | |||
48 | #include <linux/netdevice.h> | 48 | #include <linux/netdevice.h> |
49 | #include <linux/wireless.h> | 49 | #include <linux/wireless.h> |
50 | #include <linux/firmware.h> | 50 | #include <linux/firmware.h> |
51 | #include <linux/skbuff.h> | ||
52 | #include <linux/netdevice.h> | ||
53 | #include <linux/etherdevice.h> | 51 | #include <linux/etherdevice.h> |
54 | #include <linux/if_arp.h> | 52 | #include <linux/if_arp.h> |
55 | 53 | ||
@@ -1802,21 +1800,22 @@ static void iwl_unset_hw_setting(struct iwl_priv *priv) | |||
1802 | * return : set the bit for each supported rate insert in ie | 1800 | * return : set the bit for each supported rate insert in ie |
1803 | */ | 1801 | */ |
1804 | static u16 iwl_supported_rate_to_ie(u8 *ie, u16 supported_rate, | 1802 | static u16 iwl_supported_rate_to_ie(u8 *ie, u16 supported_rate, |
1805 | u16 basic_rate, int max_count) | 1803 | u16 basic_rate, int *left) |
1806 | { | 1804 | { |
1807 | u16 ret_rates = 0, bit; | 1805 | u16 ret_rates = 0, bit; |
1808 | int i; | 1806 | int i; |
1809 | u8 *rates; | 1807 | u8 *cnt = ie; |
1810 | 1808 | u8 *rates = ie + 1; | |
1811 | rates = &(ie[1]); | ||
1812 | 1809 | ||
1813 | for (bit = 1, i = 0; i < IWL_RATE_COUNT; i++, bit <<= 1) { | 1810 | for (bit = 1, i = 0; i < IWL_RATE_COUNT; i++, bit <<= 1) { |
1814 | if (bit & supported_rate) { | 1811 | if (bit & supported_rate) { |
1815 | ret_rates |= bit; | 1812 | ret_rates |= bit; |
1816 | rates[*ie] = iwl_rates[i].ieee | | 1813 | rates[*cnt] = iwl_rates[i].ieee | |
1817 | ((bit & basic_rate) ? 0x80 : 0x00); | 1814 | ((bit & basic_rate) ? 0x80 : 0x00); |
1818 | *ie = *ie + 1; | 1815 | (*cnt)++; |
1819 | if (*ie >= max_count) | 1816 | (*left)--; |
1817 | if ((*left <= 0) || | ||
1818 | (*cnt >= IWL_SUPPORTED_RATES_IE_LEN)) | ||
1820 | break; | 1819 | break; |
1821 | } | 1820 | } |
1822 | } | 1821 | } |
@@ -1839,7 +1838,7 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv, | |||
1839 | { | 1838 | { |
1840 | int len = 0; | 1839 | int len = 0; |
1841 | u8 *pos = NULL; | 1840 | u8 *pos = NULL; |
1842 | u16 ret_rates; | 1841 | u16 active_rates, ret_rates, cck_rates; |
1843 | 1842 | ||
1844 | /* Make sure there is enough space for the probe request, | 1843 | /* Make sure there is enough space for the probe request, |
1845 | * two mandatory IEs and the data */ | 1844 | * two mandatory IEs and the data */ |
@@ -1884,19 +1883,27 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv, | |||
1884 | left -= 2; | 1883 | left -= 2; |
1885 | if (left < 0) | 1884 | if (left < 0) |
1886 | return 0; | 1885 | return 0; |
1886 | |||
1887 | /* ... fill it in... */ | 1887 | /* ... fill it in... */ |
1888 | *pos++ = WLAN_EID_SUPP_RATES; | 1888 | *pos++ = WLAN_EID_SUPP_RATES; |
1889 | *pos = 0; | 1889 | *pos = 0; |
1890 | ret_rates = priv->active_rate = priv->rates_mask; | 1890 | |
1891 | priv->active_rate = priv->rates_mask; | ||
1892 | active_rates = priv->active_rate; | ||
1891 | priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK; | 1893 | priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK; |
1892 | 1894 | ||
1893 | iwl_supported_rate_to_ie(pos, priv->active_rate, | 1895 | cck_rates = IWL_CCK_RATES_MASK & active_rates; |
1894 | priv->active_rate_basic, left); | 1896 | ret_rates = iwl_supported_rate_to_ie(pos, cck_rates, |
1897 | priv->active_rate_basic, &left); | ||
1898 | active_rates &= ~ret_rates; | ||
1899 | |||
1900 | ret_rates = iwl_supported_rate_to_ie(pos, active_rates, | ||
1901 | priv->active_rate_basic, &left); | ||
1902 | active_rates &= ~ret_rates; | ||
1903 | |||
1895 | len += 2 + *pos; | 1904 | len += 2 + *pos; |
1896 | pos += (*pos) + 1; | 1905 | pos += (*pos) + 1; |
1897 | ret_rates = ~ret_rates & priv->active_rate; | 1906 | if (active_rates == 0) |
1898 | |||
1899 | if (ret_rates == 0) | ||
1900 | goto fill_end; | 1907 | goto fill_end; |
1901 | 1908 | ||
1902 | /* fill in supported extended rate */ | 1909 | /* fill in supported extended rate */ |
@@ -1907,7 +1914,8 @@ static u16 iwl_fill_probe_req(struct iwl_priv *priv, | |||
1907 | /* ... fill it in... */ | 1914 | /* ... fill it in... */ |
1908 | *pos++ = WLAN_EID_EXT_SUPP_RATES; | 1915 | *pos++ = WLAN_EID_EXT_SUPP_RATES; |
1909 | *pos = 0; | 1916 | *pos = 0; |
1910 | iwl_supported_rate_to_ie(pos, ret_rates, priv->active_rate_basic, left); | 1917 | iwl_supported_rate_to_ie(pos, active_rates, |
1918 | priv->active_rate_basic, &left); | ||
1911 | if (*pos > 0) | 1919 | if (*pos > 0) |
1912 | len += 2 + *pos; | 1920 | len += 2 + *pos; |
1913 | 1921 | ||
@@ -4494,13 +4502,13 @@ static u8 ratio2dB[100] = { | |||
4494 | * Conversion assumes that levels are voltages (20*log), not powers (10*log). */ | 4502 | * Conversion assumes that levels are voltages (20*log), not powers (10*log). */ |
4495 | int iwl_calc_db_from_ratio(int sig_ratio) | 4503 | int iwl_calc_db_from_ratio(int sig_ratio) |
4496 | { | 4504 | { |
4497 | /* Anything above 1000:1 just report as 60 dB */ | 4505 | /* 1000:1 or higher just report as 60 dB */ |
4498 | if (sig_ratio > 1000) | 4506 | if (sig_ratio >= 1000) |
4499 | return 60; | 4507 | return 60; |
4500 | 4508 | ||
4501 | /* Above 100:1, divide by 10 and use table, | 4509 | /* 100:1 or higher, divide by 10 and use table, |
4502 | * add 20 dB to make up for divide by 10 */ | 4510 | * add 20 dB to make up for divide by 10 */ |
4503 | if (sig_ratio > 100) | 4511 | if (sig_ratio >= 100) |
4504 | return (20 + (int)ratio2dB[sig_ratio/10]); | 4512 | return (20 + (int)ratio2dB[sig_ratio/10]); |
4505 | 4513 | ||
4506 | /* We shouldn't see this */ | 4514 | /* We shouldn't see this */ |
diff --git a/drivers/net/wireless/iwlwifi/iwlwifi.h b/drivers/net/wireless/iwlwifi/iwlwifi.h index e0b97c341215..432ce887807f 100644 --- a/drivers/net/wireless/iwlwifi/iwlwifi.h +++ b/drivers/net/wireless/iwlwifi/iwlwifi.h | |||
@@ -39,18 +39,13 @@ struct iwl_priv; | |||
39 | /* Hardware specific file defines the PCI IDs table for that hardware module */ | 39 | /* Hardware specific file defines the PCI IDs table for that hardware module */ |
40 | extern struct pci_device_id iwl_hw_card_ids[]; | 40 | extern struct pci_device_id iwl_hw_card_ids[]; |
41 | 41 | ||
42 | #include "iwl-hw.h" | ||
42 | #if IWL == 3945 | 43 | #if IWL == 3945 |
43 | |||
44 | #define DRV_NAME "iwl3945" | 44 | #define DRV_NAME "iwl3945" |
45 | #include "iwl-hw.h" | ||
46 | #include "iwl-3945-hw.h" | 45 | #include "iwl-3945-hw.h" |
47 | |||
48 | #elif IWL == 4965 | 46 | #elif IWL == 4965 |
49 | |||
50 | #define DRV_NAME "iwl4965" | 47 | #define DRV_NAME "iwl4965" |
51 | #include "iwl-hw.h" | ||
52 | #include "iwl-4965-hw.h" | 48 | #include "iwl-4965-hw.h" |
53 | |||
54 | #endif | 49 | #endif |
55 | 50 | ||
56 | #include "iwl-prph.h" | 51 | #include "iwl-prph.h" |
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index c2d71afd57e5..2402cb8dd328 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c | |||
@@ -4,18 +4,18 @@ | |||
4 | * Version: 0.4.1 | 4 | * Version: 0.4.1 |
5 | * Description: Netwave AirSurfer Wireless LAN PC Card driver | 5 | * Description: Netwave AirSurfer Wireless LAN PC Card driver |
6 | * Status: Experimental. | 6 | * Status: Experimental. |
7 | * Authors: John Markus Bjørndalen <johnm@cs.uit.no> | 7 | * Authors: John Markus Bjørndalen <johnm@cs.uit.no> |
8 | * Dag Brattli <dagb@cs.uit.no> | 8 | * Dag Brattli <dagb@cs.uit.no> |
9 | * David Hinds <dahinds@users.sourceforge.net> | 9 | * David Hinds <dahinds@users.sourceforge.net> |
10 | * Created at: A long time ago! | 10 | * Created at: A long time ago! |
11 | * Modified at: Mon Nov 10 11:54:37 1997 | 11 | * Modified at: Mon Nov 10 11:54:37 1997 |
12 | * Modified by: Dag Brattli <dagb@cs.uit.no> | 12 | * Modified by: Dag Brattli <dagb@cs.uit.no> |
13 | * | 13 | * |
14 | * Copyright (c) 1997 University of Tromsø, Norway | 14 | * Copyright (c) 1997 University of Tromsø, Norway |
15 | * | 15 | * |
16 | * Revision History: | 16 | * Revision History: |
17 | * | 17 | * |
18 | * 08-Nov-97 15:14:47 John Markus Bjørndalen <johnm@cs.uit.no> | 18 | * 08-Nov-97 15:14:47 John Markus Bjørndalen <johnm@cs.uit.no> |
19 | * - Fixed some bugs in netwave_rx and cleaned it up a bit. | 19 | * - Fixed some bugs in netwave_rx and cleaned it up a bit. |
20 | * (One of the bugs would have destroyed packets when receiving | 20 | * (One of the bugs would have destroyed packets when receiving |
21 | * multiple packets per interrupt). | 21 | * multiple packets per interrupt). |
@@ -158,7 +158,7 @@ static int pc_debug = PCMCIA_DEBUG; | |||
158 | module_param(pc_debug, int, 0); | 158 | module_param(pc_debug, int, 0); |
159 | #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) | 159 | #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) |
160 | static char *version = | 160 | static char *version = |
161 | "netwave_cs.c 0.3.0 Thu Jul 17 14:36:02 1997 (John Markus Bjørndalen)\n"; | 161 | "netwave_cs.c 0.3.0 Thu Jul 17 14:36:02 1997 (John Markus Bjørndalen)\n"; |
162 | #else | 162 | #else |
163 | #define DEBUG(n, args...) | 163 | #define DEBUG(n, args...) |
164 | #endif | 164 | #endif |
diff --git a/drivers/net/wireless/p54common.c b/drivers/net/wireless/p54common.c index 2c63cf0ad2cd..1437db0cf4b2 100644 --- a/drivers/net/wireless/p54common.c +++ b/drivers/net/wireless/p54common.c | |||
@@ -577,7 +577,7 @@ static int p54_set_filter(struct ieee80211_hw *dev, u16 filter_type, | |||
577 | struct p54_tx_control_filter *filter; | 577 | struct p54_tx_control_filter *filter; |
578 | 578 | ||
579 | hdr = kzalloc(sizeof(*hdr) + sizeof(*filter) + | 579 | hdr = kzalloc(sizeof(*hdr) + sizeof(*filter) + |
580 | priv->tx_hdr_len, GFP_KERNEL); | 580 | priv->tx_hdr_len, GFP_ATOMIC); |
581 | if (!hdr) | 581 | if (!hdr) |
582 | return -ENOMEM; | 582 | return -ENOMEM; |
583 | 583 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index bb6f46cfbb9f..ff399f8083e9 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -550,7 +550,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
550 | /* | 550 | /* |
551 | * Check if we need to set the Length Extension | 551 | * Check if we need to set the Length Extension |
552 | */ | 552 | */ |
553 | if (bitrate == 110 && residual <= 3) | 553 | if (bitrate == 110 && residual <= 30) |
554 | desc.service |= 0x80; | 554 | desc.service |= 0x80; |
555 | } | 555 | } |
556 | 556 | ||
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 3e42759473c3..46c8c0840a65 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -2029,6 +2029,7 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2029 | { USB_DEVICE(0x050d, 0x7050), USB_DEVICE_DATA(&rt73usb_ops) }, | 2029 | { USB_DEVICE(0x050d, 0x7050), USB_DEVICE_DATA(&rt73usb_ops) }, |
2030 | { USB_DEVICE(0x050d, 0x705a), USB_DEVICE_DATA(&rt73usb_ops) }, | 2030 | { USB_DEVICE(0x050d, 0x705a), USB_DEVICE_DATA(&rt73usb_ops) }, |
2031 | { USB_DEVICE(0x050d, 0x905b), USB_DEVICE_DATA(&rt73usb_ops) }, | 2031 | { USB_DEVICE(0x050d, 0x905b), USB_DEVICE_DATA(&rt73usb_ops) }, |
2032 | { USB_DEVICE(0x050d, 0x905c), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2032 | /* Billionton */ | 2033 | /* Billionton */ |
2033 | { USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) }, | 2034 | { USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) }, |
2034 | /* Buffalo */ | 2035 | /* Buffalo */ |
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index 0ef887dd2867..de61c8fe6492 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c | |||
@@ -131,7 +131,8 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
131 | struct rtl8187_tx_hdr *hdr; | 131 | struct rtl8187_tx_hdr *hdr; |
132 | struct rtl8187_tx_info *info; | 132 | struct rtl8187_tx_info *info; |
133 | struct urb *urb; | 133 | struct urb *urb; |
134 | u32 tmp; | 134 | __le16 rts_dur = 0; |
135 | u32 flags; | ||
135 | 136 | ||
136 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 137 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
137 | if (!urb) { | 138 | if (!urb) { |
@@ -139,24 +140,24 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb, | |||
139 | return 0; | 140 | return 0; |
140 | } | 141 | } |
141 | 142 | ||
142 | hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr)); | 143 | flags = skb->len; |
143 | tmp = skb->len - sizeof(*hdr); | 144 | flags |= RTL8187_TX_FLAG_NO_ENCRYPT; |
144 | tmp |= RTL8187_TX_FLAG_NO_ENCRYPT; | 145 | flags |= control->rts_cts_rate << 19; |
145 | tmp |= control->rts_cts_rate << 19; | 146 | flags |= control->tx_rate << 24; |
146 | tmp |= control->tx_rate << 24; | 147 | if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data)) |
147 | if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb)) | 148 | flags |= RTL8187_TX_FLAG_MORE_FRAG; |
148 | tmp |= RTL8187_TX_FLAG_MORE_FRAG; | ||
149 | if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) { | 149 | if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) { |
150 | tmp |= RTL8187_TX_FLAG_RTS; | 150 | flags |= RTL8187_TX_FLAG_RTS; |
151 | hdr->rts_duration = | 151 | rts_dur = ieee80211_rts_duration(dev, priv->if_id, skb->len, control); |
152 | ieee80211_rts_duration(dev, priv->if_id, skb->len, control); | ||
153 | } | 152 | } |
154 | if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) | 153 | if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) |
155 | tmp |= RTL8187_TX_FLAG_CTS; | 154 | flags |= RTL8187_TX_FLAG_CTS; |
156 | hdr->flags = cpu_to_le32(tmp); | 155 | |
156 | hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr)); | ||
157 | hdr->flags = cpu_to_le32(flags); | ||
157 | hdr->len = 0; | 158 | hdr->len = 0; |
158 | tmp = control->retry_limit << 8; | 159 | hdr->rts_duration = rts_dur; |
159 | hdr->retry = cpu_to_le32(tmp); | 160 | hdr->retry = cpu_to_le32(control->retry_limit << 8); |
160 | 161 | ||
161 | info = (struct rtl8187_tx_info *)skb->cb; | 162 | info = (struct rtl8187_tx_info *)skb->cb; |
162 | info->control = kmemdup(control, sizeof(*control), GFP_ATOMIC); | 163 | info->control = kmemdup(control, sizeof(*control), GFP_ATOMIC); |
@@ -587,8 +588,6 @@ static void rtl8187_configure_filter(struct ieee80211_hw *dev, | |||
587 | 588 | ||
588 | *total_flags = 0; | 589 | *total_flags = 0; |
589 | 590 | ||
590 | if (changed_flags & FIF_PROMISC_IN_BSS) | ||
591 | priv->rx_conf ^= RTL818X_RX_CONF_NICMAC; | ||
592 | if (changed_flags & FIF_ALLMULTI) | 591 | if (changed_flags & FIF_ALLMULTI) |
593 | priv->rx_conf ^= RTL818X_RX_CONF_MULTICAST; | 592 | priv->rx_conf ^= RTL818X_RX_CONF_MULTICAST; |
594 | if (changed_flags & FIF_FCSFAIL) | 593 | if (changed_flags & FIF_FCSFAIL) |
@@ -601,8 +600,6 @@ static void rtl8187_configure_filter(struct ieee80211_hw *dev, | |||
601 | if (mc_count > 0) | 600 | if (mc_count > 0) |
602 | priv->rx_conf |= RTL818X_RX_CONF_MULTICAST; | 601 | priv->rx_conf |= RTL818X_RX_CONF_MULTICAST; |
603 | 602 | ||
604 | if (priv->rx_conf & RTL818X_RX_CONF_NICMAC) | ||
605 | *total_flags |= FIF_PROMISC_IN_BSS; | ||
606 | if (priv->rx_conf & RTL818X_RX_CONF_MULTICAST) | 603 | if (priv->rx_conf & RTL818X_RX_CONF_MULTICAST) |
607 | *total_flags |= FIF_ALLMULTI; | 604 | *total_flags |= FIF_ALLMULTI; |
608 | if (priv->rx_conf & RTL818X_RX_CONF_FCS) | 605 | if (priv->rx_conf & RTL818X_RX_CONF_FCS) |
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 935b144d9b56..d5c0c66188ca 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -327,8 +327,8 @@ static void zd1201_usbrx(struct urb *urb) | |||
327 | memcpy(skb_put(skb, 6), &data[datalen-8], 6); | 327 | memcpy(skb_put(skb, 6), &data[datalen-8], 6); |
328 | memcpy(skb_put(skb, 2), &data[datalen-24], 2); | 328 | memcpy(skb_put(skb, 2), &data[datalen-24], 2); |
329 | memcpy(skb_put(skb, len), data, len); | 329 | memcpy(skb_put(skb, len), data, len); |
330 | skb->dev->last_rx = jiffies; | ||
331 | skb->protocol = eth_type_trans(skb, zd->dev); | 330 | skb->protocol = eth_type_trans(skb, zd->dev); |
331 | skb->dev->last_rx = jiffies; | ||
332 | zd->stats.rx_packets++; | 332 | zd->stats.rx_packets++; |
333 | zd->stats.rx_bytes += skb->len; | 333 | zd->stats.rx_bytes += skb->len; |
334 | netif_rx(skb); | 334 | netif_rx(skb); |
@@ -384,8 +384,8 @@ static void zd1201_usbrx(struct urb *urb) | |||
384 | memcpy(skb_put(skb, 2), &data[6], 2); | 384 | memcpy(skb_put(skb, 2), &data[6], 2); |
385 | memcpy(skb_put(skb, len), data+8, len); | 385 | memcpy(skb_put(skb, len), data+8, len); |
386 | } | 386 | } |
387 | skb->dev->last_rx = jiffies; | ||
388 | skb->protocol = eth_type_trans(skb, zd->dev); | 387 | skb->protocol = eth_type_trans(skb, zd->dev); |
388 | skb->dev->last_rx = jiffies; | ||
389 | zd->stats.rx_packets++; | 389 | zd->stats.rx_packets++; |
390 | zd->stats.rx_bytes += skb->len; | 390 | zd->stats.rx_bytes += skb->len; |
391 | netif_rx(skb); | 391 | netif_rx(skb); |
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c index b0684f965761..c755b6923812 100644 --- a/drivers/net/wireless/zd1211rw/zd_usb.c +++ b/drivers/net/wireless/zd1211rw/zd_usb.c | |||
@@ -1044,14 +1044,17 @@ error: | |||
1044 | static void disconnect(struct usb_interface *intf) | 1044 | static void disconnect(struct usb_interface *intf) |
1045 | { | 1045 | { |
1046 | struct net_device *netdev = zd_intf_to_netdev(intf); | 1046 | struct net_device *netdev = zd_intf_to_netdev(intf); |
1047 | struct zd_mac *mac = zd_netdev_mac(netdev); | 1047 | struct zd_mac *mac; |
1048 | struct zd_usb *usb = &mac->chip.usb; | 1048 | struct zd_usb *usb; |
1049 | 1049 | ||
1050 | /* Either something really bad happened, or we're just dealing with | 1050 | /* Either something really bad happened, or we're just dealing with |
1051 | * a DEVICE_INSTALLER. */ | 1051 | * a DEVICE_INSTALLER. */ |
1052 | if (netdev == NULL) | 1052 | if (netdev == NULL) |
1053 | return; | 1053 | return; |
1054 | 1054 | ||
1055 | mac = zd_netdev_mac(netdev); | ||
1056 | usb = &mac->chip.usb; | ||
1057 | |||
1055 | dev_dbg_f(zd_usb_dev(usb), "\n"); | 1058 | dev_dbg_f(zd_usb_dev(usb), "\n"); |
1056 | 1059 | ||
1057 | zd_netdev_disconnect(netdev); | 1060 | zd_netdev_disconnect(netdev); |
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 6420a90a4a92..cbde770eb121 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -240,7 +240,7 @@ config RTC_DRV_TWL92330 | |||
240 | depends on MENELAUS | 240 | depends on MENELAUS |
241 | help | 241 | help |
242 | If you say yes here you get support for the RTC on the | 242 | If you say yes here you get support for the RTC on the |
243 | TWL92330 "Menelaus" power mangement chip, used with OMAP2 | 243 | TWL92330 "Menelaus" power management chip, used with OMAP2 |
244 | platforms. The support is integrated with the rest of | 244 | platforms. The support is integrated with the rest of |
245 | the Menelaus driver; it's not separate module. | 245 | the Menelaus driver; it's not separate module. |
246 | 246 | ||
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index 8b9d68f6e016..5b7385e430ea 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c | |||
@@ -40,7 +40,7 @@ struct DCTL_data { | |||
40 | * | 40 | * |
41 | * Each bit configuration leading to an action code 2 (Exit with | 41 | * Each bit configuration leading to an action code 2 (Exit with |
42 | * programming error or unusual condition indication) | 42 | * programming error or unusual condition indication) |
43 | * are handled as fatal error´s. | 43 | * are handled as fatal errors. |
44 | * | 44 | * |
45 | * All other configurations are handled as recoverable errors. | 45 | * All other configurations are handled as recoverable errors. |
46 | * | 46 | * |
@@ -2001,7 +2001,7 @@ dasd_3990_erp_compound_code(struct dasd_ccw_req * erp, char *sense) | |||
2001 | switch (sense[28]) { | 2001 | switch (sense[28]) { |
2002 | case 0x17: | 2002 | case 0x17: |
2003 | /* issue a Diagnostic Control command with an | 2003 | /* issue a Diagnostic Control command with an |
2004 | * Inhibit Write subcommand and controler modifier */ | 2004 | * Inhibit Write subcommand and controller modifier */ |
2005 | erp = dasd_3990_erp_DCTL(erp, 0x20); | 2005 | erp = dasd_3990_erp_DCTL(erp, 0x20); |
2006 | break; | 2006 | break; |
2007 | 2007 | ||
diff --git a/drivers/s390/char/sclp_cpi.c b/drivers/s390/char/sclp_cpi.c index 29fe2a5ec2fe..82a13d9fdfe4 100644 --- a/drivers/s390/char/sclp_cpi.c +++ b/drivers/s390/char/sclp_cpi.c | |||
@@ -157,7 +157,7 @@ cpi_prepare_req(void) | |||
157 | sclp_ascebc_str(evb->system_name, CPI_LENGTH_SYSTEM_NAME); | 157 | sclp_ascebc_str(evb->system_name, CPI_LENGTH_SYSTEM_NAME); |
158 | EBC_TOUPPER(evb->system_name, CPI_LENGTH_SYSTEM_NAME); | 158 | EBC_TOUPPER(evb->system_name, CPI_LENGTH_SYSTEM_NAME); |
159 | 159 | ||
160 | /* set sytem level */ | 160 | /* set system level */ |
161 | evb->system_level = LINUX_VERSION_CODE; | 161 | evb->system_level = LINUX_VERSION_CODE; |
162 | 162 | ||
163 | /* set sysplex name */ | 163 | /* set sysplex name */ |
diff --git a/drivers/s390/cio/cmf.c b/drivers/s390/cio/cmf.c index b960f66843e4..725b0dd14269 100644 --- a/drivers/s390/cio/cmf.c +++ b/drivers/s390/cio/cmf.c | |||
@@ -158,7 +158,7 @@ static inline u64 time_to_avg_nsec(u32 value, u32 count) | |||
158 | if (count == 0) | 158 | if (count == 0) |
159 | return 0; | 159 | return 0; |
160 | 160 | ||
161 | /* value comes in units of 128 µsec */ | 161 | /* value comes in units of 128 µsec */ |
162 | ret = time_to_nsec(value); | 162 | ret = time_to_nsec(value); |
163 | do_div(ret, count); | 163 | do_div(ret, count); |
164 | 164 | ||
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 449937233732..6bf3ebbe985a 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation | 4 | * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation |
5 | * Author(s): Fritz Elfert (elfert@de.ibm.com, felfert@millenux.com) | 5 | * Author(s): Fritz Elfert (elfert@de.ibm.com, felfert@millenux.com) |
6 | * Fixes by : Jochen Röhrig (roehrig@de.ibm.com) | 6 | * Fixes by : Jochen Röhrig (roehrig@de.ibm.com) |
7 | * Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 7 | * Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
8 | Peter Tiedemann (ptiedem@de.ibm.com) | 8 | Peter Tiedemann (ptiedem@de.ibm.com) |
9 | * Driver Model stuff by : Cornelia Huck <cornelia.huck@de.ibm.com> | 9 | * Driver Model stuff by : Cornelia Huck <cornelia.huck@de.ibm.com> |
@@ -19,7 +19,7 @@ | |||
19 | * Dieter Wellerdiek (wel@de.ibm.com) | 19 | * Dieter Wellerdiek (wel@de.ibm.com) |
20 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 20 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
21 | * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) | 21 | * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) |
22 | * Jochen Röhrig (roehrig@de.ibm.com) | 22 | * Jochen Röhrig (roehrig@de.ibm.com) |
23 | * | 23 | * |
24 | * This program is free software; you can redistribute it and/or modify | 24 | * This program is free software; you can redistribute it and/or modify |
25 | * it under the terms of the GNU General Public License as published by | 25 | * it under the terms of the GNU General Public License as published by |
@@ -885,7 +885,7 @@ ch_action_firstio(fsm_instance * fi, int event, void *arg) | |||
885 | } | 885 | } |
886 | 886 | ||
887 | /** | 887 | /** |
888 | * Don´t setup a timer for receiving the initial RX frame | 888 | * Don't setup a timer for receiving the initial RX frame |
889 | * if in compatibility mode, since VM TCP delays the initial | 889 | * if in compatibility mode, since VM TCP delays the initial |
890 | * frame until it has some data to send. | 890 | * frame until it has some data to send. |
891 | */ | 891 | */ |
@@ -905,10 +905,10 @@ ch_action_firstio(fsm_instance * fi, int event, void *arg) | |||
905 | ccw_check_return_code(ch, rc, "init IO"); | 905 | ccw_check_return_code(ch, rc, "init IO"); |
906 | } | 906 | } |
907 | /** | 907 | /** |
908 | * If in compatibility mode since we don´t setup a timer, we | 908 | * If in compatibility mode since we don't setup a timer, we |
909 | * also signal RX channel up immediately. This enables us | 909 | * also signal RX channel up immediately. This enables us |
910 | * to send packets early which in turn usually triggers some | 910 | * to send packets early which in turn usually triggers some |
911 | * reply from VM TCP which brings up the RX channel to it´s | 911 | * reply from VM TCP which brings up the RX channel to it's |
912 | * final state. | 912 | * final state. |
913 | */ | 913 | */ |
914 | if ((CHANNEL_DIRECTION(ch->flags) == READ) && | 914 | if ((CHANNEL_DIRECTION(ch->flags) == READ) && |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index a2d08c9ba3c4..ff999ff0b627 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -6643,7 +6643,8 @@ qeth_netdev_init(struct net_device *dev) | |||
6643 | dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; | 6643 | dev->vlan_rx_kill_vid = qeth_vlan_rx_kill_vid; |
6644 | dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; | 6644 | dev->vlan_rx_add_vid = qeth_vlan_rx_add_vid; |
6645 | #endif | 6645 | #endif |
6646 | dev->header_ops = &qeth_null_ops; | 6646 | if (qeth_get_netdev_flags(card) & IFF_NOARP) |
6647 | dev->header_ops = &qeth_null_ops; | ||
6647 | 6648 | ||
6648 | #ifdef CONFIG_QETH_IPV6 | 6649 | #ifdef CONFIG_QETH_IPV6 |
6649 | /*IPv6 address autoconfiguration stuff*/ | 6650 | /*IPv6 address autoconfiguration stuff*/ |
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 03b51025a8f4..9abba8b90f70 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -1526,7 +1526,7 @@ struct aac_mntent { | |||
1526 | __le32 capacityhigh; | 1526 | __le32 capacityhigh; |
1527 | }; | 1527 | }; |
1528 | 1528 | ||
1529 | #define FSCS_NOTCLEAN 0x0001 /* fsck is neccessary before mounting */ | 1529 | #define FSCS_NOTCLEAN 0x0001 /* fsck is necessary before mounting */ |
1530 | #define FSCS_READONLY 0x0002 /* possible result of broken mirror */ | 1530 | #define FSCS_READONLY 0x0002 /* possible result of broken mirror */ |
1531 | #define FSCS_HIDDEN 0x0004 /* should be ignored - set during a clear */ | 1531 | #define FSCS_HIDDEN 0x0004 /* should be ignored - set during a clear */ |
1532 | 1532 | ||
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index f08e71e0205a..a58c265dc8af 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* aha152x.c -- Adaptec AHA-152x driver | 1 | /* aha152x.c -- Adaptec AHA-152x driver |
2 | * Author: Jürgen E. Fischer, fischer@norbit.de | 2 | * Author: Jürgen E. Fischer, fischer@norbit.de |
3 | * Copyright 1993-2004 Jürgen E. Fischer | 3 | * Copyright 1993-2004 Jürgen E. Fischer |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms of the GNU General Public License as published by the | 6 | * under the terms of the GNU General Public License as published by the |
@@ -357,7 +357,7 @@ enum { | |||
357 | check_condition = 0x0800, /* requesting sense after CHECK CONDITION */ | 357 | check_condition = 0x0800, /* requesting sense after CHECK CONDITION */ |
358 | }; | 358 | }; |
359 | 359 | ||
360 | MODULE_AUTHOR("Jürgen Fischer"); | 360 | MODULE_AUTHOR("Jürgen Fischer"); |
361 | MODULE_DESCRIPTION(AHA152X_REVID); | 361 | MODULE_DESCRIPTION(AHA152X_REVID); |
362 | MODULE_LICENSE("GPL"); | 362 | MODULE_LICENSE("GPL"); |
363 | 363 | ||
diff --git a/drivers/scsi/aic7xxx/cam.h b/drivers/scsi/aic7xxx/cam.h index 26f17e3fc45c..687aef6ef185 100644 --- a/drivers/scsi/aic7xxx/cam.h +++ b/drivers/scsi/aic7xxx/cam.h | |||
@@ -48,7 +48,7 @@ typedef enum { | |||
48 | CAM_REQ_ABORTED, /* CCB request aborted by the host */ | 48 | CAM_REQ_ABORTED, /* CCB request aborted by the host */ |
49 | CAM_UA_ABORT, /* Unable to abort CCB request */ | 49 | CAM_UA_ABORT, /* Unable to abort CCB request */ |
50 | CAM_REQ_CMP_ERR, /* CCB request completed with an error */ | 50 | CAM_REQ_CMP_ERR, /* CCB request completed with an error */ |
51 | CAM_BUSY, /* CAM subsytem is busy */ | 51 | CAM_BUSY, /* CAM subsystem is busy */ |
52 | CAM_REQ_INVALID, /* CCB request was invalid */ | 52 | CAM_REQ_INVALID, /* CCB request was invalid */ |
53 | CAM_PATH_INVALID, /* Supplied Path ID is invalid */ | 53 | CAM_PATH_INVALID, /* Supplied Path ID is invalid */ |
54 | CAM_SEL_TIMEOUT, /* Target Selection Timeout */ | 54 | CAM_SEL_TIMEOUT, /* Target Selection Timeout */ |
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index fd42d4789202..a9def6e1d30e 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -1808,12 +1808,12 @@ static irqreturn_t dc395x_interrupt(int irq, void *dev_id) | |||
1808 | irqreturn_t handled = IRQ_NONE; | 1808 | irqreturn_t handled = IRQ_NONE; |
1809 | 1809 | ||
1810 | /* | 1810 | /* |
1811 | * Check for pending interupt | 1811 | * Check for pending interrupt |
1812 | */ | 1812 | */ |
1813 | scsi_status = DC395x_read16(acb, TRM_S1040_SCSI_STATUS); | 1813 | scsi_status = DC395x_read16(acb, TRM_S1040_SCSI_STATUS); |
1814 | dma_status = DC395x_read8(acb, TRM_S1040_DMA_STATUS); | 1814 | dma_status = DC395x_read8(acb, TRM_S1040_DMA_STATUS); |
1815 | if (scsi_status & SCSIINTERRUPT) { | 1815 | if (scsi_status & SCSIINTERRUPT) { |
1816 | /* interupt pending - let's process it! */ | 1816 | /* interrupt pending - let's process it! */ |
1817 | dc395x_handle_interrupt(acb, scsi_status); | 1817 | dc395x_handle_interrupt(acb, scsi_status); |
1818 | handled = IRQ_HANDLED; | 1818 | handled = IRQ_HANDLED; |
1819 | } | 1819 | } |
@@ -4579,7 +4579,7 @@ static void adapter_uninit_chip(struct AdapterCtlBlk *acb) | |||
4579 | if (acb->config & HCC_SCSI_RESET) | 4579 | if (acb->config & HCC_SCSI_RESET) |
4580 | reset_scsi_bus(acb); | 4580 | reset_scsi_bus(acb); |
4581 | 4581 | ||
4582 | /* clear any pending interupt state */ | 4582 | /* clear any pending interrupt state */ |
4583 | DC395x_read8(acb, TRM_S1040_SCSI_INTSTATUS); | 4583 | DC395x_read8(acb, TRM_S1040_SCSI_INTSTATUS); |
4584 | } | 4584 | } |
4585 | 4585 | ||
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index e4e4c6a39ed6..78779209ac89 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
@@ -427,7 +427,7 @@ megaraid_exit(void) | |||
427 | * @id : pci device id of the class of controllers | 427 | * @id : pci device id of the class of controllers |
428 | * | 428 | * |
429 | * This routine should be called whenever a new adapter is detected by the | 429 | * This routine should be called whenever a new adapter is detected by the |
430 | * PCI hotplug susbsytem. | 430 | * PCI hotplug susbsystem. |
431 | */ | 431 | */ |
432 | static int __devinit | 432 | static int __devinit |
433 | megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | 433 | megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c index 1e29f51d596b..d692c713416a 100644 --- a/drivers/scsi/qla4xxx/ql4_init.c +++ b/drivers/scsi/qla4xxx/ql4_init.c | |||
@@ -1006,7 +1006,7 @@ int ql4xxx_lock_drvr_wait(struct scsi_qla_host *a) | |||
1006 | * qla4xxx_start_firmware - starts qla4xxx firmware | 1006 | * qla4xxx_start_firmware - starts qla4xxx firmware |
1007 | * @ha: Pointer to host adapter structure. | 1007 | * @ha: Pointer to host adapter structure. |
1008 | * | 1008 | * |
1009 | * This routine performs the neccessary steps to start the firmware for | 1009 | * This routine performs the necessary steps to start the firmware for |
1010 | * the QLA4010 adapter. | 1010 | * the QLA4010 adapter. |
1011 | **/ | 1011 | **/ |
1012 | static int qla4xxx_start_firmware(struct scsi_qla_host *ha) | 1012 | static int qla4xxx_start_firmware(struct scsi_qla_host *ha) |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 69f542c4923c..a69b155f39a2 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -676,7 +676,7 @@ static int sd_getgeo(struct block_device *bdev, struct hd_geometry *geo) | |||
676 | * success as well). Returns a negated errno value in case of error. | 676 | * success as well). Returns a negated errno value in case of error. |
677 | * | 677 | * |
678 | * Note: most ioctls are forward onto the block subsystem or further | 678 | * Note: most ioctls are forward onto the block subsystem or further |
679 | * down in the scsi subsytem. | 679 | * down in the scsi subsystem. |
680 | **/ | 680 | **/ |
681 | static int sd_ioctl(struct inode * inode, struct file * filp, | 681 | static int sd_ioctl(struct inode * inode, struct file * filp, |
682 | unsigned int cmd, unsigned long arg) | 682 | unsigned int cmd, unsigned long arg) |
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index dc15a22105f7..4aafe89b557f 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c | |||
@@ -1596,7 +1596,7 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd, | |||
1596 | * IO while SEL is true. But again, there are some disks out the in the | 1596 | * IO while SEL is true. But again, there are some disks out the in the |
1597 | * world that do that nevertheless. (Somebody claimed that this announces | 1597 | * world that do that nevertheless. (Somebody claimed that this announces |
1598 | * reselection capability of the target.) So we better skip that test and | 1598 | * reselection capability of the target.) So we better skip that test and |
1599 | * only wait for BSY... (Famous german words: Der Klügere gibt nach :-) | 1599 | * only wait for BSY... (Famous german words: Der Klügere gibt nach :-) |
1600 | */ | 1600 | */ |
1601 | 1601 | ||
1602 | while (time_before(jiffies, timeout) && !(NCR5380_read(STATUS_REG) & | 1602 | while (time_before(jiffies, timeout) && !(NCR5380_read(STATUS_REG) & |
diff --git a/drivers/scsi/sym53c8xx_2/sym_fw2.h b/drivers/scsi/sym53c8xx_2/sym_fw2.h index 6e5b952312e3..ae1fb179b88e 100644 --- a/drivers/scsi/sym53c8xx_2/sym_fw2.h +++ b/drivers/scsi/sym53c8xx_2/sym_fw2.h | |||
@@ -1781,7 +1781,7 @@ static struct SYM_FWB_SCR SYM_FWB_SCR = { | |||
1781 | * While testing with bogus QUANTUM drives, the C1010 | 1781 | * While testing with bogus QUANTUM drives, the C1010 |
1782 | * sometimes raised a spurious phase mismatch with | 1782 | * sometimes raised a spurious phase mismatch with |
1783 | * WSR and the CHMOV(1) triggered another PM. | 1783 | * WSR and the CHMOV(1) triggered another PM. |
1784 | * Waiting explicitely for the PHASE seemed to avoid | 1784 | * Waiting explicitly for the PHASE seemed to avoid |
1785 | * the nested phase mismatch. Btw, this didn't happen | 1785 | * the nested phase mismatch. Btw, this didn't happen |
1786 | * using my IBM drives. | 1786 | * using my IBM drives. |
1787 | */ | 1787 | */ |
diff --git a/drivers/scsi/wd33c93.h b/drivers/scsi/wd33c93.h index 61ffb860dacc..00123f2383d7 100644 --- a/drivers/scsi/wd33c93.h +++ b/drivers/scsi/wd33c93.h | |||
@@ -155,7 +155,7 @@ | |||
155 | #define WD33C93_FS_12_15 OWNID_FS_12 | 155 | #define WD33C93_FS_12_15 OWNID_FS_12 |
156 | #define WD33C93_FS_16_20 OWNID_FS_16 | 156 | #define WD33C93_FS_16_20 OWNID_FS_16 |
157 | 157 | ||
158 | /* pass input-clock explicitely. accepted mhz values are 8-10,12-20 */ | 158 | /* pass input-clock explicitly. accepted mhz values are 8-10,12-20 */ |
159 | #define WD33C93_FS_MHZ(mhz) (mhz) | 159 | #define WD33C93_FS_MHZ(mhz) (mhz) |
160 | 160 | ||
161 | /* Control register */ | 161 | /* Control register */ |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index d6ae38e55d01..87665d7df6f2 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -62,11 +62,11 @@ config SERIAL_8250_CONSOLE | |||
62 | kernel will automatically use the first serial line, /dev/ttyS0, as | 62 | kernel will automatically use the first serial line, /dev/ttyS0, as |
63 | system console. | 63 | system console. |
64 | 64 | ||
65 | you can set that using a kernel command line option such as | 65 | You can set that using a kernel command line option such as |
66 | "console=uart8250,io,0x3f8,9600n8" | 66 | "console=uart8250,io,0x3f8,9600n8" |
67 | "console=uart8250,mmio,0xff5e0000,115200n8". | 67 | "console=uart8250,mmio,0xff5e0000,115200n8". |
68 | and it will switch to normal serial console when correponding port is | 68 | and it will switch to normal serial console when the corresponding |
69 | ready. | 69 | port is ready. |
70 | "earlycon=uart8250,io,0x3f8,9600n8" | 70 | "earlycon=uart8250,io,0x3f8,9600n8" |
71 | "earlycon=uart8250,mmio,0xff5e0000,115200n8". | 71 | "earlycon=uart8250,mmio,0xff5e0000,115200n8". |
72 | it will not only setup early console. | 72 | it will not only setup early console. |
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 3f26c4b2f322..e773c8e14962 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c | |||
@@ -20,8 +20,8 @@ | |||
20 | * - S3C2410 and S3C2440 serial support | 20 | * - S3C2410 and S3C2440 serial support |
21 | * - Power Management support | 21 | * - Power Management support |
22 | * - Fix console via IrDA devices | 22 | * - Fix console via IrDA devices |
23 | * - SysReq (Herbert Pötzl) | 23 | * - SysReq (Herbert Pötzl) |
24 | * - Break character handling (Herbert Pötzl) | 24 | * - Break character handling (Herbert Pötzl) |
25 | * - spin-lock initialisation (Dimitry Andric) | 25 | * - spin-lock initialisation (Dimitry Andric) |
26 | * - added clock control | 26 | * - added clock control |
27 | * - updated init code to use platform_device info | 27 | * - updated init code to use platform_device info |
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c index e9aba932f217..7051e6c5edc3 100644 --- a/drivers/spi/mpc52xx_psc_spi.c +++ b/drivers/spi/mpc52xx_psc_spi.c | |||
@@ -181,7 +181,7 @@ static int mpc52xx_psc_spi_transfer_rxtx(struct spi_device *spi, | |||
181 | } | 181 | } |
182 | 182 | ||
183 | 183 | ||
184 | /* enable interupts and wait for wake up | 184 | /* enable interrupts and wait for wake up |
185 | * if just one byte is expected the Rx FIFO genererates no | 185 | * if just one byte is expected the Rx FIFO genererates no |
186 | * FFULL interrupt, so activate the RxRDY interrupt | 186 | * FFULL interrupt, so activate the RxRDY interrupt |
187 | */ | 187 | */ |
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c index e78c2ddc1f88..367b75c0b25b 100644 --- a/drivers/usb/gadget/lh7a40x_udc.c +++ b/drivers/usb/gadget/lh7a40x_udc.c | |||
@@ -1272,7 +1272,7 @@ static int lh7a40x_set_halt(struct usb_ep *_ep, int value) | |||
1272 | /* | 1272 | /* |
1273 | * Attempts to halt IN endpoints will fail (returning -EAGAIN) | 1273 | * Attempts to halt IN endpoints will fail (returning -EAGAIN) |
1274 | * if any transfer requests are still queued, or if the controller | 1274 | * if any transfer requests are still queued, or if the controller |
1275 | * FIFO still holds bytes that the host hasn’t collected. | 1275 | * FIFO still holds bytes that the host hasn't collected. |
1276 | */ | 1276 | */ |
1277 | spin_unlock_irqrestore(&ep->dev->lock, flags); | 1277 | spin_unlock_irqrestore(&ep->dev->lock, flags); |
1278 | DEBUG | 1278 | DEBUG |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 0dcb4164dc83..735db4aec831 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -451,7 +451,7 @@ ehci_hub_status_data (struct usb_hcd *hcd, char *buf) | |||
451 | 451 | ||
452 | /* Some boards (mostly VIA?) report bogus overcurrent indications, | 452 | /* Some boards (mostly VIA?) report bogus overcurrent indications, |
453 | * causing massive log spam unless we completely ignore them. It | 453 | * causing massive log spam unless we completely ignore them. It |
454 | * may be relevant that VIA VT8235 controlers, where PORT_POWER is | 454 | * may be relevant that VIA VT8235 controllers, where PORT_POWER is |
455 | * always set, seem to clear PORT_OCC and PORT_CSC when writing to | 455 | * always set, seem to clear PORT_OCC and PORT_CSC when writing to |
456 | * PORT_POWER; that's surprising, but maybe within-spec. | 456 | * PORT_POWER; that's surprising, but maybe within-spec. |
457 | */ | 457 | */ |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 94d859aa73f8..ba370c56172c 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -1556,7 +1556,7 @@ sl811h_start(struct usb_hcd *hcd) | |||
1556 | hcd->power_budget = sl811->board->power * 2; | 1556 | hcd->power_budget = sl811->board->power * 2; |
1557 | } | 1557 | } |
1558 | 1558 | ||
1559 | /* enable power and interupts */ | 1559 | /* enable power and interrupts */ |
1560 | port_power(sl811, 1); | 1560 | port_power(sl811, 1); |
1561 | 1561 | ||
1562 | return 0; | 1562 | return 0; |
diff --git a/drivers/usb/image/Kconfig b/drivers/usb/image/Kconfig index 95ce703110d2..7595dfb38e3b 100644 --- a/drivers/usb/image/Kconfig +++ b/drivers/usb/image/Kconfig | |||
@@ -1,5 +1,5 @@ | |||
1 | # | 1 | # |
2 | # USB Imageing devices configuration | 2 | # USB Imaging devices configuration |
3 | # | 3 | # |
4 | comment "USB Imaging devices" | 4 | comment "USB Imaging devices" |
5 | depends on USB | 5 | depends on USB |
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c index 04e87acd6e46..2677fea147d9 100644 --- a/drivers/usb/misc/cytherm.c +++ b/drivers/usb/misc/cytherm.c | |||
@@ -118,7 +118,7 @@ static ssize_t set_brightness(struct device *dev, struct device_attribute *attr, | |||
118 | cytherm->brightness, buffer, 8); | 118 | cytherm->brightness, buffer, 8); |
119 | if (retval) | 119 | if (retval) |
120 | dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); | 120 | dev_dbg(&cytherm->udev->dev, "retval = %d\n", retval); |
121 | /* Inform µC that we have changed the brightness setting */ | 121 | /* Inform µC that we have changed the brightness setting */ |
122 | retval = vendor_command(cytherm->udev, WRITE_RAM, BRIGHTNESS_SEM, | 122 | retval = vendor_command(cytherm->udev, WRITE_RAM, BRIGHTNESS_SEM, |
123 | 0x01, buffer, 8); | 123 | 0x01, buffer, 8); |
124 | if (retval) | 124 | if (retval) |
diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c index 5c0a26cbd128..cd137577bb2d 100644 --- a/drivers/usb/misc/emi26.c +++ b/drivers/usb/misc/emi26.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Emagic EMI 2|6 usb audio interface firmware loader. | 2 | * Emagic EMI 2|6 usb audio interface firmware loader. |
3 | * Copyright (C) 2002 | 3 | * Copyright (C) 2002 |
4 | * Tapio Laxström (tapio.laxstrom@iptime.fi) | 4 | * Tapio Laxström (tapio.laxstrom@iptime.fi) |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License, as published by | 7 | * it under the terms of the GNU General Public License, as published by |
@@ -249,7 +249,7 @@ static void __exit emi26_exit (void) | |||
249 | module_init(emi26_init); | 249 | module_init(emi26_init); |
250 | module_exit(emi26_exit); | 250 | module_exit(emi26_exit); |
251 | 251 | ||
252 | MODULE_AUTHOR("tapio laxström"); | 252 | MODULE_AUTHOR("Tapio Laxström"); |
253 | MODULE_DESCRIPTION("Emagic EMI 2|6 firmware loader."); | 253 | MODULE_DESCRIPTION("Emagic EMI 2|6 firmware loader."); |
254 | MODULE_LICENSE("GPL"); | 254 | MODULE_LICENSE("GPL"); |
255 | 255 | ||
diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c index 23153eac0dfa..4758cc5ccebc 100644 --- a/drivers/usb/misc/emi62.c +++ b/drivers/usb/misc/emi62.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Emagic EMI 2|6 usb audio interface firmware loader. | 2 | * Emagic EMI 2|6 usb audio interface firmware loader. |
3 | * Copyright (C) 2002 | 3 | * Copyright (C) 2002 |
4 | * Tapio Laxström (tapio.laxstrom@iptime.fi) | 4 | * Tapio Laxström (tapio.laxstrom@iptime.fi) |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License, as published by | 7 | * it under the terms of the GNU General Public License, as published by |
@@ -292,7 +292,7 @@ static void __exit emi62_exit (void) | |||
292 | module_init(emi62_init); | 292 | module_init(emi62_init); |
293 | module_exit(emi62_exit); | 293 | module_exit(emi62_exit); |
294 | 294 | ||
295 | MODULE_AUTHOR("tapio laxström"); | 295 | MODULE_AUTHOR("Tapio Laxström"); |
296 | MODULE_DESCRIPTION("Emagic EMI 6|2m firmware loader."); | 296 | MODULE_DESCRIPTION("Emagic EMI 6|2m firmware loader."); |
297 | MODULE_LICENSE("GPL"); | 297 | MODULE_LICENSE("GPL"); |
298 | 298 | ||
diff --git a/drivers/usb/serial/ChangeLog.history b/drivers/usb/serial/ChangeLog.history index 52c4f7bd7a80..c1b279939bbf 100644 --- a/drivers/usb/serial/ChangeLog.history +++ b/drivers/usb/serial/ChangeLog.history | |||
@@ -400,7 +400,7 @@ visor.c Change Log comments: | |||
400 | 400 | ||
401 | (11/11/2001) gkh | 401 | (11/11/2001) gkh |
402 | Added support for the m125 devices, and added check to prevent oopses | 402 | Added support for the m125 devices, and added check to prevent oopses |
403 | for Clié devices that lie about the number of ports they have. | 403 | for Clié devices that lie about the number of ports they have. |
404 | 404 | ||
405 | (08/30/2001) gkh | 405 | (08/30/2001) gkh |
406 | Added support for the Clie devices, both the 3.5 and 4.0 os versions. | 406 | Added support for the Clie devices, both the 3.5 and 4.0 os versions. |
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index 99fefed77919..4a86696e6c7d 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig | |||
@@ -527,7 +527,7 @@ config USB_SERIAL_CYBERJACK | |||
527 | depends on USB_SERIAL && EXPERIMENTAL | 527 | depends on USB_SERIAL && EXPERIMENTAL |
528 | ---help--- | 528 | ---help--- |
529 | Say Y here if you want to use a cyberJack pinpad/e-com USB chipcard | 529 | Say Y here if you want to use a cyberJack pinpad/e-com USB chipcard |
530 | reader. This is an interface to ISO 7816 compatible contactbased | 530 | reader. This is an interface to ISO 7816 compatible contact-based |
531 | chipcards, e.g. GSM SIMs. | 531 | chipcards, e.g. GSM SIMs. |
532 | 532 | ||
533 | To compile this driver as a module, choose M here: the | 533 | To compile this driver as a module, choose M here: the |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 65257867b34b..8a8a6b9fb05b 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -83,7 +83,7 @@ | |||
83 | * | 83 | * |
84 | * (18/Jun/2003) Ian Abbott | 84 | * (18/Jun/2003) Ian Abbott |
85 | * Added Device ID of the USB relais from Rudolf Gugler (backported from | 85 | * Added Device ID of the USB relais from Rudolf Gugler (backported from |
86 | * Philipp Gühring's patch for 2.5.x kernel). | 86 | * Philipp Gühring's patch for 2.5.x kernel). |
87 | * Moved read transfer buffer reallocation into startup function. | 87 | * Moved read transfer buffer reallocation into startup function. |
88 | * Free existing write urb and transfer buffer in startup function. | 88 | * Free existing write urb and transfer buffer in startup function. |
89 | * Only use urbs in write urb pool that were successfully allocated. | 89 | * Only use urbs in write urb pool that were successfully allocated. |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index b57b90ae9f9d..b51cbb0eaa05 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * Bill Ryder - bryder@sgi.com formerly of Silicon Graphics, Inc.- wrote the | 17 | * Bill Ryder - bryder@sgi.com formerly of Silicon Graphics, Inc.- wrote the |
18 | * FTDI_SIO implementation. | 18 | * FTDI_SIO implementation. |
19 | * | 19 | * |
20 | * Philipp Gühring - pg@futureware.at - added the Device ID of the USB relais | 20 | * Philipp Gühring - pg@futureware.at - added the Device ID of the USB relais |
21 | * from Rudolf Gugler | 21 | * from Rudolf Gugler |
22 | * | 22 | * |
23 | */ | 23 | */ |
@@ -44,7 +44,7 @@ | |||
44 | #define FTDI_ACTZWAVE_PID 0xF2D0 | 44 | #define FTDI_ACTZWAVE_PID 0xF2D0 |
45 | 45 | ||
46 | 46 | ||
47 | /* www.starting-point-systems.com µChameleon device */ | 47 | /* www.starting-point-systems.com µChameleon device */ |
48 | #define FTDI_MICRO_CHAMELEON_PID 0xCAA0 /* Product Id */ | 48 | #define FTDI_MICRO_CHAMELEON_PID 0xCAA0 /* Product Id */ |
49 | 49 | ||
50 | /* www.irtrans.de device */ | 50 | /* www.irtrans.de device */ |
@@ -419,7 +419,7 @@ | |||
419 | 419 | ||
420 | /* | 420 | /* |
421 | * Teratronik product ids. | 421 | * Teratronik product ids. |
422 | * Submitted by O. Wölfelschneider. | 422 | * Submitted by O. Wölfelschneider. |
423 | */ | 423 | */ |
424 | #define FTDI_TERATRONIK_VCP_PID 0xEC88 /* Teratronik device (preferring VCP driver on windows) */ | 424 | #define FTDI_TERATRONIK_VCP_PID 0xEC88 /* Teratronik device (preferring VCP driver on windows) */ |
425 | #define FTDI_TERATRONIK_D2XX_PID 0xEC89 /* Teratronik device (preferring D2XX driver on windows) */ | 425 | #define FTDI_TERATRONIK_D2XX_PID 0xEC89 /* Teratronik device (preferring D2XX driver on windows) */ |
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index e836ad07fdb9..9b38a08ac83a 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c | |||
@@ -306,7 +306,7 @@ static struct usb_device_id ipaq_id_table [] = { | |||
306 | { USB_DEVICE(0x0930, 0x0705) }, /* TOSHIBA Pocket PC e310 */ | 306 | { USB_DEVICE(0x0930, 0x0705) }, /* TOSHIBA Pocket PC e310 */ |
307 | { USB_DEVICE(0x0930, 0x0706) }, /* TOSHIBA Pocket PC e740 */ | 307 | { USB_DEVICE(0x0930, 0x0706) }, /* TOSHIBA Pocket PC e740 */ |
308 | { USB_DEVICE(0x0930, 0x0707) }, /* TOSHIBA Pocket PC e330 Series */ | 308 | { USB_DEVICE(0x0930, 0x0707) }, /* TOSHIBA Pocket PC e330 Series */ |
309 | { USB_DEVICE(0x0930, 0x0708) }, /* TOSHIBA Pocket PC e350 Series */ | 309 | { USB_DEVICE(0x0930, 0x0708) }, /* TOSHIBA Pocket PC e350 Series */ |
310 | { USB_DEVICE(0x0930, 0x0709) }, /* TOSHIBA Pocket PC e750 Series */ | 310 | { USB_DEVICE(0x0930, 0x0709) }, /* TOSHIBA Pocket PC e750 Series */ |
311 | { USB_DEVICE(0x0930, 0x070A) }, /* TOSHIBA Pocket PC e400 Series */ | 311 | { USB_DEVICE(0x0930, 0x070A) }, /* TOSHIBA Pocket PC e400 Series */ |
312 | { USB_DEVICE(0x0930, 0x070B) }, /* TOSHIBA Pocket PC e800 Series */ | 312 | { USB_DEVICE(0x0930, 0x070B) }, /* TOSHIBA Pocket PC e800 Series */ |
@@ -488,7 +488,7 @@ static struct usb_device_id ipaq_id_table [] = { | |||
488 | { USB_DEVICE(0x0BF8, 0x1001) }, /* Fujitsu Siemens Computers USB Sync */ | 488 | { USB_DEVICE(0x0BF8, 0x1001) }, /* Fujitsu Siemens Computers USB Sync */ |
489 | { USB_DEVICE(0x0C44, 0x03A2) }, /* Motorola iDEN Smartphone */ | 489 | { USB_DEVICE(0x0C44, 0x03A2) }, /* Motorola iDEN Smartphone */ |
490 | { USB_DEVICE(0x0C8E, 0x6000) }, /* Cesscom Luxian Series */ | 490 | { USB_DEVICE(0x0C8E, 0x6000) }, /* Cesscom Luxian Series */ |
491 | { USB_DEVICE(0x0CAD, 0x9001) }, /* Motorola PowerPad Pocket PC Device */ | 491 | { USB_DEVICE(0x0CAD, 0x9001) }, /* Motorola PowerPad Pocket PC Device */ |
492 | { USB_DEVICE(0x0F4E, 0x0200) }, /* Freedom Scientific USB Sync */ | 492 | { USB_DEVICE(0x0F4E, 0x0200) }, /* Freedom Scientific USB Sync */ |
493 | { USB_DEVICE(0x0F98, 0x0201) }, /* Cyberbank USB Sync */ | 493 | { USB_DEVICE(0x0F98, 0x0201) }, /* Cyberbank USB Sync */ |
494 | { USB_DEVICE(0x0FB8, 0x3001) }, /* Wistron USB Sync */ | 494 | { USB_DEVICE(0x0FB8, 0x3001) }, /* Wistron USB Sync */ |
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index 6831dca93c1b..93a7724e167a 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * $Id: isd200.c,v 1.16 2002/04/22 03:39:43 mdharm Exp $ | 3 | * $Id: isd200.c,v 1.16 2002/04/22 03:39:43 mdharm Exp $ |
4 | * | 4 | * |
5 | * Current development and maintenance: | 5 | * Current development and maintenance: |
6 | * (C) 2001-2002 Björn Stenberg (bjorn@haxx.se) | 6 | * (C) 2001-2002 Björn Stenberg (bjorn@haxx.se) |
7 | * | 7 | * |
8 | * Developed with the assistance of: | 8 | * Developed with the assistance of: |
9 | * (C) 2002 Alan Stern <stern@rowland.org> | 9 | * (C) 2002 Alan Stern <stern@rowland.org> |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 9b656ec427d0..22ab2380367d 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -407,7 +407,7 @@ UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210, | |||
407 | "FinePix 1400Zoom", | 407 | "FinePix 1400Zoom", |
408 | US_SC_UFI, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN), | 408 | US_SC_UFI, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN), |
409 | 409 | ||
410 | /* Reported by Peter Wächtler <pwaechtler@loewe-komp.de> | 410 | /* Reported by Peter Wächtler <pwaechtler@loewe-komp.de> |
411 | * The device needs the flags only. | 411 | * The device needs the flags only. |
412 | */ | 412 | */ |
413 | UNUSUAL_DEV( 0x04ce, 0x0002, 0x0074, 0x0074, | 413 | UNUSUAL_DEV( 0x04ce, 0x0002, 0x0074, 0x0074, |
@@ -1551,7 +1551,7 @@ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, | |||
1551 | US_FL_GO_SLOW ), | 1551 | US_FL_GO_SLOW ), |
1552 | 1552 | ||
1553 | /* | 1553 | /* |
1554 | * David Härdeman <david@2gen.com> | 1554 | * David Härdeman <david@2gen.com> |
1555 | * The key makes the SCSI stack print confusing (but harmless) messages | 1555 | * The key makes the SCSI stack print confusing (but harmless) messages |
1556 | */ | 1556 | */ |
1557 | UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x0100, | 1557 | UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x0100, |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index b3bf4ecc983a..fb9d8d0b2c04 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -661,7 +661,7 @@ config FB_HECUBA | |||
661 | help | 661 | help |
662 | This enables support for the Hecuba board. This driver was tested | 662 | This enables support for the Hecuba board. This driver was tested |
663 | with an E-Ink 800x600 display and x86 SBCs through a 16 bit GPIO | 663 | with an E-Ink 800x600 display and x86 SBCs through a 16 bit GPIO |
664 | interface (8 bit data, 4 bit control). If you anticpate using | 664 | interface (8 bit data, 4 bit control). If you anticipate using |
665 | this driver, say Y or M; otherwise say N. You must specify the | 665 | this driver, say Y or M; otherwise say N. You must specify the |
666 | GPIO IO address to be used for setting control and data. | 666 | GPIO IO address to be used for setting control and data. |
667 | 667 | ||
@@ -815,7 +815,7 @@ config FB_XVR500 | |||
815 | help | 815 | help |
816 | This is the framebuffer device for the Sun XVR-500 and similar | 816 | This is the framebuffer device for the Sun XVR-500 and similar |
817 | graphics cards based upon the 3DLABS Wildcat chipset. The driver | 817 | graphics cards based upon the 3DLABS Wildcat chipset. The driver |
818 | only works on sparc64 systems where the system firwmare has | 818 | only works on sparc64 systems where the system firmware has |
819 | mostly initialized the card already. It is treated as a | 819 | mostly initialized the card already. It is treated as a |
820 | completely dumb framebuffer device. | 820 | completely dumb framebuffer device. |
821 | 821 | ||
@@ -828,7 +828,7 @@ config FB_XVR2500 | |||
828 | help | 828 | help |
829 | This is the framebuffer device for the Sun XVR-2500 and similar | 829 | This is the framebuffer device for the Sun XVR-2500 and similar |
830 | graphics cards based upon the 3DLABS Wildcat chipset. The driver | 830 | graphics cards based upon the 3DLABS Wildcat chipset. The driver |
831 | only works on sparc64 systems where the system firwmare has | 831 | only works on sparc64 systems where the system firmware has |
832 | mostly initialized the card already. It is treated as a | 832 | mostly initialized the card already. It is treated as a |
833 | completely dumb framebuffer device. | 833 | completely dumb framebuffer device. |
834 | 834 | ||
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c index f2e243c353f9..4c9ec3f58c52 100644 --- a/drivers/video/amifb.c +++ b/drivers/video/amifb.c | |||
@@ -112,7 +112,7 @@ | |||
112 | +----------+---------------------------------------------+----------+-------+ | 112 | +----------+---------------------------------------------+----------+-------+ |
113 | | | ^ | | | | 113 | | | ^ | | | |
114 | | | |upper_margin | | | | 114 | | | |upper_margin | | | |
115 | | | ¥ | | | | 115 | | | v | | | |
116 | +----------###############################################----------+-------+ | 116 | +----------###############################################----------+-------+ |
117 | | # ^ # | | | 117 | | # ^ # | | |
118 | | # | # | | | 118 | | # | # | | |
@@ -133,15 +133,15 @@ | |||
133 | | # | # | | | 133 | | # | # | | |
134 | | # | # | | | 134 | | # | # | | |
135 | | # | # | | | 135 | | # | # | | |
136 | | # ¥ # | | | 136 | | # v # | | |
137 | +----------###############################################----------+-------+ | 137 | +----------###############################################----------+-------+ |
138 | | | ^ | | | | 138 | | | ^ | | | |
139 | | | |lower_margin | | | | 139 | | | |lower_margin | | | |
140 | | | ¥ | | | | 140 | | | v | | | |
141 | +----------+---------------------------------------------+----------+-------+ | 141 | +----------+---------------------------------------------+----------+-------+ |
142 | | | ^ | | | | 142 | | | ^ | | | |
143 | | | |vsync_len | | | | 143 | | | |vsync_len | | | |
144 | | | ¥ | | | | 144 | | | v | | | |
145 | +----------+---------------------------------------------+----------+-------+ | 145 | +----------+---------------------------------------------+----------+-------+ |
146 | 146 | ||
147 | 147 | ||
@@ -325,7 +325,7 @@ | |||
325 | CCIR -> PAL | 325 | CCIR -> PAL |
326 | ----------- | 326 | ----------- |
327 | 327 | ||
328 | - a scanline is 64 µs long, of which 52.48 µs are visible. This is about | 328 | - a scanline is 64 µs long, of which 52.48 µs are visible. This is about |
329 | 736 visible 70 ns pixels per line. | 329 | 736 visible 70 ns pixels per line. |
330 | - we have 625 scanlines, of which 575 are visible (interlaced); after | 330 | - we have 625 scanlines, of which 575 are visible (interlaced); after |
331 | rounding this becomes 576. | 331 | rounding this becomes 576. |
@@ -333,7 +333,7 @@ | |||
333 | RETMA -> NTSC | 333 | RETMA -> NTSC |
334 | ------------- | 334 | ------------- |
335 | 335 | ||
336 | - a scanline is 63.5 µs long, of which 53.5 µs are visible. This is about | 336 | - a scanline is 63.5 µs long, of which 53.5 µs are visible. This is about |
337 | 736 visible 70 ns pixels per line. | 337 | 736 visible 70 ns pixels per line. |
338 | - we have 525 scanlines, of which 485 are visible (interlaced); after | 338 | - we have 525 scanlines, of which 485 are visible (interlaced); after |
339 | rounding this becomes 484. | 339 | rounding this becomes 484. |
@@ -802,7 +802,7 @@ static u_short ecs_palette[32]; | |||
802 | 802 | ||
803 | static u_short do_vmode_full = 0; /* Change the Video Mode */ | 803 | static u_short do_vmode_full = 0; /* Change the Video Mode */ |
804 | static u_short do_vmode_pan = 0; /* Update the Video Mode */ | 804 | static u_short do_vmode_pan = 0; /* Update the Video Mode */ |
805 | static short do_blank = 0; /* (Un)Blank the Screen (±1) */ | 805 | static short do_blank = 0; /* (Un)Blank the Screen (±1) */ |
806 | static u_short do_cursor = 0; /* Move the Cursor */ | 806 | static u_short do_cursor = 0; /* Move the Cursor */ |
807 | 807 | ||
808 | 808 | ||
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index abe0c435a664..d775eb6590b6 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -26,7 +26,7 @@ | |||
26 | * Anthony Tong <atong@uiuc.edu> | 26 | * Anthony Tong <atong@uiuc.edu> |
27 | * | 27 | * |
28 | * Generic LCD support written by Daniel Mantione, ported from 2.4.20 by Alex Kern | 28 | * Generic LCD support written by Daniel Mantione, ported from 2.4.20 by Alex Kern |
29 | * Many Thanks to Ville Syrjälä for patches and fixing nasting 16 bit color bug. | 29 | * Many Thanks to Ville Syrjälä for patches and fixing nasting 16 bit color bug. |
30 | * | 30 | * |
31 | * This file is subject to the terms and conditions of the GNU General Public | 31 | * This file is subject to the terms and conditions of the GNU General Public |
32 | * License. See the file COPYING in the main directory of this archive for | 32 | * License. See the file COPYING in the main directory of this archive for |
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index a22ccf9485a4..267422f66255 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig | |||
@@ -27,7 +27,7 @@ config VGACON_SOFT_SCROLLBACK | |||
27 | The scrollback buffer of the standard VGA console is located in | 27 | The scrollback buffer of the standard VGA console is located in |
28 | the VGA RAM. The size of this RAM is fixed and is quite small. | 28 | the VGA RAM. The size of this RAM is fixed and is quite small. |
29 | If you require a larger scrollback buffer, this can be placed in | 29 | If you require a larger scrollback buffer, this can be placed in |
30 | System RAM which is dynamically allocated during intialization. | 30 | System RAM which is dynamically allocated during initialization. |
31 | Placing the scrollback buffer in System RAM will slightly slow | 31 | Placing the scrollback buffer in System RAM will slightly slow |
32 | down the console. | 32 | down the console. |
33 | 33 | ||
diff --git a/drivers/video/geode/video_gx.c b/drivers/video/geode/video_gx.c index 7f3f18d06718..febf09c63492 100644 --- a/drivers/video/geode/video_gx.c +++ b/drivers/video/geode/video_gx.c | |||
@@ -127,7 +127,7 @@ static void gx_set_dclk_frequency(struct fb_info *info) | |||
127 | int timeout = 1000; | 127 | int timeout = 1000; |
128 | 128 | ||
129 | /* Rev. 1 Geode GXs use a 14 MHz reference clock instead of 48 MHz. */ | 129 | /* Rev. 1 Geode GXs use a 14 MHz reference clock instead of 48 MHz. */ |
130 | if (cpu_data->x86_mask == 1) { | 130 | if (cpu_data(0).x86_mask == 1) { |
131 | pll_table = gx_pll_table_14MHz; | 131 | pll_table = gx_pll_table_14MHz; |
132 | pll_table_len = ARRAY_SIZE(gx_pll_table_14MHz); | 132 | pll_table_len = ARRAY_SIZE(gx_pll_table_14MHz); |
133 | } else { | 133 | } else { |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index e8e38edb9b5b..481d58f7535d 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G/915GM/ | 4 | * Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G/915GM/ |
5 | * 945G/945GM integrated graphics chips. | 5 | * 945G/945GM integrated graphics chips. |
6 | * | 6 | * |
7 | * Copyright © 2002, 2003 David Dawes <dawes@xfree86.org> | 7 | * Copyright © 2002, 2003 David Dawes <dawes@xfree86.org> |
8 | * 2004 Sylvain Meyer | 8 | * 2004 Sylvain Meyer |
9 | * 2006 David Airlie | 9 | * 2006 David Airlie |
10 | * | 10 | * |
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index 2a0e32074f7d..5f6fb7d2c408 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Linux framebuffer driver for Intel(R) 865G integrated graphics chips. | 4 | * Linux framebuffer driver for Intel(R) 865G integrated graphics chips. |
5 | * | 5 | * |
6 | * Copyright © 2002, 2003 David Dawes <dawes@xfree86.org> | 6 | * Copyright © 2002, 2003 David Dawes <dawes@xfree86.org> |
7 | * 2004 Sylvain Meyer | 7 | * 2004 Sylvain Meyer |
8 | * | 8 | * |
9 | * This driver consists of two parts. The first part (intelfbdrv.c) provides | 9 | * This driver consists of two parts. The first part (intelfbdrv.c) provides |
diff --git a/drivers/video/omap/Kconfig b/drivers/video/omap/Kconfig index 7f4d25b8a184..f4fcf11b290d 100644 --- a/drivers/video/omap/Kconfig +++ b/drivers/video/omap/Kconfig | |||
@@ -8,7 +8,7 @@ config FB_OMAP | |||
8 | Frame buffer driver for OMAP based boards. | 8 | Frame buffer driver for OMAP based boards. |
9 | 9 | ||
10 | config FB_OMAP_BOOTLOADER_INIT | 10 | config FB_OMAP_BOOTLOADER_INIT |
11 | bool "Check bootloader initializaion" | 11 | bool "Check bootloader initialization" |
12 | depends on FB_OMAP | 12 | depends on FB_OMAP |
13 | help | 13 | help |
14 | Say Y here if you want to enable checking if the bootloader has | 14 | Say Y here if you want to enable checking if the bootloader has |
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index ae08d4587091..5857ccf5f6b1 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -56,7 +56,7 @@ | |||
56 | * - Add support for different devices | 56 | * - Add support for different devices |
57 | * - Backlight support | 57 | * - Backlight support |
58 | * | 58 | * |
59 | * 2004-09-05: Herbert Pötzl <herbert@13thfloor.at> | 59 | * 2004-09-05: Herbert Pötzl <herbert@13thfloor.at> |
60 | * - added clock (de-)allocation code | 60 | * - added clock (de-)allocation code |
61 | * - added fixem fbmem option | 61 | * - added fixem fbmem option |
62 | * | 62 | * |
@@ -64,7 +64,7 @@ | |||
64 | * - code cleanup | 64 | * - code cleanup |
65 | * - added a forgotten return in h1940fb_init | 65 | * - added a forgotten return in h1940fb_init |
66 | * | 66 | * |
67 | * 2004-07-19: Herbert Pötzl <herbert@13thfloor.at> | 67 | * 2004-07-19: Herbert Pötzl <herbert@13thfloor.at> |
68 | * - code cleanup and extended debugging | 68 | * - code cleanup and extended debugging |
69 | * | 69 | * |
70 | * 2004-07-15: Arnaud Patard <arnaud.patard@rtp-net.org> | 70 | * 2004-07-15: Arnaud Patard <arnaud.patard@rtp-net.org> |
diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c index ff9e805c43bc..c31f549ebea0 100644 --- a/drivers/video/vermilion/vermilion.c +++ b/drivers/video/vermilion/vermilion.c | |||
@@ -23,8 +23,8 @@ | |||
23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
24 | * | 24 | * |
25 | * Authors: | 25 | * Authors: |
26 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> | 26 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> |
27 | * Michel Dänzer <michel-at-tungstengraphics-dot-com> | 27 | * Michel Dänzer <michel-at-tungstengraphics-dot-com> |
28 | * Alan Hourihane <alanh-at-tungstengraphics-dot-com> | 28 | * Alan Hourihane <alanh-at-tungstengraphics-dot-com> |
29 | */ | 29 | */ |
30 | 30 | ||
diff --git a/drivers/video/vermilion/vermilion.h b/drivers/video/vermilion/vermilion.h index 1fc6695a49d2..c4aba59d4809 100644 --- a/drivers/video/vermilion/vermilion.h +++ b/drivers/video/vermilion/vermilion.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
24 | * | 24 | * |
25 | * Authors: | 25 | * Authors: |
26 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> | 26 | * Thomas Hellström <thomas-at-tungstengraphics-dot-com> |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef _VERMILION_H_ | 29 | #ifndef _VERMILION_H_ |
diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c index c5982502c03d..f236954d2536 100644 --- a/drivers/watchdog/i6300esb.c +++ b/drivers/watchdog/i6300esb.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * i6300esb: Watchdog timer driver for Intel 6300ESB chipset | 2 | * i6300esb: Watchdog timer driver for Intel 6300ESB chipset |
3 | * | 3 | * |
4 | * (c) Copyright 2004 Google Inc. | 4 | * (c) Copyright 2004 Google Inc. |
5 | * (c) Copyright 2005 David Härdeman <david@2gen.com> | 5 | * (c) Copyright 2005 David Härdeman <david@2gen.com> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
@@ -19,7 +19,7 @@ | |||
19 | * Initial version 0.01 | 19 | * Initial version 0.01 |
20 | * 2004YYZZ Ross Biro | 20 | * 2004YYZZ Ross Biro |
21 | * Version 0.02 | 21 | * Version 0.02 |
22 | * 20050210 David Härdeman <david@2gen.com> | 22 | * 20050210 David Härdeman <david@2gen.com> |
23 | * Ported driver to kernel 2.6 | 23 | * Ported driver to kernel 2.6 |
24 | */ | 24 | */ |
25 | 25 | ||
@@ -521,7 +521,7 @@ static void __exit watchdog_cleanup (void) | |||
521 | module_init(watchdog_init); | 521 | module_init(watchdog_init); |
522 | module_exit(watchdog_cleanup); | 522 | module_exit(watchdog_cleanup); |
523 | 523 | ||
524 | MODULE_AUTHOR("Ross Biro and David Härdeman"); | 524 | MODULE_AUTHOR("Ross Biro and David Härdeman"); |
525 | MODULE_DESCRIPTION("Watchdog driver for Intel 6300ESB chipsets"); | 525 | MODULE_DESCRIPTION("Watchdog driver for Intel 6300ESB chipsets"); |
526 | MODULE_LICENSE("GPL"); | 526 | MODULE_LICENSE("GPL"); |
527 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | 527 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); |
diff --git a/drivers/watchdog/iTCO_vendor_support.c b/drivers/watchdog/iTCO_vendor_support.c index 415083990097..cafc465f2ae3 100644 --- a/drivers/watchdog/iTCO_vendor_support.c +++ b/drivers/watchdog/iTCO_vendor_support.c | |||
@@ -115,7 +115,7 @@ static void supermicro_old_pre_keepalive(unsigned long acpibase) | |||
115 | * For P4DPx: | 115 | * For P4DPx: |
116 | * BIOS setup -> Advanced -> I/O Device Configuration -> Watch Dog | 116 | * BIOS setup -> Advanced -> I/O Device Configuration -> Watch Dog |
117 | * This setting enables or disables Watchdog function. When enabled, the | 117 | * This setting enables or disables Watchdog function. When enabled, the |
118 | * default watchdog timer is set to be 5 minutes (about 4’35â€). It is | 118 | * default watchdog timer is set to be 5 minutes (about 4m35s). It is |
119 | * enough to load and run the OS. The application (service or driver) has | 119 | * enough to load and run the OS. The application (service or driver) has |
120 | * to take over the control once OS is running up and before watchdog | 120 | * to take over the control once OS is running up and before watchdog |
121 | * expires. | 121 | * expires. |
diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c index d9e821d08deb..51826c216d6d 100644 --- a/drivers/watchdog/w83697hf_wdt.c +++ b/drivers/watchdog/w83697hf_wdt.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * which is based on wdt.c. | 8 | * which is based on wdt.c. |
9 | * Original copyright messages: | 9 | * Original copyright messages: |
10 | * | 10 | * |
11 | * (c) Copyright 2003 Pádraig Brady <P@draigBrady.com> | 11 | * (c) Copyright 2003 Pádraig Brady <P@draigBrady.com> |
12 | * | 12 | * |
13 | * (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl> | 13 | * (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl> |
14 | * | 14 | * |
diff --git a/drivers/zorro/zorro.ids b/drivers/zorro/zorro.ids index 5bd4b05d4c45..560fef2a7b1c 100644 --- a/drivers/zorro/zorro.ids +++ b/drivers/zorro/zorro.ids | |||
@@ -295,7 +295,7 @@ | |||
295 | 0100 RH 800C [HD Controller] | 295 | 0100 RH 800C [HD Controller] |
296 | 0200 RH 800C [RAM Expansion] | 296 | 0200 RH 800C [RAM Expansion] |
297 | 0861 Kato | 297 | 0861 Kato |
298 | # The Rainbow II and III are actually made by Ingenieurbüro Helfrich | 298 | # The Rainbow II and III are actually made by Ingenieurbüro Helfrich |
299 | 2000 Rainbow II [Graphics Card] | 299 | 2000 Rainbow II [Graphics Card] |
300 | 2100 Rainbow III [Graphics Card] | 300 | 2100 Rainbow III [Graphics Card] |
301 | 8000 Melody MPEG [Audio Card] | 301 | 8000 Melody MPEG [Audio Card] |
diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c index 576dd7de2278..f95ae9789c91 100644 --- a/fs/binfmt_em86.c +++ b/fs/binfmt_em86.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/fs/binfmt_em86.c | 2 | * linux/fs/binfmt_em86.c |
3 | * | 3 | * |
4 | * Based on linux/fs/binfmt_script.c | 4 | * Based on linux/fs/binfmt_script.c |
5 | * Copyright (C) 1996 Martin von Löwis | 5 | * Copyright (C) 1996 Martin von Löwis |
6 | * original #!-checking implemented by tytso. | 6 | * original #!-checking implemented by tytso. |
7 | * | 7 | * |
8 | * em86 changes Copyright (C) 1997 Jim Paradis | 8 | * em86 changes Copyright (C) 1997 Jim Paradis |
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 42e94b3ab7be..b53c7e5f41bb 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * binfmt_misc.c | 2 | * binfmt_misc.c |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Richard Günther | 4 | * Copyright (C) 1997 Richard Günther |
5 | * | 5 | * |
6 | * binfmt_misc detects binaries via a magic or filename extension and invokes | 6 | * binfmt_misc detects binaries via a magic or filename extension and invokes |
7 | * a specified wrapper. This should obsolete binfmt_java, binfmt_em86 and | 7 | * a specified wrapper. This should obsolete binfmt_java, binfmt_em86 and |
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c index 4d0e0f6d3273..ab33939b12a7 100644 --- a/fs/binfmt_script.c +++ b/fs/binfmt_script.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/fs/binfmt_script.c | 2 | * linux/fs/binfmt_script.c |
3 | * | 3 | * |
4 | * Copyright (C) 1996 Martin von Löwis | 4 | * Copyright (C) 1996 Martin von Löwis |
5 | * original #!-checking implemented by tytso. | 5 | * original #!-checking implemented by tytso. |
6 | */ | 6 | */ |
7 | 7 | ||
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index aa359a2e4ce6..09e3d306e96f 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * (C) 1991 Linus Torvalds - minix filesystem | 4 | * (C) 1991 Linus Torvalds - minix filesystem |
5 | * 1992, 1993, 1994 Eric Youngdale Modified for ISO 9660 filesystem. | 5 | * 1992, 1993, 1994 Eric Youngdale Modified for ISO 9660 filesystem. |
6 | * 1994 Eberhard Moenkeberg - multi session handling. | 6 | * 1994 Eberhard Mönkeberg - multi session handling. |
7 | * 1995 Mark Dobie - allow mounting of some weird VideoCDs and PhotoCDs. | 7 | * 1995 Mark Dobie - allow mounting of some weird VideoCDs and PhotoCDs. |
8 | * 1997 Gordon Chaffee - Joliet CDs | 8 | * 1997 Gordon Chaffee - Joliet CDs |
9 | * 1998 Eric Lammerts - ISO 9660 Level 3 | 9 | * 1998 Eric Lammerts - ISO 9660 Level 3 |
diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index df0b8535de84..df25ecc418af 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c | |||
@@ -773,7 +773,7 @@ int dtSearch(struct inode *ip, struct component_name * key, ino_t * data, | |||
773 | getChild: | 773 | getChild: |
774 | /* update max. number of pages to split */ | 774 | /* update max. number of pages to split */ |
775 | if (BT_STACK_FULL(btstack)) { | 775 | if (BT_STACK_FULL(btstack)) { |
776 | /* Something's corrupted, mark filesytem dirty so | 776 | /* Something's corrupted, mark filesystem dirty so |
777 | * chkdsk will fix it. | 777 | * chkdsk will fix it. |
778 | */ | 778 | */ |
779 | jfs_error(sb, "stack overrun in dtSearch!"); | 779 | jfs_error(sb, "stack overrun in dtSearch!"); |
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index af8b235d405d..11833f4caeaa 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -168,7 +168,8 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct | |||
168 | spin_unlock(&inode->i_lock); | 168 | spin_unlock(&inode->i_lock); |
169 | 169 | ||
170 | spin_unlock(&clp->cl_lock); | 170 | spin_unlock(&clp->cl_lock); |
171 | kfree(delegation); | 171 | if (delegation != NULL) |
172 | nfs_free_delegation(delegation); | ||
172 | return status; | 173 | return status; |
173 | } | 174 | } |
174 | 175 | ||
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 8ec7fbd8240c..35334539d947 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -562,6 +562,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
562 | nfs_fattr_init(&fattr); | 562 | nfs_fattr_init(&fattr); |
563 | desc->entry = &my_entry; | 563 | desc->entry = &my_entry; |
564 | 564 | ||
565 | nfs_block_sillyrename(dentry); | ||
565 | while(!desc->entry->eof) { | 566 | while(!desc->entry->eof) { |
566 | res = readdir_search_pagecache(desc); | 567 | res = readdir_search_pagecache(desc); |
567 | 568 | ||
@@ -592,6 +593,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
592 | break; | 593 | break; |
593 | } | 594 | } |
594 | } | 595 | } |
596 | nfs_unblock_sillyrename(dentry); | ||
595 | unlock_kernel(); | 597 | unlock_kernel(); |
596 | if (res > 0) | 598 | if (res > 0) |
597 | res = 0; | 599 | res = 0; |
@@ -866,6 +868,7 @@ struct dentry_operations nfs_dentry_operations = { | |||
866 | static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) | 868 | static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) |
867 | { | 869 | { |
868 | struct dentry *res; | 870 | struct dentry *res; |
871 | struct dentry *parent; | ||
869 | struct inode *inode = NULL; | 872 | struct inode *inode = NULL; |
870 | int error; | 873 | int error; |
871 | struct nfs_fh fhandle; | 874 | struct nfs_fh fhandle; |
@@ -894,26 +897,31 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru | |||
894 | goto out_unlock; | 897 | goto out_unlock; |
895 | } | 898 | } |
896 | 899 | ||
900 | parent = dentry->d_parent; | ||
901 | /* Protect against concurrent sillydeletes */ | ||
902 | nfs_block_sillyrename(parent); | ||
897 | error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, &fhandle, &fattr); | 903 | error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, &fhandle, &fattr); |
898 | if (error == -ENOENT) | 904 | if (error == -ENOENT) |
899 | goto no_entry; | 905 | goto no_entry; |
900 | if (error < 0) { | 906 | if (error < 0) { |
901 | res = ERR_PTR(error); | 907 | res = ERR_PTR(error); |
902 | goto out_unlock; | 908 | goto out_unblock_sillyrename; |
903 | } | 909 | } |
904 | inode = nfs_fhget(dentry->d_sb, &fhandle, &fattr); | 910 | inode = nfs_fhget(dentry->d_sb, &fhandle, &fattr); |
905 | res = (struct dentry *)inode; | 911 | res = (struct dentry *)inode; |
906 | if (IS_ERR(res)) | 912 | if (IS_ERR(res)) |
907 | goto out_unlock; | 913 | goto out_unblock_sillyrename; |
908 | 914 | ||
909 | no_entry: | 915 | no_entry: |
910 | res = d_materialise_unique(dentry, inode); | 916 | res = d_materialise_unique(dentry, inode); |
911 | if (res != NULL) { | 917 | if (res != NULL) { |
912 | if (IS_ERR(res)) | 918 | if (IS_ERR(res)) |
913 | goto out_unlock; | 919 | goto out_unblock_sillyrename; |
914 | dentry = res; | 920 | dentry = res; |
915 | } | 921 | } |
916 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 922 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
923 | out_unblock_sillyrename: | ||
924 | nfs_unblock_sillyrename(parent); | ||
917 | out_unlock: | 925 | out_unlock: |
918 | unlock_kernel(); | 926 | unlock_kernel(); |
919 | out: | 927 | out: |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index d29f90d00aa2..b3bb89f7d5d2 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -131,7 +131,7 @@ nfs_file_release(struct inode *inode, struct file *filp) | |||
131 | { | 131 | { |
132 | /* Ensure that dirty pages are flushed out with the right creds */ | 132 | /* Ensure that dirty pages are flushed out with the right creds */ |
133 | if (filp->f_mode & FMODE_WRITE) | 133 | if (filp->f_mode & FMODE_WRITE) |
134 | filemap_fdatawrite(filp->f_mapping); | 134 | nfs_wb_all(filp->f_path.dentry->d_inode); |
135 | nfs_inc_stats(inode, NFSIOS_VFSRELEASE); | 135 | nfs_inc_stats(inode, NFSIOS_VFSRELEASE); |
136 | return NFS_PROTO(inode)->file_release(inode, filp); | 136 | return NFS_PROTO(inode)->file_release(inode, filp); |
137 | } | 137 | } |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 6d2f2a3eccf8..db5d96dc6107 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -514,7 +514,7 @@ struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx) | |||
514 | return ctx; | 514 | return ctx; |
515 | } | 515 | } |
516 | 516 | ||
517 | void put_nfs_open_context(struct nfs_open_context *ctx) | 517 | static void __put_nfs_open_context(struct nfs_open_context *ctx, int wait) |
518 | { | 518 | { |
519 | struct inode *inode = ctx->path.dentry->d_inode; | 519 | struct inode *inode = ctx->path.dentry->d_inode; |
520 | 520 | ||
@@ -522,8 +522,12 @@ void put_nfs_open_context(struct nfs_open_context *ctx) | |||
522 | return; | 522 | return; |
523 | list_del(&ctx->list); | 523 | list_del(&ctx->list); |
524 | spin_unlock(&inode->i_lock); | 524 | spin_unlock(&inode->i_lock); |
525 | if (ctx->state != NULL) | 525 | if (ctx->state != NULL) { |
526 | nfs4_close_state(&ctx->path, ctx->state, ctx->mode); | 526 | if (wait) |
527 | nfs4_close_sync(&ctx->path, ctx->state, ctx->mode); | ||
528 | else | ||
529 | nfs4_close_state(&ctx->path, ctx->state, ctx->mode); | ||
530 | } | ||
527 | if (ctx->cred != NULL) | 531 | if (ctx->cred != NULL) |
528 | put_rpccred(ctx->cred); | 532 | put_rpccred(ctx->cred); |
529 | dput(ctx->path.dentry); | 533 | dput(ctx->path.dentry); |
@@ -531,6 +535,16 @@ void put_nfs_open_context(struct nfs_open_context *ctx) | |||
531 | kfree(ctx); | 535 | kfree(ctx); |
532 | } | 536 | } |
533 | 537 | ||
538 | void put_nfs_open_context(struct nfs_open_context *ctx) | ||
539 | { | ||
540 | __put_nfs_open_context(ctx, 0); | ||
541 | } | ||
542 | |||
543 | static void put_nfs_open_context_sync(struct nfs_open_context *ctx) | ||
544 | { | ||
545 | __put_nfs_open_context(ctx, 1); | ||
546 | } | ||
547 | |||
534 | /* | 548 | /* |
535 | * Ensure that mmap has a recent RPC credential for use when writing out | 549 | * Ensure that mmap has a recent RPC credential for use when writing out |
536 | * shared pages | 550 | * shared pages |
@@ -577,7 +591,7 @@ static void nfs_file_clear_open_context(struct file *filp) | |||
577 | spin_lock(&inode->i_lock); | 591 | spin_lock(&inode->i_lock); |
578 | list_move_tail(&ctx->list, &NFS_I(inode)->open_files); | 592 | list_move_tail(&ctx->list, &NFS_I(inode)->open_files); |
579 | spin_unlock(&inode->i_lock); | 593 | spin_unlock(&inode->i_lock); |
580 | put_nfs_open_context(ctx); | 594 | put_nfs_open_context_sync(ctx); |
581 | } | 595 | } |
582 | } | 596 | } |
583 | 597 | ||
@@ -1169,6 +1183,9 @@ static void init_once(struct kmem_cache * cachep, void *foo) | |||
1169 | INIT_RADIX_TREE(&nfsi->nfs_page_tree, GFP_ATOMIC); | 1183 | INIT_RADIX_TREE(&nfsi->nfs_page_tree, GFP_ATOMIC); |
1170 | nfsi->ncommit = 0; | 1184 | nfsi->ncommit = 0; |
1171 | nfsi->npages = 0; | 1185 | nfsi->npages = 0; |
1186 | atomic_set(&nfsi->silly_count, 1); | ||
1187 | INIT_HLIST_HEAD(&nfsi->silly_list); | ||
1188 | init_waitqueue_head(&nfsi->waitqueue); | ||
1172 | nfs4_init_once(nfsi); | 1189 | nfs4_init_once(nfsi); |
1173 | } | 1190 | } |
1174 | 1191 | ||
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index d2802b1ca3b9..b35069a2aa9e 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h | |||
@@ -178,7 +178,7 @@ extern int nfs4_proc_setclientid(struct nfs_client *, u32, unsigned short, struc | |||
178 | extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct rpc_cred *); | 178 | extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct rpc_cred *); |
179 | extern int nfs4_proc_async_renew(struct nfs_client *, struct rpc_cred *); | 179 | extern int nfs4_proc_async_renew(struct nfs_client *, struct rpc_cred *); |
180 | extern int nfs4_proc_renew(struct nfs_client *, struct rpc_cred *); | 180 | extern int nfs4_proc_renew(struct nfs_client *, struct rpc_cred *); |
181 | extern int nfs4_do_close(struct path *path, struct nfs4_state *state); | 181 | extern int nfs4_do_close(struct path *path, struct nfs4_state *state, int wait); |
182 | extern struct dentry *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *); | 182 | extern struct dentry *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *); |
183 | extern int nfs4_open_revalidate(struct inode *, struct dentry *, int, struct nameidata *); | 183 | extern int nfs4_open_revalidate(struct inode *, struct dentry *, int, struct nameidata *); |
184 | extern int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle); | 184 | extern int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle); |
@@ -209,6 +209,7 @@ extern void nfs4_drop_state_owner(struct nfs4_state_owner *); | |||
209 | extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *); | 209 | extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *); |
210 | extern void nfs4_put_open_state(struct nfs4_state *); | 210 | extern void nfs4_put_open_state(struct nfs4_state *); |
211 | extern void nfs4_close_state(struct path *, struct nfs4_state *, mode_t); | 211 | extern void nfs4_close_state(struct path *, struct nfs4_state *, mode_t); |
212 | extern void nfs4_close_sync(struct path *, struct nfs4_state *, mode_t); | ||
212 | extern void nfs4_state_set_mode_locked(struct nfs4_state *, mode_t); | 213 | extern void nfs4_state_set_mode_locked(struct nfs4_state *, mode_t); |
213 | extern void nfs4_schedule_state_recovery(struct nfs_client *); | 214 | extern void nfs4_schedule_state_recovery(struct nfs_client *); |
214 | extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); | 215 | extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp); |
@@ -235,6 +236,7 @@ extern struct svc_version nfs4_callback_version1; | |||
235 | #else | 236 | #else |
236 | 237 | ||
237 | #define nfs4_close_state(a, b, c) do { } while (0) | 238 | #define nfs4_close_state(a, b, c) do { } while (0) |
239 | #define nfs4_close_sync(a, b, c) do { } while (0) | ||
238 | 240 | ||
239 | #endif /* CONFIG_NFS_V4 */ | 241 | #endif /* CONFIG_NFS_V4 */ |
240 | #endif /* __LINUX_FS_NFS_NFS4_FS.H */ | 242 | #endif /* __LINUX_FS_NFS_NFS4_FS.H */ |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index cb99fd90a9ac..f03d9d5f5ba4 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1305,7 +1305,7 @@ static const struct rpc_call_ops nfs4_close_ops = { | |||
1305 | * | 1305 | * |
1306 | * NOTE: Caller must be holding the sp->so_owner semaphore! | 1306 | * NOTE: Caller must be holding the sp->so_owner semaphore! |
1307 | */ | 1307 | */ |
1308 | int nfs4_do_close(struct path *path, struct nfs4_state *state) | 1308 | int nfs4_do_close(struct path *path, struct nfs4_state *state, int wait) |
1309 | { | 1309 | { |
1310 | struct nfs_server *server = NFS_SERVER(state->inode); | 1310 | struct nfs_server *server = NFS_SERVER(state->inode); |
1311 | struct nfs4_closedata *calldata; | 1311 | struct nfs4_closedata *calldata; |
@@ -1333,8 +1333,11 @@ int nfs4_do_close(struct path *path, struct nfs4_state *state) | |||
1333 | task = rpc_run_task(server->client, RPC_TASK_ASYNC, &nfs4_close_ops, calldata); | 1333 | task = rpc_run_task(server->client, RPC_TASK_ASYNC, &nfs4_close_ops, calldata); |
1334 | if (IS_ERR(task)) | 1334 | if (IS_ERR(task)) |
1335 | return PTR_ERR(task); | 1335 | return PTR_ERR(task); |
1336 | status = 0; | ||
1337 | if (wait) | ||
1338 | status = rpc_wait_for_completion_task(task); | ||
1336 | rpc_put_task(task); | 1339 | rpc_put_task(task); |
1337 | return 0; | 1340 | return status; |
1338 | out_free_calldata: | 1341 | out_free_calldata: |
1339 | kfree(calldata); | 1342 | kfree(calldata); |
1340 | out: | 1343 | out: |
@@ -1365,13 +1368,14 @@ static int nfs4_intent_set_file(struct nameidata *nd, struct path *path, struct | |||
1365 | } | 1368 | } |
1366 | ret = PTR_ERR(filp); | 1369 | ret = PTR_ERR(filp); |
1367 | out_close: | 1370 | out_close: |
1368 | nfs4_close_state(path, state, nd->intent.open.flags); | 1371 | nfs4_close_sync(path, state, nd->intent.open.flags); |
1369 | return ret; | 1372 | return ret; |
1370 | } | 1373 | } |
1371 | 1374 | ||
1372 | struct dentry * | 1375 | struct dentry * |
1373 | nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | 1376 | nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd) |
1374 | { | 1377 | { |
1378 | struct dentry *parent; | ||
1375 | struct path path = { | 1379 | struct path path = { |
1376 | .mnt = nd->mnt, | 1380 | .mnt = nd->mnt, |
1377 | .dentry = dentry, | 1381 | .dentry = dentry, |
@@ -1394,6 +1398,9 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | |||
1394 | cred = rpcauth_lookupcred(NFS_CLIENT(dir)->cl_auth, 0); | 1398 | cred = rpcauth_lookupcred(NFS_CLIENT(dir)->cl_auth, 0); |
1395 | if (IS_ERR(cred)) | 1399 | if (IS_ERR(cred)) |
1396 | return (struct dentry *)cred; | 1400 | return (struct dentry *)cred; |
1401 | parent = dentry->d_parent; | ||
1402 | /* Protect against concurrent sillydeletes */ | ||
1403 | nfs_block_sillyrename(parent); | ||
1397 | state = nfs4_do_open(dir, &path, nd->intent.open.flags, &attr, cred); | 1404 | state = nfs4_do_open(dir, &path, nd->intent.open.flags, &attr, cred); |
1398 | put_rpccred(cred); | 1405 | put_rpccred(cred); |
1399 | if (IS_ERR(state)) { | 1406 | if (IS_ERR(state)) { |
@@ -1401,12 +1408,14 @@ nfs4_atomic_open(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | |||
1401 | d_add(dentry, NULL); | 1408 | d_add(dentry, NULL); |
1402 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 1409 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
1403 | } | 1410 | } |
1411 | nfs_unblock_sillyrename(parent); | ||
1404 | return (struct dentry *)state; | 1412 | return (struct dentry *)state; |
1405 | } | 1413 | } |
1406 | res = d_add_unique(dentry, igrab(state->inode)); | 1414 | res = d_add_unique(dentry, igrab(state->inode)); |
1407 | if (res != NULL) | 1415 | if (res != NULL) |
1408 | path.dentry = res; | 1416 | path.dentry = res; |
1409 | nfs_set_verifier(path.dentry, nfs_save_change_attribute(dir)); | 1417 | nfs_set_verifier(path.dentry, nfs_save_change_attribute(dir)); |
1418 | nfs_unblock_sillyrename(parent); | ||
1410 | nfs4_intent_set_file(nd, &path, state); | 1419 | nfs4_intent_set_file(nd, &path, state); |
1411 | return res; | 1420 | return res; |
1412 | } | 1421 | } |
@@ -1444,7 +1453,7 @@ nfs4_open_revalidate(struct inode *dir, struct dentry *dentry, int openflags, st | |||
1444 | nfs4_intent_set_file(nd, &path, state); | 1453 | nfs4_intent_set_file(nd, &path, state); |
1445 | return 1; | 1454 | return 1; |
1446 | } | 1455 | } |
1447 | nfs4_close_state(&path, state, openflags); | 1456 | nfs4_close_sync(&path, state, openflags); |
1448 | out_drop: | 1457 | out_drop: |
1449 | d_drop(dentry); | 1458 | d_drop(dentry); |
1450 | return 0; | 1459 | return 0; |
@@ -1898,7 +1907,7 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, | |||
1898 | if (status == 0 && (nd->flags & LOOKUP_OPEN) != 0) | 1907 | if (status == 0 && (nd->flags & LOOKUP_OPEN) != 0) |
1899 | status = nfs4_intent_set_file(nd, &path, state); | 1908 | status = nfs4_intent_set_file(nd, &path, state); |
1900 | else | 1909 | else |
1901 | nfs4_close_state(&path, state, flags); | 1910 | nfs4_close_sync(&path, state, flags); |
1902 | out: | 1911 | out: |
1903 | return status; | 1912 | return status; |
1904 | } | 1913 | } |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index bfb36261cecb..23a9a36556bf 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -425,7 +425,7 @@ void nfs4_put_open_state(struct nfs4_state *state) | |||
425 | /* | 425 | /* |
426 | * Close the current file. | 426 | * Close the current file. |
427 | */ | 427 | */ |
428 | void nfs4_close_state(struct path *path, struct nfs4_state *state, mode_t mode) | 428 | static void __nfs4_close(struct path *path, struct nfs4_state *state, mode_t mode, int wait) |
429 | { | 429 | { |
430 | struct nfs4_state_owner *owner = state->owner; | 430 | struct nfs4_state_owner *owner = state->owner; |
431 | int call_close = 0; | 431 | int call_close = 0; |
@@ -466,7 +466,17 @@ void nfs4_close_state(struct path *path, struct nfs4_state *state, mode_t mode) | |||
466 | nfs4_put_open_state(state); | 466 | nfs4_put_open_state(state); |
467 | nfs4_put_state_owner(owner); | 467 | nfs4_put_state_owner(owner); |
468 | } else | 468 | } else |
469 | nfs4_do_close(path, state); | 469 | nfs4_do_close(path, state, wait); |
470 | } | ||
471 | |||
472 | void nfs4_close_state(struct path *path, struct nfs4_state *state, mode_t mode) | ||
473 | { | ||
474 | __nfs4_close(path, state, mode, 0); | ||
475 | } | ||
476 | |||
477 | void nfs4_close_sync(struct path *path, struct nfs4_state *state, mode_t mode) | ||
478 | { | ||
479 | __nfs4_close(path, state, mode, 1); | ||
470 | } | 480 | } |
471 | 481 | ||
472 | /* | 482 | /* |
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index e87b44ee9ac9..4b0334590ee5 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -43,7 +43,7 @@ | |||
43 | * from being used (thanks to Leo Spiekman) | 43 | * from being used (thanks to Leo Spiekman) |
44 | * Andy Walker : Allow to specify the NFS server in nfs_root | 44 | * Andy Walker : Allow to specify the NFS server in nfs_root |
45 | * without giving a path name | 45 | * without giving a path name |
46 | * Swen Thümmler : Allow to specify the NFS options in nfs_root | 46 | * Swen Thümmler : Allow to specify the NFS options in nfs_root |
47 | * without giving a path name. Fix BOOTP request | 47 | * without giving a path name. Fix BOOTP request |
48 | * for domainname (domainname is NIS domain, not | 48 | * for domainname (domainname is NIS domain, not |
49 | * DNS domain!). Skip dummy devices for BOOTP. | 49 | * DNS domain!). Skip dummy devices for BOOTP. |
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index 1aed850d18f2..ce558c2e4d53 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c | |||
@@ -11,9 +11,11 @@ | |||
11 | #include <linux/sunrpc/sched.h> | 11 | #include <linux/sunrpc/sched.h> |
12 | #include <linux/sunrpc/clnt.h> | 12 | #include <linux/sunrpc/clnt.h> |
13 | #include <linux/nfs_fs.h> | 13 | #include <linux/nfs_fs.h> |
14 | 14 | #include <linux/sched.h> | |
15 | #include <linux/wait.h> | ||
15 | 16 | ||
16 | struct nfs_unlinkdata { | 17 | struct nfs_unlinkdata { |
18 | struct hlist_node list; | ||
17 | struct nfs_removeargs args; | 19 | struct nfs_removeargs args; |
18 | struct nfs_removeres res; | 20 | struct nfs_removeres res; |
19 | struct inode *dir; | 21 | struct inode *dir; |
@@ -52,6 +54,20 @@ static int nfs_copy_dname(struct dentry *dentry, struct nfs_unlinkdata *data) | |||
52 | return 0; | 54 | return 0; |
53 | } | 55 | } |
54 | 56 | ||
57 | static void nfs_free_dname(struct nfs_unlinkdata *data) | ||
58 | { | ||
59 | kfree(data->args.name.name); | ||
60 | data->args.name.name = NULL; | ||
61 | data->args.name.len = 0; | ||
62 | } | ||
63 | |||
64 | static void nfs_dec_sillycount(struct inode *dir) | ||
65 | { | ||
66 | struct nfs_inode *nfsi = NFS_I(dir); | ||
67 | if (atomic_dec_return(&nfsi->silly_count) == 1) | ||
68 | wake_up(&nfsi->waitqueue); | ||
69 | } | ||
70 | |||
55 | /** | 71 | /** |
56 | * nfs_async_unlink_init - Initialize the RPC info | 72 | * nfs_async_unlink_init - Initialize the RPC info |
57 | * task: rpc_task of the sillydelete | 73 | * task: rpc_task of the sillydelete |
@@ -95,6 +111,8 @@ static void nfs_async_unlink_done(struct rpc_task *task, void *calldata) | |||
95 | static void nfs_async_unlink_release(void *calldata) | 111 | static void nfs_async_unlink_release(void *calldata) |
96 | { | 112 | { |
97 | struct nfs_unlinkdata *data = calldata; | 113 | struct nfs_unlinkdata *data = calldata; |
114 | |||
115 | nfs_dec_sillycount(data->dir); | ||
98 | nfs_free_unlinkdata(data); | 116 | nfs_free_unlinkdata(data); |
99 | } | 117 | } |
100 | 118 | ||
@@ -104,33 +122,100 @@ static const struct rpc_call_ops nfs_unlink_ops = { | |||
104 | .rpc_release = nfs_async_unlink_release, | 122 | .rpc_release = nfs_async_unlink_release, |
105 | }; | 123 | }; |
106 | 124 | ||
107 | static int nfs_call_unlink(struct dentry *dentry, struct nfs_unlinkdata *data) | 125 | static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct nfs_unlinkdata *data) |
108 | { | 126 | { |
109 | struct rpc_task *task; | 127 | struct rpc_task *task; |
128 | struct dentry *alias; | ||
129 | |||
130 | alias = d_lookup(parent, &data->args.name); | ||
131 | if (alias != NULL) { | ||
132 | int ret = 0; | ||
133 | /* | ||
134 | * Hey, we raced with lookup... See if we need to transfer | ||
135 | * the sillyrename information to the aliased dentry. | ||
136 | */ | ||
137 | nfs_free_dname(data); | ||
138 | spin_lock(&alias->d_lock); | ||
139 | if (!(alias->d_flags & DCACHE_NFSFS_RENAMED)) { | ||
140 | alias->d_fsdata = data; | ||
141 | alias->d_flags ^= DCACHE_NFSFS_RENAMED; | ||
142 | ret = 1; | ||
143 | } | ||
144 | spin_unlock(&alias->d_lock); | ||
145 | nfs_dec_sillycount(dir); | ||
146 | dput(alias); | ||
147 | return ret; | ||
148 | } | ||
149 | data->dir = igrab(dir); | ||
150 | if (!data->dir) { | ||
151 | nfs_dec_sillycount(dir); | ||
152 | return 0; | ||
153 | } | ||
154 | data->args.fh = NFS_FH(dir); | ||
155 | nfs_fattr_init(&data->res.dir_attr); | ||
156 | |||
157 | task = rpc_run_task(NFS_CLIENT(dir), RPC_TASK_ASYNC, &nfs_unlink_ops, data); | ||
158 | if (!IS_ERR(task)) | ||
159 | rpc_put_task(task); | ||
160 | return 1; | ||
161 | } | ||
162 | |||
163 | static int nfs_call_unlink(struct dentry *dentry, struct nfs_unlinkdata *data) | ||
164 | { | ||
110 | struct dentry *parent; | 165 | struct dentry *parent; |
111 | struct inode *dir; | 166 | struct inode *dir; |
167 | int ret = 0; | ||
112 | 168 | ||
113 | if (nfs_copy_dname(dentry, data) < 0) | ||
114 | goto out_free; | ||
115 | 169 | ||
116 | parent = dget_parent(dentry); | 170 | parent = dget_parent(dentry); |
117 | if (parent == NULL) | 171 | if (parent == NULL) |
118 | goto out_free; | 172 | goto out_free; |
119 | dir = igrab(parent->d_inode); | 173 | dir = parent->d_inode; |
174 | if (nfs_copy_dname(dentry, data) == 0) | ||
175 | goto out_dput; | ||
176 | /* Non-exclusive lock protects against concurrent lookup() calls */ | ||
177 | spin_lock(&dir->i_lock); | ||
178 | if (atomic_inc_not_zero(&NFS_I(dir)->silly_count) == 0) { | ||
179 | /* Deferred delete */ | ||
180 | hlist_add_head(&data->list, &NFS_I(dir)->silly_list); | ||
181 | spin_unlock(&dir->i_lock); | ||
182 | ret = 1; | ||
183 | goto out_dput; | ||
184 | } | ||
185 | spin_unlock(&dir->i_lock); | ||
186 | ret = nfs_do_call_unlink(parent, dir, data); | ||
187 | out_dput: | ||
120 | dput(parent); | 188 | dput(parent); |
121 | if (dir == NULL) | 189 | out_free: |
122 | goto out_free; | 190 | return ret; |
191 | } | ||
123 | 192 | ||
124 | data->dir = dir; | 193 | void nfs_block_sillyrename(struct dentry *dentry) |
125 | data->args.fh = NFS_FH(dir); | 194 | { |
126 | nfs_fattr_init(&data->res.dir_attr); | 195 | struct nfs_inode *nfsi = NFS_I(dentry->d_inode); |
127 | 196 | ||
128 | task = rpc_run_task(NFS_CLIENT(dir), RPC_TASK_ASYNC, &nfs_unlink_ops, data); | 197 | wait_event(nfsi->waitqueue, atomic_cmpxchg(&nfsi->silly_count, 1, 0) == 1); |
129 | if (!IS_ERR(task)) | 198 | } |
130 | rpc_put_task(task); | 199 | |
131 | return 1; | 200 | void nfs_unblock_sillyrename(struct dentry *dentry) |
132 | out_free: | 201 | { |
133 | return 0; | 202 | struct inode *dir = dentry->d_inode; |
203 | struct nfs_inode *nfsi = NFS_I(dir); | ||
204 | struct nfs_unlinkdata *data; | ||
205 | |||
206 | atomic_inc(&nfsi->silly_count); | ||
207 | spin_lock(&dir->i_lock); | ||
208 | while (!hlist_empty(&nfsi->silly_list)) { | ||
209 | if (!atomic_inc_not_zero(&nfsi->silly_count)) | ||
210 | break; | ||
211 | data = hlist_entry(nfsi->silly_list.first, struct nfs_unlinkdata, list); | ||
212 | hlist_del(&data->list); | ||
213 | spin_unlock(&dir->i_lock); | ||
214 | if (nfs_do_call_unlink(dentry, dir, data) == 0) | ||
215 | nfs_free_unlinkdata(data); | ||
216 | spin_lock(&dir->i_lock); | ||
217 | } | ||
218 | spin_unlock(&dir->i_lock); | ||
134 | } | 219 | } |
135 | 220 | ||
136 | /** | 221 | /** |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 0cf9d1cd9bd2..89527a487ed7 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -174,8 +174,6 @@ static void nfs_mark_uptodate(struct page *page, unsigned int base, unsigned int | |||
174 | return; | 174 | return; |
175 | if (count != nfs_page_length(page)) | 175 | if (count != nfs_page_length(page)) |
176 | return; | 176 | return; |
177 | if (count != PAGE_CACHE_SIZE) | ||
178 | zero_user_page(page, count, PAGE_CACHE_SIZE - count, KM_USER0); | ||
179 | SetPageUptodate(page); | 177 | SetPageUptodate(page); |
180 | } | 178 | } |
181 | 179 | ||
@@ -627,7 +625,8 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx, | |||
627 | return ERR_PTR(error); | 625 | return ERR_PTR(error); |
628 | } | 626 | } |
629 | spin_unlock(&inode->i_lock); | 627 | spin_unlock(&inode->i_lock); |
630 | return new; | 628 | req = new; |
629 | goto zero_page; | ||
631 | } | 630 | } |
632 | spin_unlock(&inode->i_lock); | 631 | spin_unlock(&inode->i_lock); |
633 | 632 | ||
@@ -655,13 +654,23 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx, | |||
655 | if (offset < req->wb_offset) { | 654 | if (offset < req->wb_offset) { |
656 | req->wb_offset = offset; | 655 | req->wb_offset = offset; |
657 | req->wb_pgbase = offset; | 656 | req->wb_pgbase = offset; |
658 | req->wb_bytes = rqend - req->wb_offset; | 657 | req->wb_bytes = max(end, rqend) - req->wb_offset; |
658 | goto zero_page; | ||
659 | } | 659 | } |
660 | 660 | ||
661 | if (end > rqend) | 661 | if (end > rqend) |
662 | req->wb_bytes = end - req->wb_offset; | 662 | req->wb_bytes = end - req->wb_offset; |
663 | 663 | ||
664 | return req; | 664 | return req; |
665 | zero_page: | ||
666 | /* If this page might potentially be marked as up to date, | ||
667 | * then we need to zero any uninitalised data. */ | ||
668 | if (req->wb_pgbase == 0 && req->wb_bytes != PAGE_CACHE_SIZE | ||
669 | && !PageUptodate(req->wb_page)) | ||
670 | zero_user_page(req->wb_page, req->wb_bytes, | ||
671 | PAGE_CACHE_SIZE - req->wb_bytes, | ||
672 | KM_USER0); | ||
673 | return req; | ||
665 | } | 674 | } |
666 | 675 | ||
667 | int nfs_flush_incompatible(struct file *file, struct page *page) | 676 | int nfs_flush_incompatible(struct file *file, struct page *page) |
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index 345798ebd366..37c11e194372 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog | |||
@@ -382,7 +382,7 @@ ToDo/Notes: | |||
382 | own locking so it does not matter if the vfs inode is locked. | 382 | own locking so it does not matter if the vfs inode is locked. |
383 | - Fix bug in mft record writing where we forgot to set the device in | 383 | - Fix bug in mft record writing where we forgot to set the device in |
384 | the buffers when mapping them after the VM had discarded them. | 384 | the buffers when mapping them after the VM had discarded them. |
385 | Thanks to Martin MOKREJÅ for the bug report. | 385 | Thanks to Martin MOKREJÃ… for the bug report. |
386 | 386 | ||
387 | 2.1.22 - Many bug and race fixes and error handling improvements. | 387 | 2.1.22 - Many bug and race fixes and error handling improvements. |
388 | 388 | ||
@@ -1585,7 +1585,7 @@ tng-0.0.4 - Big changes, getting in line with Al Viro's comments. | |||
1585 | for reading $MFT (ntfs_mft_readpage). In the process create dedicated | 1585 | for reading $MFT (ntfs_mft_readpage). In the process create dedicated |
1586 | address space operations (ntfs_mft_aops) for $MFT inode mapping. Also | 1586 | address space operations (ntfs_mft_aops) for $MFT inode mapping. Also |
1587 | removed the now superfluous exports from the kernel core patch. | 1587 | removed the now superfluous exports from the kernel core patch. |
1588 | - Fix a bug where kfree() was used insted of ntfs_free(). | 1588 | - Fix a bug where kfree() was used instead of ntfs_free(). |
1589 | - Change map_mft_record() to take ntfs_inode as argument instead of | 1589 | - Change map_mft_record() to take ntfs_inode as argument instead of |
1590 | vfs inode. Dito for unmap_mft_record(). Adapt all callers. | 1590 | vfs inode. Dito for unmap_mft_record(). Adapt all callers. |
1591 | - Add pointer to ntfs_volume to ntfs_inode. | 1591 | - Add pointer to ntfs_volume to ntfs_inode. |
diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c index 4847fbfb0107..9ef85e628fe1 100644 --- a/fs/ntfs/sysctl.c +++ b/fs/ntfs/sysctl.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * sysctl.c - Code for sysctl handling in NTFS Linux kernel driver. Part of | 2 | * sysctl.c - Code for sysctl handling in NTFS Linux kernel driver. Part of |
3 | * the Linux-NTFS project. Adapted from the old NTFS driver, | 3 | * the Linux-NTFS project. Adapted from the old NTFS driver, |
4 | * Copyright (C) 1997 Martin von Löwis, Régis Duchesne | 4 | * Copyright (C) 1997 Martin von Löwis, Régis Duchesne |
5 | * | 5 | * |
6 | * Copyright (c) 2002-2005 Anton Altaparmakov | 6 | * Copyright (c) 2002-2005 Anton Altaparmakov |
7 | * | 7 | * |
diff --git a/fs/ntfs/sysctl.h b/fs/ntfs/sysctl.h index beda5bf96405..d4f8ce920d95 100644 --- a/fs/ntfs/sysctl.h +++ b/fs/ntfs/sysctl.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * sysctl.h - Defines for sysctl handling in NTFS Linux kernel driver. Part of | 2 | * sysctl.h - Defines for sysctl handling in NTFS Linux kernel driver. Part of |
3 | * the Linux-NTFS project. Adapted from the old NTFS driver, | 3 | * the Linux-NTFS project. Adapted from the old NTFS driver, |
4 | * Copyright (C) 1997 Martin von Löwis, Régis Duchesne | 4 | * Copyright (C) 1997 Martin von Löwis, Régis Duchesne |
5 | * | 5 | * |
6 | * Copyright (c) 2002-2004 Anton Altaparmakov | 6 | * Copyright (c) 2002-2004 Anton Altaparmakov |
7 | * | 7 | * |
diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c index 014e73978dac..3094ddb7a254 100644 --- a/fs/ocfs2/dcache.c +++ b/fs/ocfs2/dcache.c | |||
@@ -376,7 +376,7 @@ out: | |||
376 | * directory locks. The dentries have already been deleted on other | 376 | * directory locks. The dentries have already been deleted on other |
377 | * nodes via ocfs2_remote_dentry_delete(). | 377 | * nodes via ocfs2_remote_dentry_delete(). |
378 | * | 378 | * |
379 | * Normally, the VFS handles the d_move() for the file sytem, after | 379 | * Normally, the VFS handles the d_move() for the file system, after |
380 | * the ->rename() callback. OCFS2 wants to handle this internally, so | 380 | * the ->rename() callback. OCFS2 wants to handle this internally, so |
381 | * the new lock can be created atomically with respect to the cluster. | 381 | * the new lock can be created atomically with respect to the cluster. |
382 | */ | 382 | */ |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 57adfe90d5ae..98c3781bc069 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -319,7 +319,7 @@ static int finish_unfinished(struct super_block *s) | |||
319 | 319 | ||
320 | /* to protect file being unlinked from getting lost we "safe" link files | 320 | /* to protect file being unlinked from getting lost we "safe" link files |
321 | being unlinked. This link will be deleted in the same transaction with last | 321 | being unlinked. This link will be deleted in the same transaction with last |
322 | item of file. mounting the filesytem we scan all these links and remove | 322 | item of file. mounting the filesystem we scan all these links and remove |
323 | files which almost got lost */ | 323 | files which almost got lost */ |
324 | void add_save_link(struct reiserfs_transaction_handle *th, | 324 | void add_save_link(struct reiserfs_transaction_handle *th, |
325 | struct inode *inode, int truncate) | 325 | struct inode *inode, int truncate) |
diff --git a/fs/super.c b/fs/super.c index d28fde7e1cfb..ceaf2e3d594c 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * Added kerneld support: Jacques Gelinas and Bjorn Ekwall | 15 | * Added kerneld support: Jacques Gelinas and Bjorn Ekwall |
16 | * Added change_root: Werner Almesberger & Hans Lermen, Feb '96 | 16 | * Added change_root: Werner Almesberger & Hans Lermen, Feb '96 |
17 | * Added options to /proc/mounts: | 17 | * Added options to /proc/mounts: |
18 | * Torbjörn Lindh (torbjorn.lindh@gopta.se), April 14, 1996. | 18 | * Torbjörn Lindh (torbjorn.lindh@gopta.se), April 14, 1996. |
19 | * Added devfs support: Richard Gooch <rgooch@atnf.csiro.au>, 13-JAN-1998 | 19 | * Added devfs support: Richard Gooch <rgooch@atnf.csiro.au>, 13-JAN-1998 |
20 | * Heavily rewritten for 'one fs - one tree' dcache architecture. AV, Mar 2000 | 20 | * Heavily rewritten for 'one fs - one tree' dcache architecture. AV, Mar 2000 |
21 | */ | 21 | */ |
@@ -417,7 +417,7 @@ restart: | |||
417 | } | 417 | } |
418 | 418 | ||
419 | /* | 419 | /* |
420 | * Call the ->sync_fs super_op against all filesytems which are r/w and | 420 | * Call the ->sync_fs super_op against all filesystems which are r/w and |
421 | * which implement it. | 421 | * which implement it. |
422 | * | 422 | * |
423 | * This operation is careful to avoid the livelock which could easily happen | 423 | * This operation is careful to avoid the livelock which could easily happen |
@@ -425,7 +425,7 @@ restart: | |||
425 | * is used only here. We set it against all filesystems and then clear it as | 425 | * is used only here. We set it against all filesystems and then clear it as |
426 | * we sync them. So redirtied filesystems are skipped. | 426 | * we sync them. So redirtied filesystems are skipped. |
427 | * | 427 | * |
428 | * But if process A is currently running sync_filesytems and then process B | 428 | * But if process A is currently running sync_filesystems and then process B |
429 | * calls sync_filesystems as well, process B will set all the s_need_sync_fs | 429 | * calls sync_filesystems as well, process B will set all the s_need_sync_fs |
430 | * flags again, which will cause process A to resync everything. Fix that with | 430 | * flags again, which will cause process A to resync everything. Fix that with |
431 | * a local mutex. | 431 | * a local mutex. |
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index d3be1e7fb48b..27d1785b7644 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -540,7 +540,7 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd, const struct attribute *attr, | |||
540 | /** | 540 | /** |
541 | * sysfs_create_file - create an attribute file for an object. | 541 | * sysfs_create_file - create an attribute file for an object. |
542 | * @kobj: object we're creating for. | 542 | * @kobj: object we're creating for. |
543 | * @attr: atrribute descriptor. | 543 | * @attr: attribute descriptor. |
544 | */ | 544 | */ |
545 | 545 | ||
546 | int sysfs_create_file(struct kobject * kobj, const struct attribute * attr) | 546 | int sysfs_create_file(struct kobject * kobj, const struct attribute * attr) |
diff --git a/include/asm-alpha/ide.h b/include/asm-alpha/ide.h index 2a5cc0b367ab..b7bf68d0407b 100644 --- a/include/asm-alpha/ide.h +++ b/include/asm-alpha/ide.h | |||
@@ -40,7 +40,6 @@ static inline unsigned long ide_default_io_base(int index) | |||
40 | } | 40 | } |
41 | } | 41 | } |
42 | 42 | ||
43 | #define IDE_ARCH_OBSOLETE_INIT | ||
44 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 43 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
45 | 44 | ||
46 | #ifdef CONFIG_PCI | 45 | #ifdef CONFIG_PCI |
diff --git a/include/asm-arm/arch-aaec2000/aaec2000.h b/include/asm-arm/arch-aaec2000/aaec2000.h index 002227924b9f..a6d1ee0980f2 100644 --- a/include/asm-arm/arch-aaec2000/aaec2000.h +++ b/include/asm-arm/arch-aaec2000/aaec2000.h | |||
@@ -140,11 +140,11 @@ | |||
140 | #define TIMER3_CLEAR __REG(0x80000e0c) /* Timer 3 Clear Register */ | 140 | #define TIMER3_CLEAR __REG(0x80000e0c) /* Timer 3 Clear Register */ |
141 | 141 | ||
142 | /* Timer Control register bits */ | 142 | /* Timer Control register bits */ |
143 | #define TIMER_CTRL_ENABLE (1 << 7) /* Enable (Start° Timer */ | 143 | #define TIMER_CTRL_ENABLE (1 << 7) /* Enable (Start Timer) */ |
144 | #define TIMER_CTRL_PERIODIC (1 << 6) /* Periodic Running Mode */ | 144 | #define TIMER_CTRL_PERIODIC (1 << 6) /* Periodic Running Mode */ |
145 | #define TIMER_CTRL_FREE_RUNNING (0 << 6) /* Normal Running Mode */ | 145 | #define TIMER_CTRL_FREE_RUNNING (0 << 6) /* Normal Running Mode */ |
146 | #define TIMER_CTRL_CLKSEL_508K (1 << 3) /* 508KHz Clock select (Timer 1, 2) */ | 146 | #define TIMER_CTRL_CLKSEL_508K (1 << 3) /* 508KHz Clock select (Timer 1, 2) */ |
147 | #define TIMER_CTRL_CLKSEL_2K (0 << 3) /* 2KHz Clock Select (Timer 1, 2)*/ | 147 | #define TIMER_CTRL_CLKSEL_2K (0 << 3) /* 2KHz Clock Select (Timer 1, 2) */ |
148 | 148 | ||
149 | /* Power and State Control */ | 149 | /* Power and State Control */ |
150 | #define POWER_BASE __REG(0x80000400) | 150 | #define POWER_BASE __REG(0x80000400) |
diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h index 678134bf2475..1eb8aac43228 100644 --- a/include/asm-arm/dma-mapping.h +++ b/include/asm-arm/dma-mapping.h | |||
@@ -401,7 +401,7 @@ extern void dma_sync_sg_for_device(struct device*, struct scatterlist*, int, enu | |||
401 | * | 401 | * |
402 | * On the SA-1111, a bug limits DMA to only certain regions of RAM. | 402 | * On the SA-1111, a bug limits DMA to only certain regions of RAM. |
403 | * On the IXP425, the PCI inbound window is 64MB (256MB total RAM) | 403 | * On the IXP425, the PCI inbound window is 64MB (256MB total RAM) |
404 | * On some ADI engineering sytems, PCI inbound window is 32MB (12MB total RAM) | 404 | * On some ADI engineering systems, PCI inbound window is 32MB (12MB total RAM) |
405 | * | 405 | * |
406 | * The following are helper functions used by the dmabounce subystem | 406 | * The following are helper functions used by the dmabounce subystem |
407 | * | 407 | * |
diff --git a/include/asm-arm/ide.h b/include/asm-arm/ide.h index 4f68c8a5a199..f348fcf3150b 100644 --- a/include/asm-arm/ide.h +++ b/include/asm-arm/ide.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #if !defined(CONFIG_ARCH_L7200) | 20 | #if !defined(CONFIG_ARCH_L7200) |
21 | # define IDE_ARCH_OBSOLETE_INIT | ||
22 | # ifdef CONFIG_ARCH_CLPS7500 | 21 | # ifdef CONFIG_ARCH_CLPS7500 |
23 | # define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 22 | # define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
24 | # else | 23 | # else |
diff --git a/include/asm-blackfin/ide.h b/include/asm-blackfin/ide.h index 41b2db46a168..121e272581d6 100644 --- a/include/asm-blackfin/ide.h +++ b/include/asm-blackfin/ide.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #define MAX_HWIFS 1 | 20 | #define MAX_HWIFS 1 |
21 | 21 | ||
22 | /* Legacy ... BLK_DEV_IDECS */ | 22 | /* Legacy ... BLK_DEV_IDECS */ |
23 | #define IDE_ARCH_OBSOLETE_INIT | ||
24 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 23 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
25 | 24 | ||
26 | 25 | ||
diff --git a/include/asm-blackfin/system.h b/include/asm-blackfin/system.h index 2b3d47d0bbb6..4a927379ee1c 100644 --- a/include/asm-blackfin/system.h +++ b/include/asm-blackfin/system.h | |||
@@ -128,9 +128,7 @@ extern unsigned long irq_flags; | |||
128 | #define mb() asm volatile ("" : : :"memory") | 128 | #define mb() asm volatile ("" : : :"memory") |
129 | #define rmb() asm volatile ("" : : :"memory") | 129 | #define rmb() asm volatile ("" : : :"memory") |
130 | #define wmb() asm volatile ("" : : :"memory") | 130 | #define wmb() asm volatile ("" : : :"memory") |
131 | #define set_rmb(var, value) do { (void) xchg(&var, value); } while (0) | 131 | #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) |
132 | #define set_mb(var, value) set_rmb(var, value) | ||
133 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) | ||
134 | 132 | ||
135 | #define read_barrier_depends() do { } while(0) | 133 | #define read_barrier_depends() do { } while(0) |
136 | 134 | ||
diff --git a/include/asm-cris/arch-v32/ide.h b/include/asm-cris/arch-v32/ide.h index 6590f657500d..11296170d057 100644 --- a/include/asm-cris/arch-v32/ide.h +++ b/include/asm-cris/arch-v32/ide.h | |||
@@ -54,7 +54,7 @@ static inline unsigned long ide_default_io_base(int index) | |||
54 | #define SUPPORT_VLB_SYNC 0 | 54 | #define SUPPORT_VLB_SYNC 0 |
55 | 55 | ||
56 | #define IDE_ARCH_ACK_INTR | 56 | #define IDE_ARCH_ACK_INTR |
57 | #define ide_ack_intr(hwif) (hwif)->hw.ack_intr(hwif) | 57 | #define ide_ack_intr(hwif) ((hwif)->ack_intr(hwif)) |
58 | 58 | ||
59 | #endif /* __KERNEL__ */ | 59 | #endif /* __KERNEL__ */ |
60 | 60 | ||
diff --git a/include/asm-h8300/system.h b/include/asm-h8300/system.h index 7807018f8500..2c1e83f7b419 100644 --- a/include/asm-h8300/system.h +++ b/include/asm-h8300/system.h | |||
@@ -82,8 +82,7 @@ asmlinkage void resume(void); | |||
82 | #define mb() asm volatile ("" : : :"memory") | 82 | #define mb() asm volatile ("" : : :"memory") |
83 | #define rmb() asm volatile ("" : : :"memory") | 83 | #define rmb() asm volatile ("" : : :"memory") |
84 | #define wmb() asm volatile ("" : : :"memory") | 84 | #define wmb() asm volatile ("" : : :"memory") |
85 | #define set_rmb(var, value) do { xchg(&var, value); } while (0) | 85 | #define set_mb(var, value) do { xchg(&var, value); } while (0) |
86 | #define set_mb(var, value) set_rmb(var, value) | ||
87 | 86 | ||
88 | #ifdef CONFIG_SMP | 87 | #ifdef CONFIG_SMP |
89 | #define smp_mb() mb() | 88 | #define smp_mb() mb() |
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h index e928675de352..1ccf23809329 100644 --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h | |||
@@ -46,7 +46,6 @@ static inline unsigned long ide_default_io_base(int index) | |||
46 | } | 46 | } |
47 | } | 47 | } |
48 | 48 | ||
49 | #define IDE_ARCH_OBSOLETE_INIT | ||
50 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 49 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
51 | 50 | ||
52 | #ifdef CONFIG_PCI | 51 | #ifdef CONFIG_PCI |
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index 4672a49e8760..5d2044e529ab 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h | |||
@@ -65,7 +65,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
65 | } | 65 | } |
66 | } | 66 | } |
67 | 67 | ||
68 | #define IDE_ARCH_OBSOLETE_INIT | ||
69 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 68 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
70 | 69 | ||
71 | #ifdef CONFIG_BLK_DEV_IDEPCI | 70 | #ifdef CONFIG_BLK_DEV_IDEPCI |
diff --git a/include/asm-m68k/ide.h b/include/asm-m68k/ide.h index f9ffb2cbbae8..909c6dfd3851 100644 --- a/include/asm-m68k/ide.h +++ b/include/asm-m68k/ide.h | |||
@@ -137,7 +137,7 @@ ide_get_lock(irq_handler_t handler, void *data) | |||
137 | #endif /* CONFIG_BLK_DEV_FALCON_IDE */ | 137 | #endif /* CONFIG_BLK_DEV_FALCON_IDE */ |
138 | 138 | ||
139 | #define IDE_ARCH_ACK_INTR | 139 | #define IDE_ARCH_ACK_INTR |
140 | #define ide_ack_intr(hwif) ((hwif)->hw.ack_intr ? (hwif)->hw.ack_intr(hwif) : 1) | 140 | #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1) |
141 | 141 | ||
142 | #endif /* __KERNEL__ */ | 142 | #endif /* __KERNEL__ */ |
143 | #endif /* _M68K_IDE_H */ | 143 | #endif /* _M68K_IDE_H */ |
diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index 1bd1142685e1..15b4c7d45c94 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h | |||
@@ -104,8 +104,7 @@ asmlinkage void resume(void); | |||
104 | #define mb() asm volatile ("" : : :"memory") | 104 | #define mb() asm volatile ("" : : :"memory") |
105 | #define rmb() asm volatile ("" : : :"memory") | 105 | #define rmb() asm volatile ("" : : :"memory") |
106 | #define wmb() asm volatile ("" : : :"memory") | 106 | #define wmb() asm volatile ("" : : :"memory") |
107 | #define set_rmb(var, value) do { xchg(&var, value); } while (0) | 107 | #define set_mb(var, value) do { xchg(&var, value); } while (0) |
108 | #define set_mb(var, value) set_rmb(var, value) | ||
109 | 108 | ||
110 | #ifdef CONFIG_SMP | 109 | #ifdef CONFIG_SMP |
111 | #define smp_mb() mb() | 110 | #define smp_mb() mb() |
diff --git a/include/asm-mips/mach-generic/ide.h b/include/asm-mips/mach-generic/ide.h index a77128362a7d..4ec2b930dfbb 100644 --- a/include/asm-mips/mach-generic/ide.h +++ b/include/asm-mips/mach-generic/ide.h | |||
@@ -98,7 +98,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | #define IDE_ARCH_OBSOLETE_INIT | ||
102 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 101 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
103 | 102 | ||
104 | #ifdef CONFIG_BLK_DEV_IDEPCI | 103 | #ifdef CONFIG_BLK_DEV_IDEPCI |
diff --git a/include/asm-mips/pci/bridge.h b/include/asm-mips/pci/bridge.h index b84feebf2cef..5f4b9d4e4114 100644 --- a/include/asm-mips/pci/bridge.h +++ b/include/asm-mips/pci/bridge.h | |||
@@ -538,7 +538,7 @@ typedef struct bridge_err_cmdword_s { | |||
538 | BRIDGE_ISR_PMU_ESIZE_FAULT) | 538 | BRIDGE_ISR_PMU_ESIZE_FAULT) |
539 | 539 | ||
540 | /* | 540 | /* |
541 | * List of Errors which are fatal and kill the sytem | 541 | * List of Errors which are fatal and kill the system |
542 | */ | 542 | */ |
543 | #define BRIDGE_ISR_ERROR_FATAL \ | 543 | #define BRIDGE_ISR_ERROR_FATAL \ |
544 | ((BRIDGE_ISR_XTALK_ERROR & ~BRIDGE_ISR_XREAD_REQ_TIMEOUT)|\ | 544 | ((BRIDGE_ISR_XTALK_ERROR & ~BRIDGE_ISR_XREAD_REQ_TIMEOUT)|\ |
diff --git a/include/asm-parisc/ide.h b/include/asm-parisc/ide.h index b27bf7aeb256..be8760fbc8ee 100644 --- a/include/asm-parisc/ide.h +++ b/include/asm-parisc/ide.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #define MAX_HWIFS 2 | 17 | #define MAX_HWIFS 2 |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #define IDE_ARCH_OBSOLETE_INIT | ||
21 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 20 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
22 | 21 | ||
23 | #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) | 22 | #define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) |
diff --git a/include/asm-powerpc/ide.h b/include/asm-powerpc/ide.h index 1644e44c8757..fd7f5a430f0a 100644 --- a/include/asm-powerpc/ide.h +++ b/include/asm-powerpc/ide.h | |||
@@ -69,12 +69,11 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
69 | 69 | ||
70 | #ifdef CONFIG_BLK_DEV_MPC8xx_IDE | 70 | #ifdef CONFIG_BLK_DEV_MPC8xx_IDE |
71 | #define IDE_ARCH_ACK_INTR 1 | 71 | #define IDE_ARCH_ACK_INTR 1 |
72 | #define ide_ack_intr(hwif) (hwif->hw.ack_intr ? hwif->hw.ack_intr(hwif) : 1) | 72 | #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1) |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | #endif /* __powerpc64__ */ | 75 | #endif /* __powerpc64__ */ |
76 | 76 | ||
77 | #define IDE_ARCH_OBSOLETE_INIT | ||
78 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 77 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
79 | 78 | ||
80 | #endif /* __KERNEL__ */ | 79 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index bf14ab4ef4c9..e44cdfc8493a 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h | |||
@@ -522,7 +522,7 @@ static inline void name at \ | |||
522 | #else | 522 | #else |
523 | /* | 523 | /* |
524 | * Enforce synchronisation of stores vs. spin_unlock | 524 | * Enforce synchronisation of stores vs. spin_unlock |
525 | * (this does it explicitely, though our implementation of spin_unlock | 525 | * (this does it explicitly, though our implementation of spin_unlock |
526 | * does it implicitely too) | 526 | * does it implicitely too) |
527 | */ | 527 | */ |
528 | static inline void mmiowb(void) | 528 | static inline void mmiowb(void) |
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 98c6bd5756b7..f6dfce025adf 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -121,7 +121,5 @@ struct paca_struct { | |||
121 | 121 | ||
122 | extern struct paca_struct paca[]; | 122 | extern struct paca_struct paca[]; |
123 | 123 | ||
124 | void setup_boot_paca(void); | ||
125 | |||
126 | #endif /* __KERNEL__ */ | 124 | #endif /* __KERNEL__ */ |
127 | #endif /* _ASM_POWERPC_PACA_H */ | 125 | #endif /* _ASM_POWERPC_PACA_H */ |
diff --git a/include/asm-sh/se7751.h b/include/asm-sh/se7751.h index 02ca9347f043..b36792ac5d66 100644 --- a/include/asm-sh/se7751.h +++ b/include/asm-sh/se7751.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define PA_LED 0xba000000 /* LED */ | 36 | #define PA_LED 0xba000000 /* LED */ |
37 | #define PA_BCR 0xbb000000 /* FPGA on the MS7751SE01 */ | 37 | #define PA_BCR 0xbb000000 /* FPGA on the MS7751SE01 */ |
38 | 38 | ||
39 | #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controler */ | 39 | #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controller */ |
40 | #define PA_MRSHPC_MW1 0xb8400000 /* MR-SHPC-01 memory window base */ | 40 | #define PA_MRSHPC_MW1 0xb8400000 /* MR-SHPC-01 memory window base */ |
41 | #define PA_MRSHPC_MW2 0xb8500000 /* MR-SHPC-01 attribute window base */ | 41 | #define PA_MRSHPC_MW2 0xb8500000 /* MR-SHPC-01 attribute window base */ |
42 | #define PA_MRSHPC_IO 0xb8600000 /* MR-SHPC-01 I/O window base */ | 42 | #define PA_MRSHPC_IO 0xb8600000 /* MR-SHPC-01 I/O window base */ |
diff --git a/include/asm-sh/systemh7751.h b/include/asm-sh/systemh7751.h index b143bb2a2ca7..4161122c84ef 100644 --- a/include/asm-sh/systemh7751.h +++ b/include/asm-sh/systemh7751.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #define PA_LED 0xba000000 /* LED */ | 36 | #define PA_LED 0xba000000 /* LED */ |
37 | #define PA_BCR 0xbb000000 /* FPGA on the MS7751SE01 */ | 37 | #define PA_BCR 0xbb000000 /* FPGA on the MS7751SE01 */ |
38 | 38 | ||
39 | #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controler */ | 39 | #define PA_MRSHPC 0xb83fffe0 /* MR-SHPC-01 PCMCIA controller */ |
40 | #define PA_MRSHPC_MW1 0xb8400000 /* MR-SHPC-01 memory window base */ | 40 | #define PA_MRSHPC_MW1 0xb8400000 /* MR-SHPC-01 memory window base */ |
41 | #define PA_MRSHPC_MW2 0xb8500000 /* MR-SHPC-01 attribute window base */ | 41 | #define PA_MRSHPC_MW2 0xb8500000 /* MR-SHPC-01 attribute window base */ |
42 | #define PA_MRSHPC_IO 0xb8600000 /* MR-SHPC-01 I/O window base */ | 42 | #define PA_MRSHPC_IO 0xb8600000 /* MR-SHPC-01 I/O window base */ |
diff --git a/include/asm-sh64/ide.h b/include/asm-sh64/ide.h index c9d84d5f772e..b6e31e8b9410 100644 --- a/include/asm-sh64/ide.h +++ b/include/asm-sh64/ide.h | |||
@@ -19,7 +19,6 @@ | |||
19 | /* Without this, the initialisation of PCI IDE cards end up calling | 19 | /* Without this, the initialisation of PCI IDE cards end up calling |
20 | * ide_init_hwif_ports, which won't work. */ | 20 | * ide_init_hwif_ports, which won't work. */ |
21 | #ifdef CONFIG_BLK_DEV_IDEPCI | 21 | #ifdef CONFIG_BLK_DEV_IDEPCI |
22 | #define IDE_ARCH_OBSOLETE_INIT 1 | ||
23 | #define ide_default_io_ctl(base) (0) | 22 | #define ide_default_io_ctl(base) (0) |
24 | #endif | 23 | #endif |
25 | 24 | ||
diff --git a/include/asm-sh64/system.h b/include/asm-sh64/system.h index 5ff94644e8c8..be2a15ffcc55 100644 --- a/include/asm-sh64/system.h +++ b/include/asm-sh64/system.h | |||
@@ -62,8 +62,7 @@ extern void __xchg_called_with_bad_pointer(void); | |||
62 | #define smp_read_barrier_depends() do { } while (0) | 62 | #define smp_read_barrier_depends() do { } while (0) |
63 | #endif /* CONFIG_SMP */ | 63 | #endif /* CONFIG_SMP */ |
64 | 64 | ||
65 | #define set_rmb(var, value) do { (void)xchg(&var, value); } while (0) | 65 | #define set_mb(var, value) do { (void)xchg(&var, value); } while (0) |
66 | #define set_mb(var, value) set_rmb(var, value) | ||
67 | 66 | ||
68 | /* Interrupt Control */ | 67 | /* Interrupt Control */ |
69 | #ifndef HARD_CLI | 68 | #ifndef HARD_CLI |
diff --git a/include/asm-sparc/ide.h b/include/asm-sparc/ide.h index a6d735a1310e..404022765fc7 100644 --- a/include/asm-sparc/ide.h +++ b/include/asm-sparc/ide.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #undef MAX_HWIFS | 18 | #undef MAX_HWIFS |
19 | #define MAX_HWIFS 2 | 19 | #define MAX_HWIFS 2 |
20 | 20 | ||
21 | #define IDE_ARCH_OBSOLETE_INIT | ||
22 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 21 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
23 | 22 | ||
24 | #define __ide_insl(data_reg, buffer, wcount) \ | 23 | #define __ide_insl(data_reg, buffer, wcount) \ |
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h index 55149cf933c2..ac7eb210b941 100644 --- a/include/asm-sparc64/ide.h +++ b/include/asm-sparc64/ide.h | |||
@@ -24,7 +24,6 @@ | |||
24 | # endif | 24 | # endif |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #define IDE_ARCH_OBSOLETE_INIT | ||
28 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 27 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
29 | 28 | ||
30 | #define __ide_insl(data_reg, buffer, wcount) \ | 29 | #define __ide_insl(data_reg, buffer, wcount) \ |
diff --git a/include/asm-v850/system.h b/include/asm-v850/system.h index 0de2481fd990..a34ddfafd561 100644 --- a/include/asm-v850/system.h +++ b/include/asm-v850/system.h | |||
@@ -66,8 +66,7 @@ static inline int irqs_disabled (void) | |||
66 | #define rmb() mb () | 66 | #define rmb() mb () |
67 | #define wmb() mb () | 67 | #define wmb() mb () |
68 | #define read_barrier_depends() ((void)0) | 68 | #define read_barrier_depends() ((void)0) |
69 | #define set_rmb(var, value) do { xchg (&var, value); } while (0) | 69 | #define set_mb(var, value) do { xchg (&var, value); } while (0) |
70 | #define set_mb(var, value) set_rmb (var, value) | ||
71 | 70 | ||
72 | #define smp_mb() mb () | 71 | #define smp_mb() mb () |
73 | #define smp_rmb() rmb () | 72 | #define smp_rmb() rmb () |
diff --git a/include/asm-x86/acpi_32.h b/include/asm-x86/acpi_32.h index 125179adf044..723493e6c851 100644 --- a/include/asm-x86/acpi_32.h +++ b/include/asm-x86/acpi_32.h | |||
@@ -81,11 +81,7 @@ int __acpi_release_global_lock(unsigned int *lock); | |||
81 | :"=r"(n_hi), "=r"(n_lo) \ | 81 | :"=r"(n_hi), "=r"(n_lo) \ |
82 | :"0"(n_hi), "1"(n_lo)) | 82 | :"0"(n_hi), "1"(n_lo)) |
83 | 83 | ||
84 | #ifdef CONFIG_X86_IO_APIC | 84 | extern void early_quirks(void); |
85 | extern void check_acpi_pci(void); | ||
86 | #else | ||
87 | static inline void check_acpi_pci(void) { } | ||
88 | #endif | ||
89 | 85 | ||
90 | #ifdef CONFIG_ACPI | 86 | #ifdef CONFIG_ACPI |
91 | extern int acpi_lapic; | 87 | extern int acpi_lapic; |
diff --git a/include/asm-x86/compat.h b/include/asm-x86/compat.h index 53cb96b68a62..66ba7987184a 100644 --- a/include/asm-x86/compat.h +++ b/include/asm-x86/compat.h | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | #include <linux/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
9 | #include <asm/user32.h> | ||
9 | 10 | ||
10 | #define COMPAT_USER_HZ 100 | 11 | #define COMPAT_USER_HZ 100 |
11 | 12 | ||
@@ -181,6 +182,11 @@ struct compat_shmid64_ds { | |||
181 | }; | 182 | }; |
182 | 183 | ||
183 | /* | 184 | /* |
185 | * The type of struct elf_prstatus.pr_reg in compatible core dumps. | ||
186 | */ | ||
187 | typedef struct user_regs_struct32 compat_elf_gregset_t; | ||
188 | |||
189 | /* | ||
184 | * A pointer passed in from user mode. This should not | 190 | * A pointer passed in from user mode. This should not |
185 | * be used for syscall parameters, just declare them | 191 | * be used for syscall parameters, just declare them |
186 | * as pointers because the syscall entry code will have | 192 | * as pointers because the syscall entry code will have |
diff --git a/include/asm-x86/desc_64.h b/include/asm-x86/desc_64.h index ac991b5ca0fd..7d9c938e69fd 100644 --- a/include/asm-x86/desc_64.h +++ b/include/asm-x86/desc_64.h | |||
@@ -20,6 +20,16 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; | |||
20 | #define load_LDT_desc() asm volatile("lldt %w0"::"r" (GDT_ENTRY_LDT*8)) | 20 | #define load_LDT_desc() asm volatile("lldt %w0"::"r" (GDT_ENTRY_LDT*8)) |
21 | #define clear_LDT() asm volatile("lldt %w0"::"r" (0)) | 21 | #define clear_LDT() asm volatile("lldt %w0"::"r" (0)) |
22 | 22 | ||
23 | static inline unsigned long __store_tr(void) | ||
24 | { | ||
25 | unsigned long tr; | ||
26 | |||
27 | asm volatile ("str %w0":"=r" (tr)); | ||
28 | return tr; | ||
29 | } | ||
30 | |||
31 | #define store_tr(tr) (tr) = __store_tr() | ||
32 | |||
23 | /* | 33 | /* |
24 | * This is the ldt that every process will get unless we need | 34 | * This is the ldt that every process will get unless we need |
25 | * something other than this. | 35 | * something other than this. |
@@ -31,6 +41,16 @@ extern struct desc_ptr cpu_gdt_descr[]; | |||
31 | /* the cpu gdt accessor */ | 41 | /* the cpu gdt accessor */ |
32 | #define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address) | 42 | #define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address) |
33 | 43 | ||
44 | static inline void load_gdt(const struct desc_ptr *ptr) | ||
45 | { | ||
46 | asm volatile("lgdt %w0"::"m" (*ptr)); | ||
47 | } | ||
48 | |||
49 | static inline void store_gdt(struct desc_ptr *ptr) | ||
50 | { | ||
51 | asm("sgdt %w0":"=m" (*ptr)); | ||
52 | } | ||
53 | |||
34 | static inline void _set_gate(void *adr, unsigned type, unsigned long func, unsigned dpl, unsigned ist) | 54 | static inline void _set_gate(void *adr, unsigned type, unsigned long func, unsigned dpl, unsigned ist) |
35 | { | 55 | { |
36 | struct gate_struct s; | 56 | struct gate_struct s; |
@@ -71,6 +91,16 @@ static inline void set_system_gate_ist(int nr, void *func, unsigned ist) | |||
71 | _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, ist); | 91 | _set_gate(&idt_table[nr], GATE_INTERRUPT, (unsigned long) func, 3, ist); |
72 | } | 92 | } |
73 | 93 | ||
94 | static inline void load_idt(const struct desc_ptr *ptr) | ||
95 | { | ||
96 | asm volatile("lidt %w0"::"m" (*ptr)); | ||
97 | } | ||
98 | |||
99 | static inline void store_idt(struct desc_ptr *dtr) | ||
100 | { | ||
101 | asm("sidt %w0":"=m" (*dtr)); | ||
102 | } | ||
103 | |||
74 | static inline void set_tssldt_descriptor(void *ptr, unsigned long tss, unsigned type, | 104 | static inline void set_tssldt_descriptor(void *ptr, unsigned long tss, unsigned type, |
75 | unsigned size) | 105 | unsigned size) |
76 | { | 106 | { |
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h index d94898831bac..771af336734f 100644 --- a/include/asm-x86/geode.h +++ b/include/asm-x86/geode.h | |||
@@ -38,6 +38,8 @@ extern int geode_get_dev_base(unsigned int dev); | |||
38 | #define MSR_LBAR_ACPI 0x5140000E | 38 | #define MSR_LBAR_ACPI 0x5140000E |
39 | #define MSR_LBAR_PMS 0x5140000F | 39 | #define MSR_LBAR_PMS 0x5140000F |
40 | 40 | ||
41 | #define MSR_DIVIL_SOFT_RESET 0x51400017 | ||
42 | |||
41 | #define MSR_PIC_YSEL_LOW 0x51400020 | 43 | #define MSR_PIC_YSEL_LOW 0x51400020 |
42 | #define MSR_PIC_YSEL_HIGH 0x51400021 | 44 | #define MSR_PIC_YSEL_HIGH 0x51400021 |
43 | #define MSR_PIC_ZSEL_LOW 0x51400022 | 45 | #define MSR_PIC_ZSEL_LOW 0x51400022 |
diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h index d4ab6db050b6..b1f3c1ea55d9 100644 --- a/include/asm-x86/hpet.h +++ b/include/asm-x86/hpet.h | |||
@@ -3,12 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef CONFIG_HPET_TIMER | 4 | #ifdef CONFIG_HPET_TIMER |
5 | 5 | ||
6 | /* | ||
7 | * Documentation on HPET can be found at: | ||
8 | * http://www.intel.com/ial/home/sp/pcmmspec.htm | ||
9 | * ftp://download.intel.com/ial/home/sp/mmts098.pdf | ||
10 | */ | ||
11 | |||
12 | #define HPET_MMAP_SIZE 1024 | 6 | #define HPET_MMAP_SIZE 1024 |
13 | 7 | ||
14 | #define HPET_ID 0x000 | 8 | #define HPET_ID 0x000 |
@@ -64,6 +58,7 @@ | |||
64 | /* hpet memory map physical address */ | 58 | /* hpet memory map physical address */ |
65 | extern unsigned long hpet_address; | 59 | extern unsigned long hpet_address; |
66 | extern unsigned long force_hpet_address; | 60 | extern unsigned long force_hpet_address; |
61 | extern int hpet_force_user; | ||
67 | extern int is_hpet_enabled(void); | 62 | extern int is_hpet_enabled(void); |
68 | extern int hpet_enable(void); | 63 | extern int hpet_enable(void); |
69 | extern unsigned long hpet_readl(unsigned long a); | 64 | extern unsigned long hpet_readl(unsigned long a); |
diff --git a/include/asm-x86/ide.h b/include/asm-x86/ide.h index e7817a3d6578..42130adf9c7c 100644 --- a/include/asm-x86/ide.h +++ b/include/asm-x86/ide.h | |||
@@ -62,7 +62,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | #define IDE_ARCH_OBSOLETE_INIT | ||
66 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ | 65 | #define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */ |
67 | 66 | ||
68 | #ifdef CONFIG_BLK_DEV_IDEPCI | 67 | #ifdef CONFIG_BLK_DEV_IDEPCI |
diff --git a/include/asm-x86/io_apic_64.h b/include/asm-x86/io_apic_64.h index d9f2e54324d5..e2c13675ee4e 100644 --- a/include/asm-x86/io_apic_64.h +++ b/include/asm-x86/io_apic_64.h | |||
@@ -133,4 +133,6 @@ void enable_NMI_through_LVT0 (void * dummy); | |||
133 | 133 | ||
134 | extern spinlock_t i8259A_lock; | 134 | extern spinlock_t i8259A_lock; |
135 | 135 | ||
136 | extern int timer_over_8254; | ||
137 | |||
136 | #endif | 138 | #endif |
diff --git a/include/asm-x86/ipi.h b/include/asm-x86/ipi.h index a7c75ea408a8..6d011bd6067d 100644 --- a/include/asm-x86/ipi.h +++ b/include/asm-x86/ipi.h | |||
@@ -119,7 +119,7 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | |||
119 | */ | 119 | */ |
120 | local_irq_save(flags); | 120 | local_irq_save(flags); |
121 | for_each_cpu_mask(query_cpu, mask) { | 121 | for_each_cpu_mask(query_cpu, mask) { |
122 | __send_IPI_dest_field(x86_cpu_to_apicid[query_cpu], | 122 | __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu), |
123 | vector, APIC_DEST_PHYSICAL); | 123 | vector, APIC_DEST_PHYSICAL); |
124 | } | 124 | } |
125 | local_irq_restore(flags); | 125 | local_irq_restore(flags); |
diff --git a/include/asm-x86/irq_32.h b/include/asm-x86/irq_32.h index 36f310632c49..aca9c96e8e6b 100644 --- a/include/asm-x86/irq_32.h +++ b/include/asm-x86/irq_32.h | |||
@@ -45,4 +45,7 @@ unsigned int do_IRQ(struct pt_regs *regs); | |||
45 | void init_IRQ(void); | 45 | void init_IRQ(void); |
46 | void __init native_init_IRQ(void); | 46 | void __init native_init_IRQ(void); |
47 | 47 | ||
48 | /* Interrupt vector management */ | ||
49 | extern DECLARE_BITMAP(used_vectors, NR_VECTORS); | ||
50 | |||
48 | #endif /* _ASM_IRQ_H */ | 51 | #endif /* _ASM_IRQ_H */ |
diff --git a/include/asm-x86/msr-index.h b/include/asm-x86/msr-index.h index a02eb2991349..a4944732be04 100644 --- a/include/asm-x86/msr-index.h +++ b/include/asm-x86/msr-index.h | |||
@@ -73,8 +73,32 @@ | |||
73 | #define MSR_P6_EVNTSEL0 0x00000186 | 73 | #define MSR_P6_EVNTSEL0 0x00000186 |
74 | #define MSR_P6_EVNTSEL1 0x00000187 | 74 | #define MSR_P6_EVNTSEL1 0x00000187 |
75 | 75 | ||
76 | /* K7/K8 MSRs. Not complete. See the architecture manual for a more | 76 | /* AMD64 MSRs. Not complete. See the architecture manual for a more |
77 | complete list. */ | 77 | complete list. */ |
78 | |||
79 | #define MSR_AMD64_IBSFETCHCTL 0xc0011030 | ||
80 | #define MSR_AMD64_IBSFETCHLINAD 0xc0011031 | ||
81 | #define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032 | ||
82 | #define MSR_AMD64_IBSOPCTL 0xc0011033 | ||
83 | #define MSR_AMD64_IBSOPRIP 0xc0011034 | ||
84 | #define MSR_AMD64_IBSOPDATA 0xc0011035 | ||
85 | #define MSR_AMD64_IBSOPDATA2 0xc0011036 | ||
86 | #define MSR_AMD64_IBSOPDATA3 0xc0011037 | ||
87 | #define MSR_AMD64_IBSDCLINAD 0xc0011038 | ||
88 | #define MSR_AMD64_IBSDCPHYSAD 0xc0011039 | ||
89 | #define MSR_AMD64_IBSCTL 0xc001103a | ||
90 | |||
91 | /* K8 MSRs */ | ||
92 | #define MSR_K8_TOP_MEM1 0xc001001a | ||
93 | #define MSR_K8_TOP_MEM2 0xc001001d | ||
94 | #define MSR_K8_SYSCFG 0xc0010010 | ||
95 | #define MSR_K8_HWCR 0xc0010015 | ||
96 | #define MSR_K8_ENABLE_C1E 0xc0010055 | ||
97 | #define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000 /* MtrrFixDramEn bit */ | ||
98 | #define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000 /* MtrrFixDramModEn bit */ | ||
99 | #define K8_MTRR_RDMEM_WRMEM_MASK 0x18181818 /* Mask: RdMem|WrMem */ | ||
100 | |||
101 | /* K7 MSRs */ | ||
78 | #define MSR_K7_EVNTSEL0 0xc0010000 | 102 | #define MSR_K7_EVNTSEL0 0xc0010000 |
79 | #define MSR_K7_PERFCTR0 0xc0010004 | 103 | #define MSR_K7_PERFCTR0 0xc0010004 |
80 | #define MSR_K7_EVNTSEL1 0xc0010001 | 104 | #define MSR_K7_EVNTSEL1 0xc0010001 |
@@ -83,20 +107,10 @@ | |||
83 | #define MSR_K7_PERFCTR2 0xc0010006 | 107 | #define MSR_K7_PERFCTR2 0xc0010006 |
84 | #define MSR_K7_EVNTSEL3 0xc0010003 | 108 | #define MSR_K7_EVNTSEL3 0xc0010003 |
85 | #define MSR_K7_PERFCTR3 0xc0010007 | 109 | #define MSR_K7_PERFCTR3 0xc0010007 |
86 | #define MSR_K8_TOP_MEM1 0xc001001a | ||
87 | #define MSR_K7_CLK_CTL 0xc001001b | 110 | #define MSR_K7_CLK_CTL 0xc001001b |
88 | #define MSR_K8_TOP_MEM2 0xc001001d | ||
89 | #define MSR_K8_SYSCFG 0xc0010010 | ||
90 | |||
91 | #define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000 /* MtrrFixDramEn bit */ | ||
92 | #define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000 /* MtrrFixDramModEn bit */ | ||
93 | #define K8_MTRR_RDMEM_WRMEM_MASK 0x18181818 /* Mask: RdMem|WrMem */ | ||
94 | |||
95 | #define MSR_K7_HWCR 0xc0010015 | 111 | #define MSR_K7_HWCR 0xc0010015 |
96 | #define MSR_K8_HWCR 0xc0010015 | ||
97 | #define MSR_K7_FID_VID_CTL 0xc0010041 | 112 | #define MSR_K7_FID_VID_CTL 0xc0010041 |
98 | #define MSR_K7_FID_VID_STATUS 0xc0010042 | 113 | #define MSR_K7_FID_VID_STATUS 0xc0010042 |
99 | #define MSR_K8_ENABLE_C1E 0xc0010055 | ||
100 | 114 | ||
101 | /* K6 MSRs */ | 115 | /* K6 MSRs */ |
102 | #define MSR_K6_EFER 0xc0000080 | 116 | #define MSR_K6_EFER 0xc0000080 |
diff --git a/include/asm-x86/processor_32.h b/include/asm-x86/processor_32.h index 83800e7496ee..13976b086837 100644 --- a/include/asm-x86/processor_32.h +++ b/include/asm-x86/processor_32.h | |||
@@ -79,6 +79,7 @@ struct cpuinfo_x86 { | |||
79 | unsigned char booted_cores; /* number of cores as seen by OS */ | 79 | unsigned char booted_cores; /* number of cores as seen by OS */ |
80 | __u8 phys_proc_id; /* Physical processor id. */ | 80 | __u8 phys_proc_id; /* Physical processor id. */ |
81 | __u8 cpu_core_id; /* Core id */ | 81 | __u8 cpu_core_id; /* Core id */ |
82 | __u8 cpu_index; /* index into per_cpu list */ | ||
82 | #endif | 83 | #endif |
83 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); | 84 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); |
84 | 85 | ||
@@ -103,14 +104,19 @@ extern struct tss_struct doublefault_tss; | |||
103 | DECLARE_PER_CPU(struct tss_struct, init_tss); | 104 | DECLARE_PER_CPU(struct tss_struct, init_tss); |
104 | 105 | ||
105 | #ifdef CONFIG_SMP | 106 | #ifdef CONFIG_SMP |
106 | extern struct cpuinfo_x86 cpu_data[]; | 107 | DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); |
107 | #define current_cpu_data cpu_data[smp_processor_id()] | 108 | #define cpu_data(cpu) per_cpu(cpu_info, cpu) |
109 | #define current_cpu_data cpu_data(smp_processor_id()) | ||
108 | #else | 110 | #else |
109 | #define cpu_data (&boot_cpu_data) | 111 | #define cpu_data(cpu) boot_cpu_data |
110 | #define current_cpu_data boot_cpu_data | 112 | #define current_cpu_data boot_cpu_data |
111 | #endif | 113 | #endif |
112 | 114 | ||
113 | extern int cpu_llc_id[NR_CPUS]; | 115 | /* |
116 | * the following now lives in the per cpu area: | ||
117 | * extern int cpu_llc_id[NR_CPUS]; | ||
118 | */ | ||
119 | DECLARE_PER_CPU(u8, cpu_llc_id); | ||
114 | extern char ignore_fpu_irq; | 120 | extern char ignore_fpu_irq; |
115 | 121 | ||
116 | void __init cpu_detect(struct cpuinfo_x86 *c); | 122 | void __init cpu_detect(struct cpuinfo_x86 *c); |
diff --git a/include/asm-x86/processor_64.h b/include/asm-x86/processor_64.h index f422becbddd9..e4f19970a82b 100644 --- a/include/asm-x86/processor_64.h +++ b/include/asm-x86/processor_64.h | |||
@@ -74,6 +74,7 @@ struct cpuinfo_x86 { | |||
74 | __u8 booted_cores; /* number of cores as seen by OS */ | 74 | __u8 booted_cores; /* number of cores as seen by OS */ |
75 | __u8 phys_proc_id; /* Physical Processor id. */ | 75 | __u8 phys_proc_id; /* Physical Processor id. */ |
76 | __u8 cpu_core_id; /* Core id. */ | 76 | __u8 cpu_core_id; /* Core id. */ |
77 | __u8 cpu_index; /* index into per_cpu list */ | ||
77 | #endif | 78 | #endif |
78 | } ____cacheline_aligned; | 79 | } ____cacheline_aligned; |
79 | 80 | ||
@@ -88,11 +89,12 @@ struct cpuinfo_x86 { | |||
88 | #define X86_VENDOR_UNKNOWN 0xff | 89 | #define X86_VENDOR_UNKNOWN 0xff |
89 | 90 | ||
90 | #ifdef CONFIG_SMP | 91 | #ifdef CONFIG_SMP |
91 | extern struct cpuinfo_x86 cpu_data[]; | 92 | DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); |
92 | #define current_cpu_data cpu_data[smp_processor_id()] | 93 | #define cpu_data(cpu) per_cpu(cpu_info, cpu) |
94 | #define current_cpu_data cpu_data(smp_processor_id()) | ||
93 | #else | 95 | #else |
94 | #define cpu_data (&boot_cpu_data) | 96 | #define cpu_data(cpu) boot_cpu_data |
95 | #define current_cpu_data boot_cpu_data | 97 | #define current_cpu_data boot_cpu_data |
96 | #endif | 98 | #endif |
97 | 99 | ||
98 | extern char ignore_irq13; | 100 | extern char ignore_irq13; |
@@ -390,12 +392,6 @@ static inline void sync_core(void) | |||
390 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); | 392 | asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory"); |
391 | } | 393 | } |
392 | 394 | ||
393 | #define ARCH_HAS_PREFETCH | ||
394 | static inline void prefetch(void *x) | ||
395 | { | ||
396 | asm volatile("prefetcht0 (%0)" :: "r" (x)); | ||
397 | } | ||
398 | |||
399 | #define ARCH_HAS_PREFETCHW 1 | 395 | #define ARCH_HAS_PREFETCHW 1 |
400 | static inline void prefetchw(void *x) | 396 | static inline void prefetchw(void *x) |
401 | { | 397 | { |
diff --git a/include/asm-x86/proto.h b/include/asm-x86/proto.h index c44a3a93b5a4..dabba55f7ed8 100644 --- a/include/asm-x86/proto.h +++ b/include/asm-x86/proto.h | |||
@@ -83,8 +83,6 @@ extern unsigned tsc_khz; | |||
83 | extern int reboot_force; | 83 | extern int reboot_force; |
84 | extern int notsc_setup(char *); | 84 | extern int notsc_setup(char *); |
85 | 85 | ||
86 | extern int timer_over_8254; | ||
87 | |||
88 | extern int gsi_irq_sharing(int gsi); | 86 | extern int gsi_irq_sharing(int gsi); |
89 | 87 | ||
90 | extern int force_mwait; | 88 | extern int force_mwait; |
diff --git a/include/asm-x86/ptrace_32.h b/include/asm-x86/ptrace_32.h index 6002597b9e12..78d063dabe0a 100644 --- a/include/asm-x86/ptrace_32.h +++ b/include/asm-x86/ptrace_32.h | |||
@@ -55,6 +55,8 @@ static inline int v8086_mode(struct pt_regs *regs) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | #define instruction_pointer(regs) ((regs)->eip) | 57 | #define instruction_pointer(regs) ((regs)->eip) |
58 | #define frame_pointer(regs) ((regs)->ebp) | ||
59 | #define stack_pointer(regs) ((regs)->esp) | ||
58 | #define regs_return_value(regs) ((regs)->eax) | 60 | #define regs_return_value(regs) ((regs)->eax) |
59 | 61 | ||
60 | extern unsigned long profile_pc(struct pt_regs *regs); | 62 | extern unsigned long profile_pc(struct pt_regs *regs); |
diff --git a/include/asm-x86/ptrace_64.h b/include/asm-x86/ptrace_64.h index 7f166ccb0606..7bfe61e1b705 100644 --- a/include/asm-x86/ptrace_64.h +++ b/include/asm-x86/ptrace_64.h | |||
@@ -40,6 +40,8 @@ struct pt_regs { | |||
40 | #define user_mode(regs) (!!((regs)->cs & 3)) | 40 | #define user_mode(regs) (!!((regs)->cs & 3)) |
41 | #define user_mode_vm(regs) user_mode(regs) | 41 | #define user_mode_vm(regs) user_mode(regs) |
42 | #define instruction_pointer(regs) ((regs)->rip) | 42 | #define instruction_pointer(regs) ((regs)->rip) |
43 | #define frame_pointer(regs) ((regs)->rbp) | ||
44 | #define stack_pointer(regs) ((regs)->rsp) | ||
43 | #define regs_return_value(regs) ((regs)->rax) | 45 | #define regs_return_value(regs) ((regs)->rax) |
44 | 46 | ||
45 | extern unsigned long profile_pc(struct pt_regs *regs); | 47 | extern unsigned long profile_pc(struct pt_regs *regs); |
diff --git a/include/asm-x86/smp_32.h b/include/asm-x86/smp_32.h index 1f576a93368f..7056d8684522 100644 --- a/include/asm-x86/smp_32.h +++ b/include/asm-x86/smp_32.h | |||
@@ -39,9 +39,11 @@ extern void lock_ipi_call_lock(void); | |||
39 | extern void unlock_ipi_call_lock(void); | 39 | extern void unlock_ipi_call_lock(void); |
40 | 40 | ||
41 | #define MAX_APICID 256 | 41 | #define MAX_APICID 256 |
42 | extern u8 x86_cpu_to_apicid[]; | 42 | extern u8 __initdata x86_cpu_to_apicid_init[]; |
43 | extern void *x86_cpu_to_apicid_ptr; | ||
44 | DECLARE_PER_CPU(u8, x86_cpu_to_apicid); | ||
43 | 45 | ||
44 | #define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] | 46 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) |
45 | 47 | ||
46 | extern void set_cpu_sibling_map(int cpu); | 48 | extern void set_cpu_sibling_map(int cpu); |
47 | 49 | ||
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h index d30e9b684fdd..6f0e0273b646 100644 --- a/include/asm-x86/smp_64.h +++ b/include/asm-x86/smp_64.h | |||
@@ -37,6 +37,8 @@ extern void lock_ipi_call_lock(void); | |||
37 | extern void unlock_ipi_call_lock(void); | 37 | extern void unlock_ipi_call_lock(void); |
38 | extern int smp_num_siblings; | 38 | extern int smp_num_siblings; |
39 | extern void smp_send_reschedule(int cpu); | 39 | extern void smp_send_reschedule(int cpu); |
40 | extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *), | ||
41 | void *info, int wait); | ||
40 | 42 | ||
41 | /* | 43 | /* |
42 | * cpu_sibling_map and cpu_core_map now live | 44 | * cpu_sibling_map and cpu_core_map now live |
@@ -47,7 +49,7 @@ extern void smp_send_reschedule(int cpu); | |||
47 | */ | 49 | */ |
48 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); | 50 | DECLARE_PER_CPU(cpumask_t, cpu_sibling_map); |
49 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); | 51 | DECLARE_PER_CPU(cpumask_t, cpu_core_map); |
50 | extern u8 cpu_llc_id[NR_CPUS]; | 52 | DECLARE_PER_CPU(u8, cpu_llc_id); |
51 | 53 | ||
52 | #define SMP_TRAMPOLINE_BASE 0x6000 | 54 | #define SMP_TRAMPOLINE_BASE 0x6000 |
53 | 55 | ||
@@ -84,7 +86,9 @@ static inline int hard_smp_processor_id(void) | |||
84 | * Some lowlevel functions might want to know about | 86 | * Some lowlevel functions might want to know about |
85 | * the real APIC ID <-> CPU # mapping. | 87 | * the real APIC ID <-> CPU # mapping. |
86 | */ | 88 | */ |
87 | extern u8 x86_cpu_to_apicid[NR_CPUS]; /* physical ID */ | 89 | extern u8 __initdata x86_cpu_to_apicid_init[]; |
90 | extern void *x86_cpu_to_apicid_ptr; | ||
91 | DECLARE_PER_CPU(u8, x86_cpu_to_apicid); /* physical ID */ | ||
88 | extern u8 bios_cpu_apicid[]; | 92 | extern u8 bios_cpu_apicid[]; |
89 | 93 | ||
90 | static inline int cpu_present_to_apicid(int mps_cpu) | 94 | static inline int cpu_present_to_apicid(int mps_cpu) |
@@ -115,8 +119,9 @@ static __inline int logical_smp_processor_id(void) | |||
115 | } | 119 | } |
116 | 120 | ||
117 | #ifdef CONFIG_SMP | 121 | #ifdef CONFIG_SMP |
118 | #define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] | 122 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) |
119 | #else | 123 | #else |
124 | extern unsigned int boot_cpu_id; | ||
120 | #define cpu_physical_id(cpu) boot_cpu_id | 125 | #define cpu_physical_id(cpu) boot_cpu_id |
121 | #endif /* !CONFIG_SMP */ | 126 | #endif /* !CONFIG_SMP */ |
122 | #endif | 127 | #endif |
diff --git a/include/asm-x86/system_32.h b/include/asm-x86/system_32.h index db6283eb5e46..ef8468883bac 100644 --- a/include/asm-x86/system_32.h +++ b/include/asm-x86/system_32.h | |||
@@ -315,5 +315,6 @@ extern unsigned long arch_align_stack(unsigned long sp); | |||
315 | extern void free_init_pages(char *what, unsigned long begin, unsigned long end); | 315 | extern void free_init_pages(char *what, unsigned long begin, unsigned long end); |
316 | 316 | ||
317 | void default_idle(void); | 317 | void default_idle(void); |
318 | void __show_registers(struct pt_regs *, int all); | ||
318 | 319 | ||
319 | #endif | 320 | #endif |
diff --git a/include/asm-x86/topology_32.h b/include/asm-x86/topology_32.h index ae1074603c4b..9040f5a61278 100644 --- a/include/asm-x86/topology_32.h +++ b/include/asm-x86/topology_32.h | |||
@@ -28,8 +28,8 @@ | |||
28 | #define _ASM_I386_TOPOLOGY_H | 28 | #define _ASM_I386_TOPOLOGY_H |
29 | 29 | ||
30 | #ifdef CONFIG_X86_HT | 30 | #ifdef CONFIG_X86_HT |
31 | #define topology_physical_package_id(cpu) (cpu_data[cpu].phys_proc_id) | 31 | #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) |
32 | #define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id) | 32 | #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id) |
33 | #define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu)) | 33 | #define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu)) |
34 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | 34 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) |
35 | #endif | 35 | #endif |
diff --git a/include/asm-x86/topology_64.h b/include/asm-x86/topology_64.h index c0c93d744673..a718dda037e0 100644 --- a/include/asm-x86/topology_64.h +++ b/include/asm-x86/topology_64.h | |||
@@ -56,8 +56,8 @@ extern int __node_distance(int, int); | |||
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #ifdef CONFIG_SMP | 58 | #ifdef CONFIG_SMP |
59 | #define topology_physical_package_id(cpu) (cpu_data[cpu].phys_proc_id) | 59 | #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) |
60 | #define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id) | 60 | #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id) |
61 | #define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu)) | 61 | #define topology_core_siblings(cpu) (per_cpu(cpu_core_map, cpu)) |
62 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) | 62 | #define topology_thread_siblings(cpu) (per_cpu(cpu_sibling_map, cpu)) |
63 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) | 63 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) |
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index 2b641b176e7f..c6d3e22c0624 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * -- <linux/cdrom.h> | 2 | * -- <linux/cdrom.h> |
3 | * General header file for linux CD-ROM drivers | 3 | * General header file for linux CD-ROM drivers |
4 | * Copyright (C) 1992 David Giller, rafetmad@oxy.edu | 4 | * Copyright (C) 1992 David Giller, rafetmad@oxy.edu |
5 | * 1994, 1995 Eberhard Moenkeberg, emoenke@gwdg.de | 5 | * 1994, 1995 Eberhard Mönkeberg, emoenke@gwdg.de |
6 | * 1996 David van Leeuwen, david@tm.tno.nl | 6 | * 1996 David van Leeuwen, david@tm.tno.nl |
7 | * 1997, 1998 Erik Andersen, andersee@debian.org | 7 | * 1997, 1998 Erik Andersen, andersee@debian.org |
8 | * 1998-2002 Jens Axboe, axboe@suse.de | 8 | * 1998-2002 Jens Axboe, axboe@suse.de |
@@ -76,7 +76,7 @@ | |||
76 | (struct cdrom_multisession) */ | 76 | (struct cdrom_multisession) */ |
77 | #define CDROM_GET_MCN 0x5311 /* Obtain the "Universal Product Code" | 77 | #define CDROM_GET_MCN 0x5311 /* Obtain the "Universal Product Code" |
78 | if available (struct cdrom_mcn) */ | 78 | if available (struct cdrom_mcn) */ |
79 | #define CDROM_GET_UPC CDROM_GET_MCN /* This one is depricated, | 79 | #define CDROM_GET_UPC CDROM_GET_MCN /* This one is deprecated, |
80 | but here anyway for compatibility */ | 80 | but here anyway for compatibility */ |
81 | #define CDROMRESET 0x5312 /* hard-reset the drive */ | 81 | #define CDROMRESET 0x5312 /* hard-reset the drive */ |
82 | #define CDROMVOLREAD 0x5313 /* Get the drive's volume setting | 82 | #define CDROMVOLREAD 0x5313 /* Get the drive's volume setting |
@@ -506,7 +506,7 @@ struct cdrom_generic_command | |||
506 | #define GPMODE_TO_PROTECT_PAGE 0x1d | 506 | #define GPMODE_TO_PROTECT_PAGE 0x1d |
507 | #define GPMODE_CAPABILITIES_PAGE 0x2a | 507 | #define GPMODE_CAPABILITIES_PAGE 0x2a |
508 | #define GPMODE_ALL_PAGES 0x3f | 508 | #define GPMODE_ALL_PAGES 0x3f |
509 | /* Not in Mt. Fuji, but in ATAPI 2.6 -- depricated now in favor | 509 | /* Not in Mt. Fuji, but in ATAPI 2.6 -- deprecated now in favor |
510 | * of MODE_SENSE_POWER_PAGE */ | 510 | * of MODE_SENSE_POWER_PAGE */ |
511 | #define GPMODE_CDROM_PAGE 0x0d | 511 | #define GPMODE_CDROM_PAGE 0x0d |
512 | 512 | ||
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index fc32694287e2..f3110ebe894a 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au> | 6 | * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au> |
7 | * | 7 | * |
8 | * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no> | 8 | * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no> |
9 | * and Nettle, by Niels Möller. | 9 | * and Nettle, by Niels Möller. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify it | 11 | * This program is free software; you can redistribute it and/or modify it |
12 | * under the terms of the GNU General Public License as published by the Free | 12 | * under the terms of the GNU General Public License as published by the Free |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 499f5373e213..37c66d1254b5 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -183,11 +183,14 @@ int dm_resume(struct mapped_device *md); | |||
183 | */ | 183 | */ |
184 | uint32_t dm_get_event_nr(struct mapped_device *md); | 184 | uint32_t dm_get_event_nr(struct mapped_device *md); |
185 | int dm_wait_event(struct mapped_device *md, int event_nr); | 185 | int dm_wait_event(struct mapped_device *md, int event_nr); |
186 | uint32_t dm_next_uevent_seq(struct mapped_device *md); | ||
187 | void dm_uevent_add(struct mapped_device *md, struct list_head *elist); | ||
186 | 188 | ||
187 | /* | 189 | /* |
188 | * Info functions. | 190 | * Info functions. |
189 | */ | 191 | */ |
190 | const char *dm_device_name(struct mapped_device *md); | 192 | const char *dm_device_name(struct mapped_device *md); |
193 | int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid); | ||
191 | struct gendisk *dm_disk(struct mapped_device *md); | 194 | struct gendisk *dm_disk(struct mapped_device *md); |
192 | int dm_suspended(struct mapped_device *md); | 195 | int dm_suspended(struct mapped_device *md); |
193 | int dm_noflush_suspending(struct dm_target *ti); | 196 | int dm_noflush_suspending(struct dm_target *ti); |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index b93486107821..523281c5b7f5 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
@@ -131,6 +131,7 @@ struct dm_ioctl { | |||
131 | char name[DM_NAME_LEN]; /* device name */ | 131 | char name[DM_NAME_LEN]; /* device name */ |
132 | char uuid[DM_UUID_LEN]; /* unique identifier for | 132 | char uuid[DM_UUID_LEN]; /* unique identifier for |
133 | * the block device */ | 133 | * the block device */ |
134 | char data[7]; /* padding or data */ | ||
134 | }; | 135 | }; |
135 | 136 | ||
136 | /* | 137 | /* |
@@ -285,9 +286,9 @@ typedef char ioctl_struct[308]; | |||
285 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 286 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
286 | 287 | ||
287 | #define DM_VERSION_MAJOR 4 | 288 | #define DM_VERSION_MAJOR 4 |
288 | #define DM_VERSION_MINOR 11 | 289 | #define DM_VERSION_MINOR 12 |
289 | #define DM_VERSION_PATCHLEVEL 0 | 290 | #define DM_VERSION_PATCHLEVEL 0 |
290 | #define DM_VERSION_EXTRA "-ioctl (2006-10-12)" | 291 | #define DM_VERSION_EXTRA "-ioctl (2007-10-02)" |
291 | 292 | ||
292 | /* Status bits */ | 293 | /* Status bits */ |
293 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 294 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1657e995f72c..1bcce660cf03 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1536,7 +1536,7 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1536 | 1536 | ||
1537 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | 1537 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
1538 | struct file *filp); | 1538 | struct file *filp); |
1539 | extern long do_sys_open(int fdf, const char __user *filename, int flags, | 1539 | extern long do_sys_open(int dfd, const char __user *filename, int flags, |
1540 | int mode); | 1540 | int mode); |
1541 | extern struct file *filp_open(const char *, int, int); | 1541 | extern struct file *filp_open(const char *, int, int); |
1542 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); | 1542 | extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 19db0a4ae447..2e4b8dd03cfe 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -192,22 +192,20 @@ typedef unsigned char byte; /* used everywhere */ | |||
192 | struct hwif_s; | 192 | struct hwif_s; |
193 | typedef int (ide_ack_intr_t)(struct hwif_s *); | 193 | typedef int (ide_ack_intr_t)(struct hwif_s *); |
194 | 194 | ||
195 | #ifndef NO_DMA | ||
196 | #define NO_DMA 255 | ||
197 | #endif | ||
198 | |||
199 | /* | 195 | /* |
200 | * hwif_chipset_t is used to keep track of the specific hardware | 196 | * hwif_chipset_t is used to keep track of the specific hardware |
201 | * chipset used by each IDE interface, if known. | 197 | * chipset used by each IDE interface, if known. |
202 | */ | 198 | */ |
203 | typedef enum { ide_unknown, ide_generic, ide_pci, | 199 | enum { ide_unknown, ide_generic, ide_pci, |
204 | ide_cmd640, ide_dtc2278, ide_ali14xx, | 200 | ide_cmd640, ide_dtc2278, ide_ali14xx, |
205 | ide_qd65xx, ide_umc8672, ide_ht6560b, | 201 | ide_qd65xx, ide_umc8672, ide_ht6560b, |
206 | ide_rz1000, ide_trm290, | 202 | ide_rz1000, ide_trm290, |
207 | ide_cmd646, ide_cy82c693, ide_4drives, | 203 | ide_cmd646, ide_cy82c693, ide_4drives, |
208 | ide_pmac, ide_etrax100, ide_acorn, | 204 | ide_pmac, ide_etrax100, ide_acorn, |
209 | ide_au1xxx, ide_forced | 205 | ide_au1xxx, ide_forced |
210 | } hwif_chipset_t; | 206 | }; |
207 | |||
208 | typedef u8 hwif_chipset_t; | ||
211 | 209 | ||
212 | /* | 210 | /* |
213 | * Structure to hold all information about the location of this port | 211 | * Structure to hold all information about the location of this port |
@@ -215,22 +213,16 @@ typedef enum { ide_unknown, ide_generic, ide_pci, | |||
215 | typedef struct hw_regs_s { | 213 | typedef struct hw_regs_s { |
216 | unsigned long io_ports[IDE_NR_PORTS]; /* task file registers */ | 214 | unsigned long io_ports[IDE_NR_PORTS]; /* task file registers */ |
217 | int irq; /* our irq number */ | 215 | int irq; /* our irq number */ |
218 | int dma; /* our dma entry */ | ||
219 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ | 216 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ |
220 | hwif_chipset_t chipset; | 217 | hwif_chipset_t chipset; |
221 | struct device *dev; | 218 | struct device *dev; |
222 | } hw_regs_t; | 219 | } hw_regs_t; |
223 | 220 | ||
224 | /* | 221 | struct hwif_s * ide_find_port(unsigned long); |
225 | * Register new hardware with ide | 222 | |
226 | */ | 223 | int ide_register_hw(hw_regs_t *, void (*)(struct hwif_s *), int, |
227 | int ide_register_hw(hw_regs_t *, int, struct hwif_s **); | 224 | struct hwif_s **); |
228 | int ide_register_hw_with_fixup(hw_regs_t *, int, struct hwif_s **, | ||
229 | void (*)(struct hwif_s *)); | ||
230 | 225 | ||
231 | /* | ||
232 | * Set up hw_regs_t structure before calling ide_register_hw (optional) | ||
233 | */ | ||
234 | void ide_setup_ports( hw_regs_t *hw, | 226 | void ide_setup_ports( hw_regs_t *hw, |
235 | unsigned long base, | 227 | unsigned long base, |
236 | int *offsets, | 228 | int *offsets, |
@@ -268,11 +260,7 @@ static inline void ide_std_init_ports(hw_regs_t *hw, | |||
268 | # define ide_init_default_irq(base) (0) | 260 | # define ide_init_default_irq(base) (0) |
269 | #endif | 261 | #endif |
270 | 262 | ||
271 | /* | 263 | #ifdef CONFIG_IDE_ARCH_OBSOLETE_INIT |
272 | * ide_init_hwif_ports() is OBSOLETE and will be removed in 2.7 series. | ||
273 | * New ports shouldn't define IDE_ARCH_OBSOLETE_INIT in <asm/ide.h>. | ||
274 | */ | ||
275 | #ifdef IDE_ARCH_OBSOLETE_INIT | ||
276 | static inline void ide_init_hwif_ports(hw_regs_t *hw, | 264 | static inline void ide_init_hwif_ports(hw_regs_t *hw, |
277 | unsigned long io_addr, | 265 | unsigned long io_addr, |
278 | unsigned long ctl_addr, | 266 | unsigned long ctl_addr, |
@@ -302,7 +290,7 @@ static inline void ide_init_hwif_ports(hw_regs_t *hw, | |||
302 | if (io_addr || ctl_addr) | 290 | if (io_addr || ctl_addr) |
303 | printk(KERN_WARNING "%s: must not be called\n", __FUNCTION__); | 291 | printk(KERN_WARNING "%s: must not be called\n", __FUNCTION__); |
304 | } | 292 | } |
305 | #endif /* IDE_ARCH_OBSOLETE_INIT */ | 293 | #endif /* CONFIG_IDE_ARCH_OBSOLETE_INIT */ |
306 | 294 | ||
307 | /* Currently only m68k, apus and m8xx need it */ | 295 | /* Currently only m68k, apus and m8xx need it */ |
308 | #ifndef IDE_ARCH_ACK_INTR | 296 | #ifndef IDE_ARCH_ACK_INTR |
@@ -363,7 +351,6 @@ typedef union { | |||
363 | * ATA DATA Register Special. | 351 | * ATA DATA Register Special. |
364 | * ATA NSECTOR Count Register(). | 352 | * ATA NSECTOR Count Register(). |
365 | * ATAPI Byte Count Register. | 353 | * ATAPI Byte Count Register. |
366 | * Channel index ordering pairs. | ||
367 | */ | 354 | */ |
368 | typedef union { | 355 | typedef union { |
369 | unsigned all :16; | 356 | unsigned all :16; |
@@ -378,7 +365,7 @@ typedef union { | |||
378 | #error "Please fix <asm/byteorder.h>" | 365 | #error "Please fix <asm/byteorder.h>" |
379 | #endif | 366 | #endif |
380 | } b; | 367 | } b; |
381 | } ata_nsector_t, ata_data_t, atapi_bcount_t, ata_index_t; | 368 | } ata_nsector_t, ata_data_t, atapi_bcount_t; |
382 | 369 | ||
383 | /* | 370 | /* |
384 | * ATA-IDE Select Register, aka Device-Head | 371 | * ATA-IDE Select Register, aka Device-Head |
@@ -657,7 +644,7 @@ typedef struct ide_drive_s { | |||
657 | ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx)) | 644 | ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx)) |
658 | #define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1) | 645 | #define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1) |
659 | 646 | ||
660 | struct ide_pci_device_s; | 647 | struct ide_port_info; |
661 | 648 | ||
662 | typedef struct hwif_s { | 649 | typedef struct hwif_s { |
663 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | 650 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ |
@@ -672,7 +659,6 @@ typedef struct hwif_s { | |||
672 | unsigned long sata_scr[SATA_NR_PORTS]; | 659 | unsigned long sata_scr[SATA_NR_PORTS]; |
673 | unsigned long sata_misc[SATA_NR_PORTS]; | 660 | unsigned long sata_misc[SATA_NR_PORTS]; |
674 | 661 | ||
675 | hw_regs_t hw; /* Hardware info */ | ||
676 | ide_drive_t drives[MAX_DRIVES]; /* drive info */ | 662 | ide_drive_t drives[MAX_DRIVES]; /* drive info */ |
677 | 663 | ||
678 | u8 major; /* our major number */ | 664 | u8 major; /* our major number */ |
@@ -694,7 +680,9 @@ typedef struct hwif_s { | |||
694 | hwif_chipset_t chipset; /* sub-module for tuning.. */ | 680 | hwif_chipset_t chipset; /* sub-module for tuning.. */ |
695 | 681 | ||
696 | struct pci_dev *pci_dev; /* for pci chipsets */ | 682 | struct pci_dev *pci_dev; /* for pci chipsets */ |
697 | struct ide_pci_device_s *cds; /* chipset device struct */ | 683 | const struct ide_port_info *cds; /* chipset device struct */ |
684 | |||
685 | ide_ack_intr_t *ack_intr; | ||
698 | 686 | ||
699 | void (*rw_disk)(ide_drive_t *, struct request *); | 687 | void (*rw_disk)(ide_drive_t *, struct request *); |
700 | 688 | ||
@@ -725,6 +713,8 @@ typedef struct hwif_s { | |||
725 | u8 (*mdma_filter)(ide_drive_t *); | 713 | u8 (*mdma_filter)(ide_drive_t *); |
726 | u8 (*udma_filter)(ide_drive_t *); | 714 | u8 (*udma_filter)(ide_drive_t *); |
727 | 715 | ||
716 | void (*fixup)(struct hwif_s *); | ||
717 | |||
728 | void (*ata_input_data)(ide_drive_t *, void *, u32); | 718 | void (*ata_input_data)(ide_drive_t *, void *, u32); |
729 | void (*ata_output_data)(ide_drive_t *, void *, u32); | 719 | void (*ata_output_data)(ide_drive_t *, void *, u32); |
730 | 720 | ||
@@ -841,8 +831,6 @@ typedef struct hwgroup_s { | |||
841 | 831 | ||
842 | /* for pci chipsets */ | 832 | /* for pci chipsets */ |
843 | struct pci_dev *pci_dev; | 833 | struct pci_dev *pci_dev; |
844 | /* chipset device struct */ | ||
845 | struct ide_pci_device_s *cds; | ||
846 | 834 | ||
847 | /* current request */ | 835 | /* current request */ |
848 | struct request *rq; | 836 | struct request *rq; |
@@ -1030,36 +1018,16 @@ extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | |||
1030 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | 1018 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, |
1031 | int uptodate, int nr_sectors); | 1019 | int uptodate, int nr_sectors); |
1032 | 1020 | ||
1033 | /* | ||
1034 | * This is used on exit from the driver to designate the next irq handler | ||
1035 | * and also to start the safety timer. | ||
1036 | */ | ||
1037 | extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry); | 1021 | extern void ide_set_handler (ide_drive_t *drive, ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry); |
1038 | 1022 | ||
1039 | /* | ||
1040 | * This is used on exit from the driver to designate the next irq handler | ||
1041 | * and start the safety time safely and atomically from the IRQ handler | ||
1042 | * with respect to the command issue (which it also does) | ||
1043 | */ | ||
1044 | extern void ide_execute_command(ide_drive_t *, task_ioreg_t cmd, ide_handler_t *, unsigned int, ide_expiry_t *); | 1023 | extern void ide_execute_command(ide_drive_t *, task_ioreg_t cmd, ide_handler_t *, unsigned int, ide_expiry_t *); |
1045 | 1024 | ||
1046 | ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8); | 1025 | ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8); |
1047 | 1026 | ||
1048 | /* | ||
1049 | * ide_error() takes action based on the error returned by the controller. | ||
1050 | * The caller should return immediately after invoking this. | ||
1051 | * | ||
1052 | * (drive, msg, status) | ||
1053 | */ | ||
1054 | ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat); | 1027 | ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, byte stat); |
1055 | 1028 | ||
1056 | ide_startstop_t __ide_abort(ide_drive_t *, struct request *); | 1029 | ide_startstop_t __ide_abort(ide_drive_t *, struct request *); |
1057 | 1030 | ||
1058 | /* | ||
1059 | * Abort a running command on the controller triggering the abort | ||
1060 | * from a host side, non error situation | ||
1061 | * (drive, msg) | ||
1062 | */ | ||
1063 | extern ide_startstop_t ide_abort(ide_drive_t *, const char *); | 1031 | extern ide_startstop_t ide_abort(ide_drive_t *, const char *); |
1064 | 1032 | ||
1065 | extern void ide_fix_driveid(struct hd_driveid *); | 1033 | extern void ide_fix_driveid(struct hd_driveid *); |
@@ -1075,15 +1043,8 @@ extern void ide_fixstring(u8 *, const int, const int); | |||
1075 | 1043 | ||
1076 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); | 1044 | int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long); |
1077 | 1045 | ||
1078 | /* | ||
1079 | * Start a reset operation for an IDE interface. | ||
1080 | * The caller should return immediately after invoking this. | ||
1081 | */ | ||
1082 | extern ide_startstop_t ide_do_reset (ide_drive_t *); | 1046 | extern ide_startstop_t ide_do_reset (ide_drive_t *); |
1083 | 1047 | ||
1084 | /* | ||
1085 | * This function is intended to be used prior to invoking ide_do_drive_cmd(). | ||
1086 | */ | ||
1087 | extern void ide_init_drive_cmd (struct request *rq); | 1048 | extern void ide_init_drive_cmd (struct request *rq); |
1088 | 1049 | ||
1089 | /* | 1050 | /* |
@@ -1098,13 +1059,6 @@ typedef enum { | |||
1098 | 1059 | ||
1099 | extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t); | 1060 | extern int ide_do_drive_cmd(ide_drive_t *, struct request *, ide_action_t); |
1100 | 1061 | ||
1101 | /* | ||
1102 | * Clean up after success/failure of an explicit drive cmd. | ||
1103 | * stat/err are used only when (HWGROUP(drive)->rq->cmd == IDE_DRIVE_CMD). | ||
1104 | * stat/err are used only when (HWGROUP(drive)->rq->cmd == IDE_DRIVE_TASK_MASK). | ||
1105 | * | ||
1106 | * (ide_drive_t *drive, u8 stat, u8 err) | ||
1107 | */ | ||
1108 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); | 1062 | extern void ide_end_drive_cmd(ide_drive_t *, u8, u8); |
1109 | 1063 | ||
1110 | /* | 1064 | /* |
@@ -1177,10 +1131,6 @@ extern int taskfile_lib_get_identify(ide_drive_t *drive, u8 *); | |||
1177 | 1131 | ||
1178 | extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout); | 1132 | extern int ide_wait_not_busy(ide_hwif_t *hwif, unsigned long timeout); |
1179 | 1133 | ||
1180 | /* | ||
1181 | * ide_stall_queue() can be used by a drive to give excess bandwidth back | ||
1182 | * to the hwgroup by sleeping for timeout jiffies. | ||
1183 | */ | ||
1184 | extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | 1134 | extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); |
1185 | 1135 | ||
1186 | extern int ide_spin_wait_hwgroup(ide_drive_t *); | 1136 | extern int ide_spin_wait_hwgroup(ide_drive_t *); |
@@ -1200,8 +1150,8 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o | |||
1200 | #define ide_pci_register_driver(d) pci_register_driver(d) | 1150 | #define ide_pci_register_driver(d) pci_register_driver(d) |
1201 | #endif | 1151 | #endif |
1202 | 1152 | ||
1203 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); | 1153 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *); |
1204 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); | 1154 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
1205 | 1155 | ||
1206 | extern void default_hwif_iops(ide_hwif_t *); | 1156 | extern void default_hwif_iops(ide_hwif_t *); |
1207 | extern void default_hwif_mmiops(ide_hwif_t *); | 1157 | extern void default_hwif_mmiops(ide_hwif_t *); |
@@ -1261,6 +1211,14 @@ enum { | |||
1261 | IDE_HFLAG_SERIALIZE = (1 << 20), | 1211 | IDE_HFLAG_SERIALIZE = (1 << 20), |
1262 | /* use legacy IRQs */ | 1212 | /* use legacy IRQs */ |
1263 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), | 1213 | IDE_HFLAG_LEGACY_IRQS = (1 << 21), |
1214 | /* force use of legacy IRQs */ | ||
1215 | IDE_HFLAG_FORCE_LEGACY_IRQS = (1 << 22), | ||
1216 | /* limit LBA48 requests to 256 sectors */ | ||
1217 | IDE_HFLAG_RQSIZE_256 = (1 << 23), | ||
1218 | /* use 32-bit I/O ops */ | ||
1219 | IDE_HFLAG_IO_32BIT = (1 << 24), | ||
1220 | /* unmask IRQs */ | ||
1221 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), | ||
1264 | }; | 1222 | }; |
1265 | 1223 | ||
1266 | #ifdef CONFIG_BLK_DEV_OFFBOARD | 1224 | #ifdef CONFIG_BLK_DEV_OFFBOARD |
@@ -1269,7 +1227,7 @@ enum { | |||
1269 | # define IDE_HFLAG_OFF_BOARD 0 | 1227 | # define IDE_HFLAG_OFF_BOARD 0 |
1270 | #endif | 1228 | #endif |
1271 | 1229 | ||
1272 | typedef struct ide_pci_device_s { | 1230 | struct ide_port_info { |
1273 | char *name; | 1231 | char *name; |
1274 | unsigned int (*init_chipset)(struct pci_dev *, const char *); | 1232 | unsigned int (*init_chipset)(struct pci_dev *, const char *); |
1275 | void (*init_iops)(ide_hwif_t *); | 1233 | void (*init_iops)(ide_hwif_t *); |
@@ -1277,17 +1235,17 @@ typedef struct ide_pci_device_s { | |||
1277 | void (*init_dma)(ide_hwif_t *, unsigned long); | 1235 | void (*init_dma)(ide_hwif_t *, unsigned long); |
1278 | void (*fixup)(ide_hwif_t *); | 1236 | void (*fixup)(ide_hwif_t *); |
1279 | ide_pci_enablebit_t enablebits[2]; | 1237 | ide_pci_enablebit_t enablebits[2]; |
1238 | hwif_chipset_t chipset; | ||
1280 | unsigned int extra; | 1239 | unsigned int extra; |
1281 | struct ide_pci_device_s *next; | ||
1282 | u32 host_flags; | 1240 | u32 host_flags; |
1283 | u8 pio_mask; | 1241 | u8 pio_mask; |
1284 | u8 swdma_mask; | 1242 | u8 swdma_mask; |
1285 | u8 mwdma_mask; | 1243 | u8 mwdma_mask; |
1286 | u8 udma_mask; | 1244 | u8 udma_mask; |
1287 | } ide_pci_device_t; | 1245 | }; |
1288 | 1246 | ||
1289 | extern int ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); | 1247 | int ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *); |
1290 | extern int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, ide_pci_device_t *); | 1248 | int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, const struct ide_port_info *); |
1291 | 1249 | ||
1292 | void ide_map_sg(ide_drive_t *, struct request *); | 1250 | void ide_map_sg(ide_drive_t *, struct request *); |
1293 | void ide_init_sg_cmd(ide_drive_t *, struct request *); | 1251 | void ide_init_sg_cmd(ide_drive_t *, struct request *); |
@@ -1370,8 +1328,7 @@ void ide_unregister_region(struct gendisk *); | |||
1370 | 1328 | ||
1371 | void ide_undecoded_slave(ide_hwif_t *); | 1329 | void ide_undecoded_slave(ide_hwif_t *); |
1372 | 1330 | ||
1373 | int probe_hwif_init_with_fixup(ide_hwif_t *, void (*)(ide_hwif_t *)); | 1331 | int ide_device_add(u8 idx[4]); |
1374 | extern int probe_hwif_init(ide_hwif_t *); | ||
1375 | 1332 | ||
1376 | static inline void *ide_get_hwifdata (ide_hwif_t * hwif) | 1333 | static inline void *ide_get_hwifdata (ide_hwif_t * hwif) |
1377 | { | 1334 | { |
diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index efa292a52e7e..56ae438ae510 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h | |||
@@ -118,7 +118,7 @@ struct ipmi_smi_handlers | |||
118 | /* Enable/disable firmware maintenance mode. Note that this | 118 | /* Enable/disable firmware maintenance mode. Note that this |
119 | is *not* the modes defined, this is simply an on/off | 119 | is *not* the modes defined, this is simply an on/off |
120 | setting. The message handler does the mode handling. Note | 120 | setting. The message handler does the mode handling. Note |
121 | that this is called from interupt context, so it cannot | 121 | that this is called from interrupt context, so it cannot |
122 | block. */ | 122 | block. */ |
123 | void (*set_maintenance_mode)(void *send_info, int enable); | 123 | void (*set_maintenance_mode)(void *send_info, int enable); |
124 | 124 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c5164c257f71..e82a6ebc725d 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -160,6 +160,12 @@ struct nfs_inode { | |||
160 | /* Open contexts for shared mmap writes */ | 160 | /* Open contexts for shared mmap writes */ |
161 | struct list_head open_files; | 161 | struct list_head open_files; |
162 | 162 | ||
163 | /* Number of in-flight sillydelete RPC calls */ | ||
164 | atomic_t silly_count; | ||
165 | /* List of deferred sillydelete requests */ | ||
166 | struct hlist_head silly_list; | ||
167 | wait_queue_head_t waitqueue; | ||
168 | |||
163 | #ifdef CONFIG_NFS_V4 | 169 | #ifdef CONFIG_NFS_V4 |
164 | struct nfs4_cached_acl *nfs4_acl; | 170 | struct nfs4_cached_acl *nfs4_acl; |
165 | /* NFSv4 state */ | 171 | /* NFSv4 state */ |
@@ -394,6 +400,8 @@ extern void nfs_release_automount_timer(void); | |||
394 | */ | 400 | */ |
395 | extern int nfs_async_unlink(struct inode *dir, struct dentry *dentry); | 401 | extern int nfs_async_unlink(struct inode *dir, struct dentry *dentry); |
396 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); | 402 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); |
403 | extern void nfs_block_sillyrename(struct dentry *dentry); | ||
404 | extern void nfs_unblock_sillyrename(struct dentry *dentry); | ||
397 | 405 | ||
398 | /* | 406 | /* |
399 | * linux/fs/nfs/write.c | 407 | * linux/fs/nfs/write.c |
diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h index 1adfe668d031..af7c36a5a521 100644 --- a/include/linux/prefetch.h +++ b/include/linux/prefetch.h | |||
@@ -34,17 +34,12 @@ | |||
34 | 34 | ||
35 | */ | 35 | */ |
36 | 36 | ||
37 | /* | ||
38 | * These cannot be do{}while(0) macros. See the mental gymnastics in | ||
39 | * the loop macro. | ||
40 | */ | ||
41 | |||
42 | #ifndef ARCH_HAS_PREFETCH | 37 | #ifndef ARCH_HAS_PREFETCH |
43 | static inline void prefetch(const void *x) {;} | 38 | #define prefetch(x) __builtin_prefetch(x) |
44 | #endif | 39 | #endif |
45 | 40 | ||
46 | #ifndef ARCH_HAS_PREFETCHW | 41 | #ifndef ARCH_HAS_PREFETCHW |
47 | static inline void prefetchw(const void *x) {;} | 42 | #define prefetchw(x) __builtin_prefetch(x,1) |
48 | #endif | 43 | #endif |
49 | 44 | ||
50 | #ifndef ARCH_HAS_SPINLOCK_PREFETCH | 45 | #ifndef ARCH_HAS_SPINLOCK_PREFETCH |
diff --git a/include/linux/security.h b/include/linux/security.h index ff3f857f6957..ac050830a873 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -832,9 +832,11 @@ struct request_sock; | |||
832 | * incoming sk_buff @skb has been associated with a particular socket, @sk. | 832 | * incoming sk_buff @skb has been associated with a particular socket, @sk. |
833 | * @sk contains the sock (not socket) associated with the incoming sk_buff. | 833 | * @sk contains the sock (not socket) associated with the incoming sk_buff. |
834 | * @skb contains the incoming network data. | 834 | * @skb contains the incoming network data. |
835 | * @socket_getpeersec: | 835 | * @socket_getpeersec_stream: |
836 | * This hook allows the security module to provide peer socket security | 836 | * This hook allows the security module to provide peer socket security |
837 | * state to userspace via getsockopt SO_GETPEERSEC. | 837 | * state for unix or connected tcp sockets to userspace via getsockopt |
838 | * SO_GETPEERSEC. For tcp sockets this can be meaningful if the | ||
839 | * socket is associated with an ipsec SA. | ||
838 | * @sock is the local socket. | 840 | * @sock is the local socket. |
839 | * @optval userspace memory where the security state is to be copied. | 841 | * @optval userspace memory where the security state is to be copied. |
840 | * @optlen userspace int where the module should copy the actual length | 842 | * @optlen userspace int where the module should copy the actual length |
@@ -843,6 +845,17 @@ struct request_sock; | |||
843 | * by the caller. | 845 | * by the caller. |
844 | * Return 0 if all is well, otherwise, typical getsockopt return | 846 | * Return 0 if all is well, otherwise, typical getsockopt return |
845 | * values. | 847 | * values. |
848 | * @socket_getpeersec_dgram: | ||
849 | * This hook allows the security module to provide peer socket security | ||
850 | * state for udp sockets on a per-packet basis to userspace via | ||
851 | * getsockopt SO_GETPEERSEC. The application must first have indicated | ||
852 | * the IP_PASSSEC option via getsockopt. It can then retrieve the | ||
853 | * security state returned by this hook for a packet via the SCM_SECURITY | ||
854 | * ancillary message type. | ||
855 | * @skb is the skbuff for the packet being queried | ||
856 | * @secdata is a pointer to a buffer in which to copy the security data | ||
857 | * @seclen is the maximum length for @secdata | ||
858 | * Return 0 on success, error on failure. | ||
846 | * @sk_alloc_security: | 859 | * @sk_alloc_security: |
847 | * Allocate and attach a security structure to the sk->sk_security field, | 860 | * Allocate and attach a security structure to the sk->sk_security field, |
848 | * which is used to copy security attributes between local stream sockets. | 861 | * which is used to copy security attributes between local stream sockets. |
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h index cf80c1af5854..32c385dd9e06 100644 --- a/include/net/irda/irttp.h +++ b/include/net/irda/irttp.h | |||
@@ -56,7 +56,7 @@ | |||
56 | 56 | ||
57 | /* Receive queue sizes */ | 57 | /* Receive queue sizes */ |
58 | /* Minimum of credit that the peer should hold. | 58 | /* Minimum of credit that the peer should hold. |
59 | * If the peer has less credits than 9 frames, we will explicitely send | 59 | * If the peer has less credits than 9 frames, we will explicitly send |
60 | * him some credits (through irttp_give_credit() and a specific frame). | 60 | * him some credits (through irttp_give_credit() and a specific frame). |
61 | * Note that when we give credits it's likely that it won't be sent in | 61 | * Note that when we give credits it's likely that it won't be sent in |
62 | * this LAP window, but in the next one. So, we make sure that the peer | 62 | * this LAP window, but in the next one. So, we make sure that the peer |
@@ -66,7 +66,7 @@ | |||
66 | /* This is the default maximum number of credits held by the peer, so the | 66 | /* This is the default maximum number of credits held by the peer, so the |
67 | * default maximum number of frames he can send us before needing flow | 67 | * default maximum number of frames he can send us before needing flow |
68 | * control answer from us (this may be negociated differently at TSAP setup). | 68 | * control answer from us (this may be negociated differently at TSAP setup). |
69 | * We want to minimise the number of times we have to explicitely send some | 69 | * We want to minimise the number of times we have to explicitly send some |
70 | * credit to the peer, hoping we can piggyback it on the return data. In | 70 | * credit to the peer, hoping we can piggyback it on the return data. In |
71 | * particular, it doesn't make sense for us to send credit more than once | 71 | * particular, it doesn't make sense for us to send credit more than once |
72 | * per LAP window. | 72 | * per LAP window. |
diff --git a/init/main.c b/init/main.c index 0dd0e7a1f632..f605a969ea61 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -70,15 +70,7 @@ | |||
70 | /* | 70 | /* |
71 | * This is one of the first .c files built. Error out early if we have compiler | 71 | * This is one of the first .c files built. Error out early if we have compiler |
72 | * trouble. | 72 | * trouble. |
73 | * | ||
74 | * Versions of gcc older than that listed below may actually compile and link | ||
75 | * okay, but the end product can have subtle run time bugs. To avoid associated | ||
76 | * bogus bug reports, we flatly refuse to compile with a gcc that is known to be | ||
77 | * too old from the very beginning. | ||
78 | */ | 73 | */ |
79 | #if (__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 2) | ||
80 | #error Sorry, your GCC is too old. It builds incorrect kernels. | ||
81 | #endif | ||
82 | 74 | ||
83 | #if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 0 | 75 | #if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 0 |
84 | #warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended. | 76 | #warning gcc-4.1.0 is known to miscompile the kernel. A different compiler version is recommended. |
@@ -288,7 +280,7 @@ static int __init unknown_bootoption(char *param, char *val) | |||
288 | return 0; | 280 | return 0; |
289 | 281 | ||
290 | /* | 282 | /* |
291 | * Preemptive maintenance for "why didn't my mispelled command | 283 | * Preemptive maintenance for "why didn't my misspelled command |
292 | * line work?" | 284 | * line work?" |
293 | */ | 285 | */ |
294 | if (strchr(param, '.') && (!val || strchr(param, '.') < val)) { | 286 | if (strchr(param, '.') && (!val || strchr(param, '.') < val)) { |
diff --git a/kernel/Makefile b/kernel/Makefile index 05c3e6df8597..79f017e09fbd 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
@@ -9,8 +9,9 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \ | |||
9 | rcupdate.o extable.o params.o posix-timers.o \ | 9 | rcupdate.o extable.o params.o posix-timers.o \ |
10 | kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ | 10 | kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ |
11 | hrtimer.o rwsem.o latency.o nsproxy.o srcu.o \ | 11 | hrtimer.o rwsem.o latency.o nsproxy.o srcu.o \ |
12 | utsname.o sysctl_check.o notifier.o | 12 | utsname.o notifier.o |
13 | 13 | ||
14 | obj-$(CONFIG_SYSCTL) += sysctl_check.o | ||
14 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 15 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
15 | obj-y += time/ | 16 | obj-y += time/ |
16 | obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o | 17 | obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index b2b2c2b0a49b..b6d2ff7e37ee 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -412,7 +412,7 @@ static int hrtimer_reprogram(struct hrtimer *timer, | |||
412 | /* | 412 | /* |
413 | * When the callback is running, we do not reprogram the clock event | 413 | * When the callback is running, we do not reprogram the clock event |
414 | * device. The timer callback is either running on a different CPU or | 414 | * device. The timer callback is either running on a different CPU or |
415 | * the callback is executed in the hrtimer_interupt context. The | 415 | * the callback is executed in the hrtimer_interrupt context. The |
416 | * reprogramming is handled either by the softirq, which called the | 416 | * reprogramming is handled either by the softirq, which called the |
417 | * callback or at the end of the hrtimer_interrupt. | 417 | * callback or at the end of the hrtimer_interrupt. |
418 | */ | 418 | */ |
@@ -638,7 +638,7 @@ void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, void *addr) | |||
638 | #endif | 638 | #endif |
639 | 639 | ||
640 | /* | 640 | /* |
641 | * Counterpart to lock_timer_base above: | 641 | * Counterpart to lock_hrtimer_base above: |
642 | */ | 642 | */ |
643 | static inline | 643 | static inline |
644 | void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) | 644 | void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) |
diff --git a/kernel/panic.c b/kernel/panic.c index 3886bd8230fe..6f6e03e91595 100644 --- a/kernel/panic.c +++ b/kernel/panic.c | |||
@@ -148,7 +148,7 @@ EXPORT_SYMBOL(panic); | |||
148 | * 'F' - Module has been forcibly loaded. | 148 | * 'F' - Module has been forcibly loaded. |
149 | * 'S' - SMP with CPUs not designed for SMP. | 149 | * 'S' - SMP with CPUs not designed for SMP. |
150 | * 'R' - User forced a module unload. | 150 | * 'R' - User forced a module unload. |
151 | * 'M' - Machine had a machine check experience. | 151 | * 'M' - System experienced a machine check exception. |
152 | * 'B' - System has hit bad_page. | 152 | * 'B' - System has hit bad_page. |
153 | * 'U' - Userspace-defined naughtiness. | 153 | * 'U' - Userspace-defined naughtiness. |
154 | * | 154 | * |
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index ccc95ac07bed..78039b477d2b 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -1005,11 +1005,12 @@ copy_data_pages(struct memory_bitmap *copy_bm, struct memory_bitmap *orig_bm) | |||
1005 | } | 1005 | } |
1006 | memory_bm_position_reset(orig_bm); | 1006 | memory_bm_position_reset(orig_bm); |
1007 | memory_bm_position_reset(copy_bm); | 1007 | memory_bm_position_reset(copy_bm); |
1008 | do { | 1008 | for(;;) { |
1009 | pfn = memory_bm_next_pfn(orig_bm); | 1009 | pfn = memory_bm_next_pfn(orig_bm); |
1010 | if (likely(pfn != BM_END_OF_MAP)) | 1010 | if (unlikely(pfn == BM_END_OF_MAP)) |
1011 | copy_data_page(memory_bm_next_pfn(copy_bm), pfn); | 1011 | break; |
1012 | } while (pfn != BM_END_OF_MAP); | 1012 | copy_data_page(memory_bm_next_pfn(copy_bm), pfn); |
1013 | } | ||
1013 | } | 1014 | } |
1014 | 1015 | ||
1015 | /* Total number of image pages */ | 1016 | /* Total number of image pages */ |
diff --git a/kernel/sched.c b/kernel/sched.c index afe76ec2e7fe..7581e331b139 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -3310,7 +3310,6 @@ unsigned long long task_sched_runtime(struct task_struct *p) | |||
3310 | /* | 3310 | /* |
3311 | * Account user cpu time to a process. | 3311 | * Account user cpu time to a process. |
3312 | * @p: the process that the cpu time gets accounted to | 3312 | * @p: the process that the cpu time gets accounted to |
3313 | * @hardirq_offset: the offset to subtract from hardirq_count() | ||
3314 | * @cputime: the cpu time spent in user space since the last update | 3313 | * @cputime: the cpu time spent in user space since the last update |
3315 | */ | 3314 | */ |
3316 | void account_user_time(struct task_struct *p, cputime_t cputime) | 3315 | void account_user_time(struct task_struct *p, cputime_t cputime) |
@@ -5146,7 +5145,7 @@ static int __migrate_task_irq(struct task_struct *p, int src_cpu, int dest_cpu) | |||
5146 | } | 5145 | } |
5147 | 5146 | ||
5148 | /* | 5147 | /* |
5149 | * Figure out where task on dead CPU should go, use force if neccessary. | 5148 | * Figure out where task on dead CPU should go, use force if necessary. |
5150 | * NOTE: interrupts should be disabled by the caller | 5149 | * NOTE: interrupts should be disabled by the caller |
5151 | */ | 5150 | */ |
5152 | static void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p) | 5151 | static void move_task_off_dead_cpu(int dead_cpu, struct task_struct *p) |
@@ -5525,7 +5524,7 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
5525 | 5524 | ||
5526 | case CPU_ONLINE: | 5525 | case CPU_ONLINE: |
5527 | case CPU_ONLINE_FROZEN: | 5526 | case CPU_ONLINE_FROZEN: |
5528 | /* Strictly unneccessary, as first user will wake it. */ | 5527 | /* Strictly unnecessary, as first user will wake it. */ |
5529 | wake_up_process(cpu_rq(cpu)->migration_thread); | 5528 | wake_up_process(cpu_rq(cpu)->migration_thread); |
5530 | break; | 5529 | break; |
5531 | 5530 | ||
diff --git a/kernel/taskstats.c b/kernel/taskstats.c index 9f360f68aad6..354e74bc17c1 100644 --- a/kernel/taskstats.c +++ b/kernel/taskstats.c | |||
@@ -263,7 +263,7 @@ out: | |||
263 | 263 | ||
264 | stats->version = TASKSTATS_VERSION; | 264 | stats->version = TASKSTATS_VERSION; |
265 | /* | 265 | /* |
266 | * Accounting subsytems can also add calls here to modify | 266 | * Accounting subsystems can also add calls here to modify |
267 | * fields of taskstats. | 267 | * fields of taskstats. |
268 | */ | 268 | */ |
269 | return rc; | 269 | return rc; |
diff --git a/lib/argv_split.c b/lib/argv_split.c index fad6ce4f7b57..5205a8dae5bc 100644 --- a/lib/argv_split.c +++ b/lib/argv_split.c | |||
@@ -4,7 +4,8 @@ | |||
4 | 4 | ||
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/ctype.h> | 6 | #include <linux/ctype.h> |
7 | #include <linux/bug.h> | 7 | #include <linux/slab.h> |
8 | #include <linux/module.h> | ||
8 | 9 | ||
9 | static const char *skip_sep(const char *cp) | 10 | static const char *skip_sep(const char *cp) |
10 | { | 11 | { |
diff --git a/lib/kernel_lock.c b/lib/kernel_lock.c index e0fdfddb406e..f73e2f8c308f 100644 --- a/lib/kernel_lock.c +++ b/lib/kernel_lock.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * lib/kernel_lock.c | 2 | * lib/kernel_lock.c |
3 | * | 3 | * |
4 | * This is the traditional BKL - big kernel lock. Largely | 4 | * This is the traditional BKL - big kernel lock. Largely |
5 | * relegated to obsolescense, but used by various less | 5 | * relegated to obsolescence, but used by various less |
6 | * important (or lazy) subsystems. | 6 | * important (or lazy) subsystems. |
7 | */ | 7 | */ |
8 | #include <linux/smp_lock.h> | 8 | #include <linux/smp_lock.h> |
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index 2e4eae5b0824..5886147252d0 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -126,7 +126,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | |||
126 | else | 126 | else |
127 | subsystem = kobject_name(&kset->kobj); | 127 | subsystem = kobject_name(&kset->kobj); |
128 | if (!subsystem) { | 128 | if (!subsystem) { |
129 | pr_debug("unset subsytem caused the event to drop!\n"); | 129 | pr_debug("unset subsystem caused the event to drop!\n"); |
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
diff --git a/mm/Kconfig b/mm/Kconfig index b1f03b0eb7f1..c070ec0c15bf 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -37,7 +37,7 @@ config DISCONTIGMEM_MANUAL | |||
37 | in their physical address spaces, and this option provides | 37 | in their physical address spaces, and this option provides |
38 | more efficient handling of these holes. However, the vast | 38 | more efficient handling of these holes. However, the vast |
39 | majority of hardware has quite flat address spaces, and | 39 | majority of hardware has quite flat address spaces, and |
40 | can have degraded performance from extra overhead that | 40 | can have degraded performance from the extra overhead that |
41 | this option imposes. | 41 | this option imposes. |
42 | 42 | ||
43 | Many NUMA configurations will have this as the only option. | 43 | Many NUMA configurations will have this as the only option. |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 034617f8cdb2..8b809ecefa39 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1017,7 +1017,7 @@ static long region_chg(struct list_head *head, long f, long t) | |||
1017 | 1017 | ||
1018 | /* If we are below the current region then a new region is required. | 1018 | /* If we are below the current region then a new region is required. |
1019 | * Subtle, allocate a new region at the position but make it zero | 1019 | * Subtle, allocate a new region at the position but make it zero |
1020 | * size such that we can guarentee to record the reservation. */ | 1020 | * size such that we can guarantee to record the reservation. */ |
1021 | if (&rg->link == head || t < rg->from) { | 1021 | if (&rg->link == head || t < rg->from) { |
1022 | nrg = kmalloc(sizeof(*nrg), GFP_KERNEL); | 1022 | nrg = kmalloc(sizeof(*nrg), GFP_KERNEL); |
1023 | if (!nrg) | 1023 | if (!nrg) |
diff --git a/mm/memory.c b/mm/memory.c index 142683df8755..eefd5b68bc42 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -2713,7 +2713,7 @@ int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, in | |||
2713 | return 0; | 2713 | return 0; |
2714 | 2714 | ||
2715 | down_read(&mm->mmap_sem); | 2715 | down_read(&mm->mmap_sem); |
2716 | /* ignore errors, just check how much was sucessfully transfered */ | 2716 | /* ignore errors, just check how much was successfully transferred */ |
2717 | while (len) { | 2717 | while (len) { |
2718 | int bytes, ret, offset; | 2718 | int bytes, ret, offset; |
2719 | void *maddr; | 2719 | void *maddr; |
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 091b9c6c2529..1833879f8438 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -121,7 +121,7 @@ int __add_pages(struct zone *zone, unsigned long phys_start_pfn, | |||
121 | err = __add_section(zone, i << PFN_SECTION_SHIFT); | 121 | err = __add_section(zone, i << PFN_SECTION_SHIFT); |
122 | 122 | ||
123 | /* | 123 | /* |
124 | * EEXIST is finally dealed with by ioresource collision | 124 | * EEXIST is finally dealt with by ioresource collision |
125 | * check. see add_memory() => register_memory_resource() | 125 | * check. see add_memory() => register_memory_resource() |
126 | * Warning will be printed if there is collision. | 126 | * Warning will be printed if there is collision. |
127 | */ | 127 | */ |
diff --git a/mm/mempool.c b/mm/mempool.c index 02d5ec3feabc..a46eb1b4bb66 100644 --- a/mm/mempool.c +++ b/mm/mempool.c | |||
@@ -299,7 +299,7 @@ EXPORT_SYMBOL(mempool_free_slab); | |||
299 | 299 | ||
300 | /* | 300 | /* |
301 | * A commonly used alloc and free fn that kmalloc/kfrees the amount of memory | 301 | * A commonly used alloc and free fn that kmalloc/kfrees the amount of memory |
302 | * specfied by pool_data | 302 | * specified by pool_data |
303 | */ | 303 | */ |
304 | void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data) | 304 | void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data) |
305 | { | 305 | { |
diff --git a/mm/migrate.c b/mm/migrate.c index 4d6ee03db946..6a207e8d17ea 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -706,7 +706,7 @@ move_newpage: | |||
706 | * The function returns after 10 attempts or if no pages | 706 | * The function returns after 10 attempts or if no pages |
707 | * are movable anymore because to has become empty | 707 | * are movable anymore because to has become empty |
708 | * or no retryable pages exist anymore. All pages will be | 708 | * or no retryable pages exist anymore. All pages will be |
709 | * retruned to the LRU or freed. | 709 | * returned to the LRU or freed. |
710 | * | 710 | * |
711 | * Return: Number of pages not migrated or error code. | 711 | * Return: Number of pages not migrated or error code. |
712 | */ | 712 | */ |
diff --git a/mm/nommu.c b/mm/nommu.c index 42fb84e9e815..8f09333f78e1 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -175,7 +175,8 @@ EXPORT_SYMBOL(vfree); | |||
175 | void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot) | 175 | void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot) |
176 | { | 176 | { |
177 | /* | 177 | /* |
178 | * kmalloc doesn't like __GFP_HIGHMEM for some reason | 178 | * You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc() |
179 | * returns only a logical address. | ||
179 | */ | 180 | */ |
180 | return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM); | 181 | return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM); |
181 | } | 182 | } |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 7845462064f4..838a5e31394c 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -989,7 +989,7 @@ int __set_page_dirty_no_writeback(struct page *page) | |||
989 | * mapping is pinned by the vma's ->vm_file reference. | 989 | * mapping is pinned by the vma's ->vm_file reference. |
990 | * | 990 | * |
991 | * We take care to handle the case where the page was truncated from the | 991 | * We take care to handle the case where the page was truncated from the |
992 | * mapping by re-checking page_mapping() insode tree_lock. | 992 | * mapping by re-checking page_mapping() inside tree_lock. |
993 | */ | 993 | */ |
994 | int __set_page_dirty_nobuffers(struct page *page) | 994 | int __set_page_dirty_nobuffers(struct page *page) |
995 | { | 995 | { |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 43f757fcf30f..da69d833e067 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -123,7 +123,7 @@ static unsigned long __meminitdata dma_reserve; | |||
123 | 123 | ||
124 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP | 124 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP |
125 | /* | 125 | /* |
126 | * MAX_ACTIVE_REGIONS determines the maxmimum number of distinct | 126 | * MAX_ACTIVE_REGIONS determines the maximum number of distinct |
127 | * ranges of memory (RAM) that may be registered with add_active_range(). | 127 | * ranges of memory (RAM) that may be registered with add_active_range(). |
128 | * Ranges passed to add_active_range() will be merged if possible | 128 | * Ranges passed to add_active_range() will be merged if possible |
129 | * so the number of times add_active_range() can be called is | 129 | * so the number of times add_active_range() can be called is |
@@ -1260,7 +1260,7 @@ int zone_watermark_ok(struct zone *z, int order, unsigned long mark, | |||
1260 | * skip over zones that are not allowed by the cpuset, or that have | 1260 | * skip over zones that are not allowed by the cpuset, or that have |
1261 | * been recently (in last second) found to be nearly full. See further | 1261 | * been recently (in last second) found to be nearly full. See further |
1262 | * comments in mmzone.h. Reduces cache footprint of zonelist scans | 1262 | * comments in mmzone.h. Reduces cache footprint of zonelist scans |
1263 | * that have to skip over alot of full or unallowed zones. | 1263 | * that have to skip over a lot of full or unallowed zones. |
1264 | * | 1264 | * |
1265 | * If the zonelist cache is present in the passed in zonelist, then | 1265 | * If the zonelist cache is present in the passed in zonelist, then |
1266 | * returns a pointer to the allowed node mask (either the current | 1266 | * returns a pointer to the allowed node mask (either the current |
@@ -2358,7 +2358,7 @@ void build_all_zonelists(void) | |||
2358 | __build_all_zonelists(NULL); | 2358 | __build_all_zonelists(NULL); |
2359 | cpuset_init_current_mems_allowed(); | 2359 | cpuset_init_current_mems_allowed(); |
2360 | } else { | 2360 | } else { |
2361 | /* we have to stop all cpus to guaranntee there is no user | 2361 | /* we have to stop all cpus to guarantee there is no user |
2362 | of zonelist */ | 2362 | of zonelist */ |
2363 | stop_machine_run(__build_all_zonelists, NULL, NR_CPUS); | 2363 | stop_machine_run(__build_all_zonelists, NULL, NR_CPUS); |
2364 | /* cpuset refresh routine should be here */ | 2364 | /* cpuset refresh routine should be here */ |
@@ -2864,7 +2864,7 @@ static int __meminit first_active_region_index_in_nid(int nid) | |||
2864 | 2864 | ||
2865 | /* | 2865 | /* |
2866 | * Basic iterator support. Return the next active range of PFNs for a node | 2866 | * Basic iterator support. Return the next active range of PFNs for a node |
2867 | * Note: nid == MAX_NUMNODES returns next region regardles of node | 2867 | * Note: nid == MAX_NUMNODES returns next region regardless of node |
2868 | */ | 2868 | */ |
2869 | static int __meminit next_active_region_index_in_nid(int index, int nid) | 2869 | static int __meminit next_active_region_index_in_nid(int index, int nid) |
2870 | { | 2870 | { |
diff --git a/mm/prio_tree.c b/mm/prio_tree.c index b4e76c25f953..603ae98d9694 100644 --- a/mm/prio_tree.c +++ b/mm/prio_tree.c | |||
@@ -34,7 +34,7 @@ | |||
34 | * Radix priority search tree for address_space->i_mmap | 34 | * Radix priority search tree for address_space->i_mmap |
35 | * | 35 | * |
36 | * For each vma that map a unique set of file pages i.e., unique [radix_index, | 36 | * For each vma that map a unique set of file pages i.e., unique [radix_index, |
37 | * heap_index] value, we have a corresponing priority search tree node. If | 37 | * heap_index] value, we have a corresponding priority search tree node. If |
38 | * multiple vmas have identical [radix_index, heap_index] value, then one of | 38 | * multiple vmas have identical [radix_index, heap_index] value, then one of |
39 | * them is used as a tree node and others are stored in a vm_set list. The tree | 39 | * them is used as a tree node and others are stored in a vm_set list. The tree |
40 | * node points to the first vma (head) of the list using vm_set.head. | 40 | * node points to the first vma (head) of the list using vm_set.head. |
@@ -26,7 +26,7 @@ | |||
26 | * initialized objects. | 26 | * initialized objects. |
27 | * | 27 | * |
28 | * This means, that your constructor is used only for newly allocated | 28 | * This means, that your constructor is used only for newly allocated |
29 | * slabs and you must pass objects with the same intializations to | 29 | * slabs and you must pass objects with the same initializations to |
30 | * kmem_cache_free. | 30 | * kmem_cache_free. |
31 | * | 31 | * |
32 | * Each cache can only support one memory type (GFP_DMA, GFP_HIGHMEM, | 32 | * Each cache can only support one memory type (GFP_DMA, GFP_HIGHMEM, |
@@ -1369,7 +1369,7 @@ static int __cpuinit cpuup_callback(struct notifier_block *nfb, | |||
1369 | * structure is usually allocated from kmem_cache_create() and | 1369 | * structure is usually allocated from kmem_cache_create() and |
1370 | * gets destroyed at kmem_cache_destroy(). | 1370 | * gets destroyed at kmem_cache_destroy(). |
1371 | */ | 1371 | */ |
1372 | /* fall thru */ | 1372 | /* fall through */ |
1373 | #endif | 1373 | #endif |
1374 | case CPU_UP_CANCELED: | 1374 | case CPU_UP_CANCELED: |
1375 | case CPU_UP_CANCELED_FROZEN: | 1375 | case CPU_UP_CANCELED_FROZEN: |
@@ -3806,7 +3806,7 @@ const char *kmem_cache_name(struct kmem_cache *cachep) | |||
3806 | EXPORT_SYMBOL_GPL(kmem_cache_name); | 3806 | EXPORT_SYMBOL_GPL(kmem_cache_name); |
3807 | 3807 | ||
3808 | /* | 3808 | /* |
3809 | * This initializes kmem_list3 or resizes varioius caches for all nodes. | 3809 | * This initializes kmem_list3 or resizes various caches for all nodes. |
3810 | */ | 3810 | */ |
3811 | static int alloc_kmemlist(struct kmem_cache *cachep) | 3811 | static int alloc_kmemlist(struct kmem_cache *cachep) |
3812 | { | 3812 | { |
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * This file contains the default values for the opereation of the | 8 | * This file contains the default values for the operation of the |
9 | * Linux VM subsystem. Fine-tuning documentation can be found in | 9 | * Linux VM subsystem. Fine-tuning documentation can be found in |
10 | * Documentation/sysctl/vm.txt. | 10 | * Documentation/sysctl/vm.txt. |
11 | * Started 18.12.91 | 11 | * Started 18.12.91 |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 2e01af365848..af77e171e339 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -247,7 +247,7 @@ struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, | |||
247 | EXPORT_SYMBOL_GPL(__get_vm_area); | 247 | EXPORT_SYMBOL_GPL(__get_vm_area); |
248 | 248 | ||
249 | /** | 249 | /** |
250 | * get_vm_area - reserve a contingous kernel virtual area | 250 | * get_vm_area - reserve a contiguous kernel virtual area |
251 | * @size: size of the area | 251 | * @size: size of the area |
252 | * @flags: %VM_IOREMAP for I/O mappings or VM_ALLOC | 252 | * @flags: %VM_IOREMAP for I/O mappings or VM_ALLOC |
253 | * | 253 | * |
@@ -303,7 +303,7 @@ found: | |||
303 | } | 303 | } |
304 | 304 | ||
305 | /** | 305 | /** |
306 | * remove_vm_area - find and remove a contingous kernel virtual area | 306 | * remove_vm_area - find and remove a continuous kernel virtual area |
307 | * @addr: base address | 307 | * @addr: base address |
308 | * | 308 | * |
309 | * Search for the kernel VM area starting at @addr, and remove it. | 309 | * Search for the kernel VM area starting at @addr, and remove it. |
@@ -364,7 +364,7 @@ static void __vunmap(void *addr, int deallocate_pages) | |||
364 | * vfree - release memory allocated by vmalloc() | 364 | * vfree - release memory allocated by vmalloc() |
365 | * @addr: memory base address | 365 | * @addr: memory base address |
366 | * | 366 | * |
367 | * Free the virtually contiguous memory area starting at @addr, as | 367 | * Free the virtually continuous memory area starting at @addr, as |
368 | * obtained from vmalloc(), vmalloc_32() or __vmalloc(). If @addr is | 368 | * obtained from vmalloc(), vmalloc_32() or __vmalloc(). If @addr is |
369 | * NULL, no operation is performed. | 369 | * NULL, no operation is performed. |
370 | * | 370 | * |
diff --git a/mm/vmscan.c b/mm/vmscan.c index cb474cc99645..e5a9597e3bbc 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -141,7 +141,7 @@ EXPORT_SYMBOL(unregister_shrinker); | |||
141 | * percentages of the lru and ageable caches. This should balance the seeks | 141 | * percentages of the lru and ageable caches. This should balance the seeks |
142 | * generated by these structures. | 142 | * generated by these structures. |
143 | * | 143 | * |
144 | * If the vm encounted mapped pages on the LRU it increase the pressure on | 144 | * If the vm encountered mapped pages on the LRU it increase the pressure on |
145 | * slab to avoid swapping. | 145 | * slab to avoid swapping. |
146 | * | 146 | * |
147 | * We do weird things to avoid (scanned*seeks*entries) overflowing 32 bits. | 147 | * We do weird things to avoid (scanned*seeks*entries) overflowing 32 bits. |
diff --git a/net/9p/Kconfig b/net/9p/Kconfig index eecbf12f6393..71bc110aebf8 100644 --- a/net/9p/Kconfig +++ b/net/9p/Kconfig | |||
@@ -27,5 +27,5 @@ config NET_9P_DEBUG | |||
27 | bool "Debug information" | 27 | bool "Debug information" |
28 | depends on NET_9P | 28 | depends on NET_9P |
29 | help | 29 | help |
30 | Say Y if you want the 9P subsistem to log debug information. | 30 | Say Y if you want the 9P subsystem to log debug information. |
31 | 31 | ||
diff --git a/net/ax25/ax25_ds_in.c b/net/ax25/ax25_ds_in.c index e37d217a986a..8273b1200eee 100644 --- a/net/ax25/ax25_ds_in.c +++ b/net/ax25/ax25_ds_in.c | |||
@@ -75,7 +75,7 @@ static int ax25_ds_state1_machine(ax25_cb *ax25, struct sk_buff *skb, int framet | |||
75 | } | 75 | } |
76 | ax25_dama_on(ax25); | 76 | ax25_dama_on(ax25); |
77 | 77 | ||
78 | /* according to DK4EG´s spec we are required to | 78 | /* according to DK4EG's spec we are required to |
79 | * send a RR RESPONSE FINAL NR=0. | 79 | * send a RR RESPONSE FINAL NR=0. |
80 | */ | 80 | */ |
81 | 81 | ||
diff --git a/net/ax25/ax25_ds_subr.c b/net/ax25/ax25_ds_subr.c index a49773ff2b92..b5e59787be2f 100644 --- a/net/ax25/ax25_ds_subr.c +++ b/net/ax25/ax25_ds_subr.c | |||
@@ -41,7 +41,7 @@ void ax25_ds_enquiry_response(ax25_cb *ax25) | |||
41 | ax25_cb *ax25o; | 41 | ax25_cb *ax25o; |
42 | struct hlist_node *node; | 42 | struct hlist_node *node; |
43 | 43 | ||
44 | /* Please note that neither DK4EG´s nor DG2FEF´s | 44 | /* Please note that neither DK4EG's nor DG2FEF's |
45 | * DAMA spec mention the following behaviour as seen | 45 | * DAMA spec mention the following behaviour as seen |
46 | * with TheFirmware: | 46 | * with TheFirmware: |
47 | * | 47 | * |
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index 1f78c3e336d8..347e935faaf0 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c | |||
@@ -2,7 +2,7 @@ | |||
2 | BNEP implementation for Linux Bluetooth stack (BlueZ). | 2 | BNEP implementation for Linux Bluetooth stack (BlueZ). |
3 | Copyright (C) 2001-2002 Inventel Systemes | 3 | Copyright (C) 2001-2002 Inventel Systemes |
4 | Written 2001-2002 by | 4 | Written 2001-2002 by |
5 | Clément Moreau <clement.moreau@inventel.fr> | 5 | Clément Moreau <clement.moreau@inventel.fr> |
6 | David Libault <david.libault@inventel.fr> | 6 | David Libault <david.libault@inventel.fr> |
7 | 7 | ||
8 | Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com> | 8 | Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com> |
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c index 9092816f58de..95e3837e4312 100644 --- a/net/bluetooth/bnep/netdev.c +++ b/net/bluetooth/bnep/netdev.c | |||
@@ -2,7 +2,7 @@ | |||
2 | BNEP implementation for Linux Bluetooth stack (BlueZ). | 2 | BNEP implementation for Linux Bluetooth stack (BlueZ). |
3 | Copyright (C) 2001-2002 Inventel Systemes | 3 | Copyright (C) 2001-2002 Inventel Systemes |
4 | Written 2001-2002 by | 4 | Written 2001-2002 by |
5 | Clément Moreau <clement.moreau@inventel.fr> | 5 | Clément Moreau <clement.moreau@inventel.fr> |
6 | David Libault <david.libault@inventel.fr> | 6 | David Libault <david.libault@inventel.fr> |
7 | 7 | ||
8 | Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com> | 8 | Copyright (C) 2002 Maxim Krasnyansky <maxk@qualcomm.com> |
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index d5a09eaef915..817169e718c1 100644 --- a/net/bridge/netfilter/ebtables.c +++ b/net/bridge/netfilter/ebtables.c | |||
@@ -871,7 +871,7 @@ static int translate_table(char *name, struct ebt_table_info *newinfo) | |||
871 | return -EINVAL; | 871 | return -EINVAL; |
872 | } | 872 | } |
873 | 873 | ||
874 | /* we now know the following (along with E=mc²): | 874 | /* we now know the following (along with E=mc²): |
875 | - the nr of entries in each chain is right | 875 | - the nr of entries in each chain is right |
876 | - the size of the allocated space is right | 876 | - the size of the allocated space is right |
877 | - all valid hooks have a corresponding chain | 877 | - all valid hooks have a corresponding chain |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 7ac703171ff3..c4719edb55c0 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> | 7 | * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> |
8 | * Ben Greear <greearb@candelatech.com> | 8 | * Ben Greear <greearb@candelatech.com> |
9 | * Jens Låås <jens.laas@data.slu.se> | 9 | * Jens Låås <jens.laas@data.slu.se> |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or | 11 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License | 12 | * modify it under the terms of the GNU General Public License |
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c index 9b58dd67acb6..d309e8f19992 100644 --- a/net/ieee80211/ieee80211_wx.c +++ b/net/ieee80211/ieee80211_wx.c | |||
@@ -409,7 +409,7 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee, | |||
409 | (*crypt)->priv); | 409 | (*crypt)->priv); |
410 | sec.flags |= (1 << key); | 410 | sec.flags |= (1 << key); |
411 | /* This ensures a key will be activated if no key is | 411 | /* This ensures a key will be activated if no key is |
412 | * explicitely set */ | 412 | * explicitly set */ |
413 | if (key == sec.active_key) | 413 | if (key == sec.active_key) |
414 | sec.flags |= SEC_ACTIVE_KEY; | 414 | sec.flags |= SEC_ACTIVE_KEY; |
415 | 415 | ||
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index d894f616c3d6..9f9fd2c6f6e2 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig | |||
@@ -560,7 +560,7 @@ config TCP_CONG_ILLINOIS | |||
560 | depends on EXPERIMENTAL | 560 | depends on EXPERIMENTAL |
561 | default n | 561 | default n |
562 | ---help--- | 562 | ---help--- |
563 | TCP-Illinois is a sender-side modificatio of TCP Reno for | 563 | TCP-Illinois is a sender-side modification of TCP Reno for |
564 | high speed long delay links. It uses round-trip-time to | 564 | high speed long delay links. It uses round-trip-time to |
565 | adjust the alpha and beta parameters to achieve a higher average | 565 | adjust the alpha and beta parameters to achieve a higher average |
566 | throughput and maintain fairness. | 566 | throughput and maintain fairness. |
diff --git a/net/irda/discovery.c b/net/irda/discovery.c index af0cea721d2a..80c33f408e3f 100644 --- a/net/irda/discovery.c +++ b/net/irda/discovery.c | |||
@@ -202,7 +202,7 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force) | |||
202 | /* Drop the spinlock before calling the higher layers, as | 202 | /* Drop the spinlock before calling the higher layers, as |
203 | * we can't guarantee they won't call us back and create a | 203 | * we can't guarantee they won't call us back and create a |
204 | * deadlock. We will work on our own private data, so we | 204 | * deadlock. We will work on our own private data, so we |
205 | * don't care to be interupted. - Jean II */ | 205 | * don't care to be interrupted. - Jean II */ |
206 | spin_unlock_irqrestore(&log->hb_spinlock, flags); | 206 | spin_unlock_irqrestore(&log->hb_spinlock, flags); |
207 | 207 | ||
208 | if(buffer == NULL) | 208 | if(buffer == NULL) |
diff --git a/net/irda/iriap.c b/net/irda/iriap.c index ee3889fa49ab..dc5e34a01620 100644 --- a/net/irda/iriap.c +++ b/net/irda/iriap.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
diff --git a/net/irda/iriap_event.c b/net/irda/iriap_event.c index 99b18dc7a0b7..8fb9d7277ca8 100644 --- a/net/irda/iriap_event.c +++ b/net/irda/iriap_event.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c index cf302457097b..cbcf04380f3a 100644 --- a/net/irda/irias_object.c +++ b/net/irda/irias_object.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | * | 18 | * |
19 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
20 | * provide warranty for any of this software. This material is | 20 | * provide warranty for any of this software. This material is |
21 | * provided "AS-IS" and at no charge. | 21 | * provided "AS-IS" and at no charge. |
22 | * | 22 | * |
diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c index 87039c2fb6a2..fff52d57a200 100644 --- a/net/irda/irlan/irlan_client.c +++ b/net/irda/irlan/irlan_client.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 23 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
24 | * provide warranty for any of this software. This material is | 24 | * provide warranty for any of this software. This material is |
25 | * provided "AS-IS" and at no charge. | 25 | * provided "AS-IS" and at no charge. |
26 | * | 26 | * |
diff --git a/net/irda/irlan/irlan_client_event.c b/net/irda/irlan/irlan_client_event.c index 843ab6fbb394..6afcee59e906 100644 --- a/net/irda/irlan/irlan_client_event.c +++ b/net/irda/irlan/irlan_client_event.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * published by the Free Software Foundation; either version 2 of | 17 | * published by the Free Software Foundation; either version 2 of |
18 | * the License, or (at your option) any later version. | 18 | * the License, or (at your option) any later version. |
19 | * | 19 | * |
20 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 20 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
21 | * provide warranty for any of this software. This material is | 21 | * provide warranty for any of this software. This material is |
22 | * provided "AS-IS" and at no charge. | 22 | * provided "AS-IS" and at no charge. |
23 | * | 23 | * |
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index f5778ef3ccc7..a4b56e25a917 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * published by the Free Software Foundation; either version 2 of | 17 | * published by the Free Software Foundation; either version 2 of |
18 | * the License, or (at your option) any later version. | 18 | * the License, or (at your option) any later version. |
19 | * | 19 | * |
20 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 20 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
21 | * provide warranty for any of this software. This material is | 21 | * provide warranty for any of this software. This material is |
22 | * provided "AS-IS" and at no charge. | 22 | * provided "AS-IS" and at no charge. |
23 | * | 23 | * |
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c index 340f04a36b02..7f9c8542e5fc 100644 --- a/net/irda/irlan/irlan_eth.c +++ b/net/irda/irlan/irlan_eth.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * published by the Free Software Foundation; either version 2 of | 19 | * published by the Free Software Foundation; either version 2 of |
20 | * the License, or (at your option) any later version. | 20 | * the License, or (at your option) any later version. |
21 | * | 21 | * |
22 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 22 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
23 | * provide warranty for any of this software. This material is | 23 | * provide warranty for any of this software. This material is |
24 | * provided "AS-IS" and at no charge. | 24 | * provided "AS-IS" and at no charge. |
25 | * | 25 | * |
diff --git a/net/irda/irlan/irlan_event.c b/net/irda/irlan/irlan_event.c index 623e0fd16c19..a9750a801388 100644 --- a/net/irda/irlan/irlan_event.c +++ b/net/irda/irlan/irlan_event.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | * | 18 | * |
19 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
20 | * provide warranty for any of this software. This material is | 20 | * provide warranty for any of this software. This material is |
21 | * provided "AS-IS" and at no charge. | 21 | * provided "AS-IS" and at no charge. |
22 | * | 22 | * |
diff --git a/net/irda/irlan/irlan_filter.c b/net/irda/irlan/irlan_filter.c index e6346b88f934..4384be9a6888 100644 --- a/net/irda/irlan/irlan_filter.c +++ b/net/irda/irlan/irlan_filter.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | * | 18 | * |
19 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
20 | * provide warranty for any of this software. This material is | 20 | * provide warranty for any of this software. This material is |
21 | * provided "AS-IS" and at no charge. | 21 | * provided "AS-IS" and at no charge. |
22 | * | 22 | * |
diff --git a/net/irda/irlan/irlan_provider.c b/net/irda/irlan/irlan_provider.c index aac66434e473..13db942812e4 100644 --- a/net/irda/irlan/irlan_provider.c +++ b/net/irda/irlan/irlan_provider.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 23 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
24 | * provide warranty for any of this software. This material is | 24 | * provide warranty for any of this software. This material is |
25 | * provided "AS-IS" and at no charge. | 25 | * provided "AS-IS" and at no charge. |
26 | * | 26 | * |
diff --git a/net/irda/irlan/irlan_provider_event.c b/net/irda/irlan/irlan_provider_event.c index ef401bd6ea00..10ece5a47522 100644 --- a/net/irda/irlan/irlan_provider_event.c +++ b/net/irda/irlan/irlan_provider_event.c | |||
@@ -16,7 +16,7 @@ | |||
16 | * published by the Free Software Foundation; either version 2 of | 16 | * published by the Free Software Foundation; either version 2 of |
17 | * the License, or (at your option) any later version. | 17 | * the License, or (at your option) any later version. |
18 | * | 18 | * |
19 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 19 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
20 | * provide warranty for any of this software. This material is | 20 | * provide warranty for any of this software. This material is |
21 | * provided "AS-IS" and at no charge. | 21 | * provided "AS-IS" and at no charge. |
22 | * | 22 | * |
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index a8b8873aa263..4c33bf5c8354 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
@@ -19,7 +19,7 @@ | |||
19 | * published by the Free Software Foundation; either version 2 of | 19 | * published by the Free Software Foundation; either version 2 of |
20 | * the License, or (at your option) any later version. | 20 | * the License, or (at your option) any later version. |
21 | * | 21 | * |
22 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 22 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
23 | * provide warranty for any of this software. This material is | 23 | * provide warranty for any of this software. This material is |
24 | * provided "AS-IS" and at no charge. | 24 | * provided "AS-IS" and at no charge. |
25 | * | 25 | * |
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c index 77ac27e81161..4f3764546b2f 100644 --- a/net/irda/irlap_frame.c +++ b/net/irda/irlap_frame.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c index 7db92ced2c02..cedff8068fbc 100644 --- a/net/irda/irlmp.c +++ b/net/irda/irlmp.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c index 65ffa981510a..1bba87e78609 100644 --- a/net/irda/irlmp_event.c +++ b/net/irda/irlmp_event.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
diff --git a/net/irda/irlmp_frame.c b/net/irda/irlmp_frame.c index 559302d3fe66..0a79d9aeb08c 100644 --- a/net/irda/irlmp_frame.c +++ b/net/irda/irlmp_frame.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
diff --git a/net/irda/irmod.c b/net/irda/irmod.c index 8ba703da2797..01554b996b9b 100644 --- a/net/irda/irmod.c +++ b/net/irda/irmod.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * published by the Free Software Foundation; either version 2 of | 17 | * published by the Free Software Foundation; either version 2 of |
18 | * the License, or (at your option) any later version. | 18 | * the License, or (at your option) any later version. |
19 | * | 19 | * |
20 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 20 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
21 | * provide warranty for any of this software. This material is | 21 | * provide warranty for any of this software. This material is |
22 | * provided "AS-IS" and at no charge. | 22 | * provided "AS-IS" and at no charge. |
23 | * | 23 | * |
diff --git a/net/irda/irqueue.c b/net/irda/irqueue.c index d058b467f9e4..40c28efaed95 100644 --- a/net/irda/irqueue.c +++ b/net/irda/irqueue.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * published by the Free Software Foundation; either version 2 of | 28 | * published by the Free Software Foundation; either version 2 of |
29 | * the License, or (at your option) any later version. | 29 | * the License, or (at your option) any later version. |
30 | * | 30 | * |
31 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 31 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
32 | * provide warranty for any of this software. This material is | 32 | * provide warranty for any of this software. This material is |
33 | * provided "AS-IS" and at no charge. | 33 | * provided "AS-IS" and at no charge. |
34 | * | 34 | * |
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c index 525343a1c521..565cbf0421cd 100644 --- a/net/irda/irsysctl.c +++ b/net/irda/irsysctl.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * published by the Free Software Foundation; either version 2 of | 17 | * published by the Free Software Foundation; either version 2 of |
18 | * the License, or (at your option) any later version. | 18 | * the License, or (at your option) any later version. |
19 | * | 19 | * |
20 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 20 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
21 | * provide warranty for any of this software. This material is | 21 | * provide warranty for any of this software. This material is |
22 | * provided "AS-IS" and at no charge. | 22 | * provided "AS-IS" and at no charge. |
23 | * | 23 | * |
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index 1311976c9dfe..97db158c9274 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
diff --git a/net/irda/timer.c b/net/irda/timer.c index d3a6ee8cc4a2..d730099080a2 100644 --- a/net/irda/timer.c +++ b/net/irda/timer.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 21 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
22 | * provide warranty for any of this software. This material is | 22 | * provide warranty for any of this software. This material is |
23 | * provided "AS-IS" and at no charge. | 23 | * provided "AS-IS" and at no charge. |
24 | * | 24 | * |
diff --git a/net/irda/wrapper.c b/net/irda/wrapper.c index a7a7f191f1a8..e71286768a48 100644 --- a/net/irda/wrapper.c +++ b/net/irda/wrapper.c | |||
@@ -20,7 +20,7 @@ | |||
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * Neither Dag Brattli nor University of Tromsø admit liability nor | 23 | * Neither Dag Brattli nor University of Tromsø admit liability nor |
24 | * provide warranty for any of this software. This material is | 24 | * provide warranty for any of this software. This material is |
25 | * provided "AS-IS" and at no charge. | 25 | * provided "AS-IS" and at no charge. |
26 | * | 26 | * |
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 983058d432dc..a2f5a6ea3895 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
@@ -389,7 +389,7 @@ static void iucv_block_cpu(void *data) | |||
389 | * iucv_declare_cpu | 389 | * iucv_declare_cpu |
390 | * @data: unused | 390 | * @data: unused |
391 | * | 391 | * |
392 | * Declare a interupt buffer on this cpu. | 392 | * Declare a interrupt buffer on this cpu. |
393 | */ | 393 | */ |
394 | static void iucv_declare_cpu(void *data) | 394 | static void iucv_declare_cpu(void *data) |
395 | { | 395 | { |
diff --git a/net/netfilter/xt_CONNMARK.c b/net/netfilter/xt_CONNMARK.c index 8cc324b159e9..856793e8db7a 100644 --- a/net/netfilter/xt_CONNMARK.c +++ b/net/netfilter/xt_CONNMARK.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/ip.h> | 23 | #include <linux/ip.h> |
24 | #include <net/checksum.h> | 24 | #include <net/checksum.h> |
25 | 25 | ||
26 | MODULE_AUTHOR("Henrik Nordstrom <hno@marasytems.com>"); | 26 | MODULE_AUTHOR("Henrik Nordstrom <hno@marasystems.com>"); |
27 | MODULE_DESCRIPTION("IP tables CONNMARK matching module"); | 27 | MODULE_DESCRIPTION("IP tables CONNMARK matching module"); |
28 | MODULE_LICENSE("GPL"); | 28 | MODULE_LICENSE("GPL"); |
29 | MODULE_ALIAS("ipt_CONNMARK"); | 29 | MODULE_ALIAS("ipt_CONNMARK"); |
diff --git a/net/netfilter/xt_connmark.c b/net/netfilter/xt_connmark.c index 1071fc54d6d3..9f67920af41f 100644 --- a/net/netfilter/xt_connmark.c +++ b/net/netfilter/xt_connmark.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/netfilter/x_tables.h> | 25 | #include <linux/netfilter/x_tables.h> |
26 | #include <linux/netfilter/xt_connmark.h> | 26 | #include <linux/netfilter/xt_connmark.h> |
27 | 27 | ||
28 | MODULE_AUTHOR("Henrik Nordstrom <hno@marasytems.com>"); | 28 | MODULE_AUTHOR("Henrik Nordstrom <hno@marasystems.com>"); |
29 | MODULE_DESCRIPTION("IP tables connmark match module"); | 29 | MODULE_DESCRIPTION("IP tables connmark match module"); |
30 | MODULE_LICENSE("GPL"); | 30 | MODULE_LICENSE("GPL"); |
31 | MODULE_ALIAS("ipt_connmark"); | 31 | MODULE_ALIAS("ipt_connmark"); |
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c index 4fcca797150f..f263a77e57b7 100644 --- a/net/netfilter/xt_limit.c +++ b/net/netfilter/xt_limit.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* (C) 1999 Jérôme de Vivie <devivie@info.enserb.u-bordeaux.fr> | 1 | /* (C) 1999 Jérôme de Vivie <devivie@info.enserb.u-bordeaux.fr> |
2 | * (C) 1999 Hervé Eychenne <eychenne@info.enserb.u-bordeaux.fr> | 2 | * (C) 1999 Hervé Eychenne <eychenne@info.enserb.u-bordeaux.fr> |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index e9989610712c..ceda8890ab0e 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -55,7 +55,7 @@ | |||
55 | * ppp0..9. | 55 | * ppp0..9. |
56 | * | 56 | * |
57 | * NOTE: Certain meta values depend on other subsystems and are | 57 | * NOTE: Certain meta values depend on other subsystems and are |
58 | * only available if that subsytem is enabled in the kernel. | 58 | * only available if that subsystem is enabled in the kernel. |
59 | */ | 59 | */ |
60 | 60 | ||
61 | #include <linux/module.h> | 61 | #include <linux/module.h> |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index de7bb284c611..b96ea8d6a5ed 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -56,6 +56,17 @@ endef | |||
56 | # gcc support functions | 56 | # gcc support functions |
57 | # See documentation in Documentation/kbuild/makefiles.txt | 57 | # See documentation in Documentation/kbuild/makefiles.txt |
58 | 58 | ||
59 | # cc-cross-prefix | ||
60 | # Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) | ||
61 | # Return first prefix where a prefix$(CC) is found in PATH. | ||
62 | # If no $(CC) found in PATH with listed prefixes return nothing | ||
63 | cc-cross-prefix = \ | ||
64 | $(word 1, $(foreach c,$(1), \ | ||
65 | $(shell set -e; \ | ||
66 | if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \ | ||
67 | echo $(c); \ | ||
68 | fi))) | ||
69 | |||
59 | # output directory for tests below | 70 | # output directory for tests below |
60 | TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) | 71 | TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) |
61 | 72 | ||
diff --git a/scripts/basic/docproc.c b/scripts/basic/docproc.c index e5c6ac7bde9b..0e4bd5459df4 100644 --- a/scripts/basic/docproc.c +++ b/scripts/basic/docproc.c | |||
@@ -66,12 +66,15 @@ FILELINE * entity_system; | |||
66 | #define FUNCTION "-function" | 66 | #define FUNCTION "-function" |
67 | #define NOFUNCTION "-nofunction" | 67 | #define NOFUNCTION "-nofunction" |
68 | 68 | ||
69 | char *srctree; | ||
70 | |||
69 | void usage (void) | 71 | void usage (void) |
70 | { | 72 | { |
71 | fprintf(stderr, "Usage: docproc {doc|depend} file\n"); | 73 | fprintf(stderr, "Usage: docproc {doc|depend} file\n"); |
72 | fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); | 74 | fprintf(stderr, "Input is read from file.tmpl. Output is sent to stdout\n"); |
73 | fprintf(stderr, "doc: frontend when generating kernel documentation\n"); | 75 | fprintf(stderr, "doc: frontend when generating kernel documentation\n"); |
74 | fprintf(stderr, "depend: generate list of files referenced within file\n"); | 76 | fprintf(stderr, "depend: generate list of files referenced within file\n"); |
77 | fprintf(stderr, "Environment variable SRCTREE: absolute path to kernel source tree.\n"); | ||
75 | } | 78 | } |
76 | 79 | ||
77 | /* | 80 | /* |
@@ -90,7 +93,7 @@ void exec_kernel_doc(char **svec) | |||
90 | exit(1); | 93 | exit(1); |
91 | case 0: | 94 | case 0: |
92 | memset(real_filename, 0, sizeof(real_filename)); | 95 | memset(real_filename, 0, sizeof(real_filename)); |
93 | strncat(real_filename, getenv("SRCTREE"), PATH_MAX); | 96 | strncat(real_filename, srctree, PATH_MAX); |
94 | strncat(real_filename, KERNELDOCPATH KERNELDOC, | 97 | strncat(real_filename, KERNELDOCPATH KERNELDOC, |
95 | PATH_MAX - strlen(real_filename)); | 98 | PATH_MAX - strlen(real_filename)); |
96 | execvp(real_filename, svec); | 99 | execvp(real_filename, svec); |
@@ -171,7 +174,7 @@ void find_export_symbols(char * filename) | |||
171 | if (filename_exist(filename) == NULL) { | 174 | if (filename_exist(filename) == NULL) { |
172 | char real_filename[PATH_MAX + 1]; | 175 | char real_filename[PATH_MAX + 1]; |
173 | memset(real_filename, 0, sizeof(real_filename)); | 176 | memset(real_filename, 0, sizeof(real_filename)); |
174 | strncat(real_filename, getenv("SRCTREE"), PATH_MAX); | 177 | strncat(real_filename, srctree, PATH_MAX); |
175 | strncat(real_filename, filename, | 178 | strncat(real_filename, filename, |
176 | PATH_MAX - strlen(real_filename)); | 179 | PATH_MAX - strlen(real_filename)); |
177 | sym = add_new_file(filename); | 180 | sym = add_new_file(filename); |
@@ -338,6 +341,10 @@ void parse_file(FILE *infile) | |||
338 | int main(int argc, char *argv[]) | 341 | int main(int argc, char *argv[]) |
339 | { | 342 | { |
340 | FILE * infile; | 343 | FILE * infile; |
344 | |||
345 | srctree = getenv("SRCTREE"); | ||
346 | if (!srctree) | ||
347 | srctree = getcwd(NULL, 0); | ||
341 | if (argc != 3) { | 348 | if (argc != 3) { |
342 | usage(); | 349 | usage(); |
343 | exit(1); | 350 | exit(1); |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index bb08069b04af..83c5e76414ce 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -84,7 +84,7 @@ help: | |||
84 | # lxdialog stuff | 84 | # lxdialog stuff |
85 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh | 85 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh |
86 | 86 | ||
87 | # Use reursively expanded variables so we do not call gcc unless | 87 | # Use recursively expanded variables so we do not call gcc unless |
88 | # we really need to do so. (Do not call gcc as part of make mrproper) | 88 | # we really need to do so. (Do not call gcc as part of make mrproper) |
89 | HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) | 89 | HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) |
90 | HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) | 90 | HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) |
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 7bfa181d6ed6..f9d0d91a3fe4 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c | |||
@@ -235,23 +235,16 @@ void menu_finalize(struct menu *parent) | |||
235 | sym = parent->sym; | 235 | sym = parent->sym; |
236 | if (parent->list) { | 236 | if (parent->list) { |
237 | if (sym && sym_is_choice(sym)) { | 237 | if (sym && sym_is_choice(sym)) { |
238 | /* find out choice type */ | 238 | /* find the first choice value and find out choice type */ |
239 | enum symbol_type type = S_UNKNOWN; | ||
240 | |||
241 | for (menu = parent->list; menu; menu = menu->next) { | 239 | for (menu = parent->list; menu; menu = menu->next) { |
242 | if (menu->sym && menu->sym->type != S_UNKNOWN) { | 240 | if (menu->sym) { |
243 | if (type == S_UNKNOWN) | 241 | current_entry = parent; |
244 | type = menu->sym->type; | 242 | menu_set_type(menu->sym->type); |
245 | if (type != S_BOOLEAN) | 243 | current_entry = menu; |
246 | break; | 244 | menu_set_type(sym->type); |
247 | if (menu->sym->type == S_TRISTATE) { | 245 | break; |
248 | type = S_TRISTATE; | ||
249 | break; | ||
250 | } | ||
251 | } | 246 | } |
252 | } | 247 | } |
253 | current_entry = parent; | ||
254 | menu_set_type(type); | ||
255 | parentdep = expr_alloc_symbol(sym); | 248 | parentdep = expr_alloc_symbol(sym); |
256 | } else if (parent->prompt) | 249 | } else if (parent->prompt) |
257 | parentdep = parent->prompt->visible.expr; | 250 | parentdep = parent->prompt->visible.expr; |
@@ -260,16 +253,7 @@ void menu_finalize(struct menu *parent) | |||
260 | 253 | ||
261 | for (menu = parent->list; menu; menu = menu->next) { | 254 | for (menu = parent->list; menu; menu = menu->next) { |
262 | basedep = expr_transform(menu->dep); | 255 | basedep = expr_transform(menu->dep); |
263 | dep = parentdep; | 256 | basedep = expr_alloc_and(expr_copy(parentdep), basedep); |
264 | if (sym && sym_is_choice(sym) && menu->sym) { | ||
265 | enum symbol_type type = menu->sym->type; | ||
266 | |||
267 | if (type == S_UNKNOWN) | ||
268 | type = sym->type; | ||
269 | if (type != S_TRISTATE) | ||
270 | dep = expr_alloc_comp(E_EQUAL, sym, &symbol_yes); | ||
271 | } | ||
272 | basedep = expr_alloc_and(expr_copy(dep), basedep); | ||
273 | basedep = expr_eliminate_dups(basedep); | 257 | basedep = expr_eliminate_dups(basedep); |
274 | menu->dep = basedep; | 258 | menu->dep = basedep; |
275 | if (menu->sym) | 259 | if (menu->sym) |
@@ -342,8 +326,7 @@ void menu_finalize(struct menu *parent) | |||
342 | "values not supported"); | 326 | "values not supported"); |
343 | } | 327 | } |
344 | current_entry = menu; | 328 | current_entry = menu; |
345 | if (menu->sym->type == S_UNKNOWN) | 329 | menu_set_type(sym->type); |
346 | menu_set_type(sym->type); | ||
347 | menu_add_symbol(P_CHOICE, sym, NULL); | 330 | menu_add_symbol(P_CHOICE, sym, NULL); |
348 | prop = sym_get_choice_prop(sym); | 331 | prop = sym_get_choice_prop(sym); |
349 | for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) | 332 | for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 2ef9a193fcae..93ac52adb498 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -268,6 +268,9 @@ static struct symbol *sym_add_exported(const char *name, struct module *mod, | |||
268 | "was in %s%s\n", mod->name, name, | 268 | "was in %s%s\n", mod->name, name, |
269 | s->module->name, | 269 | s->module->name, |
270 | is_vmlinux(s->module->name) ?"":".ko"); | 270 | is_vmlinux(s->module->name) ?"":".ko"); |
271 | } else { | ||
272 | /* In case Modules.symvers was out of date */ | ||
273 | s->module = mod; | ||
271 | } | 274 | } |
272 | } | 275 | } |
273 | s->preloaded = 0; | 276 | s->preloaded = 0; |
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 6edb29f2b4a6..0f657b5f3bc8 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb | |||
@@ -83,6 +83,7 @@ Maintainer: $name | |||
83 | Standards-Version: 3.6.1 | 83 | Standards-Version: 3.6.1 |
84 | 84 | ||
85 | Package: $packagename | 85 | Package: $packagename |
86 | Provides: kernel-image-$version, linux-image-$version | ||
86 | Architecture: any | 87 | Architecture: any |
87 | Description: User Mode Linux kernel, version $version | 88 | Description: User Mode Linux kernel, version $version |
88 | User-mode Linux is a port of the Linux kernel to its own system call | 89 | User-mode Linux is a port of the Linux kernel to its own system call |
@@ -104,6 +105,7 @@ Maintainer: $name | |||
104 | Standards-Version: 3.6.1 | 105 | Standards-Version: 3.6.1 |
105 | 106 | ||
106 | Package: $packagename | 107 | Package: $packagename |
108 | Provides: kernel-image-$version, linux-image-$version | ||
107 | Architecture: any | 109 | Architecture: any |
108 | Description: Linux kernel, version $version | 110 | Description: Linux kernel, version $version |
109 | This package contains the Linux kernel, modules and corresponding other | 111 | This package contains the Linux kernel, modules and corresponding other |
diff --git a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c index d7c4fb86b9eb..17b3e6f13ca3 100644 --- a/sound/core/seq/seq_midi_emul.c +++ b/sound/core/seq/seq_midi_emul.c | |||
@@ -71,7 +71,7 @@ static void reset_all_channels(struct snd_midi_channel_set *chset); | |||
71 | * such as GM, GS and XG. | 71 | * such as GM, GS and XG. |
72 | * There modes that this module will run in are: | 72 | * There modes that this module will run in are: |
73 | * Generic MIDI - no interpretation at all, it will just save current values | 73 | * Generic MIDI - no interpretation at all, it will just save current values |
74 | * of controlers etc. | 74 | * of controllers etc. |
75 | * GM - You can use all gm_ prefixed elements of chan. Controls, RPN, NRPN, | 75 | * GM - You can use all gm_ prefixed elements of chan. Controls, RPN, NRPN, |
76 | * SysEx will be interpreded as defined in General Midi. | 76 | * SysEx will be interpreded as defined in General Midi. |
77 | * GS - You can use all gs_ prefixed elements of chan. Codes for GS will be | 77 | * GS - You can use all gs_ prefixed elements of chan. Codes for GS will be |
@@ -176,7 +176,7 @@ snd_midi_process_event(struct snd_midi_op *ops, | |||
176 | ev->data.control.value); | 176 | ev->data.control.value); |
177 | break; | 177 | break; |
178 | case SNDRV_SEQ_EVENT_NONREGPARAM: | 178 | case SNDRV_SEQ_EVENT_NONREGPARAM: |
179 | /* Break it back into its controler values */ | 179 | /* Break it back into its controller values */ |
180 | chan->param_type = SNDRV_MIDI_PARAM_TYPE_NONREGISTERED; | 180 | chan->param_type = SNDRV_MIDI_PARAM_TYPE_NONREGISTERED; |
181 | chan->control[MIDI_CTL_MSB_DATA_ENTRY] | 181 | chan->control[MIDI_CTL_MSB_DATA_ENTRY] |
182 | = (ev->data.control.value >> 7) & 0x7f; | 182 | = (ev->data.control.value >> 7) & 0x7f; |
@@ -189,7 +189,7 @@ snd_midi_process_event(struct snd_midi_op *ops, | |||
189 | nrpn(ops, drv, chan, chanset); | 189 | nrpn(ops, drv, chan, chanset); |
190 | break; | 190 | break; |
191 | case SNDRV_SEQ_EVENT_REGPARAM: | 191 | case SNDRV_SEQ_EVENT_REGPARAM: |
192 | /* Break it back into its controler values */ | 192 | /* Break it back into its controller values */ |
193 | chan->param_type = SNDRV_MIDI_PARAM_TYPE_REGISTERED; | 193 | chan->param_type = SNDRV_MIDI_PARAM_TYPE_REGISTERED; |
194 | chan->control[MIDI_CTL_MSB_DATA_ENTRY] | 194 | chan->control[MIDI_CTL_MSB_DATA_ENTRY] |
195 | = (ev->data.control.value >> 7) & 0x7f; | 195 | = (ev->data.control.value >> 7) & 0x7f; |
@@ -267,7 +267,7 @@ note_off(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan, | |||
267 | } | 267 | } |
268 | 268 | ||
269 | /* | 269 | /* |
270 | * Do all driver independent operations for this controler and pass | 270 | * Do all driver independent operations for this controller and pass |
271 | * events that need to take place immediately to the driver. | 271 | * events that need to take place immediately to the driver. |
272 | */ | 272 | */ |
273 | static void | 273 | static void |
diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c index 1b6f227af370..3557b6e20eb5 100644 --- a/sound/drivers/opl3/opl3_midi.c +++ b/sound/drivers/opl3/opl3_midi.c | |||
@@ -808,7 +808,7 @@ static void snd_opl3_pitch_ctrl(struct snd_opl3 *opl3, struct snd_midi_channel * | |||
808 | } | 808 | } |
809 | 809 | ||
810 | /* | 810 | /* |
811 | * Deal with a controler type event. This includes all types of | 811 | * Deal with a controller type event. This includes all types of |
812 | * control events, not just the midi controllers | 812 | * control events, not just the midi controllers |
813 | */ | 813 | */ |
814 | void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan) | 814 | void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan) |
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 4a7367a8ff9d..c1af28fd4a1f 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c | |||
@@ -623,7 +623,7 @@ static int snd_es18xx_capture_prepare(struct snd_pcm_substream *substream) | |||
623 | (snd_pcm_format_width(runtime->format) == 16 ? 0x04 : 0x00) | | 623 | (snd_pcm_format_width(runtime->format) == 16 ? 0x04 : 0x00) | |
624 | (snd_pcm_format_unsigned(runtime->format) ? 0x00 : 0x20)); | 624 | (snd_pcm_format_unsigned(runtime->format) ? 0x00 : 0x20)); |
625 | 625 | ||
626 | /* Set DMA controler */ | 626 | /* Set DMA controller */ |
627 | snd_dma_program(chip->dma1, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT); | 627 | snd_dma_program(chip->dma1, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT); |
628 | 628 | ||
629 | return 0; | 629 | return 0; |
@@ -689,7 +689,7 @@ static int snd_es18xx_playback2_prepare(struct snd_es18xx *chip, | |||
689 | (snd_pcm_format_width(runtime->format) == 16 ? 0x04 : 0x00) | | 689 | (snd_pcm_format_width(runtime->format) == 16 ? 0x04 : 0x00) | |
690 | (snd_pcm_format_unsigned(runtime->format) ? 0x00 : 0x20)); | 690 | (snd_pcm_format_unsigned(runtime->format) ? 0x00 : 0x20)); |
691 | 691 | ||
692 | /* Set DMA controler */ | 692 | /* Set DMA controller */ |
693 | snd_dma_program(chip->dma1, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT); | 693 | snd_dma_program(chip->dma1, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT); |
694 | 694 | ||
695 | return 0; | 695 | return 0; |
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c index 8a61a1191861..24460a558bf7 100644 --- a/sound/mips/au1x00.c +++ b/sound/mips/au1x00.c | |||
@@ -498,8 +498,8 @@ snd_au1000_ac97_read(struct snd_ac97 *ac97, unsigned short reg) | |||
498 | int i; | 498 | int i; |
499 | 499 | ||
500 | spin_lock(&au1000->ac97_lock); | 500 | spin_lock(&au1000->ac97_lock); |
501 | /* would rather use the interupt than this polling but it works and I can't | 501 | /* would rather use the interrupt than this polling but it works and I can't |
502 | get the interupt driven case to work efficiently */ | 502 | get the interrupt driven case to work efficiently */ |
503 | for (i = 0; i < 0x5000; i++) | 503 | for (i = 0; i < 0x5000; i++) |
504 | if (!(au1000->ac97_ioport->status & AC97C_CP)) | 504 | if (!(au1000->ac97_ioport->status & AC97C_CP)) |
505 | break; | 505 | break; |
@@ -535,8 +535,8 @@ snd_au1000_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short | |||
535 | int i; | 535 | int i; |
536 | 536 | ||
537 | spin_lock(&au1000->ac97_lock); | 537 | spin_lock(&au1000->ac97_lock); |
538 | /* would rather use the interupt than this polling but it works and I can't | 538 | /* would rather use the interrupt than this polling but it works and I can't |
539 | get the interupt driven case to work efficiently */ | 539 | get the interrupt driven case to work efficiently */ |
540 | for (i = 0; i < 0x5000; i++) | 540 | for (i = 0; i < 0x5000; i++) |
541 | if (!(au1000->ac97_ioport->status & AC97C_CP)) | 541 | if (!(au1000->ac97_ioport->status & AC97C_CP)) |
542 | break; | 542 | break; |
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index f70286a7364a..26819e2f5761 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c | |||
@@ -191,7 +191,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) | |||
191 | 191 | ||
192 | /* Init audio core. | 192 | /* Init audio core. |
193 | * This must be done before we do request_irq otherwise we can get spurious | 193 | * This must be done before we do request_irq otherwise we can get spurious |
194 | * interupts that we do not handle properly and make a mess of things */ | 194 | * interrupts that we do not handle properly and make a mess of things */ |
195 | if ((err = vortex_core_init(chip)) != 0) { | 195 | if ((err = vortex_core_init(chip)) != 0) { |
196 | printk(KERN_ERR "hw core init failed\n"); | 196 | printk(KERN_ERR "hw core init failed\n"); |
197 | goto core_out; | 197 | goto core_out; |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 91651bdfa761..e6a67b58f296 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -264,7 +264,7 @@ out: | |||
264 | } | 264 | } |
265 | 265 | ||
266 | /* | 266 | /* |
267 | * Power down the audio subsytem pmdown_time msecs after close is called. | 267 | * Power down the audio subsystem pmdown_time msecs after close is called. |
268 | * This is to ensure there are no pops or clicks in between any music tracks | 268 | * This is to ensure there are no pops or clicks in between any music tracks |
269 | * due to DAPM power cycling. | 269 | * due to DAPM power cycling. |
270 | */ | 270 | */ |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index b3193e687db7..29a546fecacf 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * o Automatic Mic Bias support | 24 | * o Automatic Mic Bias support |
25 | * o Jack insertion power event initiation - e.g. hp insertion will enable | 25 | * o Jack insertion power event initiation - e.g. hp insertion will enable |
26 | * sinks, dacs, etc | 26 | * sinks, dacs, etc |
27 | * o Delayed powerdown of audio susbsytem to reduce pops between a quick | 27 | * o Delayed powerdown of audio susbsystem to reduce pops between a quick |
28 | * device reopen. | 28 | * device reopen. |
29 | * | 29 | * |
30 | * Todo: | 30 | * Todo: |
diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c index 3733118d39bb..478369bb38c3 100644 --- a/sound/synth/emux/emux_synth.c +++ b/sound/synth/emux/emux_synth.c | |||
@@ -317,7 +317,7 @@ snd_emux_update_port(struct snd_emux_port *port, int update) | |||
317 | 317 | ||
318 | 318 | ||
319 | /* | 319 | /* |
320 | * Deal with a controler type event. This includes all types of | 320 | * Deal with a controller type event. This includes all types of |
321 | * control events, not just the midi controllers | 321 | * control events, not just the midi controllers |
322 | */ | 322 | */ |
323 | void | 323 | void |