diff options
author | Jody McIntyre <scjody@modernduck.com> | 2005-11-28 17:46:32 -0500 |
---|---|---|
committer | Jody McIntyre <scjody@modernduck.com> | 2005-11-28 17:46:32 -0500 |
commit | a880b11a95fab4618da412d99fc7365d723e702d (patch) | |
tree | 10839a82741b7154067adfff425dadef3caf4163 | |
parent | 899a1fc084ef3dcb57737d8847bf219cbf353ed3 (diff) | |
parent | 458af5439fe7ae7d95ca14106844e61f0795166c (diff) |
Merge with http://kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
151 files changed, 1066 insertions, 946 deletions
diff --git a/Documentation/arm/VFP/release-notes.txt b/Documentation/arm/VFP/release-notes.txt index f28e0222f5e5..28a2795705ca 100644 --- a/Documentation/arm/VFP/release-notes.txt +++ b/Documentation/arm/VFP/release-notes.txt | |||
@@ -12,7 +12,7 @@ This release has been validated against the SoftFloat-2b library by | |||
12 | John R. Hauser using the TestFloat-2a test suite. Details of this | 12 | John R. Hauser using the TestFloat-2a test suite. Details of this |
13 | library and test suite can be found at: | 13 | library and test suite can be found at: |
14 | 14 | ||
15 | http://www.cs.berkeley.edu/~jhauser/arithmetic/SoftFloat.html | 15 | http://www.jhauser.us/arithmetic/SoftFloat.html |
16 | 16 | ||
17 | The operations which have been tested with this package are: | 17 | The operations which have been tested with this package are: |
18 | 18 | ||
diff --git a/Documentation/dvb/faq.txt b/Documentation/dvb/faq.txt index 3bf51e45c972..a42132d60dc8 100644 --- a/Documentation/dvb/faq.txt +++ b/Documentation/dvb/faq.txt | |||
@@ -60,7 +60,6 @@ Some very frequently asked questions about linuxtv-dvb | |||
60 | Metzler Bros. DVB development; alternate drivers and | 60 | Metzler Bros. DVB development; alternate drivers and |
61 | DVB utilities, include dvb-mpegtools and tuxzap. | 61 | DVB utilities, include dvb-mpegtools and tuxzap. |
62 | 62 | ||
63 | http://www.linuxstb.org/ | ||
64 | http://sourceforge.net/projects/dvbtools/ | 63 | http://sourceforge.net/projects/dvbtools/ |
65 | Dave Chapman's dvbtools package, including | 64 | Dave Chapman's dvbtools package, including |
66 | dvbstream and dvbtune | 65 | dvbstream and dvbtune |
diff --git a/Documentation/filesystems/affs.txt b/Documentation/filesystems/affs.txt index 30c9738590f4..2d1524469c25 100644 --- a/Documentation/filesystems/affs.txt +++ b/Documentation/filesystems/affs.txt | |||
@@ -216,4 +216,4 @@ due to an incompatibility with the Amiga floppy controller. | |||
216 | 216 | ||
217 | If you are interested in an Amiga Emulator for Linux, look at | 217 | If you are interested in an Amiga Emulator for Linux, look at |
218 | 218 | ||
219 | http://www-users.informatik.rwth-aachen.de/~crux/uae.html | 219 | http://www.freiburg.linux.de/~uae/ |
diff --git a/Documentation/filesystems/ext2.txt b/Documentation/filesystems/ext2.txt index a8edb376b041..3dd2872416a1 100644 --- a/Documentation/filesystems/ext2.txt +++ b/Documentation/filesystems/ext2.txt | |||
@@ -369,9 +369,8 @@ The kernel source file:/usr/src/linux/fs/ext2/ | |||
369 | e2fsprogs (e2fsck) http://e2fsprogs.sourceforge.net/ | 369 | e2fsprogs (e2fsck) http://e2fsprogs.sourceforge.net/ |
370 | Design & Implementation http://e2fsprogs.sourceforge.net/ext2intro.html | 370 | Design & Implementation http://e2fsprogs.sourceforge.net/ext2intro.html |
371 | Journaling (ext3) ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/ | 371 | Journaling (ext3) ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/ |
372 | Hashed Directories http://kernelnewbies.org/~phillips/htree/ | ||
373 | Filesystem Resizing http://ext2resize.sourceforge.net/ | 372 | Filesystem Resizing http://ext2resize.sourceforge.net/ |
374 | Compression (*) http://www.netspace.net.au/~reiter/e2compr/ | 373 | Compression (*) http://e2compr.sourceforge.net/ |
375 | 374 | ||
376 | Implementations for: | 375 | Implementations for: |
377 | Windows 95/98/NT/2000 http://uranus.it.swin.edu.au/~jn/linux/Explore2fs.htm | 376 | Windows 95/98/NT/2000 http://uranus.it.swin.edu.au/~jn/linux/Explore2fs.htm |
diff --git a/Documentation/floppy.txt b/Documentation/floppy.txt index 6fb10fcd82fb..6ccab88705cb 100644 --- a/Documentation/floppy.txt +++ b/Documentation/floppy.txt | |||
@@ -4,7 +4,7 @@ FAQ list: | |||
4 | ========= | 4 | ========= |
5 | 5 | ||
6 | A FAQ list may be found in the fdutils package (see below), and also | 6 | A FAQ list may be found in the fdutils package (see below), and also |
7 | at http://fdutils.linux.lu/FAQ.html | 7 | at <http://fdutils.linux.lu/faq.html>. |
8 | 8 | ||
9 | 9 | ||
10 | LILO configuration options (Thinkpad users, read this) | 10 | LILO configuration options (Thinkpad users, read this) |
@@ -217,10 +217,10 @@ It also contains additional documentation about the floppy driver. | |||
217 | The latest version can be found at fdutils homepage: | 217 | The latest version can be found at fdutils homepage: |
218 | http://fdutils.linux.lu | 218 | http://fdutils.linux.lu |
219 | 219 | ||
220 | The fdutils-5.4 release can be found at: | 220 | The fdutils releases can be found at: |
221 | http://fdutils.linux.lu/fdutils-5.4.src.tar.gz | 221 | http://fdutils.linux.lu/download.html |
222 | http://www.tux.org/pub/knaff/fdutils/fdutils-5.4.src.tar.gz | 222 | http://www.tux.org/pub/knaff/fdutils/ |
223 | ftp://metalab.unc.edu/pub/Linux/utils/disk-management/fdutils-5.4.src.tar.gz | 223 | ftp://metalab.unc.edu/pub/Linux/utils/disk-management/ |
224 | 224 | ||
225 | Reporting problems about the floppy driver | 225 | Reporting problems about the floppy driver |
226 | ========================================== | 226 | ========================================== |
diff --git a/Documentation/ioctl-number.txt b/Documentation/ioctl-number.txt index 87f4d052e39c..aa7ba00ec082 100644 --- a/Documentation/ioctl-number.txt +++ b/Documentation/ioctl-number.txt | |||
@@ -133,7 +133,7 @@ Code Seq# Include File Comments | |||
133 | 'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system | 133 | 'l' 00-3F linux/tcfs_fs.h transparent cryptographic file system |
134 | <http://mikonos.dia.unisa.it/tcfs> | 134 | <http://mikonos.dia.unisa.it/tcfs> |
135 | 'l' 40-7F linux/udf_fs_i.h in development: | 135 | 'l' 40-7F linux/udf_fs_i.h in development: |
136 | <http://www.trylinux.com/projects/udf/> | 136 | <http://sourceforge.net/projects/linux-udf/> |
137 | 'm' all linux/mtio.h conflict! | 137 | 'm' all linux/mtio.h conflict! |
138 | 'm' all linux/soundcard.h conflict! | 138 | 'm' all linux/soundcard.h conflict! |
139 | 'm' all linux/synclink.h conflict! | 139 | 'm' all linux/synclink.h conflict! |
diff --git a/Documentation/kernel-docs.txt b/Documentation/kernel-docs.txt index cb89fb3b61ef..99d24f2943ee 100644 --- a/Documentation/kernel-docs.txt +++ b/Documentation/kernel-docs.txt | |||
@@ -196,7 +196,7 @@ | |||
196 | 196 | ||
197 | * Title: "Writing Linux Device Drivers" | 197 | * Title: "Writing Linux Device Drivers" |
198 | Author: Michael K. Johnson. | 198 | Author: Michael K. Johnson. |
199 | URL: http://people.redhat.com/johnsonm/devices.html | 199 | URL: http://users.evitech.fi/~tk/rtos/writing_linux_device_d.html |
200 | Keywords: files, VFS, file operations, kernel interface, character | 200 | Keywords: files, VFS, file operations, kernel interface, character |
201 | vs block devices, I/O access, hardware interrupts, DMA, access to | 201 | vs block devices, I/O access, hardware interrupts, DMA, access to |
202 | user memory, memory allocation, timers. | 202 | user memory, memory allocation, timers. |
@@ -284,7 +284,7 @@ | |||
284 | 284 | ||
285 | * Title: "Linux Kernel Module Programming Guide" | 285 | * Title: "Linux Kernel Module Programming Guide" |
286 | Author: Ori Pomerantz. | 286 | Author: Ori Pomerantz. |
287 | URL: http://www.tldp.org/LDP/lkmpg/mpg.html | 287 | URL: http://tldp.org/LDP/lkmpg/2.6/html/index.html |
288 | Keywords: modules, GPL book, /proc, ioctls, system calls, | 288 | Keywords: modules, GPL book, /proc, ioctls, system calls, |
289 | interrupt handlers . | 289 | interrupt handlers . |
290 | Description: Very nice 92 pages GPL book on the topic of modules | 290 | Description: Very nice 92 pages GPL book on the topic of modules |
@@ -292,7 +292,7 @@ | |||
292 | 292 | ||
293 | * Title: "Device File System (devfs) Overview" | 293 | * Title: "Device File System (devfs) Overview" |
294 | Author: Richard Gooch. | 294 | Author: Richard Gooch. |
295 | URL: http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.txt | 295 | URL: http://www.atnf.csiro.au/people/rgooch/linux/docs/devfs.html |
296 | Keywords: filesystem, /dev, devfs, dynamic devices, major/minor | 296 | Keywords: filesystem, /dev, devfs, dynamic devices, major/minor |
297 | allocation, device management. | 297 | allocation, device management. |
298 | Description: Document describing Richard Gooch's controversial | 298 | Description: Document describing Richard Gooch's controversial |
@@ -316,9 +316,8 @@ | |||
316 | 316 | ||
317 | * Title: "The Kernel Hacking HOWTO" | 317 | * Title: "The Kernel Hacking HOWTO" |
318 | Author: Various Talented People, and Rusty. | 318 | Author: Various Talented People, and Rusty. |
319 | URL: | 319 | Location: in kernel tree, Documentation/DocBook/kernel-hacking/ |
320 | http://www.lisoleg.net/doc/Kernel-Hacking-HOWTO/kernel-hacking-HOW | 320 | (must be built as "make {htmldocs | psdocs | pdfdocs}) |
321 | TO.html | ||
322 | Keywords: HOWTO, kernel contexts, deadlock, locking, modules, | 321 | Keywords: HOWTO, kernel contexts, deadlock, locking, modules, |
323 | symbols, return conventions. | 322 | symbols, return conventions. |
324 | Description: From the Introduction: "Please understand that I | 323 | Description: From the Introduction: "Please understand that I |
@@ -332,13 +331,13 @@ | |||
332 | originally written for the 2.3 kernels, but nearly all of it | 331 | originally written for the 2.3 kernels, but nearly all of it |
333 | applies to 2.2 too; 2.0 is slightly different". | 332 | applies to 2.2 too; 2.0 is slightly different". |
334 | 333 | ||
335 | * Title: "ALSA 0.5.0 Developer documentation" | 334 | * Title: "Writing an ALSA Driver" |
336 | Author: Stephan 'Jumpy' Bartels . | 335 | Author: Takashi Iwai <tiwai@suse.de> |
337 | URL: http://www.math.TU-Berlin.de/~sbartels/alsa/ | 336 | URL: http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html |
338 | Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware. | 337 | Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware. |
339 | Description: Advanced Linux Sound Architecture for developers, | 338 | Description: Advanced Linux Sound Architecture for developers, |
340 | both at kernel and user-level sides. Work in progress. ALSA is | 339 | both at kernel and user-level sides. ALSA is the Linux kernel |
341 | supposed to be Linux's next generation sound architecture. | 340 | sound architecture in the 2.6 kernel version. |
342 | 341 | ||
343 | * Title: "Programming Guide for Linux USB Device Drivers" | 342 | * Title: "Programming Guide for Linux USB Device Drivers" |
344 | Author: Detlef Fliegl. | 343 | Author: Detlef Fliegl. |
@@ -369,8 +368,8 @@ | |||
369 | filesystems, IPC and Networking Code. | 368 | filesystems, IPC and Networking Code. |
370 | 369 | ||
371 | * Title: "Linux Kernel Mailing List Glossary" | 370 | * Title: "Linux Kernel Mailing List Glossary" |
372 | Author: John Levon. | 371 | Author: various |
373 | URL: http://www.movement.uklinux.net/glossary.html | 372 | URL: http://kernelnewbies.org/glossary/ |
374 | Keywords: glossary, terms, linux-kernel. | 373 | Keywords: glossary, terms, linux-kernel. |
375 | Description: From the introduction: "This glossary is intended as | 374 | Description: From the introduction: "This glossary is intended as |
376 | a brief description of some of the acronyms and terms you may hear | 375 | a brief description of some of the acronyms and terms you may hear |
@@ -378,9 +377,8 @@ | |||
378 | 377 | ||
379 | * Title: "Linux Kernel Locking HOWTO" | 378 | * Title: "Linux Kernel Locking HOWTO" |
380 | Author: Various Talented People, and Rusty. | 379 | Author: Various Talented People, and Rusty. |
381 | URL: | 380 | Location: in kernel tree, Documentation/DocBook/kernel-locking/ |
382 | http://netfilter.kernelnotes.org/unreliable-guides/kernel-locking- | 381 | (must be built as "make {htmldocs | psdocs | pdfdocs}) |
383 | HOWTO.html | ||
384 | Keywords: locks, locking, spinlock, semaphore, atomic, race | 382 | Keywords: locks, locking, spinlock, semaphore, atomic, race |
385 | condition, bottom halves, tasklets, softirqs. | 383 | condition, bottom halves, tasklets, softirqs. |
386 | Description: The title says it all: document describing the | 384 | Description: The title says it all: document describing the |
@@ -490,7 +488,7 @@ | |||
490 | 488 | ||
491 | * Title: "Get those boards talking under Linux." | 489 | * Title: "Get those boards talking under Linux." |
492 | Author: Alex Ivchenko. | 490 | Author: Alex Ivchenko. |
493 | URL: http://www.ednmag.com/ednmag/reg/2000/06222000/13df2.htm | 491 | URL: http://www.edn.com/article/CA46968.html |
494 | Keywords: data-acquisition boards, drivers, modules, interrupts, | 492 | Keywords: data-acquisition boards, drivers, modules, interrupts, |
495 | memory allocation. | 493 | memory allocation. |
496 | Description: Article written for people wishing to make their data | 494 | Description: Article written for people wishing to make their data |
@@ -498,7 +496,7 @@ | |||
498 | overview on writing drivers, from the naming of functions to | 496 | overview on writing drivers, from the naming of functions to |
499 | interrupt handling. | 497 | interrupt handling. |
500 | Notes: Two-parts article. Part II is at | 498 | Notes: Two-parts article. Part II is at |
501 | http://www.ednmag.com/ednmag/reg/2000/07062000/14df.htm | 499 | URL: http://www.edn.com/article/CA46998.html |
502 | 500 | ||
503 | * Title: "Linux PCMCIA Programmer's Guide" | 501 | * Title: "Linux PCMCIA Programmer's Guide" |
504 | Author: David Hinds. | 502 | Author: David Hinds. |
@@ -529,7 +527,7 @@ | |||
529 | definitive guide for hackers, virus coders and system | 527 | definitive guide for hackers, virus coders and system |
530 | administrators." | 528 | administrators." |
531 | Author: pragmatic/THC. | 529 | Author: pragmatic/THC. |
532 | URL: http://packetstorm.securify.com/groups/thc/LKM_HACKING.html | 530 | URL: http://packetstormsecurity.org/docs/hack/LKM_HACKING.html |
533 | Keywords: syscalls, intercept, hide, abuse, symbol table. | 531 | Keywords: syscalls, intercept, hide, abuse, symbol table. |
534 | Description: Interesting paper on how to abuse the Linux kernel in | 532 | Description: Interesting paper on how to abuse the Linux kernel in |
535 | order to intercept and modify syscalls, make | 533 | order to intercept and modify syscalls, make |
@@ -537,8 +535,7 @@ | |||
537 | write kernel modules based virus... and solutions for admins to | 535 | write kernel modules based virus... and solutions for admins to |
538 | avoid all those abuses. | 536 | avoid all those abuses. |
539 | Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x | 537 | Notes: For 2.0.x kernels. Gives guidances to port it to 2.2.x |
540 | kernels. Also available in txt format at | 538 | kernels. |
541 | http://www.blacknemesis.org/hacking/txt/cllkm.txt | ||
542 | 539 | ||
543 | BOOKS: (Not on-line) | 540 | BOOKS: (Not on-line) |
544 | 541 | ||
@@ -557,7 +554,17 @@ | |||
557 | ISBN: 0-59600-008-1 | 554 | ISBN: 0-59600-008-1 |
558 | Notes: Further information in | 555 | Notes: Further information in |
559 | http://www.oreilly.com/catalog/linuxdrive2/ | 556 | http://www.oreilly.com/catalog/linuxdrive2/ |
560 | 557 | ||
558 | * Title: "Linux Device Drivers, 3nd Edition" | ||
559 | Authors: Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman | ||
560 | Publisher: O'Reilly & Associates. | ||
561 | Date: 2005. | ||
562 | Pages: 636. | ||
563 | ISBN: 0-596-00590-3 | ||
564 | Notes: Further information in | ||
565 | http://www.oreilly.com/catalog/linuxdrive3/ | ||
566 | PDF format, URL: http://lwn.net/Kernel/LDD3/ | ||
567 | |||
561 | * Title: "Linux Kernel Internals" | 568 | * Title: "Linux Kernel Internals" |
562 | Author: Michael Beck. | 569 | Author: Michael Beck. |
563 | Publisher: Addison-Wesley. | 570 | Publisher: Addison-Wesley. |
@@ -766,12 +773,15 @@ | |||
766 | documents, FAQs... | 773 | documents, FAQs... |
767 | 774 | ||
768 | * Name: "linux-kernel mailing list archives and search engines" | 775 | * Name: "linux-kernel mailing list archives and search engines" |
776 | URL: http://vger.kernel.org/vger-lists.html | ||
769 | URL: http://www.uwsg.indiana.edu/hypermail/linux/kernel/index.html | 777 | URL: http://www.uwsg.indiana.edu/hypermail/linux/kernel/index.html |
770 | URL: http://www.kernelnotes.org/lnxlists/linux-kernel/ | 778 | URL: http://marc.theaimsgroup.com/?l=linux-kernel |
771 | URL: http://www.geocrawler.com | 779 | URL: http://groups.google.com/group/mlist.linux.kernel |
780 | URL: http://www.cs.helsinki.fi/linux/linux-kernel/ | ||
781 | URL: http://www.lib.uaa.alaska.edu/linux-kernel/ | ||
772 | Keywords: linux-kernel, archives, search. | 782 | Keywords: linux-kernel, archives, search. |
773 | Description: Some of the linux-kernel mailing list archivers. If | 783 | Description: Some of the linux-kernel mailing list archivers. If |
774 | you have a better/another one, please let me know. | 784 | you have a better/another one, please let me know. |
775 | _________________________________________________________________ | 785 | _________________________________________________________________ |
776 | 786 | ||
777 | Document last updated on Thu Jun 28 15:09:39 CEST 2001 | 787 | Document last updated on Sat 2005-NOV-19 |
diff --git a/Documentation/mca.txt b/Documentation/mca.txt index 6e32c305c65a..60913354cb7d 100644 --- a/Documentation/mca.txt +++ b/Documentation/mca.txt | |||
@@ -252,7 +252,7 @@ their names here, but I don't have a list handy. Check the MCA Linux | |||
252 | home page (URL below) for a perpetually out-of-date list. | 252 | home page (URL below) for a perpetually out-of-date list. |
253 | 253 | ||
254 | ===================================================================== | 254 | ===================================================================== |
255 | MCA Linux Home Page: http://glycerine.itsmm.uni.edu/mca/ | 255 | MCA Linux Home Page: http://www.dgmicro.com/mca/ |
256 | 256 | ||
257 | Christophe Beauregard | 257 | Christophe Beauregard |
258 | chrisb@truespectra.com | 258 | chrisb@truespectra.com |
diff --git a/Documentation/networking/driver.txt b/Documentation/networking/driver.txt index 11fd0ef5ff57..a9ad58b49cc5 100644 --- a/Documentation/networking/driver.txt +++ b/Documentation/networking/driver.txt | |||
@@ -1,7 +1,4 @@ | |||
1 | Documents about softnet driver issues in general can be found | 1 | Document about softnet driver issues |
2 | at: | ||
3 | |||
4 | http://www.firstfloor.org/~andi/softnet/ | ||
5 | 2 | ||
6 | Transmit path guidelines: | 3 | Transmit path guidelines: |
7 | 4 | ||
diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c index f315d20d3867..545447ac503a 100644 --- a/Documentation/networking/ifenslave.c +++ b/Documentation/networking/ifenslave.c | |||
@@ -693,13 +693,7 @@ static int enslave(char *master_ifname, char *slave_ifname) | |||
693 | /* Older bonding versions would panic if the slave has no IP | 693 | /* Older bonding versions would panic if the slave has no IP |
694 | * address, so get the IP setting from the master. | 694 | * address, so get the IP setting from the master. |
695 | */ | 695 | */ |
696 | res = set_if_addr(master_ifname, slave_ifname); | 696 | set_if_addr(master_ifname, slave_ifname); |
697 | if (res) { | ||
698 | fprintf(stderr, | ||
699 | "Slave '%s': Error: set address failed\n", | ||
700 | slave_ifname); | ||
701 | return res; | ||
702 | } | ||
703 | } else { | 697 | } else { |
704 | res = clear_if_addr(slave_ifname); | 698 | res = clear_if_addr(slave_ifname); |
705 | if (res) { | 699 | if (res) { |
@@ -1085,7 +1079,6 @@ static int set_if_addr(char *master_ifname, char *slave_ifname) | |||
1085 | slave_ifname, ifra[i].req_name, | 1079 | slave_ifname, ifra[i].req_name, |
1086 | strerror(saved_errno)); | 1080 | strerror(saved_errno)); |
1087 | 1081 | ||
1088 | return res; | ||
1089 | } | 1082 | } |
1090 | 1083 | ||
1091 | ipaddr = ifr.ifr_addr.sa_data; | 1084 | ipaddr = ifr.ifr_addr.sa_data; |
diff --git a/Documentation/networking/iphase.txt b/Documentation/networking/iphase.txt index 39ccb8595bf1..493203a080a8 100644 --- a/Documentation/networking/iphase.txt +++ b/Documentation/networking/iphase.txt | |||
@@ -22,7 +22,7 @@ The features and limitations of this driver are as follows: | |||
22 | - All variants of Interphase ATM PCI (i)Chip adapter cards are supported, | 22 | - All variants of Interphase ATM PCI (i)Chip adapter cards are supported, |
23 | including x575 (OC3, control memory 128K , 512K and packet memory 128K, | 23 | including x575 (OC3, control memory 128K , 512K and packet memory 128K, |
24 | 512K and 1M), x525 (UTP25) and x531 (DS3 and E3). See | 24 | 512K and 1M), x525 (UTP25) and x531 (DS3 and E3). See |
25 | http://www.iphase.com/products/ClassSheet.cfm?ClassID=ATM | 25 | http://www.iphase.com/site/iphase-web/?epi_menuItemID=e196f04b4b3b40502f150882e21046a0 |
26 | for details. | 26 | for details. |
27 | - Only x86 platforms are supported. | 27 | - Only x86 platforms are supported. |
28 | - SMP is supported. | 28 | - SMP is supported. |
diff --git a/Documentation/networking/irda.txt b/Documentation/networking/irda.txt index 9e5b8e66d6a5..bff26c138be6 100644 --- a/Documentation/networking/irda.txt +++ b/Documentation/networking/irda.txt | |||
@@ -3,12 +3,8 @@ of the IrDA Utilities. More detailed information about these and associated | |||
3 | programs can be found on http://irda.sourceforge.net/ | 3 | programs can be found on http://irda.sourceforge.net/ |
4 | 4 | ||
5 | For more information about how to use the IrDA protocol stack, see the | 5 | For more information about how to use the IrDA protocol stack, see the |
6 | Linux Infared HOWTO (http://www.tuxmobil.org/Infrared-HOWTO/Infrared-HOWTO.html) | 6 | Linux Infrared HOWTO by Werner Heuser <wehe@tuxmobil.org>: |
7 | by Werner Heuser <wehe@tuxmobil.org> | 7 | <http://www.tuxmobil.org/Infrared-HOWTO/Infrared-HOWTO.html> |
8 | 8 | ||
9 | There is an active mailing list for discussing Linux-IrDA matters called | 9 | There is an active mailing list for discussing Linux-IrDA matters called |
10 | irda-users@lists.sourceforge.net | 10 | irda-users@lists.sourceforge.net |
11 | |||
12 | |||
13 | |||
14 | |||
diff --git a/Documentation/networking/ray_cs.txt b/Documentation/networking/ray_cs.txt index b1def00bc4a3..5427f8c7df95 100644 --- a/Documentation/networking/ray_cs.txt +++ b/Documentation/networking/ray_cs.txt | |||
@@ -29,8 +29,7 @@ with nondefault parameters, they can be edited in | |||
29 | will find them all. | 29 | will find them all. |
30 | 30 | ||
31 | Information on card services is available at: | 31 | Information on card services is available at: |
32 | ftp://hyper.stanford.edu/pub/pcmcia/doc | 32 | http://pcmcia-cs.sourceforge.net/ |
33 | http://hyper.stanford.edu/HyperNews/get/pcmcia/home.html | ||
34 | 33 | ||
35 | 34 | ||
36 | Card services user programs are still required for PCMCIA devices. | 35 | Card services user programs are still required for PCMCIA devices. |
diff --git a/Documentation/networking/vortex.txt b/Documentation/networking/vortex.txt index 80e1cb19609f..3759acf95b29 100644 --- a/Documentation/networking/vortex.txt +++ b/Documentation/networking/vortex.txt | |||
@@ -11,7 +11,7 @@ The driver was written by Donald Becker <becker@scyld.com> | |||
11 | Don is no longer the prime maintainer of this version of the driver. | 11 | Don is no longer the prime maintainer of this version of the driver. |
12 | Please report problems to one or more of: | 12 | Please report problems to one or more of: |
13 | 13 | ||
14 | Andrew Morton <andrewm@uow.edu.au> | 14 | Andrew Morton <akpm@osdl.org> |
15 | Netdev mailing list <netdev@vger.kernel.org> | 15 | Netdev mailing list <netdev@vger.kernel.org> |
16 | Linux kernel mailing list <linux-kernel@vger.kernel.org> | 16 | Linux kernel mailing list <linux-kernel@vger.kernel.org> |
17 | 17 | ||
@@ -274,24 +274,24 @@ Details of the device driver implementation are at the top of the source file. | |||
274 | 274 | ||
275 | Additional documentation is available at Don Becker's Linux Drivers site: | 275 | Additional documentation is available at Don Becker's Linux Drivers site: |
276 | 276 | ||
277 | http://www.scyld.com/network/vortex.html | 277 | http://www.scyld.com/vortex.html |
278 | 278 | ||
279 | Donald Becker's driver development site: | 279 | Donald Becker's driver development site: |
280 | 280 | ||
281 | http://www.scyld.com/network | 281 | http://www.scyld.com/network.html |
282 | 282 | ||
283 | Donald's vortex-diag program is useful for inspecting the NIC's state: | 283 | Donald's vortex-diag program is useful for inspecting the NIC's state: |
284 | 284 | ||
285 | http://www.scyld.com/diag/#pci-diags | 285 | http://www.scyld.com/ethercard_diag.html |
286 | 286 | ||
287 | Donald's mii-diag program may be used for inspecting and manipulating | 287 | Donald's mii-diag program may be used for inspecting and manipulating |
288 | the NIC's Media Independent Interface subsystem: | 288 | the NIC's Media Independent Interface subsystem: |
289 | 289 | ||
290 | http://www.scyld.com/diag/#mii-diag | 290 | http://www.scyld.com/ethercard_diag.html#mii-diag |
291 | 291 | ||
292 | Donald's wake-on-LAN page: | 292 | Donald's wake-on-LAN page: |
293 | 293 | ||
294 | http://www.scyld.com/expert/wake-on-lan.html | 294 | http://www.scyld.com/wakeonlan.html |
295 | 295 | ||
296 | 3Com's documentation for many NICs, including the ones supported by | 296 | 3Com's documentation for many NICs, including the ones supported by |
297 | this driver is available at | 297 | this driver is available at |
@@ -305,7 +305,7 @@ this driver is available at | |||
305 | Driver updates and a detailed changelog for the modifications which | 305 | Driver updates and a detailed changelog for the modifications which |
306 | were made for the 2.3/2,4 series kernel is available at | 306 | were made for the 2.3/2,4 series kernel is available at |
307 | 307 | ||
308 | http://www.uow.edu.au/~andrewm/linux/#3c59x-2.3 | 308 | http://www.zip.com.au/~akpm/linux/#3c59x-bc |
309 | 309 | ||
310 | 310 | ||
311 | Autonegotiation notes | 311 | Autonegotiation notes |
@@ -434,8 +434,8 @@ steps you should take: | |||
434 | send all logs to the maintainer. | 434 | send all logs to the maintainer. |
435 | 435 | ||
436 | 3) Download you card's diagnostic tool from Donald | 436 | 3) Download you card's diagnostic tool from Donald |
437 | Backer's website http://www.scyld.com/diag. Download | 437 | Becker's website <http://www.scyld.com/ethercard_diag.html>. |
438 | mii-diag.c as well. Build these. | 438 | Download mii-diag.c as well. Build these. |
439 | 439 | ||
440 | a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is | 440 | a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is |
441 | working correctly. Save the output. | 441 | working correctly. Save the output. |
@@ -443,8 +443,8 @@ steps you should take: | |||
443 | b) Run the above commands when the card is malfunctioning. Send | 443 | b) Run the above commands when the card is malfunctioning. Send |
444 | both sets of output. | 444 | both sets of output. |
445 | 445 | ||
446 | Finally, please be patient and be prepared to do some work. You may end up working on | 446 | Finally, please be patient and be prepared to do some work. You may |
447 | this problem for a week or more as the maintainer asks more questions, asks for more | 447 | end up working on this problem for a week or more as the maintainer |
448 | tests, asks for patches to be applied, etc. At the end of it all, the problem may even | 448 | asks more questions, asks for more tests, asks for patches to be |
449 | remain unresolved. | 449 | applied, etc. At the end of it all, the problem may even remain |
450 | 450 | unresolved. | |
diff --git a/Documentation/power/pci.txt b/Documentation/power/pci.txt index 6fc9d511fc39..73fc87e5dc38 100644 --- a/Documentation/power/pci.txt +++ b/Documentation/power/pci.txt | |||
@@ -335,5 +335,5 @@ this on the whole. | |||
335 | PCI Local Bus Specification | 335 | PCI Local Bus Specification |
336 | PCI Bus Power Management Interface Specification | 336 | PCI Bus Power Management Interface Specification |
337 | 337 | ||
338 | http://pcisig.org | 338 | http://www.pcisig.com |
339 | 339 | ||
diff --git a/Documentation/scsi/ibmmca.txt b/Documentation/scsi/ibmmca.txt index 2ffb3ae0ef4d..d16ce5b540f4 100644 --- a/Documentation/scsi/ibmmca.txt +++ b/Documentation/scsi/ibmmca.txt | |||
@@ -1108,7 +1108,7 @@ | |||
1108 | A: You have to activate MCA bus support, first. | 1108 | A: You have to activate MCA bus support, first. |
1109 | Q: Where can I find the latest info about this driver? | 1109 | Q: Where can I find the latest info about this driver? |
1110 | A: See the file MAINTAINERS for the current WWW-address, which offers | 1110 | A: See the file MAINTAINERS for the current WWW-address, which offers |
1111 | updates, info and Q/A lists. At this files' origin, the webaddress | 1111 | updates, info and Q/A lists. At this file's origin, the webaddress |
1112 | was: http://www.uni-mainz.de/~langm000/linux.html | 1112 | was: http://www.uni-mainz.de/~langm000/linux.html |
1113 | Q: My SCSI-adapter is not recognized by the driver, what can I do? | 1113 | Q: My SCSI-adapter is not recognized by the driver, what can I do? |
1114 | A: Just force it to be recognized by kernel parameters. See section 5.1. | 1114 | A: Just force it to be recognized by kernel parameters. See section 5.1. |
@@ -1248,7 +1248,7 @@ | |||
1248 | -------------------- | 1248 | -------------------- |
1249 | The address of the IBM SCSI-subsystem supporting WWW-page is: | 1249 | The address of the IBM SCSI-subsystem supporting WWW-page is: |
1250 | 1250 | ||
1251 | http://www.uni-mainz.de/~langm000/linux.html | 1251 | http://www.staff.uni-mainz.de/mlang/linux.html |
1252 | 1252 | ||
1253 | Here you can find info about the background of this driver, patches, | 1253 | Here you can find info about the background of this driver, patches, |
1254 | troubleshooting support, news and a bugreport form. Please check that | 1254 | troubleshooting support, news and a bugreport form. Please check that |
diff --git a/Documentation/usb/ibmcam.txt b/Documentation/usb/ibmcam.txt index ce2f21a3eac4..c25003644131 100644 --- a/Documentation/usb/ibmcam.txt +++ b/Documentation/usb/ibmcam.txt | |||
@@ -28,8 +28,8 @@ SUPPORTED CAMERAS: | |||
28 | Xirlink "C-It" camera, also known as "IBM PC Camera". | 28 | Xirlink "C-It" camera, also known as "IBM PC Camera". |
29 | The device uses proprietary ASIC (and compression method); | 29 | The device uses proprietary ASIC (and compression method); |
30 | it is manufactured by Xirlink. See http://www.xirlink.com/ | 30 | it is manufactured by Xirlink. See http://www.xirlink.com/ |
31 | http://www.ibmpccamera.com or http://www.c-itnow.com/ for | 31 | (renamed to http://www.veo.com), http://www.ibmpccamera.com, |
32 | details and pictures. | 32 | or http://www.c-itnow.com/ for details and pictures. |
33 | 33 | ||
34 | This very chipset ("X Chip", as marked at the factory) | 34 | This very chipset ("X Chip", as marked at the factory) |
35 | is used in several other cameras, and they are supported | 35 | is used in several other cameras, and they are supported |
diff --git a/Documentation/usb/ov511.txt b/Documentation/usb/ov511.txt index e1974ec8217e..a7fc0432bff1 100644 --- a/Documentation/usb/ov511.txt +++ b/Documentation/usb/ov511.txt | |||
@@ -22,8 +22,8 @@ WHAT YOU NEED: | |||
22 | http://www.ovt.com/omniusbp.html | 22 | http://www.ovt.com/omniusbp.html |
23 | 23 | ||
24 | - A Video4Linux compatible frame grabber program (I recommend vidcat and xawtv) | 24 | - A Video4Linux compatible frame grabber program (I recommend vidcat and xawtv) |
25 | vidcat is part of the w3cam package: http://www.hdk-berlin.de/~rasca/w3cam/ | 25 | vidcat is part of the w3cam package: http://mpx.freeshell.net/ |
26 | xawtv is available at: http://www.in-berlin.de/User/kraxel/xawtv.html | 26 | xawtv is available at: http://linux.bytesex.org/xawtv/ |
27 | 27 | ||
28 | HOW TO USE IT: | 28 | HOW TO USE IT: |
29 | 29 | ||
diff --git a/Documentation/usb/rio.txt b/Documentation/usb/rio.txt index 0aa79ab0088c..ab21db454694 100644 --- a/Documentation/usb/rio.txt +++ b/Documentation/usb/rio.txt | |||
@@ -46,9 +46,9 @@ Contact information: | |||
46 | -------------------- | 46 | -------------------- |
47 | 47 | ||
48 | The main page for the project is hosted at sourceforge.net in the following | 48 | The main page for the project is hosted at sourceforge.net in the following |
49 | address: http://rio500.sourceforge.net You can also go to the sourceforge | 49 | URL: <http://rio500.sourceforge.net>. You can also go to the project's |
50 | project page at: http://sourceforge.net/project/?group_id=1944 There is | 50 | sourceforge home page at: <http://sourceforge.net/projects/rio500/>. |
51 | also a mailing list: rio500-users@lists.sourceforge.net | 51 | There is also a mailing list: rio500-users@lists.sourceforge.net |
52 | 52 | ||
53 | Authors: | 53 | Authors: |
54 | ------- | 54 | ------- |
diff --git a/Documentation/video4linux/zr36120.txt b/Documentation/video4linux/zr36120.txt index 4af6c52595eb..5d6357eefde4 100644 --- a/Documentation/video4linux/zr36120.txt +++ b/Documentation/video4linux/zr36120.txt | |||
@@ -76,8 +76,11 @@ activates the GRAB bit. A few ms later the VSYNC (re-)rises and | |||
76 | the zoran starts to work on a new and freshly broadcasted frame.... | 76 | the zoran starts to work on a new and freshly broadcasted frame.... |
77 | 77 | ||
78 | For pointers I used the specs of both chips. Below are the URLs: | 78 | For pointers I used the specs of both chips. Below are the URLs: |
79 | http://www.zoran.com/ftp/download/devices/pci/ZR36120/36120data.pdf | 79 | http://www.zoran.com/ftp/download/devices/pci/ZR36120/36120data.pdf |
80 | http://www-us.semiconductor.philips.com/acrobat/datasheets/SAA_7110_A_1.pdf | 80 | http://www-us.semiconductor.philips.com/acrobat/datasheets/SAA_7110_A_1.pdf |
81 | Some alternatives for the Philips SAA 7110 datasheet are: | ||
82 | http://www.datasheetcatalog.com/datasheets_pdf/S/A/A/7/SAA7110.shtml | ||
83 | http://www.datasheetarchive.com/search.php?search=SAA7110&sType=part | ||
81 | 84 | ||
82 | The documentation has very little on absolute numbers or timings | 85 | The documentation has very little on absolute numbers or timings |
83 | needed for the various modes/resolutions, but there are other | 86 | needed for the various modes/resolutions, but there are other |
diff --git a/MAINTAINERS b/MAINTAINERS index c5cf7d7e58b2..a74a0c726134 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -58,7 +58,7 @@ P: Person | |||
58 | M: Mail patches to | 58 | M: Mail patches to |
59 | L: Mailing list that is relevant to this area | 59 | L: Mailing list that is relevant to this area |
60 | W: Web-page with status/info | 60 | W: Web-page with status/info |
61 | T: SCM tree type and URL. Type is one of: git, hg, quilt. | 61 | T: SCM tree type and location. Type is one of: git, hg, quilt. |
62 | S: Status, one of the following: | 62 | S: Status, one of the following: |
63 | 63 | ||
64 | Supported: Someone is actually paid to look after this. | 64 | Supported: Someone is actually paid to look after this. |
@@ -227,6 +227,7 @@ AGPGART DRIVER | |||
227 | P: Dave Jones | 227 | P: Dave Jones |
228 | M: davej@codemonkey.org.uk | 228 | M: davej@codemonkey.org.uk |
229 | W: http://www.codemonkey.org.uk/projects/agp/ | 229 | W: http://www.codemonkey.org.uk/projects/agp/ |
230 | T: git kernel.org:/pub/scm/linux/kernel/git/davej/agpgart.git | ||
230 | S: Maintained | 231 | S: Maintained |
231 | 232 | ||
232 | AHA152X SCSI DRIVER | 233 | AHA152X SCSI DRIVER |
@@ -384,6 +385,7 @@ P: David Woodhouse | |||
384 | M: dwmw2@infradead.org | 385 | M: dwmw2@infradead.org |
385 | L: linux-audit@redhat.com | 386 | L: linux-audit@redhat.com |
386 | W: http://people.redhat.com/sgrubb/audit/ | 387 | W: http://people.redhat.com/sgrubb/audit/ |
388 | T: git kernel.org:/pub/scm/linux/kernel/git/dwmw2/audit-2.6.git | ||
387 | S: Maintained | 389 | S: Maintained |
388 | 390 | ||
389 | AX.25 NETWORK LAYER | 391 | AX.25 NETWORK LAYER |
@@ -432,6 +434,7 @@ L: bluez-devel@lists.sf.net | |||
432 | W: http://bluez.sf.net | 434 | W: http://bluez.sf.net |
433 | W: http://www.bluez.org | 435 | W: http://www.bluez.org |
434 | W: http://www.holtmann.org/linux/bluetooth/ | 436 | W: http://www.holtmann.org/linux/bluetooth/ |
437 | T: git kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git | ||
435 | S: Maintained | 438 | S: Maintained |
436 | 439 | ||
437 | BLUETOOTH RFCOMM LAYER | 440 | BLUETOOTH RFCOMM LAYER |
@@ -547,6 +550,7 @@ P: Steve French | |||
547 | M: sfrench@samba.org | 550 | M: sfrench@samba.org |
548 | L: samba-technical@lists.samba.org | 551 | L: samba-technical@lists.samba.org |
549 | W: http://us1.samba.org/samba/Linux_CIFS_client.html | 552 | W: http://us1.samba.org/samba/Linux_CIFS_client.html |
553 | T: git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git | ||
550 | S: Supported | 554 | S: Supported |
551 | 555 | ||
552 | CIRRUS LOGIC GENERIC FBDEV DRIVER | 556 | CIRRUS LOGIC GENERIC FBDEV DRIVER |
@@ -608,6 +612,7 @@ P: Dave Jones | |||
608 | M: davej@codemonkey.org.uk | 612 | M: davej@codemonkey.org.uk |
609 | L: cpufreq@lists.linux.org.uk | 613 | L: cpufreq@lists.linux.org.uk |
610 | W: http://www.codemonkey.org.uk/projects/cpufreq/ | 614 | W: http://www.codemonkey.org.uk/projects/cpufreq/ |
615 | T: git kernel.org/pub/scm/linux/kernel/davej/cpufreq.git | ||
611 | S: Maintained | 616 | S: Maintained |
612 | 617 | ||
613 | CPUID/MSR DRIVER | 618 | CPUID/MSR DRIVER |
@@ -641,6 +646,7 @@ M: herbert@gondor.apana.org.au | |||
641 | P: David S. Miller | 646 | P: David S. Miller |
642 | M: davem@davemloft.net | 647 | M: davem@davemloft.net |
643 | L: linux-crypto@vger.kernel.org | 648 | L: linux-crypto@vger.kernel.org |
649 | T: git kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6.git | ||
644 | S: Maintained | 650 | S: Maintained |
645 | 651 | ||
646 | CYBERPRO FB DRIVER | 652 | CYBERPRO FB DRIVER |
@@ -1185,6 +1191,7 @@ P: Bartlomiej Zolnierkiewicz | |||
1185 | M: B.Zolnierkiewicz@elka.pw.edu.pl | 1191 | M: B.Zolnierkiewicz@elka.pw.edu.pl |
1186 | L: linux-kernel@vger.kernel.org | 1192 | L: linux-kernel@vger.kernel.org |
1187 | L: linux-ide@vger.kernel.org | 1193 | L: linux-ide@vger.kernel.org |
1194 | T: git kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git | ||
1188 | S: Maintained | 1195 | S: Maintained |
1189 | 1196 | ||
1190 | IDE/ATAPI CDROM DRIVER | 1197 | IDE/ATAPI CDROM DRIVER |
@@ -1279,6 +1286,7 @@ P: Vojtech Pavlik | |||
1279 | M: vojtech@suse.cz | 1286 | M: vojtech@suse.cz |
1280 | L: linux-input@atrey.karlin.mff.cuni.cz | 1287 | L: linux-input@atrey.karlin.mff.cuni.cz |
1281 | L: linux-joystick@atrey.karlin.mff.cuni.cz | 1288 | L: linux-joystick@atrey.karlin.mff.cuni.cz |
1289 | T: git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git | ||
1282 | S: Maintained | 1290 | S: Maintained |
1283 | 1291 | ||
1284 | INOTIFY | 1292 | INOTIFY |
@@ -1392,6 +1400,7 @@ P: Kai Germaschewski | |||
1392 | M: kai.germaschewski@gmx.de | 1400 | M: kai.germaschewski@gmx.de |
1393 | L: isdn4linux@listserv.isdn4linux.de | 1401 | L: isdn4linux@listserv.isdn4linux.de |
1394 | W: http://www.isdn4linux.de | 1402 | W: http://www.isdn4linux.de |
1403 | T: git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git | ||
1395 | S: Maintained | 1404 | S: Maintained |
1396 | 1405 | ||
1397 | ISDN SUBSYSTEM (Eicon active card driver) | 1406 | ISDN SUBSYSTEM (Eicon active card driver) |
@@ -1420,6 +1429,7 @@ P: Dave Kleikamp | |||
1420 | M: shaggy@austin.ibm.com | 1429 | M: shaggy@austin.ibm.com |
1421 | L: jfs-discussion@lists.sourceforge.net | 1430 | L: jfs-discussion@lists.sourceforge.net |
1422 | W: http://jfs.sourceforge.net/ | 1431 | W: http://jfs.sourceforge.net/ |
1432 | T: git kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6.git | ||
1423 | S: Supported | 1433 | S: Supported |
1424 | 1434 | ||
1425 | KCONFIG | 1435 | KCONFIG |
@@ -1534,6 +1544,7 @@ P: Paul Mackerras | |||
1534 | M: paulus@samba.org | 1544 | M: paulus@samba.org |
1535 | W: http://www.penguinppc.org/ | 1545 | W: http://www.penguinppc.org/ |
1536 | L: linuxppc-dev@ozlabs.org | 1546 | L: linuxppc-dev@ozlabs.org |
1547 | T: git kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc.git | ||
1537 | S: Supported | 1548 | S: Supported |
1538 | 1549 | ||
1539 | LINUX FOR POWER MACINTOSH | 1550 | LINUX FOR POWER MACINTOSH |
@@ -1601,6 +1612,7 @@ P: Chris Wright | |||
1601 | M: chrisw@osdl.org | 1612 | M: chrisw@osdl.org |
1602 | L: linux-security-module@wirex.com | 1613 | L: linux-security-module@wirex.com |
1603 | W: http://lsm.immunix.org | 1614 | W: http://lsm.immunix.org |
1615 | T: git kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git | ||
1604 | S: Supported | 1616 | S: Supported |
1605 | 1617 | ||
1606 | LM83 HARDWARE MONITOR DRIVER | 1618 | LM83 HARDWARE MONITOR DRIVER |
@@ -1695,6 +1707,7 @@ P: David Woodhouse | |||
1695 | M: dwmw2@infradead.org | 1707 | M: dwmw2@infradead.org |
1696 | W: http://www.linux-mtd.infradead.org/ | 1708 | W: http://www.linux-mtd.infradead.org/ |
1697 | L: linux-mtd@lists.infradead.org | 1709 | L: linux-mtd@lists.infradead.org |
1710 | T: git kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6.git | ||
1698 | S: Maintained | 1711 | S: Maintained |
1699 | 1712 | ||
1700 | MICROTEK X6 SCANNER | 1713 | MICROTEK X6 SCANNER |
@@ -1815,6 +1828,7 @@ M: yoshfuji@linux-ipv6.org | |||
1815 | P: Patrick McHardy | 1828 | P: Patrick McHardy |
1816 | M: kaber@coreworks.de | 1829 | M: kaber@coreworks.de |
1817 | L: netdev@vger.kernel.org | 1830 | L: netdev@vger.kernel.org |
1831 | T: git kernel.org:/pub/scm/linux/kernel/davem/net-2.6.git | ||
1818 | S: Maintained | 1832 | S: Maintained |
1819 | 1833 | ||
1820 | IPVS | 1834 | IPVS |
@@ -1866,6 +1880,7 @@ M: aia21@cantab.net | |||
1866 | L: linux-ntfs-dev@lists.sourceforge.net | 1880 | L: linux-ntfs-dev@lists.sourceforge.net |
1867 | L: linux-kernel@vger.kernel.org | 1881 | L: linux-kernel@vger.kernel.org |
1868 | W: http://linux-ntfs.sf.net/ | 1882 | W: http://linux-ntfs.sf.net/ |
1883 | T: git kernel.org:/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git | ||
1869 | S: Maintained | 1884 | S: Maintained |
1870 | 1885 | ||
1871 | NVIDIA (RIVA) FRAMEBUFFER DRIVER | 1886 | NVIDIA (RIVA) FRAMEBUFFER DRIVER |
@@ -2389,6 +2404,7 @@ P: Anton Blanchard | |||
2389 | M: anton@samba.org | 2404 | M: anton@samba.org |
2390 | L: sparclinux@vger.kernel.org | 2405 | L: sparclinux@vger.kernel.org |
2391 | L: ultralinux@vger.kernel.org | 2406 | L: ultralinux@vger.kernel.org |
2407 | T: git kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6.git | ||
2392 | S: Maintained | 2408 | S: Maintained |
2393 | 2409 | ||
2394 | SHARP LH SUPPORT (LH7952X & LH7A40X) | 2410 | SHARP LH SUPPORT (LH7952X & LH7A40X) |
@@ -2527,6 +2543,7 @@ P: Adrian Bunk | |||
2527 | M: trivial@kernel.org | 2543 | M: trivial@kernel.org |
2528 | L: linux-kernel@vger.kernel.org | 2544 | L: linux-kernel@vger.kernel.org |
2529 | W: http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/ | 2545 | W: http://www.kernel.org/pub/linux/kernel/people/bunk/trivial/ |
2546 | T: git kernel.org:/pub/scm/linux/kernel/git/bunk/trivial.git | ||
2530 | S: Maintained | 2547 | S: Maintained |
2531 | 2548 | ||
2532 | TMS380 TOKEN-RING NETWORK DRIVER | 2549 | TMS380 TOKEN-RING NETWORK DRIVER |
@@ -2860,6 +2877,7 @@ P: Latchesar Ionkov | |||
2860 | M: lucho@ionkov.net | 2877 | M: lucho@ionkov.net |
2861 | L: v9fs-developer@lists.sourceforge.net | 2878 | L: v9fs-developer@lists.sourceforge.net |
2862 | W: http://v9fs.sf.net | 2879 | W: http://v9fs.sf.net |
2880 | T: git kernel.org:/pub/scm/linux/kernel/ericvh/v9fs-devel.git | ||
2863 | S: Maintained | 2881 | S: Maintained |
2864 | 2882 | ||
2865 | VIDEO FOR LINUX | 2883 | VIDEO FOR LINUX |
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index 1cb261f225d5..df6c2bcde067 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -393,13 +393,6 @@ void flush_thread(void) | |||
393 | { | 393 | { |
394 | struct task_struct *tsk = current; | 394 | struct task_struct *tsk = current; |
395 | 395 | ||
396 | /* | ||
397 | * Remove function-return probe instances associated with this task | ||
398 | * and put them back on the free list. Do not insert an exit probe for | ||
399 | * this function, it will be disabled by kprobe_flush_task if you do. | ||
400 | */ | ||
401 | kprobe_flush_task(tsk); | ||
402 | |||
403 | memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8); | 396 | memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8); |
404 | memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array)); | 397 | memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array)); |
405 | /* | 398 | /* |
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c index c96bea14b98f..f6bc48da4d2a 100644 --- a/arch/i386/pci/common.c +++ b/arch/i386/pci/common.c | |||
@@ -132,7 +132,7 @@ struct pci_bus * __devinit pcibios_scan_root(int busnum) | |||
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | printk("PCI: Probing PCI hardware (bus %02x)\n", busnum); | 135 | printk(KERN_DEBUG "PCI: Probing PCI hardware (bus %02x)\n", busnum); |
136 | 136 | ||
137 | return pci_scan_bus_parented(NULL, busnum, &pci_root_ops, NULL); | 137 | return pci_scan_bus_parented(NULL, busnum, &pci_root_ops, NULL); |
138 | } | 138 | } |
@@ -144,7 +144,7 @@ static int __init pcibios_init(void) | |||
144 | struct cpuinfo_x86 *c = &boot_cpu_data; | 144 | struct cpuinfo_x86 *c = &boot_cpu_data; |
145 | 145 | ||
146 | if (!raw_pci_ops) { | 146 | if (!raw_pci_ops) { |
147 | printk("PCI: System does not support PCI\n"); | 147 | printk(KERN_WARNING "PCI: System does not support PCI\n"); |
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
150 | 150 | ||
diff --git a/arch/i386/pci/direct.c b/arch/i386/pci/direct.c index 30b7e9b4f6a2..94331d6be7a3 100644 --- a/arch/i386/pci/direct.c +++ b/arch/i386/pci/direct.c | |||
@@ -201,7 +201,7 @@ static int __init pci_sanity_check(struct pci_raw_ops *o) | |||
201 | return 1; | 201 | return 1; |
202 | } | 202 | } |
203 | 203 | ||
204 | DBG("PCI: Sanity check failed\n"); | 204 | DBG(KERN_WARNING "PCI: Sanity check failed\n"); |
205 | return 0; | 205 | return 0; |
206 | } | 206 | } |
207 | 207 | ||
diff --git a/arch/i386/pci/i386.c b/arch/i386/pci/i386.c index 6d6338500c3c..ed2c8c899bd3 100644 --- a/arch/i386/pci/i386.c +++ b/arch/i386/pci/i386.c | |||
@@ -221,6 +221,11 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask) | |||
221 | continue; | 221 | continue; |
222 | 222 | ||
223 | r = &dev->resource[idx]; | 223 | r = &dev->resource[idx]; |
224 | if (!(r->flags & (IORESOURCE_IO | IORESOURCE_MEM))) | ||
225 | continue; | ||
226 | if ((idx == PCI_ROM_RESOURCE) && | ||
227 | (!(r->flags & IORESOURCE_ROM_ENABLE))) | ||
228 | continue; | ||
224 | if (!r->start && r->end) { | 229 | if (!r->start && r->end) { |
225 | printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev)); | 230 | printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", pci_name(dev)); |
226 | return -EINVAL; | 231 | return -EINVAL; |
@@ -230,8 +235,6 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask) | |||
230 | if (r->flags & IORESOURCE_MEM) | 235 | if (r->flags & IORESOURCE_MEM) |
231 | cmd |= PCI_COMMAND_MEMORY; | 236 | cmd |= PCI_COMMAND_MEMORY; |
232 | } | 237 | } |
233 | if (dev->resource[PCI_ROM_RESOURCE].start) | ||
234 | cmd |= PCI_COMMAND_MEMORY; | ||
235 | if (cmd != old_cmd) { | 238 | if (cmd != old_cmd) { |
236 | printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd); | 239 | printk("PCI: Enabling device %s (%04x -> %04x)\n", pci_name(dev), old_cmd, cmd); |
237 | pci_write_config_word(dev, PCI_COMMAND, cmd); | 240 | pci_write_config_word(dev, PCI_COMMAND, cmd); |
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 4305d2ba76f6..2e33665d9c18 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -718,13 +718,6 @@ kernel_thread_helper (int (*fn)(void *), void *arg) | |||
718 | void | 718 | void |
719 | flush_thread (void) | 719 | flush_thread (void) |
720 | { | 720 | { |
721 | /* | ||
722 | * Remove function-return probe instances associated with this task | ||
723 | * and put them back on the free list. Do not insert an exit probe for | ||
724 | * this function, it will be disabled by kprobe_flush_task if you do. | ||
725 | */ | ||
726 | kprobe_flush_task(current); | ||
727 | |||
728 | /* drop floating-point and debug-register state if it exists: */ | 721 | /* drop floating-point and debug-register state if it exists: */ |
729 | current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); | 722 | current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID); |
730 | ia64_drop_fpu(current); | 723 | ia64_drop_fpu(current); |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 98f67c78d1bd..a13eb575f834 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -61,15 +61,17 @@ endif | |||
61 | LDFLAGS_vmlinux := -Bstatic | 61 | LDFLAGS_vmlinux := -Bstatic |
62 | 62 | ||
63 | # The -Iarch/$(ARCH)/include is temporary while we are merging | 63 | # The -Iarch/$(ARCH)/include is temporary while we are merging |
64 | CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include | 64 | CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -Iarch/$(ARCH)/include |
65 | AFLAGS += -Iarch/$(ARCH) | 65 | AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) |
66 | CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe | ||
67 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc | 66 | CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc |
68 | CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 -mmultiple | 67 | CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple |
69 | CFLAGS += $(CFLAGS-y) | 68 | CPPFLAGS += $(CPPFLAGS-y) |
69 | AFLAGS += $(AFLAGS-y) | ||
70 | CFLAGS += -msoft-float -pipe $(CFLAGS-y) | ||
70 | CPP = $(CC) -E $(CFLAGS) | 71 | CPP = $(CC) -E $(CFLAGS) |
71 | # Temporary hack until we have migrated to asm-powerpc | 72 | # Temporary hack until we have migrated to asm-powerpc |
72 | LINUXINCLUDE += -Iarch/$(ARCH)/include | 73 | LINUXINCLUDE-$(CONFIG_PPC32) := -Iarch/$(ARCH)/include |
74 | LINUXINCLUDE += $(LINUXINCLUDE-y) | ||
73 | 75 | ||
74 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ | 76 | CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ |
75 | 77 | ||
@@ -173,11 +175,13 @@ archclean: | |||
173 | 175 | ||
174 | archprepare: checkbin | 176 | archprepare: checkbin |
175 | 177 | ||
178 | ifeq ($(CONFIG_PPC32),y) | ||
176 | # Temporary hack until we have migrated to asm-powerpc | 179 | # Temporary hack until we have migrated to asm-powerpc |
177 | include/asm: arch/$(ARCH)/include/asm | 180 | include/asm: arch/$(ARCH)/include/asm |
178 | arch/$(ARCH)/include/asm: FORCE | 181 | arch/$(ARCH)/include/asm: FORCE |
179 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi | 182 | $(Q)if [ ! -d arch/$(ARCH)/include ]; then mkdir -p arch/$(ARCH)/include; fi |
180 | $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm | 183 | $(Q)ln -fsn $(srctree)/include/asm-$(OLDARCH) arch/$(ARCH)/include/asm |
184 | endif | ||
181 | 185 | ||
182 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output | 186 | # Use the file '.tmp_gas_check' for binutils tests, as gas won't output |
183 | # to stdout and these checks are run even on install targets. | 187 | # to stdout and these checks are run even on install targets. |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index de69fb37c731..a5a7542a8ff3 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -457,7 +457,6 @@ void flush_thread(void) | |||
457 | if (t->flags & _TIF_ABI_PENDING) | 457 | if (t->flags & _TIF_ABI_PENDING) |
458 | t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); | 458 | t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT); |
459 | #endif | 459 | #endif |
460 | kprobe_flush_task(current); | ||
461 | 460 | ||
462 | #ifndef CONFIG_SMP | 461 | #ifndef CONFIG_SMP |
463 | if (last_task_used_math == current) | 462 | if (last_task_used_math == current) |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 0d4d8bec0df4..b44b36e0c293 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -285,8 +285,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, | |||
285 | * It's fine to use that for setting breakpoints in the vDSO code | 285 | * It's fine to use that for setting breakpoints in the vDSO code |
286 | * pages though | 286 | * pages though |
287 | */ | 287 | */ |
288 | vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | | 288 | vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC; |
289 | VM_MAYEXEC | VM_RESERVED; | ||
290 | vma->vm_flags |= mm->def_flags; | 289 | vma->vm_flags |= mm->def_flags; |
291 | vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; | 290 | vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; |
292 | vma->vm_ops = &vdso_vmops; | 291 | vma->vm_ops = &vdso_vmops; |
diff --git a/arch/powerpc/mm/4xx_mmu.c b/arch/powerpc/mm/4xx_mmu.c index b7bcbc232f39..4d006aa1a0d1 100644 --- a/arch/powerpc/mm/4xx_mmu.c +++ b/arch/powerpc/mm/4xx_mmu.c | |||
@@ -110,13 +110,11 @@ unsigned long __init mmu_mapin_ram(void) | |||
110 | pmd_t *pmdp; | 110 | pmd_t *pmdp; |
111 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 111 | unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
112 | 112 | ||
113 | spin_lock(&init_mm.page_table_lock); | ||
114 | pmdp = pmd_offset(pgd_offset_k(v), v); | 113 | pmdp = pmd_offset(pgd_offset_k(v), v); |
115 | pmd_val(*pmdp++) = val; | 114 | pmd_val(*pmdp++) = val; |
116 | pmd_val(*pmdp++) = val; | 115 | pmd_val(*pmdp++) = val; |
117 | pmd_val(*pmdp++) = val; | 116 | pmd_val(*pmdp++) = val; |
118 | pmd_val(*pmdp++) = val; | 117 | pmd_val(*pmdp++) = val; |
119 | spin_unlock(&init_mm.page_table_lock); | ||
120 | 118 | ||
121 | v += LARGE_PAGE_SIZE_16M; | 119 | v += LARGE_PAGE_SIZE_16M; |
122 | p += LARGE_PAGE_SIZE_16M; | 120 | p += LARGE_PAGE_SIZE_16M; |
@@ -127,10 +125,8 @@ unsigned long __init mmu_mapin_ram(void) | |||
127 | pmd_t *pmdp; | 125 | pmd_t *pmdp; |
128 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; | 126 | unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; |
129 | 127 | ||
130 | spin_lock(&init_mm.page_table_lock); | ||
131 | pmdp = pmd_offset(pgd_offset_k(v), v); | 128 | pmdp = pmd_offset(pgd_offset_k(v), v); |
132 | pmd_val(*pmdp) = val; | 129 | pmd_val(*pmdp) = val; |
133 | spin_unlock(&init_mm.page_table_lock); | ||
134 | 130 | ||
135 | v += LARGE_PAGE_SIZE_4M; | 131 | v += LARGE_PAGE_SIZE_4M; |
136 | p += LARGE_PAGE_SIZE_4M; | 132 | p += LARGE_PAGE_SIZE_4M; |
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 426c269e552e..6bc9dbad7dea 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -287,15 +287,15 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas) | |||
287 | 287 | ||
288 | int prepare_hugepage_range(unsigned long addr, unsigned long len) | 288 | int prepare_hugepage_range(unsigned long addr, unsigned long len) |
289 | { | 289 | { |
290 | int err; | 290 | int err = 0; |
291 | 291 | ||
292 | if ( (addr+len) < addr ) | 292 | if ( (addr+len) < addr ) |
293 | return -EINVAL; | 293 | return -EINVAL; |
294 | 294 | ||
295 | if ((addr + len) < 0x100000000UL) | 295 | if (addr < 0x100000000UL) |
296 | err = open_low_hpage_areas(current->mm, | 296 | err = open_low_hpage_areas(current->mm, |
297 | LOW_ESID_MASK(addr, len)); | 297 | LOW_ESID_MASK(addr, len)); |
298 | else | 298 | if ((addr + len) > 0x100000000UL) |
299 | err = open_high_hpage_areas(current->mm, | 299 | err = open_high_hpage_areas(current->mm, |
300 | HTLB_AREA_MASK(addr, len)); | 300 | HTLB_AREA_MASK(addr, len)); |
301 | if (err) { | 301 | if (err) { |
@@ -754,9 +754,7 @@ repeat: | |||
754 | } | 754 | } |
755 | 755 | ||
756 | /* | 756 | /* |
757 | * No need to use ldarx/stdcx here because all who | 757 | * No need to use ldarx/stdcx here |
758 | * might be updating the pte will hold the | ||
759 | * page_table_lock | ||
760 | */ | 758 | */ |
761 | *ptep = __pte(new_pte & ~_PAGE_BUSY); | 759 | *ptep = __pte(new_pte & ~_PAGE_BUSY); |
762 | 760 | ||
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 4bd7b0a70996..ed6ed2e30dac 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -495,7 +495,7 @@ EXPORT_SYMBOL(flush_icache_user_range); | |||
495 | * We use it to preload an HPTE into the hash table corresponding to | 495 | * We use it to preload an HPTE into the hash table corresponding to |
496 | * the updated linux PTE. | 496 | * the updated linux PTE. |
497 | * | 497 | * |
498 | * This must always be called with the mm->page_table_lock held | 498 | * This must always be called with the pte lock held. |
499 | */ | 499 | */ |
500 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | 500 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, |
501 | pte_t pte) | 501 | pte_t pte) |
diff --git a/arch/powerpc/mm/tlb_32.c b/arch/powerpc/mm/tlb_32.c index 6c3dc3c44c86..ad580f3742e5 100644 --- a/arch/powerpc/mm/tlb_32.c +++ b/arch/powerpc/mm/tlb_32.c | |||
@@ -149,6 +149,12 @@ void flush_tlb_mm(struct mm_struct *mm) | |||
149 | return; | 149 | return; |
150 | } | 150 | } |
151 | 151 | ||
152 | /* | ||
153 | * It is safe to go down the mm's list of vmas when called | ||
154 | * from dup_mmap, holding mmap_sem. It would also be safe from | ||
155 | * unmap_region or exit_mmap, but not from vmtruncate on SMP - | ||
156 | * but it seems dup_mmap is the only SMP case which gets here. | ||
157 | */ | ||
152 | for (mp = mm->mmap; mp != NULL; mp = mp->vm_next) | 158 | for (mp = mm->mmap; mp != NULL; mp = mp->vm_next) |
153 | flush_range(mp->vm_mm, mp->vm_start, mp->vm_end); | 159 | flush_range(mp->vm_mm, mp->vm_start, mp->vm_end); |
154 | FINISH_FLUSH; | 160 | FINISH_FLUSH; |
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c index 53e31b834ace..859d29a0cac5 100644 --- a/arch/powerpc/mm/tlb_64.c +++ b/arch/powerpc/mm/tlb_64.c | |||
@@ -95,7 +95,7 @@ static void pte_free_submit(struct pte_freelist_batch *batch) | |||
95 | 95 | ||
96 | void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf) | 96 | void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf) |
97 | { | 97 | { |
98 | /* This is safe as we are holding page_table_lock */ | 98 | /* This is safe since tlb_gather_mmu has disabled preemption */ |
99 | cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id()); | 99 | cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id()); |
100 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); | 100 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); |
101 | 101 | ||
@@ -206,7 +206,7 @@ void __flush_tlb_pending(struct ppc64_tlb_batch *batch) | |||
206 | 206 | ||
207 | void pte_free_finish(void) | 207 | void pte_free_finish(void) |
208 | { | 208 | { |
209 | /* This is safe as we are holding page_table_lock */ | 209 | /* This is safe since tlb_gather_mmu has disabled preemption */ |
210 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); | 210 | struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur); |
211 | 211 | ||
212 | if (*batchp == NULL) | 212 | if (*batchp == NULL) |
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index bf081b345820..2b54eeb2c899 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Rewrite, cleanup: | 4 | * Rewrite, cleanup: |
5 | * | 5 | * |
6 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 6 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
7 | * | 7 | * |
8 | * Dynamic DMA mapping support, iSeries-specific parts. | 8 | * Dynamic DMA mapping support, iSeries-specific parts. |
9 | * | 9 | * |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 97ba5214417f..c78f2b290a73 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Rewrite, cleanup: | 6 | * Rewrite, cleanup: |
7 | * | 7 | * |
8 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 8 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
9 | * | 9 | * |
10 | * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR. | 10 | * Dynamic DMA mapping support, pSeries-specific parts, both SMP and LPAR. |
11 | * | 11 | * |
diff --git a/arch/powerpc/sysdev/dart.h b/arch/powerpc/sysdev/dart.h index ea8f0d9eed8a..33ed9ed7fc1e 100644 --- a/arch/powerpc/sysdev/dart.h +++ b/arch/powerpc/sysdev/dart.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 2 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
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 as published by | 5 | * it under the terms of the GNU General Public License as published by |
diff --git a/arch/powerpc/sysdev/u3_iommu.c b/arch/powerpc/sysdev/u3_iommu.c index f32baf7f4693..5c1a26a6d00c 100644 --- a/arch/powerpc/sysdev/u3_iommu.c +++ b/arch/powerpc/sysdev/u3_iommu.c | |||
@@ -1,11 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * arch/powerpc/sysdev/u3_iommu.c | 2 | * arch/powerpc/sysdev/u3_iommu.c |
3 | * | 3 | * |
4 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 4 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
5 | * | 5 | * |
6 | * Based on pSeries_iommu.c: | 6 | * Based on pSeries_iommu.c: |
7 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 7 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
8 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 8 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
9 | * | 9 | * |
10 | * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu. | 10 | * Dynamic DMA mapping support, Apple U3 & IBM CPC925 "DART" iommu. |
11 | * | 11 | * |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index d0f2bd227c4c..d39c9f206271 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -252,7 +252,7 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp) | |||
252 | } | 252 | } |
253 | 253 | ||
254 | order = get_order(len_total); | 254 | order = get_order(len_total); |
255 | if ((va = __get_free_pages(GFP_KERNEL, order)) == 0) | 255 | if ((va = __get_free_pages(GFP_KERNEL|__GFP_COMP, order)) == 0) |
256 | goto err_nopages; | 256 | goto err_nopages; |
257 | 257 | ||
258 | if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) | 258 | if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) |
diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c index 9604893ffdbd..0410bae681f8 100644 --- a/arch/sparc/mm/generic.c +++ b/arch/sparc/mm/generic.c | |||
@@ -74,7 +74,7 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | |||
74 | unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; | 74 | unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; |
75 | 75 | ||
76 | /* See comment in mm/memory.c remap_pfn_range */ | 76 | /* See comment in mm/memory.c remap_pfn_range */ |
77 | vma->vm_flags |= VM_IO | VM_RESERVED; | 77 | vma->vm_flags |= VM_IO | VM_RESERVED | VM_UNPAGED; |
78 | 78 | ||
79 | prot = __pgprot(pg_iobits); | 79 | prot = __pgprot(pg_iobits); |
80 | offset -= from; | 80 | offset -= from; |
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c index 96b825055668..d95a1bcf163d 100644 --- a/arch/sparc64/kernel/sbus.c +++ b/arch/sparc64/kernel/sbus.c | |||
@@ -327,7 +327,7 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, size_t size, dma_addr_t *dvma | |||
327 | order = get_order(size); | 327 | order = get_order(size); |
328 | if (order >= 10) | 328 | if (order >= 10) |
329 | return NULL; | 329 | return NULL; |
330 | first_page = __get_free_pages(GFP_KERNEL, order); | 330 | first_page = __get_free_pages(GFP_KERNEL|__GFP_COMP, order); |
331 | if (first_page == 0UL) | 331 | if (first_page == 0UL) |
332 | return NULL; | 332 | return NULL; |
333 | memset((char *)first_page, 0, PAGE_SIZE << order); | 333 | memset((char *)first_page, 0, PAGE_SIZE << order); |
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c index 112c316e7cd2..8fd4cb1f050a 100644 --- a/arch/sparc64/mm/generic.c +++ b/arch/sparc64/mm/generic.c | |||
@@ -128,7 +128,7 @@ int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | |||
128 | unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; | 128 | unsigned long offset = GET_PFN(pfn) << PAGE_SHIFT; |
129 | 129 | ||
130 | /* See comment in mm/memory.c remap_pfn_range */ | 130 | /* See comment in mm/memory.c remap_pfn_range */ |
131 | vma->vm_flags |= VM_IO | VM_RESERVED; | 131 | vma->vm_flags |= VM_IO | VM_RESERVED | VM_UNPAGED; |
132 | 132 | ||
133 | prot = __pgprot(pg_iobits); | 133 | prot = __pgprot(pg_iobits); |
134 | offset -= from; | 134 | offset -= from; |
diff --git a/arch/um/Makefile b/arch/um/Makefile index e55d32e903bc..1b12feeba368 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -17,7 +17,7 @@ core-y += $(ARCH_DIR)/kernel/ \ | |||
17 | 17 | ||
18 | # Have to precede the include because the included Makefiles reference them. | 18 | # Have to precede the include because the included Makefiles reference them. |
19 | SYMLINK_HEADERS := archparam.h system.h sigcontext.h processor.h ptrace.h \ | 19 | SYMLINK_HEADERS := archparam.h system.h sigcontext.h processor.h ptrace.h \ |
20 | module.h vm-flags.h elf.h | 20 | module.h vm-flags.h elf.h ldt.h |
21 | SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS),include/asm-um/$(header)) | 21 | SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS),include/asm-um/$(header)) |
22 | 22 | ||
23 | # XXX: The "os" symlink is only used by arch/um/include/os.h, which includes | 23 | # XXX: The "os" symlink is only used by arch/um/include/os.h, which includes |
diff --git a/arch/um/include/sysdep-i386/stub.h b/arch/um/include/sysdep-i386/stub.h index a49ceb199ee5..6ba8cbbe0d36 100644 --- a/arch/um/include/sysdep-i386/stub.h +++ b/arch/um/include/sysdep-i386/stub.h | |||
@@ -16,6 +16,15 @@ extern void stub_clone_handler(void); | |||
16 | #define STUB_MMAP_NR __NR_mmap2 | 16 | #define STUB_MMAP_NR __NR_mmap2 |
17 | #define MMAP_OFFSET(o) ((o) >> PAGE_SHIFT) | 17 | #define MMAP_OFFSET(o) ((o) >> PAGE_SHIFT) |
18 | 18 | ||
19 | static inline long stub_syscall0(long syscall) | ||
20 | { | ||
21 | long ret; | ||
22 | |||
23 | __asm__ volatile ("int $0x80" : "=a" (ret) : "0" (syscall)); | ||
24 | |||
25 | return ret; | ||
26 | } | ||
27 | |||
19 | static inline long stub_syscall1(long syscall, long arg1) | 28 | static inline long stub_syscall1(long syscall, long arg1) |
20 | { | 29 | { |
21 | long ret; | 30 | long ret; |
diff --git a/arch/um/include/sysdep-x86_64/stub.h b/arch/um/include/sysdep-x86_64/stub.h index 2bd6e7a97286..c41689c13dc9 100644 --- a/arch/um/include/sysdep-x86_64/stub.h +++ b/arch/um/include/sysdep-x86_64/stub.h | |||
@@ -6,7 +6,6 @@ | |||
6 | #ifndef __SYSDEP_STUB_H | 6 | #ifndef __SYSDEP_STUB_H |
7 | #define __SYSDEP_STUB_H | 7 | #define __SYSDEP_STUB_H |
8 | 8 | ||
9 | #include <asm/ptrace.h> | ||
10 | #include <asm/unistd.h> | 9 | #include <asm/unistd.h> |
11 | #include <sysdep/ptrace_user.h> | 10 | #include <sysdep/ptrace_user.h> |
12 | 11 | ||
@@ -20,6 +19,17 @@ extern void stub_clone_handler(void); | |||
20 | #define __syscall_clobber "r11","rcx","memory" | 19 | #define __syscall_clobber "r11","rcx","memory" |
21 | #define __syscall "syscall" | 20 | #define __syscall "syscall" |
22 | 21 | ||
22 | static inline long stub_syscall0(long syscall) | ||
23 | { | ||
24 | long ret; | ||
25 | |||
26 | __asm__ volatile (__syscall | ||
27 | : "=a" (ret) | ||
28 | : "0" (syscall) : __syscall_clobber ); | ||
29 | |||
30 | return ret; | ||
31 | } | ||
32 | |||
23 | static inline long stub_syscall2(long syscall, long arg1, long arg2) | 33 | static inline long stub_syscall2(long syscall, long arg1, long arg2) |
24 | { | 34 | { |
25 | long ret; | 35 | long ret; |
diff --git a/arch/um/kernel/skas/clone.c b/arch/um/kernel/skas/clone.c index 4dc55f10cd18..cb37ce9124a6 100644 --- a/arch/um/kernel/skas/clone.c +++ b/arch/um/kernel/skas/clone.c | |||
@@ -9,18 +9,24 @@ | |||
9 | #include "stub-data.h" | 9 | #include "stub-data.h" |
10 | #include "uml-config.h" | 10 | #include "uml-config.h" |
11 | #include "sysdep/stub.h" | 11 | #include "sysdep/stub.h" |
12 | #include "kern_constants.h" | ||
12 | 13 | ||
13 | /* This is in a separate file because it needs to be compiled with any | 14 | /* This is in a separate file because it needs to be compiled with any |
14 | * extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled | 15 | * extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled |
16 | * | ||
17 | * Use UM_KERN_PAGE_SIZE instead of PAGE_SIZE because that calls getpagesize | ||
18 | * on some systems. | ||
15 | */ | 19 | */ |
20 | |||
21 | #define STUB_DATA(field) (((struct stub_data *) UML_CONFIG_STUB_DATA)->field) | ||
22 | |||
16 | void __attribute__ ((__section__ (".__syscall_stub"))) | 23 | void __attribute__ ((__section__ (".__syscall_stub"))) |
17 | stub_clone_handler(void) | 24 | stub_clone_handler(void) |
18 | { | 25 | { |
19 | long err; | 26 | long err; |
20 | struct stub_data *from = (struct stub_data *) UML_CONFIG_STUB_DATA; | ||
21 | 27 | ||
22 | err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD, | 28 | err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD, |
23 | UML_CONFIG_STUB_DATA + PAGE_SIZE / 2 - | 29 | UML_CONFIG_STUB_DATA + UM_KERN_PAGE_SIZE / 2 - |
24 | sizeof(void *)); | 30 | sizeof(void *)); |
25 | if(err != 0) | 31 | if(err != 0) |
26 | goto out; | 32 | goto out; |
@@ -30,15 +36,16 @@ stub_clone_handler(void) | |||
30 | goto out; | 36 | goto out; |
31 | 37 | ||
32 | err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, | 38 | err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, |
33 | (long) &from->timer, 0); | 39 | (long) &STUB_DATA(timer), 0); |
34 | if(err) | 40 | if(err) |
35 | goto out; | 41 | goto out; |
36 | 42 | ||
37 | err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA, PAGE_SIZE, | 43 | err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA, |
38 | PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, | 44 | UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE, |
39 | from->fd, from->offset); | 45 | MAP_FIXED | MAP_SHARED, STUB_DATA(fd), |
46 | STUB_DATA(offset)); | ||
40 | out: | 47 | out: |
41 | /* save current result. Parent: pid; child: retcode of mmap */ | 48 | /* save current result. Parent: pid; child: retcode of mmap */ |
42 | from->err = err; | 49 | STUB_DATA(err) = err; |
43 | trap_myself(); | 50 | trap_myself(); |
44 | } | 51 | } |
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 6dfeb70f6957..150059dbee12 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile | |||
@@ -5,7 +5,7 @@ obj-y = bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ | |||
5 | obj-$(CONFIG_HIGHMEM) += highmem.o | 5 | obj-$(CONFIG_HIGHMEM) += highmem.o |
6 | obj-$(CONFIG_MODULES) += module.o | 6 | obj-$(CONFIG_MODULES) += module.o |
7 | 7 | ||
8 | USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o | 8 | USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o stub_segv.o |
9 | 9 | ||
10 | SYMLINKS = bitops.c semaphore.c highmem.c module.c | 10 | SYMLINKS = bitops.c semaphore.c highmem.c module.c |
11 | 11 | ||
diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c index 6360f1c958d0..17746b4c08ff 100644 --- a/arch/um/sys-i386/ldt.c +++ b/arch/um/sys-i386/ldt.c | |||
@@ -228,7 +228,7 @@ static int read_ldt(void __user * ptr, unsigned long bytecount) | |||
228 | size = LDT_ENTRY_SIZE*LDT_DIRECT_ENTRIES; | 228 | size = LDT_ENTRY_SIZE*LDT_DIRECT_ENTRIES; |
229 | if(size > bytecount) | 229 | if(size > bytecount) |
230 | size = bytecount; | 230 | size = bytecount; |
231 | if(copy_to_user(ptr, ldt->entries, size)) | 231 | if(copy_to_user(ptr, ldt->u.entries, size)) |
232 | err = -EFAULT; | 232 | err = -EFAULT; |
233 | bytecount -= size; | 233 | bytecount -= size; |
234 | ptr += size; | 234 | ptr += size; |
@@ -239,7 +239,7 @@ static int read_ldt(void __user * ptr, unsigned long bytecount) | |||
239 | size = PAGE_SIZE; | 239 | size = PAGE_SIZE; |
240 | if(size > bytecount) | 240 | if(size > bytecount) |
241 | size = bytecount; | 241 | size = bytecount; |
242 | if(copy_to_user(ptr, ldt->pages[i], size)){ | 242 | if(copy_to_user(ptr, ldt->u.pages[i], size)){ |
243 | err = -EFAULT; | 243 | err = -EFAULT; |
244 | break; | 244 | break; |
245 | } | 245 | } |
@@ -321,10 +321,11 @@ static int write_ldt(void __user * ptr, unsigned long bytecount, int func) | |||
321 | i*LDT_ENTRIES_PER_PAGE <= ldt_info.entry_number; | 321 | i*LDT_ENTRIES_PER_PAGE <= ldt_info.entry_number; |
322 | i++){ | 322 | i++){ |
323 | if(i == 0) | 323 | if(i == 0) |
324 | memcpy(&entry0, ldt->entries, sizeof(entry0)); | 324 | memcpy(&entry0, ldt->u.entries, |
325 | ldt->pages[i] = (struct ldt_entry *) | 325 | sizeof(entry0)); |
326 | __get_free_page(GFP_KERNEL|__GFP_ZERO); | 326 | ldt->u.pages[i] = (struct ldt_entry *) |
327 | if(!ldt->pages[i]){ | 327 | __get_free_page(GFP_KERNEL|__GFP_ZERO); |
328 | if(!ldt->u.pages[i]){ | ||
328 | err = -ENOMEM; | 329 | err = -ENOMEM; |
329 | /* Undo the change in host */ | 330 | /* Undo the change in host */ |
330 | memset(&ldt_info, 0, sizeof(ldt_info)); | 331 | memset(&ldt_info, 0, sizeof(ldt_info)); |
@@ -332,8 +333,9 @@ static int write_ldt(void __user * ptr, unsigned long bytecount, int func) | |||
332 | goto out_unlock; | 333 | goto out_unlock; |
333 | } | 334 | } |
334 | if(i == 0) { | 335 | if(i == 0) { |
335 | memcpy(ldt->pages[0], &entry0, sizeof(entry0)); | 336 | memcpy(ldt->u.pages[0], &entry0, |
336 | memcpy(ldt->pages[0]+1, ldt->entries+1, | 337 | sizeof(entry0)); |
338 | memcpy(ldt->u.pages[0]+1, ldt->u.entries+1, | ||
337 | sizeof(entry0)*(LDT_DIRECT_ENTRIES-1)); | 339 | sizeof(entry0)*(LDT_DIRECT_ENTRIES-1)); |
338 | } | 340 | } |
339 | ldt->entry_count = (i + 1) * LDT_ENTRIES_PER_PAGE; | 341 | ldt->entry_count = (i + 1) * LDT_ENTRIES_PER_PAGE; |
@@ -343,9 +345,9 @@ static int write_ldt(void __user * ptr, unsigned long bytecount, int func) | |||
343 | ldt->entry_count = ldt_info.entry_number + 1; | 345 | ldt->entry_count = ldt_info.entry_number + 1; |
344 | 346 | ||
345 | if(ldt->entry_count <= LDT_DIRECT_ENTRIES) | 347 | if(ldt->entry_count <= LDT_DIRECT_ENTRIES) |
346 | ldt_p = ldt->entries + ldt_info.entry_number; | 348 | ldt_p = ldt->u.entries + ldt_info.entry_number; |
347 | else | 349 | else |
348 | ldt_p = ldt->pages[ldt_info.entry_number/LDT_ENTRIES_PER_PAGE] + | 350 | ldt_p = ldt->u.pages[ldt_info.entry_number/LDT_ENTRIES_PER_PAGE] + |
349 | ldt_info.entry_number%LDT_ENTRIES_PER_PAGE; | 351 | ldt_info.entry_number%LDT_ENTRIES_PER_PAGE; |
350 | 352 | ||
351 | if(ldt_info.base_addr == 0 && ldt_info.limit == 0 && | 353 | if(ldt_info.base_addr == 0 && ldt_info.limit == 0 && |
@@ -501,8 +503,8 @@ long init_new_ldt(struct mmu_context_skas * new_mm, | |||
501 | */ | 503 | */ |
502 | down(&from_mm->ldt.semaphore); | 504 | down(&from_mm->ldt.semaphore); |
503 | if(from_mm->ldt.entry_count <= LDT_DIRECT_ENTRIES){ | 505 | if(from_mm->ldt.entry_count <= LDT_DIRECT_ENTRIES){ |
504 | memcpy(new_mm->ldt.entries, from_mm->ldt.entries, | 506 | memcpy(new_mm->ldt.u.entries, from_mm->ldt.u.entries, |
505 | sizeof(new_mm->ldt.entries)); | 507 | sizeof(new_mm->ldt.u.entries)); |
506 | } | 508 | } |
507 | else{ | 509 | else{ |
508 | i = from_mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE; | 510 | i = from_mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE; |
@@ -512,9 +514,10 @@ long init_new_ldt(struct mmu_context_skas * new_mm, | |||
512 | err = -ENOMEM; | 514 | err = -ENOMEM; |
513 | break; | 515 | break; |
514 | } | 516 | } |
515 | new_mm->ldt.pages[i] = (struct ldt_entry*)page; | 517 | new_mm->ldt.u.pages[i] = |
516 | memcpy(new_mm->ldt.pages[i], | 518 | (struct ldt_entry *) page; |
517 | from_mm->ldt.pages[i], PAGE_SIZE); | 519 | memcpy(new_mm->ldt.u.pages[i], |
520 | from_mm->ldt.u.pages[i], PAGE_SIZE); | ||
518 | } | 521 | } |
519 | } | 522 | } |
520 | new_mm->ldt.entry_count = from_mm->ldt.entry_count; | 523 | new_mm->ldt.entry_count = from_mm->ldt.entry_count; |
@@ -532,7 +535,7 @@ void free_ldt(struct mmu_context_skas * mm) | |||
532 | if(!ptrace_ldt && mm->ldt.entry_count > LDT_DIRECT_ENTRIES){ | 535 | if(!ptrace_ldt && mm->ldt.entry_count > LDT_DIRECT_ENTRIES){ |
533 | i = mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE; | 536 | i = mm->ldt.entry_count / LDT_ENTRIES_PER_PAGE; |
534 | while(i-- > 0){ | 537 | while(i-- > 0){ |
535 | free_page((long )mm->ldt.pages[i]); | 538 | free_page((long )mm->ldt.u.pages[i]); |
536 | } | 539 | } |
537 | } | 540 | } |
538 | mm->ldt.entry_count = 0; | 541 | mm->ldt.entry_count = 0; |
diff --git a/arch/um/sys-i386/stub_segv.c b/arch/um/sys-i386/stub_segv.c index 1e88b275edac..a37f672ec964 100644 --- a/arch/um/sys-i386/stub_segv.c +++ b/arch/um/sys-i386/stub_segv.c | |||
@@ -3,9 +3,11 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <asm/signal.h> | 6 | #include <signal.h> |
7 | #include <sys/select.h> /* The only way I can see to get sigset_t */ | ||
7 | #include <asm/unistd.h> | 8 | #include <asm/unistd.h> |
8 | #include "uml-config.h" | 9 | #include "uml-config.h" |
10 | #include "sysdep/stub.h" | ||
9 | #include "sysdep/sigcontext.h" | 11 | #include "sysdep/sigcontext.h" |
10 | #include "sysdep/faultinfo.h" | 12 | #include "sysdep/faultinfo.h" |
11 | 13 | ||
@@ -13,13 +15,14 @@ void __attribute__ ((__section__ (".__syscall_stub"))) | |||
13 | stub_segv_handler(int sig) | 15 | stub_segv_handler(int sig) |
14 | { | 16 | { |
15 | struct sigcontext *sc = (struct sigcontext *) (&sig + 1); | 17 | struct sigcontext *sc = (struct sigcontext *) (&sig + 1); |
18 | int pid; | ||
16 | 19 | ||
17 | GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA), | 20 | GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA), |
18 | sc); | 21 | sc); |
19 | 22 | ||
20 | __asm__("movl %0, %%eax ; int $0x80": : "g" (__NR_getpid)); | 23 | pid = stub_syscall0(__NR_getpid); |
21 | __asm__("movl %%eax, %%ebx ; movl %0, %%eax ; movl %1, %%ecx ;" | 24 | stub_syscall2(__NR_kill, pid, SIGUSR1); |
22 | "int $0x80": : "g" (__NR_kill), "g" (SIGUSR1)); | 25 | |
23 | /* Load pointer to sigcontext into esp, since we need to leave | 26 | /* Load pointer to sigcontext into esp, since we need to leave |
24 | * the stack in its original form when we do the sigreturn here, by | 27 | * the stack in its original form when we do the sigreturn here, by |
25 | * hand. | 28 | * hand. |
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index ea977df395a1..00b2025427df 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile | |||
@@ -12,7 +12,7 @@ lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o ldt.o mem.o memcpy.o \ | |||
12 | obj-y := ksyms.o | 12 | obj-y := ksyms.o |
13 | obj-$(CONFIG_MODULES) += module.o um_module.o | 13 | obj-$(CONFIG_MODULES) += module.o um_module.o |
14 | 14 | ||
15 | USER_OBJS := ptrace_user.o sigcontext.o | 15 | USER_OBJS := ptrace_user.o sigcontext.o stub_segv.o |
16 | 16 | ||
17 | SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c ldt.c memcpy.S \ | 17 | SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c ldt.c memcpy.S \ |
18 | thunk.S module.c | 18 | thunk.S module.c |
diff --git a/arch/um/sys-x86_64/stub_segv.c b/arch/um/sys-x86_64/stub_segv.c index d1e53bdf2e85..a27099533198 100644 --- a/arch/um/sys-x86_64/stub_segv.c +++ b/arch/um/sys-x86_64/stub_segv.c | |||
@@ -3,14 +3,14 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <asm/signal.h> | 6 | #include <stddef.h> |
7 | #include <signal.h> | ||
7 | #include <linux/compiler.h> | 8 | #include <linux/compiler.h> |
8 | #include <asm/unistd.h> | 9 | #include <asm/unistd.h> |
9 | #include <asm/ucontext.h> | ||
10 | #include "uml-config.h" | 10 | #include "uml-config.h" |
11 | #include "sysdep/sigcontext.h" | 11 | #include "sysdep/sigcontext.h" |
12 | #include "sysdep/faultinfo.h" | 12 | #include "sysdep/faultinfo.h" |
13 | #include <stddef.h> | 13 | #include "sysdep/stub.h" |
14 | 14 | ||
15 | /* Copied from sys-x86_64/signal.c - Can't find an equivalent definition | 15 | /* Copied from sys-x86_64/signal.c - Can't find an equivalent definition |
16 | * in the libc headers anywhere. | 16 | * in the libc headers anywhere. |
@@ -31,21 +31,21 @@ void __attribute__ ((__section__ (".__syscall_stub"))) | |||
31 | stub_segv_handler(int sig) | 31 | stub_segv_handler(int sig) |
32 | { | 32 | { |
33 | struct ucontext *uc; | 33 | struct ucontext *uc; |
34 | int pid; | ||
34 | 35 | ||
35 | __asm__("movq %%rdx, %0" : "=g" (uc) :); | 36 | __asm__("movq %%rdx, %0" : "=g" (uc) :); |
36 | GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA), | 37 | GET_FAULTINFO_FROM_SC(*((struct faultinfo *) UML_CONFIG_STUB_DATA), |
37 | &uc->uc_mcontext); | 38 | &uc->uc_mcontext); |
38 | 39 | ||
39 | __asm__("movq %0, %%rax ; syscall": : "g" (__NR_getpid)); | 40 | pid = stub_syscall0(__NR_getpid); |
40 | __asm__("movq %%rax, %%rdi ; movq %0, %%rax ; movq %1, %%rsi ;" | 41 | stub_syscall2(__NR_kill, pid, SIGUSR1); |
41 | "syscall": : "g" (__NR_kill), "g" (SIGUSR1) : | 42 | |
42 | "%rdi", "%rax", "%rsi"); | ||
43 | /* sys_sigreturn expects that the stack pointer will be 8 bytes into | 43 | /* sys_sigreturn expects that the stack pointer will be 8 bytes into |
44 | * the signal frame. So, we use the ucontext pointer, which we know | 44 | * the signal frame. So, we use the ucontext pointer, which we know |
45 | * already, to get the signal frame pointer, and add 8 to that. | 45 | * already, to get the signal frame pointer, and add 8 to that. |
46 | */ | 46 | */ |
47 | __asm__("movq %0, %%rsp": : | 47 | __asm__("movq %0, %%rsp; movq %1, %%rax ; syscall": : |
48 | "g" ((unsigned long) container_of(uc, struct rt_sigframe, | 48 | "g" ((unsigned long) container_of(uc, struct rt_sigframe, |
49 | uc) + 8)); | 49 | uc) + 8), |
50 | __asm__("movq %0, %%rax ; syscall" : : "g" (__NR_rt_sigreturn)); | 50 | "g" (__NR_rt_sigreturn)); |
51 | } | 51 | } |
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 5afd63e8cef7..7519fc520eb3 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -351,13 +351,6 @@ void flush_thread(void) | |||
351 | struct task_struct *tsk = current; | 351 | struct task_struct *tsk = current; |
352 | struct thread_info *t = current_thread_info(); | 352 | struct thread_info *t = current_thread_info(); |
353 | 353 | ||
354 | /* | ||
355 | * Remove function-return probe instances associated with this task | ||
356 | * and put them back on the free list. Do not insert an exit probe for | ||
357 | * this function, it will be disabled by kprobe_flush_task if you do. | ||
358 | */ | ||
359 | kprobe_flush_task(tsk); | ||
360 | |||
361 | if (t->flags & _TIF_ABI_PENDING) | 354 | if (t->flags & _TIF_ABI_PENDING) |
362 | t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32); | 355 | t->flags ^= (_TIF_ABI_PENDING | _TIF_IA32); |
363 | 356 | ||
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 03204bfd17af..fa601b085eba 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -133,7 +133,7 @@ static struct kobj_type ktype_bus = { | |||
133 | decl_subsys(bus, &ktype_bus, NULL); | 133 | decl_subsys(bus, &ktype_bus, NULL); |
134 | 134 | ||
135 | 135 | ||
136 | /* Manually detach a device from it's associated driver. */ | 136 | /* Manually detach a device from its associated driver. */ |
137 | static int driver_helper(struct device *dev, void *data) | 137 | static int driver_helper(struct device *dev, void *data) |
138 | { | 138 | { |
139 | const char *name = data; | 139 | const char *name = data; |
@@ -151,14 +151,13 @@ static ssize_t driver_unbind(struct device_driver *drv, | |||
151 | int err = -ENODEV; | 151 | int err = -ENODEV; |
152 | 152 | ||
153 | dev = bus_find_device(bus, NULL, (void *)buf, driver_helper); | 153 | dev = bus_find_device(bus, NULL, (void *)buf, driver_helper); |
154 | if ((dev) && | 154 | if (dev && dev->driver == drv) { |
155 | (dev->driver == drv)) { | ||
156 | device_release_driver(dev); | 155 | device_release_driver(dev); |
157 | err = count; | 156 | err = count; |
158 | } | 157 | } |
159 | if (err) | 158 | put_device(dev); |
160 | return err; | 159 | put_bus(bus); |
161 | return count; | 160 | return err; |
162 | } | 161 | } |
163 | static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind); | 162 | static DRIVER_ATTR(unbind, S_IWUSR, NULL, driver_unbind); |
164 | 163 | ||
@@ -175,16 +174,14 @@ static ssize_t driver_bind(struct device_driver *drv, | |||
175 | int err = -ENODEV; | 174 | int err = -ENODEV; |
176 | 175 | ||
177 | dev = bus_find_device(bus, NULL, (void *)buf, driver_helper); | 176 | dev = bus_find_device(bus, NULL, (void *)buf, driver_helper); |
178 | if ((dev) && | 177 | if (dev && dev->driver == NULL) { |
179 | (dev->driver == NULL)) { | ||
180 | down(&dev->sem); | 178 | down(&dev->sem); |
181 | err = driver_probe_device(drv, dev); | 179 | err = driver_probe_device(drv, dev); |
182 | up(&dev->sem); | 180 | up(&dev->sem); |
183 | put_device(dev); | ||
184 | } | 181 | } |
185 | if (err) | 182 | put_device(dev); |
186 | return err; | 183 | put_bus(bus); |
187 | return count; | 184 | return err; |
188 | } | 185 | } |
189 | static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind); | 186 | static DRIVER_ATTR(bind, S_IWUSR, NULL, driver_bind); |
190 | 187 | ||
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 3565e9795301..3b419c9a1e7e 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
@@ -62,7 +62,6 @@ void device_bind_driver(struct device * dev) | |||
62 | * because we don't know the format of the ID structures, nor what | 62 | * because we don't know the format of the ID structures, nor what |
63 | * is to be considered a match and what is not. | 63 | * is to be considered a match and what is not. |
64 | * | 64 | * |
65 | * | ||
66 | * This function returns 1 if a match is found, an error if one | 65 | * This function returns 1 if a match is found, an error if one |
67 | * occurs (that is not -ENODEV or -ENXIO), and 0 otherwise. | 66 | * occurs (that is not -ENODEV or -ENXIO), and 0 otherwise. |
68 | * | 67 | * |
@@ -158,7 +157,6 @@ static int __driver_attach(struct device * dev, void * data) | |||
158 | driver_probe_device(drv, dev); | 157 | driver_probe_device(drv, dev); |
159 | up(&dev->sem); | 158 | up(&dev->sem); |
160 | 159 | ||
161 | |||
162 | return 0; | 160 | return 0; |
163 | } | 161 | } |
164 | 162 | ||
@@ -225,15 +223,15 @@ void driver_detach(struct device_driver * drv) | |||
225 | struct device * dev; | 223 | struct device * dev; |
226 | 224 | ||
227 | for (;;) { | 225 | for (;;) { |
228 | spin_lock_irq(&drv->klist_devices.k_lock); | 226 | spin_lock(&drv->klist_devices.k_lock); |
229 | if (list_empty(&drv->klist_devices.k_list)) { | 227 | if (list_empty(&drv->klist_devices.k_list)) { |
230 | spin_unlock_irq(&drv->klist_devices.k_lock); | 228 | spin_unlock(&drv->klist_devices.k_lock); |
231 | break; | 229 | break; |
232 | } | 230 | } |
233 | dev = list_entry(drv->klist_devices.k_list.prev, | 231 | dev = list_entry(drv->klist_devices.k_list.prev, |
234 | struct device, knode_driver.n_node); | 232 | struct device, knode_driver.n_node); |
235 | get_device(dev); | 233 | get_device(dev); |
236 | spin_unlock_irq(&drv->klist_devices.k_lock); | 234 | spin_unlock(&drv->klist_devices.k_lock); |
237 | 235 | ||
238 | down(&dev->sem); | 236 | down(&dev->sem); |
239 | if (dev->driver == drv) | 237 | if (dev->driver == drv) |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 13b8a9bed66e..f7e765a1d313 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -3714,12 +3714,6 @@ static int floppy_open(struct inode *inode, struct file *filp) | |||
3714 | USETF(FD_VERIFY); | 3714 | USETF(FD_VERIFY); |
3715 | } | 3715 | } |
3716 | 3716 | ||
3717 | /* set underlying gendisk policy to reflect real ro/rw status */ | ||
3718 | if (UTESTF(FD_DISK_WRITABLE)) | ||
3719 | inode->i_bdev->bd_disk->policy = 0; | ||
3720 | else | ||
3721 | inode->i_bdev->bd_disk->policy = 1; | ||
3722 | |||
3723 | if (UDRS->fd_ref == -1 || (UDRS->fd_ref && (filp->f_flags & O_EXCL))) | 3717 | if (UDRS->fd_ref == -1 || (UDRS->fd_ref && (filp->f_flags & O_EXCL))) |
3724 | goto out2; | 3718 | goto out2; |
3725 | 3719 | ||
diff --git a/drivers/char/drm/drm_lock.c b/drivers/char/drm/drm_lock.c index b276ae8a6633..b48a595d54ec 100644 --- a/drivers/char/drm/drm_lock.c +++ b/drivers/char/drm/drm_lock.c | |||
@@ -104,6 +104,10 @@ int drm_lock(struct inode *inode, struct file *filp, | |||
104 | __set_current_state(TASK_RUNNING); | 104 | __set_current_state(TASK_RUNNING); |
105 | remove_wait_queue(&dev->lock.lock_queue, &entry); | 105 | remove_wait_queue(&dev->lock.lock_queue, &entry); |
106 | 106 | ||
107 | DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock"); | ||
108 | if (ret) | ||
109 | return ret; | ||
110 | |||
107 | sigemptyset(&dev->sigmask); | 111 | sigemptyset(&dev->sigmask); |
108 | sigaddset(&dev->sigmask, SIGSTOP); | 112 | sigaddset(&dev->sigmask, SIGSTOP); |
109 | sigaddset(&dev->sigmask, SIGTSTP); | 113 | sigaddset(&dev->sigmask, SIGTSTP); |
@@ -116,8 +120,12 @@ int drm_lock(struct inode *inode, struct file *filp, | |||
116 | if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY)) | 120 | if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY)) |
117 | dev->driver->dma_ready(dev); | 121 | dev->driver->dma_ready(dev); |
118 | 122 | ||
119 | if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) | 123 | if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) { |
120 | return dev->driver->dma_quiescent(dev); | 124 | if (dev->driver->dma_quiescent(dev)) { |
125 | DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context); | ||
126 | return DRM_ERR(EBUSY); | ||
127 | } | ||
128 | } | ||
121 | 129 | ||
122 | /* dev->driver->kernel_context_switch isn't used by any of the x86 | 130 | /* dev->driver->kernel_context_switch isn't used by any of the x86 |
123 | * drivers but is used by the Sparc driver. | 131 | * drivers but is used by the Sparc driver. |
@@ -128,9 +136,7 @@ int drm_lock(struct inode *inode, struct file *filp, | |||
128 | dev->driver->kernel_context_switch(dev, dev->last_context, | 136 | dev->driver->kernel_context_switch(dev, dev->last_context, |
129 | lock.context); | 137 | lock.context); |
130 | } | 138 | } |
131 | DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock"); | 139 | return 0; |
132 | |||
133 | return ret; | ||
134 | } | 140 | } |
135 | 141 | ||
136 | /** | 142 | /** |
diff --git a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c index 2c74155aa84f..abef2acf99f5 100644 --- a/drivers/char/drm/drm_memory.c +++ b/drivers/char/drm/drm_memory.c | |||
@@ -95,7 +95,7 @@ unsigned long drm_alloc_pages(int order, int area) | |||
95 | unsigned long addr; | 95 | unsigned long addr; |
96 | unsigned int sz; | 96 | unsigned int sz; |
97 | 97 | ||
98 | address = __get_free_pages(GFP_KERNEL, order); | 98 | address = __get_free_pages(GFP_KERNEL|__GFP_COMP, order); |
99 | if (!address) | 99 | if (!address) |
100 | return 0; | 100 | return 0; |
101 | 101 | ||
diff --git a/drivers/char/drm/drm_memory_debug.h b/drivers/char/drm/drm_memory_debug.h index 4542353195bd..b370aca718d2 100644 --- a/drivers/char/drm/drm_memory_debug.h +++ b/drivers/char/drm/drm_memory_debug.h | |||
@@ -221,7 +221,7 @@ unsigned long DRM(alloc_pages) (int order, int area) { | |||
221 | } | 221 | } |
222 | spin_unlock(&DRM(mem_lock)); | 222 | spin_unlock(&DRM(mem_lock)); |
223 | 223 | ||
224 | address = __get_free_pages(GFP_KERNEL, order); | 224 | address = __get_free_pages(GFP_KERNEL|__GFP_COMP, order); |
225 | if (!address) { | 225 | if (!address) { |
226 | spin_lock(&DRM(mem_lock)); | 226 | spin_lock(&DRM(mem_lock)); |
227 | ++DRM(mem_stats)[area].fail_count; | 227 | ++DRM(mem_stats)[area].fail_count; |
diff --git a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c index 0cc7c305a7f6..1713451a5cc6 100644 --- a/drivers/char/drm/mga_drv.c +++ b/drivers/char/drm/mga_drv.c | |||
@@ -161,7 +161,7 @@ static int mga_driver_device_is_agp(drm_device_t * dev) | |||
161 | * device. | 161 | * device. |
162 | */ | 162 | */ |
163 | 163 | ||
164 | if ((pdev->device == 0x0525) | 164 | if ((pdev->device == 0x0525) && pdev->bus->self |
165 | && (pdev->bus->self->vendor == 0x3388) | 165 | && (pdev->bus->self->vendor == 0x3388) |
166 | && (pdev->bus->self->device == 0x0021)) { | 166 | && (pdev->bus->self->device == 0x0021)) { |
167 | return 0; | 167 | return 0; |
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h index 120ee5a8ebcc..7bda7e33d2bd 100644 --- a/drivers/char/drm/radeon_drv.h +++ b/drivers/char/drm/radeon_drv.h | |||
@@ -214,8 +214,6 @@ typedef struct drm_radeon_private { | |||
214 | 214 | ||
215 | int microcode_version; | 215 | int microcode_version; |
216 | 216 | ||
217 | int is_pci; | ||
218 | |||
219 | struct { | 217 | struct { |
220 | u32 boxes; | 218 | u32 boxes; |
221 | int freelist_timeouts; | 219 | int freelist_timeouts; |
@@ -275,6 +273,7 @@ typedef struct drm_radeon_private { | |||
275 | 273 | ||
276 | /* starting from here on, data is preserved accross an open */ | 274 | /* starting from here on, data is preserved accross an open */ |
277 | uint32_t flags; /* see radeon_chip_flags */ | 275 | uint32_t flags; /* see radeon_chip_flags */ |
276 | int is_pci; | ||
278 | } drm_radeon_private_t; | 277 | } drm_radeon_private_t; |
279 | 278 | ||
280 | typedef struct drm_radeon_buf_priv { | 279 | typedef struct drm_radeon_buf_priv { |
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 91dd669273e0..29c3b631445a 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -591,7 +591,7 @@ static inline size_t read_zero_pagealigned(char __user * buf, size_t size) | |||
591 | 591 | ||
592 | if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0) | 592 | if (vma->vm_start > addr || (vma->vm_flags & VM_WRITE) == 0) |
593 | goto out_up; | 593 | goto out_up; |
594 | if (vma->vm_flags & (VM_SHARED | VM_HUGETLB)) | 594 | if (vma->vm_flags & (VM_SHARED | VM_HUGETLB | VM_UNPAGED)) |
595 | break; | 595 | break; |
596 | count = vma->vm_end - addr; | 596 | count = vma->vm_end - addr; |
597 | if (count > size) | 597 | if (count > size) |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 23a63207d747..1c0f62d0f938 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -693,8 +693,8 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev) | |||
693 | unsigned int cpu = sys_dev->id; | 693 | unsigned int cpu = sys_dev->id; |
694 | unsigned long flags; | 694 | unsigned long flags; |
695 | struct cpufreq_policy *data; | 695 | struct cpufreq_policy *data; |
696 | struct sys_device *cpu_sys_dev; | ||
697 | #ifdef CONFIG_SMP | 696 | #ifdef CONFIG_SMP |
697 | struct sys_device *cpu_sys_dev; | ||
698 | unsigned int j; | 698 | unsigned int j; |
699 | #endif | 699 | #endif |
700 | 700 | ||
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index b6815c6c29a2..1e371a510dd2 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig | |||
@@ -60,6 +60,7 @@ config EFI_PCDP | |||
60 | 60 | ||
61 | config DELL_RBU | 61 | config DELL_RBU |
62 | tristate "BIOS update support for DELL systems via sysfs" | 62 | tristate "BIOS update support for DELL systems via sysfs" |
63 | depends on X86 | ||
63 | select FW_LOADER | 64 | select FW_LOADER |
64 | help | 65 | help |
65 | Say m if you want to have the option of updating the BIOS for your | 66 | Say m if you want to have the option of updating the BIOS for your |
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index c81bd4bce1b8..23a9e1ea8e32 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c | |||
@@ -570,7 +570,7 @@ static int __init hdaps_init(void) | |||
570 | hdaps_idev->evbit[0] = BIT(EV_ABS); | 570 | hdaps_idev->evbit[0] = BIT(EV_ABS); |
571 | input_set_abs_params(hdaps_idev, ABS_X, | 571 | input_set_abs_params(hdaps_idev, ABS_X, |
572 | -256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT); | 572 | -256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT); |
573 | input_set_abs_params(hdaps_idev, ABS_X, | 573 | input_set_abs_params(hdaps_idev, ABS_Y, |
574 | -256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT); | 574 | -256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT); |
575 | 575 | ||
576 | input_register_device(hdaps_idev); | 576 | input_register_device(hdaps_idev); |
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 6c41e25e670b..a61f5d00f10a 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c | |||
@@ -522,8 +522,15 @@ static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr, | |||
522 | struct i2c_client *client = to_i2c_client(dev); | 522 | struct i2c_client *client = to_i2c_client(dev); |
523 | struct it87_data *data = i2c_get_clientdata(client); | 523 | struct it87_data *data = i2c_get_clientdata(client); |
524 | int val = simple_strtol(buf, NULL, 10); | 524 | int val = simple_strtol(buf, NULL, 10); |
525 | u8 reg = it87_read_value(client, IT87_REG_FAN_DIV); | ||
525 | 526 | ||
526 | down(&data->update_lock); | 527 | down(&data->update_lock); |
528 | switch (nr) { | ||
529 | case 0: data->fan_div[nr] = reg & 0x07; break; | ||
530 | case 1: data->fan_div[nr] = (reg >> 3) & 0x07; break; | ||
531 | case 2: data->fan_div[nr] = (reg & 0x40) ? 3 : 1; break; | ||
532 | } | ||
533 | |||
527 | data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); | 534 | data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); |
528 | it87_write_value(client, IT87_REG_FAN_MIN(nr), data->fan_min[nr]); | 535 | it87_write_value(client, IT87_REG_FAN_MIN(nr), data->fan_min[nr]); |
529 | up(&data->update_lock); | 536 | up(&data->update_lock); |
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c index bde0cda9477e..78cdd506439f 100644 --- a/drivers/hwmon/lm78.c +++ b/drivers/hwmon/lm78.c | |||
@@ -451,7 +451,7 @@ static DEVICE_ATTR(fan3_div, S_IRUGO, show_fan_3_div, NULL); | |||
451 | static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf) | 451 | static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf) |
452 | { | 452 | { |
453 | struct lm78_data *data = lm78_update_device(dev); | 453 | struct lm78_data *data = lm78_update_device(dev); |
454 | return sprintf(buf, "%d\n", vid_from_reg(82, data->vid)); | 454 | return sprintf(buf, "%d\n", vid_from_reg(data->vid, 82)); |
455 | } | 455 | } |
456 | static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL); | 456 | static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL); |
457 | 457 | ||
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c index 4e9a04e1f08e..bbb3dcde146b 100644 --- a/drivers/hwmon/w83627hf.c +++ b/drivers/hwmon/w83627hf.c | |||
@@ -456,7 +456,9 @@ static ssize_t store_regs_in_min0(struct device *dev, struct device_attribute *a | |||
456 | (w83627thf == data->type || w83637hf == data->type)) | 456 | (w83627thf == data->type || w83637hf == data->type)) |
457 | 457 | ||
458 | /* use VRM9 calculation */ | 458 | /* use VRM9 calculation */ |
459 | data->in_min[0] = (u8)(((val * 100) - 70000 + 244) / 488); | 459 | data->in_min[0] = |
460 | SENSORS_LIMIT(((val * 100) - 70000 + 244) / 488, 0, | ||
461 | 255); | ||
460 | else | 462 | else |
461 | /* use VRM8 (standard) calculation */ | 463 | /* use VRM8 (standard) calculation */ |
462 | data->in_min[0] = IN_TO_REG(val); | 464 | data->in_min[0] = IN_TO_REG(val); |
@@ -481,7 +483,9 @@ static ssize_t store_regs_in_max0(struct device *dev, struct device_attribute *a | |||
481 | (w83627thf == data->type || w83637hf == data->type)) | 483 | (w83627thf == data->type || w83637hf == data->type)) |
482 | 484 | ||
483 | /* use VRM9 calculation */ | 485 | /* use VRM9 calculation */ |
484 | data->in_max[0] = (u8)(((val * 100) - 70000 + 244) / 488); | 486 | data->in_max[0] = |
487 | SENSORS_LIMIT(((val * 100) - 70000 + 244) / 488, 0, | ||
488 | 255); | ||
485 | else | 489 | else |
486 | /* use VRM8 (standard) calculation */ | 490 | /* use VRM8 (standard) calculation */ |
487 | data->in_max[0] = IN_TO_REG(val); | 491 | data->in_max[0] = IN_TO_REG(val); |
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 41d6b4017acb..d393b504bf26 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -355,9 +355,9 @@ error4: | |||
355 | spin_unlock_irqrestore(&port_priv->reg_lock, flags); | 355 | spin_unlock_irqrestore(&port_priv->reg_lock, flags); |
356 | kfree(reg_req); | 356 | kfree(reg_req); |
357 | error3: | 357 | error3: |
358 | kfree(mad_agent_priv); | ||
359 | error2: | ||
360 | ib_dereg_mr(mad_agent_priv->agent.mr); | 358 | ib_dereg_mr(mad_agent_priv->agent.mr); |
359 | error2: | ||
360 | kfree(mad_agent_priv); | ||
361 | error1: | 361 | error1: |
362 | return ret; | 362 | return ret; |
363 | } | 363 | } |
diff --git a/drivers/md/dm-bio-list.h b/drivers/md/dm-bio-list.h index bc021e1fd4d1..bbf4615f0e30 100644 --- a/drivers/md/dm-bio-list.h +++ b/drivers/md/dm-bio-list.h | |||
@@ -33,6 +33,9 @@ static inline void bio_list_add(struct bio_list *bl, struct bio *bio) | |||
33 | 33 | ||
34 | static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2) | 34 | static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2) |
35 | { | 35 | { |
36 | if (!bl2->head) | ||
37 | return; | ||
38 | |||
36 | if (bl->tail) | 39 | if (bl->tail) |
37 | bl->tail->bi_next = bl2->head; | 40 | bl->tail->bi_next = bl2->head; |
38 | else | 41 | else |
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 54ec737195e0..07d44e19536e 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -425,8 +425,8 @@ static void list_version_get_needed(struct target_type *tt, void *needed_param) | |||
425 | { | 425 | { |
426 | size_t *needed = needed_param; | 426 | size_t *needed = needed_param; |
427 | 427 | ||
428 | *needed += sizeof(struct dm_target_versions); | ||
428 | *needed += strlen(tt->name); | 429 | *needed += strlen(tt->name); |
429 | *needed += sizeof(tt->version); | ||
430 | *needed += ALIGN_MASK; | 430 | *needed += ALIGN_MASK; |
431 | } | 431 | } |
432 | 432 | ||
@@ -974,6 +974,7 @@ static int table_load(struct dm_ioctl *param, size_t param_size) | |||
974 | if (!hc) { | 974 | if (!hc) { |
975 | DMWARN("device doesn't appear to be in the dev hash table."); | 975 | DMWARN("device doesn't appear to be in the dev hash table."); |
976 | up_write(&_hash_lock); | 976 | up_write(&_hash_lock); |
977 | dm_table_put(t); | ||
977 | return -ENXIO; | 978 | return -ENXIO; |
978 | } | 979 | } |
979 | 980 | ||
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c index e110655eabdb..a76349cb10a5 100644 --- a/drivers/md/dm-log.c +++ b/drivers/md/dm-log.c | |||
@@ -333,10 +333,10 @@ static int core_ctr(struct dirty_log *log, struct dm_target *ti, | |||
333 | lc->sync = sync; | 333 | lc->sync = sync; |
334 | 334 | ||
335 | /* | 335 | /* |
336 | * Work out how many words we need to hold the bitset. | 336 | * Work out how many "unsigned long"s we need to hold the bitset. |
337 | */ | 337 | */ |
338 | bitset_size = dm_round_up(region_count, | 338 | bitset_size = dm_round_up(region_count, |
339 | sizeof(*lc->clean_bits) << BYTE_SHIFT); | 339 | sizeof(unsigned long) << BYTE_SHIFT); |
340 | bitset_size >>= BYTE_SHIFT; | 340 | bitset_size >>= BYTE_SHIFT; |
341 | 341 | ||
342 | lc->bitset_uint32_count = bitset_size / 4; | 342 | lc->bitset_uint32_count = bitset_size / 4; |
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index f9b7b32d5d5c..f72a82fb9434 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -1000,6 +1000,7 @@ static int do_end_io(struct multipath *m, struct bio *bio, | |||
1000 | { | 1000 | { |
1001 | struct hw_handler *hwh = &m->hw_handler; | 1001 | struct hw_handler *hwh = &m->hw_handler; |
1002 | unsigned err_flags = MP_FAIL_PATH; /* Default behavior */ | 1002 | unsigned err_flags = MP_FAIL_PATH; /* Default behavior */ |
1003 | unsigned long flags; | ||
1003 | 1004 | ||
1004 | if (!error) | 1005 | if (!error) |
1005 | return 0; /* I/O complete */ | 1006 | return 0; /* I/O complete */ |
@@ -1010,17 +1011,17 @@ static int do_end_io(struct multipath *m, struct bio *bio, | |||
1010 | if (error == -EOPNOTSUPP) | 1011 | if (error == -EOPNOTSUPP) |
1011 | return error; | 1012 | return error; |
1012 | 1013 | ||
1013 | spin_lock(&m->lock); | 1014 | spin_lock_irqsave(&m->lock, flags); |
1014 | if (!m->nr_valid_paths) { | 1015 | if (!m->nr_valid_paths) { |
1015 | if (!m->queue_if_no_path) { | 1016 | if (!m->queue_if_no_path) { |
1016 | spin_unlock(&m->lock); | 1017 | spin_unlock_irqrestore(&m->lock, flags); |
1017 | return -EIO; | 1018 | return -EIO; |
1018 | } else { | 1019 | } else { |
1019 | spin_unlock(&m->lock); | 1020 | spin_unlock_irqrestore(&m->lock, flags); |
1020 | goto requeue; | 1021 | goto requeue; |
1021 | } | 1022 | } |
1022 | } | 1023 | } |
1023 | spin_unlock(&m->lock); | 1024 | spin_unlock_irqrestore(&m->lock, flags); |
1024 | 1025 | ||
1025 | if (hwh->type && hwh->type->error) | 1026 | if (hwh->type && hwh->type->error) |
1026 | err_flags = hwh->type->error(hwh, bio); | 1027 | err_flags = hwh->type->error(hwh, bio); |
@@ -1040,12 +1041,12 @@ static int do_end_io(struct multipath *m, struct bio *bio, | |||
1040 | dm_bio_restore(&mpio->details, bio); | 1041 | dm_bio_restore(&mpio->details, bio); |
1041 | 1042 | ||
1042 | /* queue for the daemon to resubmit or fail */ | 1043 | /* queue for the daemon to resubmit or fail */ |
1043 | spin_lock(&m->lock); | 1044 | spin_lock_irqsave(&m->lock, flags); |
1044 | bio_list_add(&m->queued_ios, bio); | 1045 | bio_list_add(&m->queued_ios, bio); |
1045 | m->queue_size++; | 1046 | m->queue_size++; |
1046 | if (!m->queue_io) | 1047 | if (!m->queue_io) |
1047 | queue_work(kmultipathd, &m->process_queued_ios); | 1048 | queue_work(kmultipathd, &m->process_queued_ios); |
1048 | spin_unlock(&m->lock); | 1049 | spin_unlock_irqrestore(&m->lock, flags); |
1049 | 1050 | ||
1050 | return 1; /* io not complete */ | 1051 | return 1; /* io not complete */ |
1051 | } | 1052 | } |
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 2375709a392c..6b0fc1670929 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c | |||
@@ -376,16 +376,18 @@ static void rh_inc(struct region_hash *rh, region_t region) | |||
376 | read_lock(&rh->hash_lock); | 376 | read_lock(&rh->hash_lock); |
377 | reg = __rh_find(rh, region); | 377 | reg = __rh_find(rh, region); |
378 | 378 | ||
379 | spin_lock_irq(&rh->region_lock); | ||
379 | atomic_inc(®->pending); | 380 | atomic_inc(®->pending); |
380 | 381 | ||
381 | spin_lock_irq(&rh->region_lock); | ||
382 | if (reg->state == RH_CLEAN) { | 382 | if (reg->state == RH_CLEAN) { |
383 | rh->log->type->mark_region(rh->log, reg->key); | ||
384 | |||
385 | reg->state = RH_DIRTY; | 383 | reg->state = RH_DIRTY; |
386 | list_del_init(®->list); /* take off the clean list */ | 384 | list_del_init(®->list); /* take off the clean list */ |
387 | } | 385 | spin_unlock_irq(&rh->region_lock); |
388 | spin_unlock_irq(&rh->region_lock); | 386 | |
387 | rh->log->type->mark_region(rh->log, reg->key); | ||
388 | } else | ||
389 | spin_unlock_irq(&rh->region_lock); | ||
390 | |||
389 | 391 | ||
390 | read_unlock(&rh->hash_lock); | 392 | read_unlock(&rh->hash_lock); |
391 | } | 393 | } |
@@ -408,21 +410,17 @@ static void rh_dec(struct region_hash *rh, region_t region) | |||
408 | reg = __rh_lookup(rh, region); | 410 | reg = __rh_lookup(rh, region); |
409 | read_unlock(&rh->hash_lock); | 411 | read_unlock(&rh->hash_lock); |
410 | 412 | ||
413 | spin_lock_irqsave(&rh->region_lock, flags); | ||
411 | if (atomic_dec_and_test(®->pending)) { | 414 | if (atomic_dec_and_test(®->pending)) { |
412 | spin_lock_irqsave(&rh->region_lock, flags); | ||
413 | if (atomic_read(®->pending)) { /* check race */ | ||
414 | spin_unlock_irqrestore(&rh->region_lock, flags); | ||
415 | return; | ||
416 | } | ||
417 | if (reg->state == RH_RECOVERING) { | 415 | if (reg->state == RH_RECOVERING) { |
418 | list_add_tail(®->list, &rh->quiesced_regions); | 416 | list_add_tail(®->list, &rh->quiesced_regions); |
419 | } else { | 417 | } else { |
420 | reg->state = RH_CLEAN; | 418 | reg->state = RH_CLEAN; |
421 | list_add(®->list, &rh->clean_regions); | 419 | list_add(®->list, &rh->clean_regions); |
422 | } | 420 | } |
423 | spin_unlock_irqrestore(&rh->region_lock, flags); | ||
424 | should_wake = 1; | 421 | should_wake = 1; |
425 | } | 422 | } |
423 | spin_unlock_irqrestore(&rh->region_lock, flags); | ||
426 | 424 | ||
427 | if (should_wake) | 425 | if (should_wake) |
428 | wake(); | 426 | wake(); |
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c index 66c03e882570..81ef306cb124 100644 --- a/drivers/message/i2o/pci.c +++ b/drivers/message/i2o/pci.c | |||
@@ -421,8 +421,8 @@ static int __devinit i2o_pci_probe(struct pci_dev *pdev, | |||
421 | i2o_pci_free(c); | 421 | i2o_pci_free(c); |
422 | 422 | ||
423 | free_controller: | 423 | free_controller: |
424 | i2o_iop_free(c); | ||
425 | put_device(c->device.parent); | 424 | put_device(c->device.parent); |
425 | i2o_iop_free(c); | ||
426 | 426 | ||
427 | disable: | 427 | disable: |
428 | pci_disable_device(pdev); | 428 | pci_disable_device(pdev); |
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c index 2a290cc397ad..70b47e4c4e9c 100644 --- a/drivers/net/dgrs.c +++ b/drivers/net/dgrs.c | |||
@@ -1458,6 +1458,8 @@ static struct pci_driver dgrs_pci_driver = { | |||
1458 | .probe = dgrs_pci_probe, | 1458 | .probe = dgrs_pci_probe, |
1459 | .remove = __devexit_p(dgrs_pci_remove), | 1459 | .remove = __devexit_p(dgrs_pci_remove), |
1460 | }; | 1460 | }; |
1461 | #else | ||
1462 | static struct pci_driver dgrs_pci_driver = {}; | ||
1461 | #endif | 1463 | #endif |
1462 | 1464 | ||
1463 | 1465 | ||
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index c42b68d3aa24..6a61b9f286e1 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -59,7 +59,6 @@ struct slot { | |||
59 | struct slot *next; | 59 | struct slot *next; |
60 | u8 bus; | 60 | u8 bus; |
61 | u8 device; | 61 | u8 device; |
62 | u16 status; | ||
63 | u32 number; | 62 | u32 number; |
64 | u8 state; | 63 | u8 state; |
65 | struct timer_list task_event; | 64 | struct timer_list task_event; |
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 5e582eca21d8..83c4b865718a 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c | |||
@@ -207,7 +207,6 @@ u8 pciehp_handle_power_fault(u8 hp_slot, void *inst_id) | |||
207 | * power fault Cleared | 207 | * power fault Cleared |
208 | */ | 208 | */ |
209 | info("Power fault cleared on Slot(%d)\n", ctrl->first_slot + hp_slot); | 209 | info("Power fault cleared on Slot(%d)\n", ctrl->first_slot + hp_slot); |
210 | p_slot->status = 0x00; | ||
211 | taskInfo->event_type = INT_POWER_FAULT_CLEAR; | 210 | taskInfo->event_type = INT_POWER_FAULT_CLEAR; |
212 | } else { | 211 | } else { |
213 | /* | 212 | /* |
@@ -215,8 +214,6 @@ u8 pciehp_handle_power_fault(u8 hp_slot, void *inst_id) | |||
215 | */ | 214 | */ |
216 | info("Power fault on Slot(%d)\n", ctrl->first_slot + hp_slot); | 215 | info("Power fault on Slot(%d)\n", ctrl->first_slot + hp_slot); |
217 | taskInfo->event_type = INT_POWER_FAULT; | 216 | taskInfo->event_type = INT_POWER_FAULT; |
218 | /* set power fault status for this board */ | ||
219 | p_slot->status = 0xFF; | ||
220 | info("power fault bit %x set\n", hp_slot); | 217 | info("power fault bit %x set\n", hp_slot); |
221 | } | 218 | } |
222 | if (rc) | 219 | if (rc) |
@@ -317,13 +314,10 @@ static int board_added(struct slot *p_slot) | |||
317 | return rc; | 314 | return rc; |
318 | } | 315 | } |
319 | 316 | ||
320 | dbg("%s: slot status = %x\n", __FUNCTION__, p_slot->status); | ||
321 | |||
322 | /* Check for a power fault */ | 317 | /* Check for a power fault */ |
323 | if (p_slot->status == 0xFF) { | 318 | if (p_slot->hpc_ops->query_power_fault(p_slot)) { |
324 | /* power fault occurred, but it was benign */ | 319 | dbg("%s: power fault detected\n", __FUNCTION__); |
325 | rc = POWER_FAILURE; | 320 | rc = POWER_FAILURE; |
326 | p_slot->status = 0; | ||
327 | goto err_exit; | 321 | goto err_exit; |
328 | } | 322 | } |
329 | 323 | ||
@@ -334,8 +328,6 @@ static int board_added(struct slot *p_slot) | |||
334 | goto err_exit; | 328 | goto err_exit; |
335 | } | 329 | } |
336 | 330 | ||
337 | p_slot->status = 0; | ||
338 | |||
339 | /* | 331 | /* |
340 | * Some PCI Express root ports require fixup after hot-plug operation. | 332 | * Some PCI Express root ports require fixup after hot-plug operation. |
341 | */ | 333 | */ |
@@ -382,9 +374,6 @@ static int remove_board(struct slot *p_slot) | |||
382 | 374 | ||
383 | dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot); | 375 | dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot); |
384 | 376 | ||
385 | /* Change status to shutdown */ | ||
386 | p_slot->status = 0x01; | ||
387 | |||
388 | /* Wait for exclusive access to hardware */ | 377 | /* Wait for exclusive access to hardware */ |
389 | down(&ctrl->crit_sect); | 378 | down(&ctrl->crit_sect); |
390 | 379 | ||
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 2387e75da0fe..0b8b26beb163 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -750,7 +750,7 @@ static int hpc_power_on_slot(struct slot * slot) | |||
750 | { | 750 | { |
751 | struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; | 751 | struct php_ctlr_state_s *php_ctlr = slot->ctrl->hpc_ctlr_handle; |
752 | u16 slot_cmd; | 752 | u16 slot_cmd; |
753 | u16 slot_ctrl; | 753 | u16 slot_ctrl, slot_status; |
754 | 754 | ||
755 | int retval = 0; | 755 | int retval = 0; |
756 | 756 | ||
@@ -767,6 +767,14 @@ static int hpc_power_on_slot(struct slot * slot) | |||
767 | return -1; | 767 | return -1; |
768 | } | 768 | } |
769 | 769 | ||
770 | /* Clear sticky power-fault bit from previous power failures */ | ||
771 | hp_register_read_word(php_ctlr->pci_dev, | ||
772 | SLOT_STATUS(slot->ctrl->cap_base), slot_status); | ||
773 | slot_status &= PWR_FAULT_DETECTED; | ||
774 | if (slot_status) | ||
775 | hp_register_write_word(php_ctlr->pci_dev, | ||
776 | SLOT_STATUS(slot->ctrl->cap_base), slot_status); | ||
777 | |||
770 | retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_CTRL(slot->ctrl->cap_base), slot_ctrl); | 778 | retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_CTRL(slot->ctrl->cap_base), slot_ctrl); |
771 | 779 | ||
772 | if (retval) { | 780 | if (retval) { |
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index a9b00cc2d885..6917c6cb0912 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -178,6 +178,7 @@ EXPORT_SYMBOL(pci_osc_support_set); | |||
178 | 178 | ||
179 | /** | 179 | /** |
180 | * pci_osc_control_set - commit requested control to Firmware | 180 | * pci_osc_control_set - commit requested control to Firmware |
181 | * @handle: acpi_handle for the target ACPI object | ||
181 | * @flags: driver's requested control bits | 182 | * @flags: driver's requested control bits |
182 | * | 183 | * |
183 | * Attempt to take control from Firmware on requested control bits. | 184 | * Attempt to take control from Firmware on requested control bits. |
diff --git a/drivers/sbus/char/aurora.c b/drivers/sbus/char/aurora.c index 672f9f2b2163..92e6c5639dd3 100644 --- a/drivers/sbus/char/aurora.c +++ b/drivers/sbus/char/aurora.c | |||
@@ -124,25 +124,25 @@ static inline int aurora_paranoia_check(struct Aurora_port const * port, | |||
124 | */ | 124 | */ |
125 | 125 | ||
126 | /* Get board number from pointer */ | 126 | /* Get board number from pointer */ |
127 | extern inline int board_No (struct Aurora_board const * bp) | 127 | static inline int board_No (struct Aurora_board const * bp) |
128 | { | 128 | { |
129 | return bp - aurora_board; | 129 | return bp - aurora_board; |
130 | } | 130 | } |
131 | 131 | ||
132 | /* Get port number from pointer */ | 132 | /* Get port number from pointer */ |
133 | extern inline int port_No (struct Aurora_port const * port) | 133 | static inline int port_No (struct Aurora_port const * port) |
134 | { | 134 | { |
135 | return AURORA_PORT(port - aurora_port); | 135 | return AURORA_PORT(port - aurora_port); |
136 | } | 136 | } |
137 | 137 | ||
138 | /* Get pointer to board from pointer to port */ | 138 | /* Get pointer to board from pointer to port */ |
139 | extern inline struct Aurora_board * port_Board(struct Aurora_port const * port) | 139 | static inline struct Aurora_board * port_Board(struct Aurora_port const * port) |
140 | { | 140 | { |
141 | return &aurora_board[AURORA_BOARD(port - aurora_port)]; | 141 | return &aurora_board[AURORA_BOARD(port - aurora_port)]; |
142 | } | 142 | } |
143 | 143 | ||
144 | /* Wait for Channel Command Register ready */ | 144 | /* Wait for Channel Command Register ready */ |
145 | extern inline void aurora_wait_CCR(struct aurora_reg128 * r) | 145 | static inline void aurora_wait_CCR(struct aurora_reg128 * r) |
146 | { | 146 | { |
147 | unsigned long delay; | 147 | unsigned long delay; |
148 | 148 | ||
@@ -161,7 +161,7 @@ printk("aurora_wait_CCR\n"); | |||
161 | */ | 161 | */ |
162 | 162 | ||
163 | /* Must be called with enabled interrupts */ | 163 | /* Must be called with enabled interrupts */ |
164 | extern inline void aurora_long_delay(unsigned long delay) | 164 | static inline void aurora_long_delay(unsigned long delay) |
165 | { | 165 | { |
166 | unsigned long i; | 166 | unsigned long i; |
167 | 167 | ||
@@ -420,7 +420,7 @@ static void aurora_release_io_range(struct Aurora_board *bp) | |||
420 | sbus_iounmap((unsigned long)bp->r3, 4); | 420 | sbus_iounmap((unsigned long)bp->r3, 4); |
421 | } | 421 | } |
422 | 422 | ||
423 | extern inline void aurora_mark_event(struct Aurora_port * port, int event) | 423 | static inline void aurora_mark_event(struct Aurora_port * port, int event) |
424 | { | 424 | { |
425 | #ifdef AURORA_DEBUG | 425 | #ifdef AURORA_DEBUG |
426 | printk("aurora_mark_event: start\n"); | 426 | printk("aurora_mark_event: start\n"); |
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index c28e3aea1c3c..418fc7b896ac 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -816,7 +816,7 @@ static int adpt_hba_reset(adpt_hba* pHba) | |||
816 | static void adpt_i2o_sys_shutdown(void) | 816 | static void adpt_i2o_sys_shutdown(void) |
817 | { | 817 | { |
818 | adpt_hba *pHba, *pNext; | 818 | adpt_hba *pHba, *pNext; |
819 | struct adpt_i2o_post_wait_data *p1, *p2; | 819 | struct adpt_i2o_post_wait_data *p1, *old; |
820 | 820 | ||
821 | printk(KERN_INFO"Shutting down Adaptec I2O controllers.\n"); | 821 | printk(KERN_INFO"Shutting down Adaptec I2O controllers.\n"); |
822 | printk(KERN_INFO" This could take a few minutes if there are many devices attached\n"); | 822 | printk(KERN_INFO" This could take a few minutes if there are many devices attached\n"); |
@@ -830,13 +830,14 @@ static void adpt_i2o_sys_shutdown(void) | |||
830 | } | 830 | } |
831 | 831 | ||
832 | /* Remove any timedout entries from the wait queue. */ | 832 | /* Remove any timedout entries from the wait queue. */ |
833 | p2 = NULL; | ||
834 | // spin_lock_irqsave(&adpt_post_wait_lock, flags); | 833 | // spin_lock_irqsave(&adpt_post_wait_lock, flags); |
835 | /* Nothing should be outstanding at this point so just | 834 | /* Nothing should be outstanding at this point so just |
836 | * free them | 835 | * free them |
837 | */ | 836 | */ |
838 | for(p1 = adpt_post_wait_queue; p1; p2 = p1, p1 = p2->next) { | 837 | for(p1 = adpt_post_wait_queue; p1;) { |
839 | kfree(p1); | 838 | old = p1; |
839 | p1 = p1->next; | ||
840 | kfree(old); | ||
840 | } | 841 | } |
841 | // spin_unlock_irqrestore(&adpt_post_wait_lock, flags); | 842 | // spin_unlock_irqrestore(&adpt_post_wait_lock, flags); |
842 | adpt_post_wait_queue = NULL; | 843 | adpt_post_wait_queue = NULL; |
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 0be60bba58d3..180676d7115a 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c | |||
@@ -265,10 +265,10 @@ struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, gfp_t gfp_mask) | |||
265 | spin_lock_irqsave(&dev->list_lock, flags); | 265 | spin_lock_irqsave(&dev->list_lock, flags); |
266 | list_add_tail(&cmd->list, &dev->cmd_list); | 266 | list_add_tail(&cmd->list, &dev->cmd_list); |
267 | spin_unlock_irqrestore(&dev->list_lock, flags); | 267 | spin_unlock_irqrestore(&dev->list_lock, flags); |
268 | cmd->jiffies_at_alloc = jiffies; | ||
268 | } else | 269 | } else |
269 | put_device(&dev->sdev_gendev); | 270 | put_device(&dev->sdev_gendev); |
270 | 271 | ||
271 | cmd->jiffies_at_alloc = jiffies; | ||
272 | return cmd; | 272 | return cmd; |
273 | } | 273 | } |
274 | EXPORT_SYMBOL(scsi_get_command); | 274 | EXPORT_SYMBOL(scsi_get_command); |
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 7feb829362d6..5131d88e8c5b 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -20,9 +20,17 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/pci.h> | 22 | #include <linux/pci.h> |
23 | #include <linux/usb.h> | ||
24 | |||
23 | #include <asm/io.h> | 25 | #include <asm/io.h> |
24 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
25 | #include <linux/usb.h> | 27 | |
28 | #ifdef CONFIG_PPC_PMAC | ||
29 | #include <asm/machdep.h> | ||
30 | #include <asm/pmac_feature.h> | ||
31 | #include <asm/pci-bridge.h> | ||
32 | #include <asm/prom.h> | ||
33 | #endif | ||
26 | 34 | ||
27 | #include "usb.h" | 35 | #include "usb.h" |
28 | #include "hcd.h" | 36 | #include "hcd.h" |
@@ -277,8 +285,22 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message) | |||
277 | } | 285 | } |
278 | 286 | ||
279 | done: | 287 | done: |
280 | if (retval == 0) | 288 | if (retval == 0) { |
281 | dev->dev.power.power_state = PMSG_SUSPEND; | 289 | dev->dev.power.power_state = PMSG_SUSPEND; |
290 | |||
291 | #ifdef CONFIG_PPC_PMAC | ||
292 | /* Disable ASIC clocks for USB */ | ||
293 | if (_machine == _MACH_Pmac) { | ||
294 | struct device_node *of_node; | ||
295 | |||
296 | of_node = pci_device_to_OF_node (dev); | ||
297 | if (of_node) | ||
298 | pmac_call_feature(PMAC_FTR_USB_ENABLE, | ||
299 | of_node, 0, 0); | ||
300 | } | ||
301 | #endif | ||
302 | } | ||
303 | |||
282 | return retval; | 304 | return retval; |
283 | } | 305 | } |
284 | EXPORT_SYMBOL (usb_hcd_pci_suspend); | 306 | EXPORT_SYMBOL (usb_hcd_pci_suspend); |
@@ -301,6 +323,18 @@ int usb_hcd_pci_resume (struct pci_dev *dev) | |||
301 | return 0; | 323 | return 0; |
302 | } | 324 | } |
303 | 325 | ||
326 | #ifdef CONFIG_PPC_PMAC | ||
327 | /* Reenable ASIC clocks for USB */ | ||
328 | if (_machine == _MACH_Pmac) { | ||
329 | struct device_node *of_node; | ||
330 | |||
331 | of_node = pci_device_to_OF_node (dev); | ||
332 | if (of_node) | ||
333 | pmac_call_feature (PMAC_FTR_USB_ENABLE, | ||
334 | of_node, 0, 1); | ||
335 | } | ||
336 | #endif | ||
337 | |||
304 | /* NOTE: chip docs cover clean "real suspend" cases (what Linux | 338 | /* NOTE: chip docs cover clean "real suspend" cases (what Linux |
305 | * calls "standby", "suspend to RAM", and so on). There are also | 339 | * calls "standby", "suspend to RAM", and so on). There are also |
306 | * dirty cases when swsusp fakes a suspend in "shutdown" mode. | 340 | * dirty cases when swsusp fakes a suspend in "shutdown" mode. |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 840727948d84..f78bd124d290 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1669,7 +1669,6 @@ int usb_suspend_device(struct usb_device *udev) | |||
1669 | return 0; | 1669 | return 0; |
1670 | #endif | 1670 | #endif |
1671 | } | 1671 | } |
1672 | EXPORT_SYMBOL_GPL(usb_suspend_device); | ||
1673 | 1672 | ||
1674 | /* | 1673 | /* |
1675 | * If the USB "suspend" state is in use (rather than "global suspend"), | 1674 | * If the USB "suspend" state is in use (rather than "global suspend"), |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index af3c05eb86fc..29f52a44b928 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -411,50 +411,39 @@ static void ehci_stop (struct usb_hcd *hcd) | |||
411 | dbg_status (ehci, "ehci_stop completed", readl (&ehci->regs->status)); | 411 | dbg_status (ehci, "ehci_stop completed", readl (&ehci->regs->status)); |
412 | } | 412 | } |
413 | 413 | ||
414 | static int ehci_run (struct usb_hcd *hcd) | 414 | /* one-time init, only for memory state */ |
415 | static int ehci_init(struct usb_hcd *hcd) | ||
415 | { | 416 | { |
416 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); | 417 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
417 | u32 temp; | 418 | u32 temp; |
418 | int retval; | 419 | int retval; |
419 | u32 hcc_params; | 420 | u32 hcc_params; |
420 | int first; | 421 | |
421 | 422 | spin_lock_init(&ehci->lock); | |
422 | /* skip some things on restart paths */ | 423 | |
423 | first = (ehci->watchdog.data == 0); | 424 | init_timer(&ehci->watchdog); |
424 | if (first) { | 425 | ehci->watchdog.function = ehci_watchdog; |
425 | init_timer (&ehci->watchdog); | 426 | ehci->watchdog.data = (unsigned long) ehci; |
426 | ehci->watchdog.function = ehci_watchdog; | ||
427 | ehci->watchdog.data = (unsigned long) ehci; | ||
428 | } | ||
429 | 427 | ||
430 | /* | 428 | /* |
431 | * hw default: 1K periodic list heads, one per frame. | 429 | * hw default: 1K periodic list heads, one per frame. |
432 | * periodic_size can shrink by USBCMD update if hcc_params allows. | 430 | * periodic_size can shrink by USBCMD update if hcc_params allows. |
433 | */ | 431 | */ |
434 | ehci->periodic_size = DEFAULT_I_TDPS; | 432 | ehci->periodic_size = DEFAULT_I_TDPS; |
435 | if (first && (retval = ehci_mem_init (ehci, GFP_KERNEL)) < 0) | 433 | if ((retval = ehci_mem_init(ehci, GFP_KERNEL)) < 0) |
436 | return retval; | 434 | return retval; |
437 | 435 | ||
438 | /* controllers may cache some of the periodic schedule ... */ | 436 | /* controllers may cache some of the periodic schedule ... */ |
439 | hcc_params = readl (&ehci->caps->hcc_params); | 437 | hcc_params = readl(&ehci->caps->hcc_params); |
440 | if (HCC_ISOC_CACHE (hcc_params)) // full frame cache | 438 | if (HCC_ISOC_CACHE(hcc_params)) // full frame cache |
441 | ehci->i_thresh = 8; | 439 | ehci->i_thresh = 8; |
442 | else // N microframes cached | 440 | else // N microframes cached |
443 | ehci->i_thresh = 2 + HCC_ISOC_THRES (hcc_params); | 441 | ehci->i_thresh = 2 + HCC_ISOC_THRES(hcc_params); |
444 | 442 | ||
445 | ehci->reclaim = NULL; | 443 | ehci->reclaim = NULL; |
446 | ehci->reclaim_ready = 0; | 444 | ehci->reclaim_ready = 0; |
447 | ehci->next_uframe = -1; | 445 | ehci->next_uframe = -1; |
448 | 446 | ||
449 | /* controller state: unknown --> reset */ | ||
450 | |||
451 | /* EHCI spec section 4.1 */ | ||
452 | if ((retval = ehci_reset (ehci)) != 0) { | ||
453 | ehci_mem_cleanup (ehci); | ||
454 | return retval; | ||
455 | } | ||
456 | writel (ehci->periodic_dma, &ehci->regs->frame_list); | ||
457 | |||
458 | /* | 447 | /* |
459 | * dedicate a qh for the async ring head, since we couldn't unlink | 448 | * dedicate a qh for the async ring head, since we couldn't unlink |
460 | * a 'real' qh without stopping the async schedule [4.8]. use it | 449 | * a 'real' qh without stopping the async schedule [4.8]. use it |
@@ -462,37 +451,13 @@ static int ehci_run (struct usb_hcd *hcd) | |||
462 | * its dummy is used in hw_alt_next of many tds, to prevent the qh | 451 | * its dummy is used in hw_alt_next of many tds, to prevent the qh |
463 | * from automatically advancing to the next td after short reads. | 452 | * from automatically advancing to the next td after short reads. |
464 | */ | 453 | */ |
465 | if (first) { | 454 | ehci->async->qh_next.qh = NULL; |
466 | ehci->async->qh_next.qh = NULL; | 455 | ehci->async->hw_next = QH_NEXT(ehci->async->qh_dma); |
467 | ehci->async->hw_next = QH_NEXT (ehci->async->qh_dma); | 456 | ehci->async->hw_info1 = cpu_to_le32(QH_HEAD); |
468 | ehci->async->hw_info1 = cpu_to_le32 (QH_HEAD); | 457 | ehci->async->hw_token = cpu_to_le32(QTD_STS_HALT); |
469 | ehci->async->hw_token = cpu_to_le32 (QTD_STS_HALT); | 458 | ehci->async->hw_qtd_next = EHCI_LIST_END; |
470 | ehci->async->hw_qtd_next = EHCI_LIST_END; | 459 | ehci->async->qh_state = QH_STATE_LINKED; |
471 | ehci->async->qh_state = QH_STATE_LINKED; | 460 | ehci->async->hw_alt_next = QTD_NEXT(ehci->async->dummy->qtd_dma); |
472 | ehci->async->hw_alt_next = QTD_NEXT (ehci->async->dummy->qtd_dma); | ||
473 | } | ||
474 | writel ((u32)ehci->async->qh_dma, &ehci->regs->async_next); | ||
475 | |||
476 | /* | ||
477 | * hcc_params controls whether ehci->regs->segment must (!!!) | ||
478 | * be used; it constrains QH/ITD/SITD and QTD locations. | ||
479 | * pci_pool consistent memory always uses segment zero. | ||
480 | * streaming mappings for I/O buffers, like pci_map_single(), | ||
481 | * can return segments above 4GB, if the device allows. | ||
482 | * | ||
483 | * NOTE: the dma mask is visible through dma_supported(), so | ||
484 | * drivers can pass this info along ... like NETIF_F_HIGHDMA, | ||
485 | * Scsi_Host.highmem_io, and so forth. It's readonly to all | ||
486 | * host side drivers though. | ||
487 | */ | ||
488 | if (HCC_64BIT_ADDR (hcc_params)) { | ||
489 | writel (0, &ehci->regs->segment); | ||
490 | #if 0 | ||
491 | // this is deeply broken on almost all architectures | ||
492 | if (!dma_set_mask (hcd->self.controller, DMA_64BIT_MASK)) | ||
493 | ehci_info (ehci, "enabled 64bit DMA\n"); | ||
494 | #endif | ||
495 | } | ||
496 | 461 | ||
497 | /* clear interrupt enables, set irq latency */ | 462 | /* clear interrupt enables, set irq latency */ |
498 | if (log2_irq_thresh < 0 || log2_irq_thresh > 6) | 463 | if (log2_irq_thresh < 0 || log2_irq_thresh > 6) |
@@ -507,13 +472,13 @@ static int ehci_run (struct usb_hcd *hcd) | |||
507 | * make problems: throughput reduction (!), data errors... | 472 | * make problems: throughput reduction (!), data errors... |
508 | */ | 473 | */ |
509 | if (park) { | 474 | if (park) { |
510 | park = min (park, (unsigned) 3); | 475 | park = min(park, (unsigned) 3); |
511 | temp |= CMD_PARK; | 476 | temp |= CMD_PARK; |
512 | temp |= park << 8; | 477 | temp |= park << 8; |
513 | } | 478 | } |
514 | ehci_info (ehci, "park %d\n", park); | 479 | ehci_dbg(ehci, "park %d\n", park); |
515 | } | 480 | } |
516 | if (HCC_PGM_FRAMELISTLEN (hcc_params)) { | 481 | if (HCC_PGM_FRAMELISTLEN(hcc_params)) { |
517 | /* periodic schedule size can be smaller than default */ | 482 | /* periodic schedule size can be smaller than default */ |
518 | temp &= ~(3 << 2); | 483 | temp &= ~(3 << 2); |
519 | temp |= (EHCI_TUNE_FLS << 2); | 484 | temp |= (EHCI_TUNE_FLS << 2); |
@@ -521,16 +486,63 @@ static int ehci_run (struct usb_hcd *hcd) | |||
521 | case 0: ehci->periodic_size = 1024; break; | 486 | case 0: ehci->periodic_size = 1024; break; |
522 | case 1: ehci->periodic_size = 512; break; | 487 | case 1: ehci->periodic_size = 512; break; |
523 | case 2: ehci->periodic_size = 256; break; | 488 | case 2: ehci->periodic_size = 256; break; |
524 | default: BUG (); | 489 | default: BUG(); |
525 | } | 490 | } |
526 | } | 491 | } |
492 | ehci->command = temp; | ||
493 | |||
494 | ehci->reboot_notifier.notifier_call = ehci_reboot; | ||
495 | register_reboot_notifier(&ehci->reboot_notifier); | ||
496 | |||
497 | return 0; | ||
498 | } | ||
499 | |||
500 | /* start HC running; it's halted, ehci_init() has been run (once) */ | ||
501 | static int ehci_run (struct usb_hcd *hcd) | ||
502 | { | ||
503 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); | ||
504 | int retval; | ||
505 | u32 temp; | ||
506 | u32 hcc_params; | ||
507 | |||
508 | /* EHCI spec section 4.1 */ | ||
509 | if ((retval = ehci_reset(ehci)) != 0) { | ||
510 | unregister_reboot_notifier(&ehci->reboot_notifier); | ||
511 | ehci_mem_cleanup(ehci); | ||
512 | return retval; | ||
513 | } | ||
514 | writel(ehci->periodic_dma, &ehci->regs->frame_list); | ||
515 | writel((u32)ehci->async->qh_dma, &ehci->regs->async_next); | ||
516 | |||
517 | /* | ||
518 | * hcc_params controls whether ehci->regs->segment must (!!!) | ||
519 | * be used; it constrains QH/ITD/SITD and QTD locations. | ||
520 | * pci_pool consistent memory always uses segment zero. | ||
521 | * streaming mappings for I/O buffers, like pci_map_single(), | ||
522 | * can return segments above 4GB, if the device allows. | ||
523 | * | ||
524 | * NOTE: the dma mask is visible through dma_supported(), so | ||
525 | * drivers can pass this info along ... like NETIF_F_HIGHDMA, | ||
526 | * Scsi_Host.highmem_io, and so forth. It's readonly to all | ||
527 | * host side drivers though. | ||
528 | */ | ||
529 | hcc_params = readl(&ehci->caps->hcc_params); | ||
530 | if (HCC_64BIT_ADDR(hcc_params)) { | ||
531 | writel(0, &ehci->regs->segment); | ||
532 | #if 0 | ||
533 | // this is deeply broken on almost all architectures | ||
534 | if (!dma_set_mask(hcd->self.controller, DMA_64BIT_MASK)) | ||
535 | ehci_info(ehci, "enabled 64bit DMA\n"); | ||
536 | #endif | ||
537 | } | ||
538 | |||
539 | |||
527 | // Philips, Intel, and maybe others need CMD_RUN before the | 540 | // Philips, Intel, and maybe others need CMD_RUN before the |
528 | // root hub will detect new devices (why?); NEC doesn't | 541 | // root hub will detect new devices (why?); NEC doesn't |
529 | temp |= CMD_RUN; | 542 | ehci->command &= ~(CMD_LRESET|CMD_IAAD|CMD_PSE|CMD_ASE|CMD_RESET); |
530 | writel (temp, &ehci->regs->command); | 543 | ehci->command |= CMD_RUN; |
531 | dbg_cmd (ehci, "init", temp); | 544 | writel (ehci->command, &ehci->regs->command); |
532 | 545 | dbg_cmd (ehci, "init", ehci->command); | |
533 | /* set async sleep time = 10 us ... ? */ | ||
534 | 546 | ||
535 | /* | 547 | /* |
536 | * Start, enabling full USB 2.0 functionality ... usb 1.1 devices | 548 | * Start, enabling full USB 2.0 functionality ... usb 1.1 devices |
@@ -538,26 +550,23 @@ static int ehci_run (struct usb_hcd *hcd) | |||
538 | * involved with the root hub. (Except where one is integrated, | 550 | * involved with the root hub. (Except where one is integrated, |
539 | * and there's no companion controller unless maybe for USB OTG.) | 551 | * and there's no companion controller unless maybe for USB OTG.) |
540 | */ | 552 | */ |
541 | if (first) { | ||
542 | ehci->reboot_notifier.notifier_call = ehci_reboot; | ||
543 | register_reboot_notifier (&ehci->reboot_notifier); | ||
544 | } | ||
545 | |||
546 | hcd->state = HC_STATE_RUNNING; | 553 | hcd->state = HC_STATE_RUNNING; |
547 | writel (FLAG_CF, &ehci->regs->configured_flag); | 554 | writel (FLAG_CF, &ehci->regs->configured_flag); |
548 | readl (&ehci->regs->command); /* unblock posted write */ | 555 | readl (&ehci->regs->command); /* unblock posted writes */ |
549 | 556 | ||
550 | temp = HC_VERSION(readl (&ehci->caps->hc_capbase)); | 557 | temp = HC_VERSION(readl (&ehci->caps->hc_capbase)); |
551 | ehci_info (ehci, | 558 | ehci_info (ehci, |
552 | "USB %x.%x %s, EHCI %x.%02x, driver %s\n", | 559 | "USB %x.%x started, EHCI %x.%02x, driver %s\n", |
553 | ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), | 560 | ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), |
554 | first ? "initialized" : "restarted", | ||
555 | temp >> 8, temp & 0xff, DRIVER_VERSION); | 561 | temp >> 8, temp & 0xff, DRIVER_VERSION); |
556 | 562 | ||
557 | writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */ | 563 | writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */ |
558 | 564 | ||
559 | if (first) | 565 | /* GRR this is run-once init(), being done every time the HC starts. |
560 | create_debug_files (ehci); | 566 | * So long as they're part of class devices, we can't do it init() |
567 | * since the class device isn't created that early. | ||
568 | */ | ||
569 | create_debug_files(ehci); | ||
561 | 570 | ||
562 | return 0; | 571 | return 0; |
563 | } | 572 | } |
@@ -636,9 +645,8 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs) | |||
636 | * stop that signaling. | 645 | * stop that signaling. |
637 | */ | 646 | */ |
638 | ehci->reset_done [i] = jiffies + msecs_to_jiffies (20); | 647 | ehci->reset_done [i] = jiffies + msecs_to_jiffies (20); |
639 | mod_timer (&hcd->rh_timer, | ||
640 | ehci->reset_done [i] + 1); | ||
641 | ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); | 648 | ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); |
649 | usb_hcd_resume_root_hub(hcd); | ||
642 | } | 650 | } |
643 | } | 651 | } |
644 | 652 | ||
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 88cb4ada686e..82caf336e9b6 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -94,6 +94,13 @@ static int ehci_bus_resume (struct usb_hcd *hcd) | |||
94 | msleep(5); | 94 | msleep(5); |
95 | spin_lock_irq (&ehci->lock); | 95 | spin_lock_irq (&ehci->lock); |
96 | 96 | ||
97 | /* Ideally and we've got a real resume here, and no port's power | ||
98 | * was lost. (For PCI, that means Vaux was maintained.) But we | ||
99 | * could instead be restoring a swsusp snapshot -- so that BIOS was | ||
100 | * the last user of the controller, not reset/pm hardware keeping | ||
101 | * state we gave to it. | ||
102 | */ | ||
103 | |||
97 | /* re-init operational registers in case we lost power */ | 104 | /* re-init operational registers in case we lost power */ |
98 | if (readl (&ehci->regs->intr_enable) == 0) { | 105 | if (readl (&ehci->regs->intr_enable) == 0) { |
99 | /* at least some APM implementations will try to deliver | 106 | /* at least some APM implementations will try to deliver |
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index dfd9bd0b1828..441c26064b44 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c | |||
@@ -27,7 +27,7 @@ | |||
27 | /* EHCI 0.96 (and later) section 5.1 says how to kick BIOS/SMM/... | 27 | /* EHCI 0.96 (and later) section 5.1 says how to kick BIOS/SMM/... |
28 | * off the controller (maybe it can boot from highspeed USB disks). | 28 | * off the controller (maybe it can boot from highspeed USB disks). |
29 | */ | 29 | */ |
30 | static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap) | 30 | static int bios_handoff(struct ehci_hcd *ehci, int where, u32 cap) |
31 | { | 31 | { |
32 | struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller); | 32 | struct pci_dev *pdev = to_pci_dev(ehci_to_hcd(ehci)->self.controller); |
33 | 33 | ||
@@ -48,7 +48,7 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap) | |||
48 | where, cap); | 48 | where, cap); |
49 | // some BIOS versions seem buggy... | 49 | // some BIOS versions seem buggy... |
50 | // return 1; | 50 | // return 1; |
51 | ehci_warn (ehci, "continuing after BIOS bug...\n"); | 51 | ehci_warn(ehci, "continuing after BIOS bug...\n"); |
52 | /* disable all SMIs, and clear "BIOS owns" flag */ | 52 | /* disable all SMIs, and clear "BIOS owns" flag */ |
53 | pci_write_config_dword(pdev, where + 4, 0); | 53 | pci_write_config_dword(pdev, where + 4, 0); |
54 | pci_write_config_byte(pdev, where + 2, 0); | 54 | pci_write_config_byte(pdev, where + 2, 0); |
@@ -58,96 +58,47 @@ static int bios_handoff (struct ehci_hcd *ehci, int where, u32 cap) | |||
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | /* called by khubd or root hub init threads */ | 61 | /* called after powerup, by probe or system-pm "wakeup" */ |
62 | static int ehci_pci_reset (struct usb_hcd *hcd) | 62 | static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) |
63 | { | 63 | { |
64 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); | ||
65 | u32 temp; | 64 | u32 temp; |
65 | int retval; | ||
66 | unsigned count = 256/4; | 66 | unsigned count = 256/4; |
67 | 67 | ||
68 | spin_lock_init (&ehci->lock); | 68 | /* optional debug port, normally in the first BAR */ |
69 | 69 | temp = pci_find_capability(pdev, 0x0a); | |
70 | ehci->caps = hcd->regs; | 70 | if (temp) { |
71 | ehci->regs = hcd->regs + HC_LENGTH (readl (&ehci->caps->hc_capbase)); | 71 | pci_read_config_dword(pdev, temp, &temp); |
72 | dbg_hcs_params (ehci, "reset"); | 72 | temp >>= 16; |
73 | dbg_hcc_params (ehci, "reset"); | 73 | if ((temp & (3 << 13)) == (1 << 13)) { |
74 | 74 | temp &= 0x1fff; | |
75 | /* cache this readonly data; minimize chip reads */ | 75 | ehci->debug = ehci_to_hcd(ehci)->regs + temp; |
76 | ehci->hcs_params = readl (&ehci->caps->hcs_params); | 76 | temp = readl(&ehci->debug->control); |
77 | 77 | ehci_info(ehci, "debug port %d%s\n", | |
78 | if (hcd->self.controller->bus == &pci_bus_type) { | 78 | HCS_DEBUG_PORT(ehci->hcs_params), |
79 | struct pci_dev *pdev = to_pci_dev(hcd->self.controller); | 79 | (temp & DBGP_ENABLED) |
80 | 80 | ? " IN USE" | |
81 | switch (pdev->vendor) { | 81 | : ""); |
82 | case PCI_VENDOR_ID_TDI: | 82 | if (!(temp & DBGP_ENABLED)) |
83 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { | 83 | ehci->debug = NULL; |
84 | ehci->is_tdi_rh_tt = 1; | ||
85 | tdi_reset (ehci); | ||
86 | } | ||
87 | break; | ||
88 | case PCI_VENDOR_ID_AMD: | ||
89 | /* AMD8111 EHCI doesn't work, according to AMD errata */ | ||
90 | if (pdev->device == 0x7463) { | ||
91 | ehci_info (ehci, "ignoring AMD8111 (errata)\n"); | ||
92 | return -EIO; | ||
93 | } | ||
94 | break; | ||
95 | case PCI_VENDOR_ID_NVIDIA: | ||
96 | /* NVidia reports that certain chips don't handle | ||
97 | * QH, ITD, or SITD addresses above 2GB. (But TD, | ||
98 | * data buffer, and periodic schedule are normal.) | ||
99 | */ | ||
100 | switch (pdev->device) { | ||
101 | case 0x003c: /* MCP04 */ | ||
102 | case 0x005b: /* CK804 */ | ||
103 | case 0x00d8: /* CK8 */ | ||
104 | case 0x00e8: /* CK8S */ | ||
105 | if (pci_set_consistent_dma_mask(pdev, | ||
106 | DMA_31BIT_MASK) < 0) | ||
107 | ehci_warn (ehci, "can't enable NVidia " | ||
108 | "workaround for >2GB RAM\n"); | ||
109 | break; | ||
110 | } | ||
111 | break; | ||
112 | } | ||
113 | |||
114 | /* optional debug port, normally in the first BAR */ | ||
115 | temp = pci_find_capability (pdev, 0x0a); | ||
116 | if (temp) { | ||
117 | pci_read_config_dword(pdev, temp, &temp); | ||
118 | temp >>= 16; | ||
119 | if ((temp & (3 << 13)) == (1 << 13)) { | ||
120 | temp &= 0x1fff; | ||
121 | ehci->debug = hcd->regs + temp; | ||
122 | temp = readl (&ehci->debug->control); | ||
123 | ehci_info (ehci, "debug port %d%s\n", | ||
124 | HCS_DEBUG_PORT(ehci->hcs_params), | ||
125 | (temp & DBGP_ENABLED) | ||
126 | ? " IN USE" | ||
127 | : ""); | ||
128 | if (!(temp & DBGP_ENABLED)) | ||
129 | ehci->debug = NULL; | ||
130 | } | ||
131 | } | 84 | } |
85 | } | ||
132 | 86 | ||
133 | temp = HCC_EXT_CAPS (readl (&ehci->caps->hcc_params)); | 87 | temp = HCC_EXT_CAPS(readl(&ehci->caps->hcc_params)); |
134 | } else | ||
135 | temp = 0; | ||
136 | 88 | ||
137 | /* EHCI 0.96 and later may have "extended capabilities" */ | 89 | /* EHCI 0.96 and later may have "extended capabilities" */ |
138 | while (temp && count--) { | 90 | while (temp && count--) { |
139 | u32 cap; | 91 | u32 cap; |
140 | 92 | ||
141 | pci_read_config_dword (to_pci_dev(hcd->self.controller), | 93 | pci_read_config_dword(pdev, temp, &cap); |
142 | temp, &cap); | 94 | ehci_dbg(ehci, "capability %04x at %02x\n", cap, temp); |
143 | ehci_dbg (ehci, "capability %04x at %02x\n", cap, temp); | ||
144 | switch (cap & 0xff) { | 95 | switch (cap & 0xff) { |
145 | case 1: /* BIOS/SMM/... handoff */ | 96 | case 1: /* BIOS/SMM/... handoff */ |
146 | if (bios_handoff (ehci, temp, cap) != 0) | 97 | if (bios_handoff(ehci, temp, cap) != 0) |
147 | return -EOPNOTSUPP; | 98 | return -EOPNOTSUPP; |
148 | break; | 99 | break; |
149 | case 0: /* illegal reserved capability */ | 100 | case 0: /* illegal reserved capability */ |
150 | ehci_warn (ehci, "illegal capability!\n"); | 101 | ehci_dbg(ehci, "illegal capability!\n"); |
151 | cap = 0; | 102 | cap = 0; |
152 | /* FALLTHROUGH */ | 103 | /* FALLTHROUGH */ |
153 | default: /* unknown */ | 104 | default: /* unknown */ |
@@ -156,77 +107,109 @@ static int ehci_pci_reset (struct usb_hcd *hcd) | |||
156 | temp = (cap >> 8) & 0xff; | 107 | temp = (cap >> 8) & 0xff; |
157 | } | 108 | } |
158 | if (!count) { | 109 | if (!count) { |
159 | ehci_err (ehci, "bogus capabilities ... PCI problems!\n"); | 110 | ehci_err(ehci, "bogus capabilities ... PCI problems!\n"); |
160 | return -EIO; | 111 | return -EIO; |
161 | } | 112 | } |
162 | if (ehci_is_TDI(ehci)) | ||
163 | ehci_reset (ehci); | ||
164 | 113 | ||
165 | ehci_port_power (ehci, 0); | 114 | /* PCI Memory-Write-Invalidate cycle support is optional (uncommon) */ |
115 | retval = pci_set_mwi(pdev); | ||
116 | if (!retval) | ||
117 | ehci_dbg(ehci, "MWI active\n"); | ||
118 | |||
119 | ehci_port_power(ehci, 0); | ||
120 | |||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | /* called by khubd or root hub (re)init threads; leaves HC in halt state */ | ||
125 | static int ehci_pci_reset(struct usb_hcd *hcd) | ||
126 | { | ||
127 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); | ||
128 | struct pci_dev *pdev = to_pci_dev(hcd->self.controller); | ||
129 | u32 temp; | ||
130 | int retval; | ||
131 | |||
132 | ehci->caps = hcd->regs; | ||
133 | ehci->regs = hcd->regs + HC_LENGTH(readl(&ehci->caps->hc_capbase)); | ||
134 | dbg_hcs_params(ehci, "reset"); | ||
135 | dbg_hcc_params(ehci, "reset"); | ||
136 | |||
137 | /* cache this readonly data; minimize chip reads */ | ||
138 | ehci->hcs_params = readl(&ehci->caps->hcs_params); | ||
139 | |||
140 | retval = ehci_halt(ehci); | ||
141 | if (retval) | ||
142 | return retval; | ||
143 | |||
144 | /* NOTE: only the parts below this line are PCI-specific */ | ||
145 | |||
146 | switch (pdev->vendor) { | ||
147 | case PCI_VENDOR_ID_TDI: | ||
148 | if (pdev->device == PCI_DEVICE_ID_TDI_EHCI) { | ||
149 | ehci->is_tdi_rh_tt = 1; | ||
150 | tdi_reset(ehci); | ||
151 | } | ||
152 | break; | ||
153 | case PCI_VENDOR_ID_AMD: | ||
154 | /* AMD8111 EHCI doesn't work, according to AMD errata */ | ||
155 | if (pdev->device == 0x7463) { | ||
156 | ehci_info(ehci, "ignoring AMD8111 (errata)\n"); | ||
157 | return -EIO; | ||
158 | } | ||
159 | break; | ||
160 | case PCI_VENDOR_ID_NVIDIA: | ||
161 | /* NVidia reports that certain chips don't handle | ||
162 | * QH, ITD, or SITD addresses above 2GB. (But TD, | ||
163 | * data buffer, and periodic schedule are normal.) | ||
164 | */ | ||
165 | switch (pdev->device) { | ||
166 | case 0x003c: /* MCP04 */ | ||
167 | case 0x005b: /* CK804 */ | ||
168 | case 0x00d8: /* CK8 */ | ||
169 | case 0x00e8: /* CK8S */ | ||
170 | if (pci_set_consistent_dma_mask(pdev, | ||
171 | DMA_31BIT_MASK) < 0) | ||
172 | ehci_warn(ehci, "can't enable NVidia " | ||
173 | "workaround for >2GB RAM\n"); | ||
174 | break; | ||
175 | } | ||
176 | break; | ||
177 | } | ||
178 | |||
179 | if (ehci_is_TDI(ehci)) | ||
180 | ehci_reset(ehci); | ||
166 | 181 | ||
167 | /* at least the Genesys GL880S needs fixup here */ | 182 | /* at least the Genesys GL880S needs fixup here */ |
168 | temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params); | 183 | temp = HCS_N_CC(ehci->hcs_params) * HCS_N_PCC(ehci->hcs_params); |
169 | temp &= 0x0f; | 184 | temp &= 0x0f; |
170 | if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) { | 185 | if (temp && HCS_N_PORTS(ehci->hcs_params) > temp) { |
171 | ehci_dbg (ehci, "bogus port configuration: " | 186 | ehci_dbg(ehci, "bogus port configuration: " |
172 | "cc=%d x pcc=%d < ports=%d\n", | 187 | "cc=%d x pcc=%d < ports=%d\n", |
173 | HCS_N_CC(ehci->hcs_params), | 188 | HCS_N_CC(ehci->hcs_params), |
174 | HCS_N_PCC(ehci->hcs_params), | 189 | HCS_N_PCC(ehci->hcs_params), |
175 | HCS_N_PORTS(ehci->hcs_params)); | 190 | HCS_N_PORTS(ehci->hcs_params)); |
176 | 191 | ||
177 | if (hcd->self.controller->bus == &pci_bus_type) { | 192 | switch (pdev->vendor) { |
178 | struct pci_dev *pdev; | 193 | case 0x17a0: /* GENESYS */ |
179 | 194 | /* GL880S: should be PORTS=2 */ | |
180 | pdev = to_pci_dev(hcd->self.controller); | 195 | temp |= (ehci->hcs_params & ~0xf); |
181 | switch (pdev->vendor) { | 196 | ehci->hcs_params = temp; |
182 | case 0x17a0: /* GENESYS */ | 197 | break; |
183 | /* GL880S: should be PORTS=2 */ | 198 | case PCI_VENDOR_ID_NVIDIA: |
184 | temp |= (ehci->hcs_params & ~0xf); | 199 | /* NF4: should be PCC=10 */ |
185 | ehci->hcs_params = temp; | 200 | break; |
186 | break; | ||
187 | case PCI_VENDOR_ID_NVIDIA: | ||
188 | /* NF4: should be PCC=10 */ | ||
189 | break; | ||
190 | } | ||
191 | } | 201 | } |
192 | } | 202 | } |
193 | 203 | ||
194 | /* force HC to halt state */ | 204 | /* Serial Bus Release Number is at PCI 0x60 offset */ |
195 | return ehci_halt (ehci); | 205 | pci_read_config_byte(pdev, 0x60, &ehci->sbrn); |
196 | } | ||
197 | |||
198 | static int ehci_pci_start (struct usb_hcd *hcd) | ||
199 | { | ||
200 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); | ||
201 | int result = 0; | ||
202 | |||
203 | if (hcd->self.controller->bus == &pci_bus_type) { | ||
204 | struct pci_dev *pdev; | ||
205 | u16 port_wake; | ||
206 | |||
207 | pdev = to_pci_dev(hcd->self.controller); | ||
208 | |||
209 | /* Serial Bus Release Number is at PCI 0x60 offset */ | ||
210 | pci_read_config_byte(pdev, 0x60, &ehci->sbrn); | ||
211 | |||
212 | /* port wake capability, reported by boot firmware */ | ||
213 | pci_read_config_word(pdev, 0x62, &port_wake); | ||
214 | hcd->can_wakeup = (port_wake & 1) != 0; | ||
215 | 206 | ||
216 | /* help hc dma work well with cachelines */ | 207 | /* REVISIT: per-port wake capability (PCI 0x62) currently unused */ |
217 | result = pci_set_mwi(pdev); | ||
218 | if (result) | ||
219 | ehci_dbg(ehci, "unable to enable MWI - not fatal.\n"); | ||
220 | } | ||
221 | |||
222 | return ehci_run (hcd); | ||
223 | } | ||
224 | 208 | ||
225 | /* always called by thread; normally rmmod */ | 209 | retval = ehci_pci_reinit(ehci, pdev); |
226 | 210 | ||
227 | static void ehci_pci_stop (struct usb_hcd *hcd) | 211 | /* finish init */ |
228 | { | 212 | return ehci_init(hcd); |
229 | ehci_stop (hcd); | ||
230 | } | 213 | } |
231 | 214 | ||
232 | /*-------------------------------------------------------------------------*/ | 215 | /*-------------------------------------------------------------------------*/ |
@@ -235,90 +218,88 @@ static void ehci_pci_stop (struct usb_hcd *hcd) | |||
235 | 218 | ||
236 | /* suspend/resume, section 4.3 */ | 219 | /* suspend/resume, section 4.3 */ |
237 | 220 | ||
238 | /* These routines rely on the bus (pci, platform, etc) | 221 | /* These routines rely on the PCI bus glue |
239 | * to handle powerdown and wakeup, and currently also on | 222 | * to handle powerdown and wakeup, and currently also on |
240 | * transceivers that don't need any software attention to set up | 223 | * transceivers that don't need any software attention to set up |
241 | * the right sort of wakeup. | 224 | * the right sort of wakeup. |
225 | * Also they depend on separate root hub suspend/resume. | ||
242 | */ | 226 | */ |
243 | 227 | ||
244 | static int ehci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) | 228 | static int ehci_pci_suspend(struct usb_hcd *hcd, pm_message_t message) |
245 | { | 229 | { |
246 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); | 230 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
247 | 231 | ||
248 | if (time_before (jiffies, ehci->next_statechange)) | 232 | if (time_before(jiffies, ehci->next_statechange)) |
249 | msleep (100); | 233 | msleep(10); |
250 | 234 | ||
251 | #ifdef CONFIG_USB_SUSPEND | 235 | // could save FLADJ in case of Vaux power loss |
252 | (void) usb_suspend_device (hcd->self.root_hub); | ||
253 | #else | ||
254 | usb_lock_device (hcd->self.root_hub); | ||
255 | (void) ehci_bus_suspend (hcd); | ||
256 | usb_unlock_device (hcd->self.root_hub); | ||
257 | #endif | ||
258 | |||
259 | // save (PCI) FLADJ in case of Vaux power loss | ||
260 | // ... we'd only use it to handle clock skew | 236 | // ... we'd only use it to handle clock skew |
261 | 237 | ||
262 | return 0; | 238 | return 0; |
263 | } | 239 | } |
264 | 240 | ||
265 | static int ehci_pci_resume (struct usb_hcd *hcd) | 241 | static int ehci_pci_resume(struct usb_hcd *hcd) |
266 | { | 242 | { |
267 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); | 243 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
268 | unsigned port; | 244 | unsigned port; |
269 | struct usb_device *root = hcd->self.root_hub; | 245 | struct usb_device *root = hcd->self.root_hub; |
246 | struct pci_dev *pdev = to_pci_dev(hcd->self.controller); | ||
270 | int retval = -EINVAL; | 247 | int retval = -EINVAL; |
271 | 248 | ||
272 | // maybe restore (PCI) FLADJ | 249 | // maybe restore FLADJ |
273 | 250 | ||
274 | if (time_before (jiffies, ehci->next_statechange)) | 251 | if (time_before(jiffies, ehci->next_statechange)) |
275 | msleep (100); | 252 | msleep(100); |
253 | |||
254 | /* If CF is clear, we lost PCI Vaux power and need to restart. */ | ||
255 | if (readl(&ehci->regs->configured_flag) != FLAG_CF) | ||
256 | goto restart; | ||
276 | 257 | ||
277 | /* If any port is suspended (or owned by the companion), | 258 | /* If any port is suspended (or owned by the companion), |
278 | * we know we can/must resume the HC (and mustn't reset it). | 259 | * we know we can/must resume the HC (and mustn't reset it). |
260 | * We just defer that to the root hub code. | ||
279 | */ | 261 | */ |
280 | for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; ) { | 262 | for (port = HCS_N_PORTS(ehci->hcs_params); port > 0; ) { |
281 | u32 status; | 263 | u32 status; |
282 | port--; | 264 | port--; |
283 | status = readl (&ehci->regs->port_status [port]); | 265 | status = readl(&ehci->regs->port_status [port]); |
284 | if (!(status & PORT_POWER)) | 266 | if (!(status & PORT_POWER)) |
285 | continue; | 267 | continue; |
286 | if (status & (PORT_SUSPEND | PORT_OWNER)) { | 268 | if (status & (PORT_SUSPEND | PORT_RESUME | PORT_OWNER)) { |
287 | down (&hcd->self.root_hub->serialize); | 269 | usb_hcd_resume_root_hub(hcd); |
288 | retval = ehci_bus_resume (hcd); | 270 | return 0; |
289 | up (&hcd->self.root_hub->serialize); | ||
290 | break; | ||
291 | } | 271 | } |
272 | } | ||
273 | |||
274 | restart: | ||
275 | ehci_dbg(ehci, "lost power, restarting\n"); | ||
276 | for (port = HCS_N_PORTS(ehci->hcs_params); port > 0; ) { | ||
277 | port--; | ||
292 | if (!root->children [port]) | 278 | if (!root->children [port]) |
293 | continue; | 279 | continue; |
294 | dbg_port (ehci, __FUNCTION__, port + 1, status); | 280 | usb_set_device_state(root->children[port], |
295 | usb_set_device_state (root->children[port], | ||
296 | USB_STATE_NOTATTACHED); | 281 | USB_STATE_NOTATTACHED); |
297 | } | 282 | } |
298 | 283 | ||
299 | /* Else reset, to cope with power loss or flush-to-storage | 284 | /* Else reset, to cope with power loss or flush-to-storage |
300 | * style "resume" having activated BIOS during reboot. | 285 | * style "resume" having let BIOS kick in during reboot. |
301 | */ | 286 | */ |
302 | if (port == 0) { | 287 | (void) ehci_halt(ehci); |
303 | (void) ehci_halt (ehci); | 288 | (void) ehci_reset(ehci); |
304 | (void) ehci_reset (ehci); | 289 | (void) ehci_pci_reinit(ehci, pdev); |
305 | (void) ehci_pci_reset (hcd); | 290 | |
306 | 291 | /* emptying the schedule aborts any urbs */ | |
307 | /* emptying the schedule aborts any urbs */ | 292 | spin_lock_irq(&ehci->lock); |
308 | spin_lock_irq (&ehci->lock); | 293 | if (ehci->reclaim) |
309 | if (ehci->reclaim) | 294 | ehci->reclaim_ready = 1; |
310 | ehci->reclaim_ready = 1; | 295 | ehci_work(ehci, NULL); |
311 | ehci_work (ehci, NULL); | 296 | spin_unlock_irq(&ehci->lock); |
312 | spin_unlock_irq (&ehci->lock); | 297 | |
313 | 298 | /* restart; khubd will disconnect devices */ | |
314 | /* restart; khubd will disconnect devices */ | 299 | retval = ehci_run(hcd); |
315 | retval = ehci_run (hcd); | 300 | |
316 | 301 | /* here we "know" root ports should always stay powered */ | |
317 | /* here we "know" root ports should always stay powered; | 302 | ehci_port_power(ehci, 1); |
318 | * but some controllers may lose all power. | ||
319 | */ | ||
320 | ehci_port_power (ehci, 1); | ||
321 | } | ||
322 | 303 | ||
323 | return retval; | 304 | return retval; |
324 | } | 305 | } |
@@ -339,12 +320,12 @@ static const struct hc_driver ehci_pci_hc_driver = { | |||
339 | * basic lifecycle operations | 320 | * basic lifecycle operations |
340 | */ | 321 | */ |
341 | .reset = ehci_pci_reset, | 322 | .reset = ehci_pci_reset, |
342 | .start = ehci_pci_start, | 323 | .start = ehci_run, |
343 | #ifdef CONFIG_PM | 324 | #ifdef CONFIG_PM |
344 | .suspend = ehci_pci_suspend, | 325 | .suspend = ehci_pci_suspend, |
345 | .resume = ehci_pci_resume, | 326 | .resume = ehci_pci_resume, |
346 | #endif | 327 | #endif |
347 | .stop = ehci_pci_stop, | 328 | .stop = ehci_stop, |
348 | 329 | ||
349 | /* | 330 | /* |
350 | * managing i/o requests and associated device resources | 331 | * managing i/o requests and associated device resources |
@@ -377,7 +358,7 @@ static const struct pci_device_id pci_ids [] = { { | |||
377 | }, | 358 | }, |
378 | { /* end: all zeroes */ } | 359 | { /* end: all zeroes */ } |
379 | }; | 360 | }; |
380 | MODULE_DEVICE_TABLE (pci, pci_ids); | 361 | MODULE_DEVICE_TABLE(pci, pci_ids); |
381 | 362 | ||
382 | /* pci driver glue; this is a "new style" PCI driver module */ | 363 | /* pci driver glue; this is a "new style" PCI driver module */ |
383 | static struct pci_driver ehci_pci_driver = { | 364 | static struct pci_driver ehci_pci_driver = { |
@@ -393,22 +374,22 @@ static struct pci_driver ehci_pci_driver = { | |||
393 | #endif | 374 | #endif |
394 | }; | 375 | }; |
395 | 376 | ||
396 | static int __init ehci_hcd_pci_init (void) | 377 | static int __init ehci_hcd_pci_init(void) |
397 | { | 378 | { |
398 | if (usb_disabled()) | 379 | if (usb_disabled()) |
399 | return -ENODEV; | 380 | return -ENODEV; |
400 | 381 | ||
401 | pr_debug ("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n", | 382 | pr_debug("%s: block sizes: qh %Zd qtd %Zd itd %Zd sitd %Zd\n", |
402 | hcd_name, | 383 | hcd_name, |
403 | sizeof (struct ehci_qh), sizeof (struct ehci_qtd), | 384 | sizeof(struct ehci_qh), sizeof(struct ehci_qtd), |
404 | sizeof (struct ehci_itd), sizeof (struct ehci_sitd)); | 385 | sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); |
405 | 386 | ||
406 | return pci_register_driver (&ehci_pci_driver); | 387 | return pci_register_driver(&ehci_pci_driver); |
407 | } | 388 | } |
408 | module_init (ehci_hcd_pci_init); | 389 | module_init(ehci_hcd_pci_init); |
409 | 390 | ||
410 | static void __exit ehci_hcd_pci_cleanup (void) | 391 | static void __exit ehci_hcd_pci_cleanup(void) |
411 | { | 392 | { |
412 | pci_unregister_driver (&ehci_pci_driver); | 393 | pci_unregister_driver(&ehci_pci_driver); |
413 | } | 394 | } |
414 | module_exit (ehci_hcd_pci_cleanup); | 395 | module_exit(ehci_hcd_pci_cleanup); |
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index a59e536441e1..5f22e6590cd1 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c | |||
@@ -14,15 +14,6 @@ | |||
14 | * This file is licenced under the GPL. | 14 | * This file is licenced under the GPL. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/jiffies.h> | ||
18 | |||
19 | #ifdef CONFIG_PPC_PMAC | ||
20 | #include <asm/machdep.h> | ||
21 | #include <asm/pmac_feature.h> | ||
22 | #include <asm/pci-bridge.h> | ||
23 | #include <asm/prom.h> | ||
24 | #endif | ||
25 | |||
26 | #ifndef CONFIG_PCI | 17 | #ifndef CONFIG_PCI |
27 | #error "This file is PCI bus glue. CONFIG_PCI must be defined." | 18 | #error "This file is PCI bus glue. CONFIG_PCI must be defined." |
28 | #endif | 19 | #endif |
@@ -115,39 +106,12 @@ ohci_pci_start (struct usb_hcd *hcd) | |||
115 | static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) | 106 | static int ohci_pci_suspend (struct usb_hcd *hcd, pm_message_t message) |
116 | { | 107 | { |
117 | /* root hub was already suspended */ | 108 | /* root hub was already suspended */ |
118 | |||
119 | /* FIXME these PMAC things get called in the wrong places. ASIC | ||
120 | * clocks should be turned off AFTER entering D3, and on BEFORE | ||
121 | * trying to enter D0. Evidently the PCI layer doesn't currently | ||
122 | * provide the right sort of platform hooks for this ... | ||
123 | */ | ||
124 | #ifdef CONFIG_PPC_PMAC | ||
125 | if (_machine == _MACH_Pmac) { | ||
126 | struct device_node *of_node; | ||
127 | |||
128 | /* Disable USB PAD & cell clock */ | ||
129 | of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller)); | ||
130 | if (of_node) | ||
131 | pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0); | ||
132 | } | ||
133 | #endif /* CONFIG_PPC_PMAC */ | ||
134 | return 0; | 109 | return 0; |
135 | } | 110 | } |
136 | 111 | ||
137 | 112 | ||
138 | static int ohci_pci_resume (struct usb_hcd *hcd) | 113 | static int ohci_pci_resume (struct usb_hcd *hcd) |
139 | { | 114 | { |
140 | #ifdef CONFIG_PPC_PMAC | ||
141 | if (_machine == _MACH_Pmac) { | ||
142 | struct device_node *of_node; | ||
143 | |||
144 | /* Re-enable USB PAD & cell clock */ | ||
145 | of_node = pci_device_to_OF_node (to_pci_dev(hcd->self.controller)); | ||
146 | if (of_node) | ||
147 | pmac_call_feature (PMAC_FTR_USB_ENABLE, of_node, 0, 1); | ||
148 | } | ||
149 | #endif /* CONFIG_PPC_PMAC */ | ||
150 | |||
151 | usb_hcd_resume_root_hub(hcd); | 115 | usb_hcd_resume_root_hub(hcd); |
152 | return 0; | 116 | return 0; |
153 | } | 117 | } |
diff --git a/drivers/usb/media/sn9c102_core.c b/drivers/usb/media/sn9c102_core.c index cf8cfbabefde..b2e66e3b90aa 100644 --- a/drivers/usb/media/sn9c102_core.c +++ b/drivers/usb/media/sn9c102_core.c | |||
@@ -199,7 +199,7 @@ static void sn9c102_release_buffers(struct sn9c102_device* cam) | |||
199 | { | 199 | { |
200 | if (cam->nbuffers) { | 200 | if (cam->nbuffers) { |
201 | rvfree(cam->frame[0].bufmem, | 201 | rvfree(cam->frame[0].bufmem, |
202 | cam->nbuffers * cam->frame[0].buf.length); | 202 | cam->nbuffers * PAGE_ALIGN(cam->frame[0].buf.length)); |
203 | cam->nbuffers = 0; | 203 | cam->nbuffers = 0; |
204 | } | 204 | } |
205 | } | 205 | } |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 61204bf7cd78..06e04b442ff1 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -475,6 +475,8 @@ static struct usb_device_id id_table_combined [] = { | |||
475 | { USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) }, | 475 | { USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) }, |
476 | { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) }, | 476 | { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) }, |
477 | { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16HR_PID) }, | 477 | { USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16HR_PID) }, |
478 | { USB_DEVICE(KOBIL_VID, KOBIL_CONV_B1_PID) }, | ||
479 | { USB_DEVICE(KOBIL_VID, KOBIL_CONV_KAAN_PID) }, | ||
478 | { }, /* Optional parameter entry */ | 480 | { }, /* Optional parameter entry */ |
479 | { } /* Terminating entry */ | 481 | { } /* Terminating entry */ |
480 | }; | 482 | }; |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index ddb63df31ce6..773ea3eca086 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -128,6 +128,13 @@ | |||
128 | #define SEALEVEL_2803_8_PID 0X2883 /* SeaLINK+8 (2803) Port 8 */ | 128 | #define SEALEVEL_2803_8_PID 0X2883 /* SeaLINK+8 (2803) Port 8 */ |
129 | 129 | ||
130 | /* | 130 | /* |
131 | * The following are the values for two KOBIL chipcard terminals. | ||
132 | */ | ||
133 | #define KOBIL_VID 0x0d46 /* KOBIL Vendor ID */ | ||
134 | #define KOBIL_CONV_B1_PID 0x2020 /* KOBIL Konverter for B1 */ | ||
135 | #define KOBIL_CONV_KAAN_PID 0x2021 /* KOBIL_Konverter for KAAN */ | ||
136 | |||
137 | /* | ||
131 | * DSS-20 Sync Station for Sony Ericsson P800 | 138 | * DSS-20 Sync Station for Sony Ericsson P800 |
132 | */ | 139 | */ |
133 | 140 | ||
diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c index a02fada85362..7744b8148bc5 100644 --- a/drivers/usb/serial/ipw.c +++ b/drivers/usb/serial/ipw.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <linux/module.h> | 46 | #include <linux/module.h> |
47 | #include <linux/spinlock.h> | 47 | #include <linux/spinlock.h> |
48 | #include <linux/usb.h> | 48 | #include <linux/usb.h> |
49 | #include <linux/usb.h> | ||
50 | #include <asm/uaccess.h> | 49 | #include <asm/uaccess.h> |
51 | #include "usb-serial.h" | 50 | #include "usb-serial.h" |
52 | 51 | ||
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 0a9858f69a9b..f5f47a34b168 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -1118,6 +1118,15 @@ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, | |||
1118 | US_SC_DEVICE, US_PR_DEVICE, NULL, | 1118 | US_SC_DEVICE, US_PR_DEVICE, NULL, |
1119 | US_FL_GO_SLOW ), | 1119 | US_FL_GO_SLOW ), |
1120 | 1120 | ||
1121 | /* | ||
1122 | * David Härdeman <david@2gen.com> | ||
1123 | * The key makes the SCSI stack print confusing (but harmless) messages | ||
1124 | */ | ||
1125 | UNUSUAL_DEV( 0x4146, 0xba01, 0x0100, 0x0100, | ||
1126 | "Iomega", | ||
1127 | "Micro Mini 1GB", | ||
1128 | US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), | ||
1129 | |||
1121 | #ifdef CONFIG_USB_STORAGE_SDDR55 | 1130 | #ifdef CONFIG_USB_STORAGE_SDDR55 |
1122 | UNUSUAL_DEV( 0x55aa, 0xa103, 0x0000, 0x9999, | 1131 | UNUSUAL_DEV( 0x55aa, 0xa103, 0x0000, 0x9999, |
1123 | "Sandisk", | 1132 | "Sandisk", |
diff --git a/drivers/video/console/fbcon_rotate.h b/drivers/video/console/fbcon_rotate.h index 90c672096c2e..e504fbf5c604 100644 --- a/drivers/video/console/fbcon_rotate.h +++ b/drivers/video/console/fbcon_rotate.h | |||
@@ -49,7 +49,7 @@ static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat) | |||
49 | static inline void rotate_ud(const char *in, char *out, u32 width, u32 height) | 49 | static inline void rotate_ud(const char *in, char *out, u32 width, u32 height) |
50 | { | 50 | { |
51 | int i, j; | 51 | int i, j; |
52 | int shift = width % 8; | 52 | int shift = (8 - (width % 8)) & 7; |
53 | 53 | ||
54 | width = (width + 7) & ~7; | 54 | width = (width + 7) & ~7; |
55 | 55 | ||
@@ -85,7 +85,7 @@ static inline void rotate_cw(const char *in, char *out, u32 width, u32 height) | |||
85 | static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height) | 85 | static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height) |
86 | { | 86 | { |
87 | int i, j, h = height, w = width; | 87 | int i, j, h = height, w = width; |
88 | int shift = width % 8; | 88 | int shift = (8 - (width % 8)) & 7; |
89 | 89 | ||
90 | width = (width + 7) & ~7; | 90 | width = (width + 7) & ~7; |
91 | height = (height + 7) & ~7; | 91 | height = (height + 7) & ~7; |
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 274f90543e32..167de397e4b4 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c | |||
@@ -966,6 +966,7 @@ static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight) | |||
966 | outb_p(0x12, vga_video_port_reg); /* Vertical display limit */ | 966 | outb_p(0x12, vga_video_port_reg); /* Vertical display limit */ |
967 | outb_p(vde, vga_video_port_val); | 967 | outb_p(vde, vga_video_port_val); |
968 | spin_unlock_irq(&vga_lock); | 968 | spin_unlock_irq(&vga_lock); |
969 | vga_video_font_height = fontheight; | ||
969 | 970 | ||
970 | for (i = 0; i < MAX_NR_CONSOLES; i++) { | 971 | for (i = 0; i < MAX_NR_CONSOLES; i++) { |
971 | struct vc_data *c = vc_cons[i].d; | 972 | struct vc_data *c = vc_cons[i].d; |
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 9f180096c896..6240aedb4154 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -452,13 +452,17 @@ int fb_prepare_logo(struct fb_info *info, int rotate) | |||
452 | 452 | ||
453 | /* Return if no suitable logo was found */ | 453 | /* Return if no suitable logo was found */ |
454 | fb_logo.logo = fb_find_logo(depth); | 454 | fb_logo.logo = fb_find_logo(depth); |
455 | |||
456 | if (!fb_logo.logo) { | ||
457 | return 0; | ||
458 | } | ||
455 | 459 | ||
456 | if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD) | 460 | if (rotate == FB_ROTATE_UR || rotate == FB_ROTATE_UD) |
457 | yres = info->var.yres; | 461 | yres = info->var.yres; |
458 | else | 462 | else |
459 | yres = info->var.xres; | 463 | yres = info->var.xres; |
460 | 464 | ||
461 | if (fb_logo.logo && fb_logo.logo->height > yres) { | 465 | if (fb_logo.logo->height > yres) { |
462 | fb_logo.logo = NULL; | 466 | fb_logo.logo = NULL; |
463 | return 0; | 467 | return 0; |
464 | } | 468 | } |
diff --git a/fs/compat.c b/fs/compat.c index 0f7abf246d32..818634120b69 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -168,8 +168,8 @@ asmlinkage long compat_sys_statfs(const char __user *path, struct compat_statfs | |||
168 | if (!error) { | 168 | if (!error) { |
169 | struct kstatfs tmp; | 169 | struct kstatfs tmp; |
170 | error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp); | 170 | error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp); |
171 | if (!error && put_compat_statfs(buf, &tmp)) | 171 | if (!error) |
172 | error = -EFAULT; | 172 | error = put_compat_statfs(buf, &tmp); |
173 | path_release(&nd); | 173 | path_release(&nd); |
174 | } | 174 | } |
175 | return error; | 175 | return error; |
@@ -186,8 +186,8 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user | |||
186 | if (!file) | 186 | if (!file) |
187 | goto out; | 187 | goto out; |
188 | error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp); | 188 | error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp); |
189 | if (!error && put_compat_statfs(buf, &tmp)) | 189 | if (!error) |
190 | error = -EFAULT; | 190 | error = put_compat_statfs(buf, &tmp); |
191 | fput(file); | 191 | fput(file); |
192 | out: | 192 | out: |
193 | return error; | 193 | return error; |
@@ -236,8 +236,8 @@ asmlinkage long compat_sys_statfs64(const char __user *path, compat_size_t sz, s | |||
236 | if (!error) { | 236 | if (!error) { |
237 | struct kstatfs tmp; | 237 | struct kstatfs tmp; |
238 | error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp); | 238 | error = vfs_statfs(nd.dentry->d_inode->i_sb, &tmp); |
239 | if (!error && put_compat_statfs64(buf, &tmp)) | 239 | if (!error) |
240 | error = -EFAULT; | 240 | error = put_compat_statfs64(buf, &tmp); |
241 | path_release(&nd); | 241 | path_release(&nd); |
242 | } | 242 | } |
243 | return error; | 243 | return error; |
@@ -257,8 +257,8 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c | |||
257 | if (!file) | 257 | if (!file) |
258 | goto out; | 258 | goto out; |
259 | error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp); | 259 | error = vfs_statfs(file->f_dentry->d_inode->i_sb, &tmp); |
260 | if (!error && put_compat_statfs64(buf, &tmp)) | 260 | if (!error) |
261 | error = -EFAULT; | 261 | error = put_compat_statfs64(buf, &tmp); |
262 | fput(file); | 262 | fput(file); |
263 | out: | 263 | out: |
264 | return error; | 264 | return error; |
@@ -668,7 +668,7 @@ static inline int de_thread(struct task_struct *tsk) | |||
668 | if (!thread_group_leader(current)) { | 668 | if (!thread_group_leader(current)) { |
669 | struct task_struct *parent; | 669 | struct task_struct *parent; |
670 | struct dentry *proc_dentry1, *proc_dentry2; | 670 | struct dentry *proc_dentry1, *proc_dentry2; |
671 | unsigned long exit_state, ptrace; | 671 | unsigned long ptrace; |
672 | 672 | ||
673 | /* | 673 | /* |
674 | * Wait for the thread group leader to be a zombie. | 674 | * Wait for the thread group leader to be a zombie. |
@@ -726,15 +726,15 @@ static inline int de_thread(struct task_struct *tsk) | |||
726 | list_del(¤t->tasks); | 726 | list_del(¤t->tasks); |
727 | list_add_tail(¤t->tasks, &init_task.tasks); | 727 | list_add_tail(¤t->tasks, &init_task.tasks); |
728 | current->exit_signal = SIGCHLD; | 728 | current->exit_signal = SIGCHLD; |
729 | exit_state = leader->exit_state; | 729 | |
730 | BUG_ON(leader->exit_state != EXIT_ZOMBIE); | ||
731 | leader->exit_state = EXIT_DEAD; | ||
730 | 732 | ||
731 | write_unlock_irq(&tasklist_lock); | 733 | write_unlock_irq(&tasklist_lock); |
732 | spin_unlock(&leader->proc_lock); | 734 | spin_unlock(&leader->proc_lock); |
733 | spin_unlock(¤t->proc_lock); | 735 | spin_unlock(¤t->proc_lock); |
734 | proc_pid_flush(proc_dentry1); | 736 | proc_pid_flush(proc_dentry1); |
735 | proc_pid_flush(proc_dentry2); | 737 | proc_pid_flush(proc_dentry2); |
736 | |||
737 | BUG_ON(exit_state != EXIT_ZOMBIE); | ||
738 | } | 738 | } |
739 | 739 | ||
740 | /* | 740 | /* |
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 64983ab55586..8c1cef3bb677 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -512,10 +512,14 @@ static int hugetlbfs_statfs(struct super_block *sb, struct kstatfs *buf) | |||
512 | buf->f_bsize = HPAGE_SIZE; | 512 | buf->f_bsize = HPAGE_SIZE; |
513 | if (sbinfo) { | 513 | if (sbinfo) { |
514 | spin_lock(&sbinfo->stat_lock); | 514 | spin_lock(&sbinfo->stat_lock); |
515 | buf->f_blocks = sbinfo->max_blocks; | 515 | /* If no limits set, just report 0 for max/free/used |
516 | buf->f_bavail = buf->f_bfree = sbinfo->free_blocks; | 516 | * blocks, like simple_statfs() */ |
517 | buf->f_files = sbinfo->max_inodes; | 517 | if (sbinfo->max_blocks >= 0) { |
518 | buf->f_ffree = sbinfo->free_inodes; | 518 | buf->f_blocks = sbinfo->max_blocks; |
519 | buf->f_bavail = buf->f_bfree = sbinfo->free_blocks; | ||
520 | buf->f_files = sbinfo->max_inodes; | ||
521 | buf->f_ffree = sbinfo->free_inodes; | ||
522 | } | ||
519 | spin_unlock(&sbinfo->stat_lock); | 523 | spin_unlock(&sbinfo->stat_lock); |
520 | } | 524 | } |
521 | buf->f_namelen = NAME_MAX; | 525 | buf->f_namelen = NAME_MAX; |
diff --git a/fs/jffs2/debug.h b/fs/jffs2/debug.h index f193d43a8a59..162af6dfe292 100644 --- a/fs/jffs2/debug.h +++ b/fs/jffs2/debug.h | |||
@@ -82,28 +82,28 @@ | |||
82 | do { \ | 82 | do { \ |
83 | printk(JFFS2_ERR_MSG_PREFIX \ | 83 | printk(JFFS2_ERR_MSG_PREFIX \ |
84 | " (%d) %s: " fmt, current->pid, \ | 84 | " (%d) %s: " fmt, current->pid, \ |
85 | __FUNCTION__, ##__VA_ARGS__); \ | 85 | __FUNCTION__ , ##__VA_ARGS__); \ |
86 | } while(0) | 86 | } while(0) |
87 | 87 | ||
88 | #define JFFS2_WARNING(fmt, ...) \ | 88 | #define JFFS2_WARNING(fmt, ...) \ |
89 | do { \ | 89 | do { \ |
90 | printk(JFFS2_WARN_MSG_PREFIX \ | 90 | printk(JFFS2_WARN_MSG_PREFIX \ |
91 | " (%d) %s: " fmt, current->pid, \ | 91 | " (%d) %s: " fmt, current->pid, \ |
92 | __FUNCTION__, ##__VA_ARGS__); \ | 92 | __FUNCTION__ , ##__VA_ARGS__); \ |
93 | } while(0) | 93 | } while(0) |
94 | 94 | ||
95 | #define JFFS2_NOTICE(fmt, ...) \ | 95 | #define JFFS2_NOTICE(fmt, ...) \ |
96 | do { \ | 96 | do { \ |
97 | printk(JFFS2_NOTICE_MSG_PREFIX \ | 97 | printk(JFFS2_NOTICE_MSG_PREFIX \ |
98 | " (%d) %s: " fmt, current->pid, \ | 98 | " (%d) %s: " fmt, current->pid, \ |
99 | __FUNCTION__, ##__VA_ARGS__); \ | 99 | __FUNCTION__ , ##__VA_ARGS__); \ |
100 | } while(0) | 100 | } while(0) |
101 | 101 | ||
102 | #define JFFS2_DEBUG(fmt, ...) \ | 102 | #define JFFS2_DEBUG(fmt, ...) \ |
103 | do { \ | 103 | do { \ |
104 | printk(JFFS2_DBG_MSG_PREFIX \ | 104 | printk(JFFS2_DBG_MSG_PREFIX \ |
105 | " (%d) %s: " fmt, current->pid, \ | 105 | " (%d) %s: " fmt, current->pid, \ |
106 | __FUNCTION__, ##__VA_ARGS__); \ | 106 | __FUNCTION__ , ##__VA_ARGS__); \ |
107 | } while(0) | 107 | } while(0) |
108 | 108 | ||
109 | /* | 109 | /* |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 6391d8964214..aaab1a5ac461 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -643,14 +643,11 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) | |||
643 | /* | 643 | /* |
644 | * Invalidate the local caches | 644 | * Invalidate the local caches |
645 | */ | 645 | */ |
646 | void | 646 | static void nfs_zap_caches_locked(struct inode *inode) |
647 | nfs_zap_caches(struct inode *inode) | ||
648 | { | 647 | { |
649 | struct nfs_inode *nfsi = NFS_I(inode); | 648 | struct nfs_inode *nfsi = NFS_I(inode); |
650 | int mode = inode->i_mode; | 649 | int mode = inode->i_mode; |
651 | 650 | ||
652 | spin_lock(&inode->i_lock); | ||
653 | |||
654 | NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode); | 651 | NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode); |
655 | NFS_ATTRTIMEO_UPDATE(inode) = jiffies; | 652 | NFS_ATTRTIMEO_UPDATE(inode) = jiffies; |
656 | 653 | ||
@@ -659,7 +656,12 @@ nfs_zap_caches(struct inode *inode) | |||
659 | nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE; | 656 | nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE; |
660 | else | 657 | else |
661 | nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE; | 658 | nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE; |
659 | } | ||
662 | 660 | ||
661 | void nfs_zap_caches(struct inode *inode) | ||
662 | { | ||
663 | spin_lock(&inode->i_lock); | ||
664 | nfs_zap_caches_locked(inode); | ||
663 | spin_unlock(&inode->i_lock); | 665 | spin_unlock(&inode->i_lock); |
664 | } | 666 | } |
665 | 667 | ||
@@ -676,16 +678,13 @@ static void nfs_zap_acl_cache(struct inode *inode) | |||
676 | } | 678 | } |
677 | 679 | ||
678 | /* | 680 | /* |
679 | * Invalidate, but do not unhash, the inode | 681 | * Invalidate, but do not unhash, the inode. |
682 | * NB: must be called with inode->i_lock held! | ||
680 | */ | 683 | */ |
681 | static void | 684 | static void nfs_invalidate_inode(struct inode *inode) |
682 | nfs_invalidate_inode(struct inode *inode) | ||
683 | { | 685 | { |
684 | umode_t save_mode = inode->i_mode; | 686 | set_bit(NFS_INO_STALE, &NFS_FLAGS(inode)); |
685 | 687 | nfs_zap_caches_locked(inode); | |
686 | make_bad_inode(inode); | ||
687 | inode->i_mode = save_mode; | ||
688 | nfs_zap_caches(inode); | ||
689 | } | 688 | } |
690 | 689 | ||
691 | struct nfs_find_desc { | 690 | struct nfs_find_desc { |
@@ -1528,14 +1527,13 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign | |||
1528 | printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n", | 1527 | printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n", |
1529 | __FUNCTION__, inode->i_ino, inode->i_mode, fattr->mode); | 1528 | __FUNCTION__, inode->i_ino, inode->i_mode, fattr->mode); |
1530 | #endif | 1529 | #endif |
1530 | out_err: | ||
1531 | /* | 1531 | /* |
1532 | * No need to worry about unhashing the dentry, as the | 1532 | * No need to worry about unhashing the dentry, as the |
1533 | * lookup validation will know that the inode is bad. | 1533 | * lookup validation will know that the inode is bad. |
1534 | * (But we fall through to invalidate the caches.) | 1534 | * (But we fall through to invalidate the caches.) |
1535 | */ | 1535 | */ |
1536 | nfs_invalidate_inode(inode); | 1536 | nfs_invalidate_inode(inode); |
1537 | out_err: | ||
1538 | set_bit(NFS_INO_STALE, &NFS_FLAGS(inode)); | ||
1539 | return -ESTALE; | 1537 | return -ESTALE; |
1540 | } | 1538 | } |
1541 | 1539 | ||
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 21482b2518f6..60e0dd800cc3 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3071,15 +3071,15 @@ static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock | |||
3071 | struct nfs4_client *clp = state->owner->so_client; | 3071 | struct nfs4_client *clp = state->owner->so_client; |
3072 | int status; | 3072 | int status; |
3073 | 3073 | ||
3074 | down_read(&clp->cl_sem); | ||
3075 | /* Is this a delegated open? */ | 3074 | /* Is this a delegated open? */ |
3076 | if (test_bit(NFS_DELEGATED_STATE, &state->flags)) { | 3075 | if (NFS_I(state->inode)->delegation_state != 0) { |
3077 | /* Yes: cache locks! */ | 3076 | /* Yes: cache locks! */ |
3078 | status = do_vfs_lock(request->fl_file, request); | 3077 | status = do_vfs_lock(request->fl_file, request); |
3079 | /* ...but avoid races with delegation recall... */ | 3078 | /* ...but avoid races with delegation recall... */ |
3080 | if (status < 0 || test_bit(NFS_DELEGATED_STATE, &state->flags)) | 3079 | if (status < 0 || test_bit(NFS_DELEGATED_STATE, &state->flags)) |
3081 | goto out; | 3080 | return status; |
3082 | } | 3081 | } |
3082 | down_read(&clp->cl_sem); | ||
3083 | status = nfs4_set_lock_state(state, request); | 3083 | status = nfs4_set_lock_state(state, request); |
3084 | if (status != 0) | 3084 | if (status != 0) |
3085 | goto out; | 3085 | goto out; |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 0675f3215e0a..5ef4c57618fe 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -644,12 +644,15 @@ void nfs4_copy_stateid(nfs4_stateid *dst, struct nfs4_state *state, fl_owner_t f | |||
644 | 644 | ||
645 | struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter) | 645 | struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter) |
646 | { | 646 | { |
647 | struct rpc_sequence *sequence = counter->sequence; | ||
647 | struct nfs_seqid *new; | 648 | struct nfs_seqid *new; |
648 | 649 | ||
649 | new = kmalloc(sizeof(*new), GFP_KERNEL); | 650 | new = kmalloc(sizeof(*new), GFP_KERNEL); |
650 | if (new != NULL) { | 651 | if (new != NULL) { |
651 | new->sequence = counter; | 652 | new->sequence = counter; |
652 | INIT_LIST_HEAD(&new->list); | 653 | spin_lock(&sequence->lock); |
654 | list_add_tail(&new->list, &sequence->list); | ||
655 | spin_unlock(&sequence->lock); | ||
653 | } | 656 | } |
654 | return new; | 657 | return new; |
655 | } | 658 | } |
@@ -658,12 +661,10 @@ void nfs_free_seqid(struct nfs_seqid *seqid) | |||
658 | { | 661 | { |
659 | struct rpc_sequence *sequence = seqid->sequence->sequence; | 662 | struct rpc_sequence *sequence = seqid->sequence->sequence; |
660 | 663 | ||
661 | if (!list_empty(&seqid->list)) { | 664 | spin_lock(&sequence->lock); |
662 | spin_lock(&sequence->lock); | 665 | list_del(&seqid->list); |
663 | list_del(&seqid->list); | 666 | spin_unlock(&sequence->lock); |
664 | spin_unlock(&sequence->lock); | 667 | rpc_wake_up(&sequence->wait); |
665 | } | ||
666 | rpc_wake_up_next(&sequence->wait); | ||
667 | kfree(seqid); | 668 | kfree(seqid); |
668 | } | 669 | } |
669 | 670 | ||
@@ -722,11 +723,10 @@ int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task) | |||
722 | if (sequence->list.next == &seqid->list) | 723 | if (sequence->list.next == &seqid->list) |
723 | goto out; | 724 | goto out; |
724 | spin_lock(&sequence->lock); | 725 | spin_lock(&sequence->lock); |
725 | if (!list_empty(&sequence->list)) { | 726 | if (sequence->list.next != &seqid->list) { |
726 | rpc_sleep_on(&sequence->wait, task, NULL, NULL); | 727 | rpc_sleep_on(&sequence->wait, task, NULL, NULL); |
727 | status = -EAGAIN; | 728 | status = -EAGAIN; |
728 | } else | 729 | } |
729 | list_add(&seqid->list, &sequence->list); | ||
730 | spin_unlock(&sequence->lock); | 730 | spin_unlock(&sequence->lock); |
731 | out: | 731 | out: |
732 | return status; | 732 | return status; |
diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index c6108971b4e6..94d3cdfbf9b8 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c | |||
@@ -941,13 +941,12 @@ __linvfs_get_block( | |||
941 | int retpbbm = 1; | 941 | int retpbbm = 1; |
942 | int error; | 942 | int error; |
943 | 943 | ||
944 | if (blocks) { | ||
945 | offset = blocks << inode->i_blkbits; /* 64 bit goodness */ | ||
946 | size = (ssize_t) min_t(xfs_off_t, offset, LONG_MAX); | ||
947 | } else { | ||
948 | size = 1 << inode->i_blkbits; | ||
949 | } | ||
950 | offset = (xfs_off_t)iblock << inode->i_blkbits; | 944 | offset = (xfs_off_t)iblock << inode->i_blkbits; |
945 | if (blocks) | ||
946 | size = (ssize_t) min_t(xfs_off_t, LONG_MAX, | ||
947 | (xfs_off_t)blocks << inode->i_blkbits); | ||
948 | else | ||
949 | size = 1 << inode->i_blkbits; | ||
951 | 950 | ||
952 | VOP_BMAP(vp, offset, size, | 951 | VOP_BMAP(vp, offset, size, |
953 | create ? flags : BMAPI_READ, &iomap, &retpbbm, error); | 952 | create ? flags : BMAPI_READ, &iomap, &retpbbm, error); |
@@ -1007,7 +1006,7 @@ __linvfs_get_block( | |||
1007 | ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0); | 1006 | ASSERT(iomap.iomap_bsize - iomap.iomap_delta > 0); |
1008 | offset = min_t(xfs_off_t, | 1007 | offset = min_t(xfs_off_t, |
1009 | iomap.iomap_bsize - iomap.iomap_delta, | 1008 | iomap.iomap_bsize - iomap.iomap_delta, |
1010 | blocks << inode->i_blkbits); | 1009 | (xfs_off_t)blocks << inode->i_blkbits); |
1011 | bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset); | 1010 | bh_result->b_size = (u32) min_t(xfs_off_t, UINT_MAX, offset); |
1012 | } | 1011 | } |
1013 | 1012 | ||
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index 35e557b00db2..1c7421840c18 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c | |||
@@ -310,7 +310,8 @@ xfs_attr_shortform_remove(xfs_da_args_t *args) | |||
310 | * Fix up the start offset of the attribute fork | 310 | * Fix up the start offset of the attribute fork |
311 | */ | 311 | */ |
312 | totsize -= size; | 312 | totsize -= size; |
313 | if (totsize == sizeof(xfs_attr_sf_hdr_t) && !args->addname) { | 313 | if (totsize == sizeof(xfs_attr_sf_hdr_t) && !args->addname && |
314 | !(mp->m_flags & XFS_MOUNT_COMPAT_ATTR)) { | ||
314 | /* | 315 | /* |
315 | * Last attribute now removed, revert to original | 316 | * Last attribute now removed, revert to original |
316 | * inode format making all literal area available | 317 | * inode format making all literal area available |
@@ -328,7 +329,8 @@ xfs_attr_shortform_remove(xfs_da_args_t *args) | |||
328 | xfs_idata_realloc(dp, -size, XFS_ATTR_FORK); | 329 | xfs_idata_realloc(dp, -size, XFS_ATTR_FORK); |
329 | dp->i_d.di_forkoff = xfs_attr_shortform_bytesfit(dp, totsize); | 330 | dp->i_d.di_forkoff = xfs_attr_shortform_bytesfit(dp, totsize); |
330 | ASSERT(dp->i_d.di_forkoff); | 331 | ASSERT(dp->i_d.di_forkoff); |
331 | ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) || args->addname); | 332 | ASSERT(totsize > sizeof(xfs_attr_sf_hdr_t) || args->addname || |
333 | (mp->m_flags & XFS_MOUNT_COMPAT_ATTR)); | ||
332 | dp->i_afp->if_ext_max = | 334 | dp->i_afp->if_ext_max = |
333 | XFS_IFORK_ASIZE(dp) / (uint)sizeof(xfs_bmbt_rec_t); | 335 | XFS_IFORK_ASIZE(dp) / (uint)sizeof(xfs_bmbt_rec_t); |
334 | dp->i_df.if_ext_max = | 336 | dp->i_df.if_ext_max = |
@@ -737,7 +739,8 @@ xfs_attr_shortform_allfit(xfs_dabuf_t *bp, xfs_inode_t *dp) | |||
737 | + name_loc->namelen | 739 | + name_loc->namelen |
738 | + INT_GET(name_loc->valuelen, ARCH_CONVERT); | 740 | + INT_GET(name_loc->valuelen, ARCH_CONVERT); |
739 | } | 741 | } |
740 | if (bytes == sizeof(struct xfs_attr_sf_hdr)) | 742 | if (!(dp->i_mount->m_flags & XFS_MOUNT_COMPAT_ATTR) && |
743 | (bytes == sizeof(struct xfs_attr_sf_hdr))) | ||
741 | return(-1); | 744 | return(-1); |
742 | return(xfs_attr_shortform_bytesfit(dp, bytes)); | 745 | return(xfs_attr_shortform_bytesfit(dp, bytes)); |
743 | } | 746 | } |
@@ -775,6 +778,8 @@ xfs_attr_leaf_to_shortform(xfs_dabuf_t *bp, xfs_da_args_t *args, int forkoff) | |||
775 | goto out; | 778 | goto out; |
776 | 779 | ||
777 | if (forkoff == -1) { | 780 | if (forkoff == -1) { |
781 | ASSERT(!(dp->i_mount->m_flags & XFS_MOUNT_COMPAT_ATTR)); | ||
782 | |||
778 | /* | 783 | /* |
779 | * Last attribute was removed, revert to original | 784 | * Last attribute was removed, revert to original |
780 | * inode format making all literal area available | 785 | * inode format making all literal area available |
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 7ceabd0e2d9d..d1236d6f4045 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c | |||
@@ -550,7 +550,7 @@ xfs_fs_goingdown( | |||
550 | struct vfs *vfsp = XFS_MTOVFS(mp); | 550 | struct vfs *vfsp = XFS_MTOVFS(mp); |
551 | struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev); | 551 | struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev); |
552 | 552 | ||
553 | if (sb) { | 553 | if (sb && !IS_ERR(sb)) { |
554 | xfs_force_shutdown(mp, XFS_FORCE_UMOUNT); | 554 | xfs_force_shutdown(mp, XFS_FORCE_UMOUNT); |
555 | thaw_bdev(sb->s_bdev, sb); | 555 | thaw_bdev(sb->s_bdev, sb); |
556 | } | 556 | } |
diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h index fcd6d63bb68b..3ce204a524b0 100644 --- a/fs/xfs/xfs_iomap.h +++ b/fs/xfs/xfs_iomap.h | |||
@@ -69,7 +69,7 @@ typedef struct xfs_iomap { | |||
69 | xfs_buftarg_t *iomap_target; | 69 | xfs_buftarg_t *iomap_target; |
70 | xfs_off_t iomap_offset; /* offset of mapping, bytes */ | 70 | xfs_off_t iomap_offset; /* offset of mapping, bytes */ |
71 | xfs_off_t iomap_bsize; /* size of mapping, bytes */ | 71 | xfs_off_t iomap_bsize; /* size of mapping, bytes */ |
72 | size_t iomap_delta; /* offset into mapping, bytes */ | 72 | xfs_off_t iomap_delta; /* offset into mapping, bytes */ |
73 | iomap_flags_t iomap_flags; | 73 | iomap_flags_t iomap_flags; |
74 | } xfs_iomap_t; | 74 | } xfs_iomap_t; |
75 | 75 | ||
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index 8f285149681f..4518b188ade6 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h | |||
@@ -494,10 +494,8 @@ typedef struct log { | |||
494 | 494 | ||
495 | #define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR) | 495 | #define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR) |
496 | 496 | ||
497 | #define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ | 497 | #define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ |
498 | xlog_grant_sub_space(log,bytes,type) | 498 | { \ |
499 | static inline void xlog_grant_sub_space(struct log *log, int bytes, int type) | ||
500 | { | ||
501 | if (type == 'w') { \ | 499 | if (type == 'w') { \ |
502 | (log)->l_grant_write_bytes -= (bytes); \ | 500 | (log)->l_grant_write_bytes -= (bytes); \ |
503 | if ((log)->l_grant_write_bytes < 0) { \ | 501 | if ((log)->l_grant_write_bytes < 0) { \ |
@@ -511,13 +509,9 @@ static inline void xlog_grant_sub_space(struct log *log, int bytes, int type) | |||
511 | (log)->l_grant_reserve_cycle--; \ | 509 | (log)->l_grant_reserve_cycle--; \ |
512 | } \ | 510 | } \ |
513 | } \ | 511 | } \ |
514 | } | 512 | } |
515 | 513 | #define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ | |
516 | #define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ | 514 | { \ |
517 | xlog_grant_add_space(log,bytes,type) | ||
518 | static inline void | ||
519 | xlog_grant_add_space(struct log *log, int bytes, int type) | ||
520 | { | ||
521 | if (type == 'w') { \ | 515 | if (type == 'w') { \ |
522 | (log)->l_grant_write_bytes += (bytes); \ | 516 | (log)->l_grant_write_bytes += (bytes); \ |
523 | if ((log)->l_grant_write_bytes > (log)->l_logsize) { \ | 517 | if ((log)->l_grant_write_bytes > (log)->l_logsize) { \ |
@@ -531,12 +525,9 @@ xlog_grant_add_space(struct log *log, int bytes, int type) | |||
531 | (log)->l_grant_reserve_cycle++; \ | 525 | (log)->l_grant_reserve_cycle++; \ |
532 | } \ | 526 | } \ |
533 | } \ | 527 | } \ |
534 | } | 528 | } |
535 | 529 | #define XLOG_INS_TICKETQ(q, tic) \ | |
536 | #define XLOG_INS_TICKETQ(q, tic) xlog_ins_ticketq(q, tic) | 530 | { \ |
537 | static inline void | ||
538 | xlog_ins_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) | ||
539 | { \ | ||
540 | if (q) { \ | 531 | if (q) { \ |
541 | (tic)->t_next = (q); \ | 532 | (tic)->t_next = (q); \ |
542 | (tic)->t_prev = (q)->t_prev; \ | 533 | (tic)->t_prev = (q)->t_prev; \ |
@@ -547,12 +538,9 @@ xlog_ins_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) | |||
547 | (q) = (tic); \ | 538 | (q) = (tic); \ |
548 | } \ | 539 | } \ |
549 | (tic)->t_flags |= XLOG_TIC_IN_Q; \ | 540 | (tic)->t_flags |= XLOG_TIC_IN_Q; \ |
550 | } | 541 | } |
551 | 542 | #define XLOG_DEL_TICKETQ(q, tic) \ | |
552 | #define XLOG_DEL_TICKETQ(q, tic) xlog_del_ticketq(q, tic) | 543 | { \ |
553 | static inline void | ||
554 | xlog_del_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) | ||
555 | { \ | ||
556 | if ((tic) == (tic)->t_next) { \ | 544 | if ((tic) == (tic)->t_next) { \ |
557 | (q) = NULL; \ | 545 | (q) = NULL; \ |
558 | } else { \ | 546 | } else { \ |
@@ -562,7 +550,7 @@ xlog_del_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) | |||
562 | } \ | 550 | } \ |
563 | (tic)->t_next = (tic)->t_prev = NULL; \ | 551 | (tic)->t_next = (tic)->t_prev = NULL; \ |
564 | (tic)->t_flags &= ~XLOG_TIC_IN_Q; \ | 552 | (tic)->t_flags &= ~XLOG_TIC_IN_Q; \ |
565 | } | 553 | } |
566 | 554 | ||
567 | /* common routines */ | 555 | /* common routines */ |
568 | extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp); | 556 | extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp); |
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 7c1f74531463..e03fa2a3d5ed 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -3958,8 +3958,9 @@ xfs_finish_reclaim_all(xfs_mount_t *mp, int noblock) | |||
3958 | } | 3958 | } |
3959 | } | 3959 | } |
3960 | XFS_MOUNT_IUNLOCK(mp); | 3960 | XFS_MOUNT_IUNLOCK(mp); |
3961 | xfs_finish_reclaim(ip, noblock, | 3961 | if (xfs_finish_reclaim(ip, noblock, |
3962 | XFS_IFLUSH_DELWRI_ELSE_ASYNC); | 3962 | XFS_IFLUSH_DELWRI_ELSE_ASYNC)) |
3963 | delay(1); | ||
3963 | purged = 1; | 3964 | purged = 1; |
3964 | break; | 3965 | break; |
3965 | } | 3966 | } |
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h index 36505bb4e8cb..6183eab006d4 100644 --- a/include/asm-alpha/atomic.h +++ b/include/asm-alpha/atomic.h | |||
@@ -118,8 +118,6 @@ static __inline__ long atomic_add_return(int i, atomic_t * v) | |||
118 | return result; | 118 | return result; |
119 | } | 119 | } |
120 | 120 | ||
121 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | ||
122 | |||
123 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) | 121 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) |
124 | { | 122 | { |
125 | long temp, result; | 123 | long temp, result; |
@@ -189,6 +187,9 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
189 | }) | 187 | }) |
190 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 188 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
191 | 189 | ||
190 | #define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) | ||
191 | #define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0) | ||
192 | |||
192 | #define atomic_dec_return(v) atomic_sub_return(1,(v)) | 193 | #define atomic_dec_return(v) atomic_sub_return(1,(v)) |
193 | #define atomic64_dec_return(v) atomic64_sub_return(1,(v)) | 194 | #define atomic64_dec_return(v) atomic64_sub_return(1,(v)) |
194 | 195 | ||
@@ -199,6 +200,8 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
199 | #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0) | 200 | #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i), (v)) == 0) |
200 | 201 | ||
201 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) | 202 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) |
203 | #define atomic64_inc_and_test(v) (atomic64_add_return(1, (v)) == 0) | ||
204 | |||
202 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | 205 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) |
203 | #define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0) | 206 | #define atomic64_dec_and_test(v) (atomic64_sub_return(1, (v)) == 0) |
204 | 207 | ||
diff --git a/include/asm-arm/arch-iop3xx/timex.h b/include/asm-arm/arch-iop3xx/timex.h index d4187fe9a85a..472badb451c4 100644 --- a/include/asm-arm/arch-iop3xx/timex.h +++ b/include/asm-arm/arch-iop3xx/timex.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * IOP3xx architecture timex specifications | 4 | * IOP3xx architecture timex specifications |
5 | */ | 5 | */ |
6 | #include <linux/config.h> | 6 | #include <linux/config.h> |
7 | 7 | #include <asm/hardware.h> | |
8 | 8 | ||
9 | #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) | 9 | #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) |
10 | 10 | ||
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h index 6a35e6570ccd..f89f06050893 100644 --- a/include/asm-powerpc/iommu.h +++ b/include/asm-powerpc/iommu.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
3 | * Rewrite, cleanup: | 3 | * Rewrite, cleanup: |
4 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 4 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
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 |
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h index 1e6e7846824f..6642c0125001 100644 --- a/include/asm-powerpc/page_64.h +++ b/include/asm-powerpc/page_64.h | |||
@@ -103,8 +103,9 @@ extern unsigned int HPAGE_SHIFT; | |||
103 | #define HTLB_AREA_SIZE (1UL << HTLB_AREA_SHIFT) | 103 | #define HTLB_AREA_SIZE (1UL << HTLB_AREA_SHIFT) |
104 | #define GET_HTLB_AREA(x) ((x) >> HTLB_AREA_SHIFT) | 104 | #define GET_HTLB_AREA(x) ((x) >> HTLB_AREA_SHIFT) |
105 | 105 | ||
106 | #define LOW_ESID_MASK(addr, len) (((1U << (GET_ESID(addr+len-1)+1)) \ | 106 | #define LOW_ESID_MASK(addr, len) \ |
107 | - (1U << GET_ESID(addr))) & 0xffff) | 107 | (((1U << (GET_ESID(min((addr)+(len)-1, 0x100000000UL))+1)) \ |
108 | - (1U << GET_ESID(min((addr), 0x100000000UL)))) & 0xffff) | ||
108 | #define HTLB_AREA_MASK(addr, len) (((1U << (GET_HTLB_AREA(addr+len-1)+1)) \ | 109 | #define HTLB_AREA_MASK(addr, len) (((1U << (GET_HTLB_AREA(addr+len-1)+1)) \ |
109 | - (1U << GET_HTLB_AREA(addr))) & 0xffff) | 110 | - (1U << GET_HTLB_AREA(addr))) & 0xffff) |
110 | 111 | ||
@@ -113,17 +114,21 @@ extern unsigned int HPAGE_SHIFT; | |||
113 | #define ARCH_HAS_SETCLEAR_HUGE_PTE | 114 | #define ARCH_HAS_SETCLEAR_HUGE_PTE |
114 | 115 | ||
115 | #define touches_hugepage_low_range(mm, addr, len) \ | 116 | #define touches_hugepage_low_range(mm, addr, len) \ |
116 | (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas) | 117 | (((addr) < 0x100000000UL) \ |
118 | && (LOW_ESID_MASK((addr), (len)) & (mm)->context.low_htlb_areas)) | ||
117 | #define touches_hugepage_high_range(mm, addr, len) \ | 119 | #define touches_hugepage_high_range(mm, addr, len) \ |
118 | (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas) | 120 | ((((addr) + (len)) > 0x100000000UL) \ |
121 | && (HTLB_AREA_MASK((addr), (len)) & (mm)->context.high_htlb_areas)) | ||
119 | 122 | ||
120 | #define __within_hugepage_low_range(addr, len, segmask) \ | 123 | #define __within_hugepage_low_range(addr, len, segmask) \ |
121 | ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask)) | 124 | ( (((addr)+(len)) <= 0x100000000UL) \ |
125 | && ((LOW_ESID_MASK((addr), (len)) | (segmask)) == (segmask))) | ||
122 | #define within_hugepage_low_range(addr, len) \ | 126 | #define within_hugepage_low_range(addr, len) \ |
123 | __within_hugepage_low_range((addr), (len), \ | 127 | __within_hugepage_low_range((addr), (len), \ |
124 | current->mm->context.low_htlb_areas) | 128 | current->mm->context.low_htlb_areas) |
125 | #define __within_hugepage_high_range(addr, len, zonemask) \ | 129 | #define __within_hugepage_high_range(addr, len, zonemask) \ |
126 | ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask)) | 130 | ( ((addr) >= 0x100000000UL) \ |
131 | && ((HTLB_AREA_MASK((addr), (len)) | (zonemask)) == (zonemask))) | ||
127 | #define within_hugepage_high_range(addr, len) \ | 132 | #define within_hugepage_high_range(addr, len) \ |
128 | __within_hugepage_high_range((addr), (len), \ | 133 | __within_hugepage_high_range((addr), (len), \ |
129 | current->mm->context.high_htlb_areas) | 134 | current->mm->context.high_htlb_areas) |
@@ -135,9 +140,9 @@ extern unsigned int HPAGE_SHIFT; | |||
135 | 140 | ||
136 | #define in_hugepage_area(context, addr) \ | 141 | #define in_hugepage_area(context, addr) \ |
137 | (cpu_has_feature(CPU_FTR_16M_PAGE) && \ | 142 | (cpu_has_feature(CPU_FTR_16M_PAGE) && \ |
138 | ( ((1 << GET_HTLB_AREA(addr)) & (context).high_htlb_areas) || \ | 143 | ( ( (addr) >= 0x100000000UL) \ |
139 | ( ((addr) < 0x100000000L) && \ | 144 | ? ((1 << GET_HTLB_AREA(addr)) & (context).high_htlb_areas) \ |
140 | ((1 << GET_ESID(addr)) & (context).low_htlb_areas) ) ) ) | 145 | : ((1 << GET_ESID(addr)) & (context).low_htlb_areas) ) ) |
141 | 146 | ||
142 | #else /* !CONFIG_HUGETLB_PAGE */ | 147 | #else /* !CONFIG_HUGETLB_PAGE */ |
143 | 148 | ||
diff --git a/include/asm-powerpc/tce.h b/include/asm-powerpc/tce.h index d099d5200f9b..980a094fd5a7 100644 --- a/include/asm-powerpc/tce.h +++ b/include/asm-powerpc/tce.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation | 2 | * Copyright (C) 2001 Mike Corrigan & Dave Engebretsen, IBM Corporation |
3 | * Rewrite, cleanup: | 3 | * Rewrite, cleanup: |
4 | * Copyright (C) 2004 Olof Johansson <olof@austin.ibm.com>, IBM Corporation | 4 | * Copyright (C) 2004 Olof Johansson <olof@lixom.net>, IBM Corporation |
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 |
diff --git a/include/asm-sparc64/atomic.h b/include/asm-sparc64/atomic.h index 8198c3d0d007..3789fe315992 100644 --- a/include/asm-sparc64/atomic.h +++ b/include/asm-sparc64/atomic.h | |||
@@ -54,6 +54,7 @@ extern int atomic64_sub_ret(int, atomic64_t *); | |||
54 | * other cases. | 54 | * other cases. |
55 | */ | 55 | */ |
56 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) | 56 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) |
57 | #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) | ||
57 | 58 | ||
58 | #define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0) | 59 | #define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0) |
59 | #define atomic64_sub_and_test(i, v) (atomic64_sub_ret(i, v) == 0) | 60 | #define atomic64_sub_and_test(i, v) (atomic64_sub_ret(i, v) == 0) |
diff --git a/include/asm-um/ldt-i386.h b/include/asm-um/ldt-i386.h index b42662929b6c..175722a91164 100644 --- a/include/asm-um/ldt-i386.h +++ b/include/asm-um/ldt-i386.h | |||
@@ -35,7 +35,7 @@ typedef struct uml_ldt { | |||
35 | union { | 35 | union { |
36 | struct ldt_entry * pages[LDT_PAGES_MAX]; | 36 | struct ldt_entry * pages[LDT_PAGES_MAX]; |
37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; | 37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; |
38 | }; | 38 | } u; |
39 | } uml_ldt_t; | 39 | } uml_ldt_t; |
40 | 40 | ||
41 | /* | 41 | /* |
diff --git a/include/asm-um/ldt.h b/include/asm-um/ldt-x86_64.h index 4466ff6de0fd..175722a91164 100644 --- a/include/asm-um/ldt.h +++ b/include/asm-um/ldt-x86_64.h | |||
@@ -35,7 +35,7 @@ typedef struct uml_ldt { | |||
35 | union { | 35 | union { |
36 | struct ldt_entry * pages[LDT_PAGES_MAX]; | 36 | struct ldt_entry * pages[LDT_PAGES_MAX]; |
37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; | 37 | struct ldt_entry entries[LDT_DIRECT_ENTRIES]; |
38 | }; | 38 | } u; |
39 | } uml_ldt_t; | 39 | } uml_ldt_t; |
40 | 40 | ||
41 | /* | 41 | /* |
@@ -67,8 +67,3 @@ typedef struct uml_ldt { | |||
67 | (info)->useable == 0 ) | 67 | (info)->useable == 0 ) |
68 | 68 | ||
69 | #endif | 69 | #endif |
70 | #ifndef __UM_LDT_H | ||
71 | #define __UM_LDT_H | ||
72 | |||
73 | #include "asm/arch/ldt.h" | ||
74 | #endif | ||
diff --git a/include/asm-x86_64/atomic.h b/include/asm-x86_64/atomic.h index 0866ef67f198..50db9f39274f 100644 --- a/include/asm-x86_64/atomic.h +++ b/include/asm-x86_64/atomic.h | |||
@@ -160,8 +160,8 @@ static __inline__ int atomic_inc_and_test(atomic_t *v) | |||
160 | 160 | ||
161 | /** | 161 | /** |
162 | * atomic_add_negative - add and test if negative | 162 | * atomic_add_negative - add and test if negative |
163 | * @v: pointer of type atomic_t | ||
164 | * @i: integer value to add | 163 | * @i: integer value to add |
164 | * @v: pointer of type atomic_t | ||
165 | * | 165 | * |
166 | * Atomically adds @i to @v and returns true | 166 | * Atomically adds @i to @v and returns true |
167 | * if the result is negative, or false when | 167 | * if the result is negative, or false when |
@@ -178,6 +178,31 @@ static __inline__ int atomic_add_negative(int i, atomic_t *v) | |||
178 | return c; | 178 | return c; |
179 | } | 179 | } |
180 | 180 | ||
181 | /** | ||
182 | * atomic_add_return - add and return | ||
183 | * @i: integer value to add | ||
184 | * @v: pointer of type atomic_t | ||
185 | * | ||
186 | * Atomically adds @i to @v and returns @i + @v | ||
187 | */ | ||
188 | static __inline__ int atomic_add_return(int i, atomic_t *v) | ||
189 | { | ||
190 | int __i = i; | ||
191 | __asm__ __volatile__( | ||
192 | LOCK "xaddl %0, %1;" | ||
193 | :"=r"(i) | ||
194 | :"m"(v->counter), "0"(i)); | ||
195 | return i + __i; | ||
196 | } | ||
197 | |||
198 | static __inline__ int atomic_sub_return(int i, atomic_t *v) | ||
199 | { | ||
200 | return atomic_add_return(-i,v); | ||
201 | } | ||
202 | |||
203 | #define atomic_inc_return(v) (atomic_add_return(1,v)) | ||
204 | #define atomic_dec_return(v) (atomic_sub_return(1,v)) | ||
205 | |||
181 | /* An 64bit atomic type */ | 206 | /* An 64bit atomic type */ |
182 | 207 | ||
183 | typedef struct { volatile long counter; } atomic64_t; | 208 | typedef struct { volatile long counter; } atomic64_t; |
@@ -320,14 +345,14 @@ static __inline__ int atomic64_inc_and_test(atomic64_t *v) | |||
320 | 345 | ||
321 | /** | 346 | /** |
322 | * atomic64_add_negative - add and test if negative | 347 | * atomic64_add_negative - add and test if negative |
323 | * @v: pointer to atomic64_t | ||
324 | * @i: integer value to add | 348 | * @i: integer value to add |
349 | * @v: pointer to type atomic64_t | ||
325 | * | 350 | * |
326 | * Atomically adds @i to @v and returns true | 351 | * Atomically adds @i to @v and returns true |
327 | * if the result is negative, or false when | 352 | * if the result is negative, or false when |
328 | * result is greater than or equal to zero. | 353 | * result is greater than or equal to zero. |
329 | */ | 354 | */ |
330 | static __inline__ long atomic64_add_negative(long i, atomic64_t *v) | 355 | static __inline__ int atomic64_add_negative(long i, atomic64_t *v) |
331 | { | 356 | { |
332 | unsigned char c; | 357 | unsigned char c; |
333 | 358 | ||
@@ -339,27 +364,30 @@ static __inline__ long atomic64_add_negative(long i, atomic64_t *v) | |||
339 | } | 364 | } |
340 | 365 | ||
341 | /** | 366 | /** |
342 | * atomic_add_return - add and return | 367 | * atomic64_add_return - add and return |
343 | * @v: pointer of type atomic_t | ||
344 | * @i: integer value to add | 368 | * @i: integer value to add |
369 | * @v: pointer to type atomic64_t | ||
345 | * | 370 | * |
346 | * Atomically adds @i to @v and returns @i + @v | 371 | * Atomically adds @i to @v and returns @i + @v |
347 | */ | 372 | */ |
348 | static __inline__ int atomic_add_return(int i, atomic_t *v) | 373 | static __inline__ long atomic64_add_return(long i, atomic64_t *v) |
349 | { | 374 | { |
350 | int __i = i; | 375 | long __i = i; |
351 | __asm__ __volatile__( | 376 | __asm__ __volatile__( |
352 | LOCK "xaddl %0, %1;" | 377 | LOCK "xaddq %0, %1;" |
353 | :"=r"(i) | 378 | :"=r"(i) |
354 | :"m"(v->counter), "0"(i)); | 379 | :"m"(v->counter), "0"(i)); |
355 | return i + __i; | 380 | return i + __i; |
356 | } | 381 | } |
357 | 382 | ||
358 | static __inline__ int atomic_sub_return(int i, atomic_t *v) | 383 | static __inline__ long atomic64_sub_return(long i, atomic64_t *v) |
359 | { | 384 | { |
360 | return atomic_add_return(-i,v); | 385 | return atomic64_add_return(-i,v); |
361 | } | 386 | } |
362 | 387 | ||
388 | #define atomic64_inc_return(v) (atomic64_add_return(1,v)) | ||
389 | #define atomic64_dec_return(v) (atomic64_sub_return(1,v)) | ||
390 | |||
363 | #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) | 391 | #define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) |
364 | 392 | ||
365 | /** | 393 | /** |
@@ -381,9 +409,6 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v) | |||
381 | }) | 409 | }) |
382 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 410 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) |
383 | 411 | ||
384 | #define atomic_inc_return(v) (atomic_add_return(1,v)) | ||
385 | #define atomic_dec_return(v) (atomic_sub_return(1,v)) | ||
386 | |||
387 | /* These are x86-specific, used by some header files */ | 412 | /* These are x86-specific, used by some header files */ |
388 | #define atomic_clear_mask(mask, addr) \ | 413 | #define atomic_clear_mask(mask, addr) \ |
389 | __asm__ __volatile__(LOCK "andl %0,%1" \ | 414 | __asm__ __volatile__(LOCK "andl %0,%1" \ |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 313dfe9b443a..8b2eab90abb6 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -11,7 +11,7 @@ struct vm_area_struct; | |||
11 | /* | 11 | /* |
12 | * GFP bitmasks.. | 12 | * GFP bitmasks.. |
13 | */ | 13 | */ |
14 | /* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */ | 14 | /* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low three bits) */ |
15 | #define __GFP_DMA ((__force gfp_t)0x01u) | 15 | #define __GFP_DMA ((__force gfp_t)0x01u) |
16 | #define __GFP_HIGHMEM ((__force gfp_t)0x02u) | 16 | #define __GFP_HIGHMEM ((__force gfp_t)0x02u) |
17 | #ifdef CONFIG_DMA_IS_DMA32 | 17 | #ifdef CONFIG_DMA_IS_DMA32 |
@@ -74,7 +74,12 @@ struct vm_area_struct; | |||
74 | #define GFP_DMA32 __GFP_DMA32 | 74 | #define GFP_DMA32 __GFP_DMA32 |
75 | 75 | ||
76 | 76 | ||
77 | #define gfp_zone(mask) ((__force int)((mask) & (__force gfp_t)GFP_ZONEMASK)) | 77 | static inline int gfp_zone(gfp_t gfp) |
78 | { | ||
79 | int zone = GFP_ZONEMASK & (__force int) gfp; | ||
80 | BUG_ON(zone >= GFP_ZONETYPES); | ||
81 | return zone; | ||
82 | } | ||
78 | 83 | ||
79 | /* | 84 | /* |
80 | * There is only one page-allocator function, and two main namespaces to | 85 | * There is only one page-allocator function, and two main namespaces to |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index aa56172c6fed..dcde7adfdce5 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -16,8 +16,6 @@ | |||
16 | #ifndef _LINUX_JBD_H | 16 | #ifndef _LINUX_JBD_H |
17 | #define _LINUX_JBD_H | 17 | #define _LINUX_JBD_H |
18 | 18 | ||
19 | #if defined(CONFIG_JBD) || defined(CONFIG_JBD_MODULE) || !defined(__KERNEL__) | ||
20 | |||
21 | /* Allow this file to be included directly into e2fsprogs */ | 19 | /* Allow this file to be included directly into e2fsprogs */ |
22 | #ifndef __KERNEL__ | 20 | #ifndef __KERNEL__ |
23 | #include "jfs_compat.h" | 21 | #include "jfs_compat.h" |
@@ -1083,19 +1081,4 @@ extern int jbd_blocks_per_page(struct inode *inode); | |||
1083 | 1081 | ||
1084 | #endif /* __KERNEL__ */ | 1082 | #endif /* __KERNEL__ */ |
1085 | 1083 | ||
1086 | #endif /* CONFIG_JBD || CONFIG_JBD_MODULE || !__KERNEL__ */ | ||
1087 | |||
1088 | /* | ||
1089 | * Compatibility no-ops which allow the kernel to compile without CONFIG_JBD | ||
1090 | * go here. | ||
1091 | */ | ||
1092 | |||
1093 | #if defined(__KERNEL__) && !(defined(CONFIG_JBD) || defined(CONFIG_JBD_MODULE)) | ||
1094 | |||
1095 | #define J_ASSERT(expr) do {} while (0) | ||
1096 | #define J_ASSERT_BH(bh, expr) do {} while (0) | ||
1097 | #define buffer_jbd(bh) 0 | ||
1098 | #define journal_buffer_journal_lru(bh) 0 | ||
1099 | |||
1100 | #endif /* defined(__KERNEL__) && !defined(CONFIG_JBD) */ | ||
1101 | #endif /* _LINUX_JBD_H */ | 1084 | #endif /* _LINUX_JBD_H */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 0986d19be0b7..f0cdfd18db55 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -144,7 +144,8 @@ extern unsigned int kobjsize(const void *objp); | |||
144 | 144 | ||
145 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ | 145 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ |
146 | #define VM_GROWSUP 0x00000200 | 146 | #define VM_GROWSUP 0x00000200 |
147 | #define VM_SHM 0x00000400 /* shared memory area, don't swap out */ | 147 | #define VM_SHM 0x00000000 /* Means nothing: delete it later */ |
148 | #define VM_UNPAGED 0x00000400 /* Pages managed without map count */ | ||
148 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ | 149 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ |
149 | 150 | ||
150 | #define VM_EXECUTABLE 0x00001000 | 151 | #define VM_EXECUTABLE 0x00001000 |
@@ -157,7 +158,7 @@ extern unsigned int kobjsize(const void *objp); | |||
157 | 158 | ||
158 | #define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */ | 159 | #define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */ |
159 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ | 160 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ |
160 | #define VM_RESERVED 0x00080000 /* Pages managed in a special way */ | 161 | #define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */ |
161 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ | 162 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ |
162 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ | 163 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ |
163 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ | 164 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ |
@@ -311,8 +312,6 @@ struct page { | |||
311 | 312 | ||
312 | extern void FASTCALL(__page_cache_release(struct page *)); | 313 | extern void FASTCALL(__page_cache_release(struct page *)); |
313 | 314 | ||
314 | #ifdef CONFIG_HUGETLB_PAGE | ||
315 | |||
316 | static inline int page_count(struct page *page) | 315 | static inline int page_count(struct page *page) |
317 | { | 316 | { |
318 | if (PageCompound(page)) | 317 | if (PageCompound(page)) |
@@ -329,23 +328,6 @@ static inline void get_page(struct page *page) | |||
329 | 328 | ||
330 | void put_page(struct page *page); | 329 | void put_page(struct page *page); |
331 | 330 | ||
332 | #else /* CONFIG_HUGETLB_PAGE */ | ||
333 | |||
334 | #define page_count(p) (atomic_read(&(p)->_count) + 1) | ||
335 | |||
336 | static inline void get_page(struct page *page) | ||
337 | { | ||
338 | atomic_inc(&page->_count); | ||
339 | } | ||
340 | |||
341 | static inline void put_page(struct page *page) | ||
342 | { | ||
343 | if (put_page_testzero(page)) | ||
344 | __page_cache_release(page); | ||
345 | } | ||
346 | |||
347 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
348 | |||
349 | /* | 331 | /* |
350 | * Multiple processes may "see" the same page. E.g. for untouched | 332 | * Multiple processes may "see" the same page. E.g. for untouched |
351 | * mappings of /dev/null, all processes see the same page full of | 333 | * mappings of /dev/null, all processes see the same page full of |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 2c8edad5dccf..9f22090df7dd 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -91,21 +91,11 @@ struct per_cpu_pageset { | |||
91 | * will be a maximum of 4 (2 ** 2) zonelists, for 3 modifiers there will | 91 | * will be a maximum of 4 (2 ** 2) zonelists, for 3 modifiers there will |
92 | * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible | 92 | * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible |
93 | * combinations of zone modifiers in "zone modifier space". | 93 | * combinations of zone modifiers in "zone modifier space". |
94 | * | ||
95 | * NOTE! Make sure this matches the zones in <linux/gfp.h> | ||
94 | */ | 96 | */ |
95 | #define GFP_ZONEMASK 0x03 | 97 | #define GFP_ZONEMASK 0x07 |
96 | /* | 98 | #define GFP_ZONETYPES 5 |
97 | * As an optimisation any zone modifier bits which are only valid when | ||
98 | * no other zone modifier bits are set (loners) should be placed in | ||
99 | * the highest order bits of this field. This allows us to reduce the | ||
100 | * extent of the zonelists thus saving space. For example in the case | ||
101 | * of three zone modifier bits, we could require up to eight zonelists. | ||
102 | * If the left most zone modifier is a "loner" then the highest valid | ||
103 | * zonelist would be four allowing us to allocate only five zonelists. | ||
104 | * Use the first form when the left most bit is not a "loner", otherwise | ||
105 | * use the second. | ||
106 | */ | ||
107 | /* #define GFP_ZONETYPES (GFP_ZONEMASK + 1) */ /* Non-loner */ | ||
108 | #define GFP_ZONETYPES ((GFP_ZONEMASK + 1) / 2 + 1) /* Loner */ | ||
109 | 99 | ||
110 | /* | 100 | /* |
111 | * On machines where it is needed (eg PCs) we divide physical memory | 101 | * On machines where it is needed (eg PCs) we divide physical memory |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f34767c5fc79..343083fec258 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -287,11 +287,7 @@ extern void __mod_page_state(unsigned long offset, unsigned long delta); | |||
287 | #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) | 287 | #define ClearPageReclaim(page) clear_bit(PG_reclaim, &(page)->flags) |
288 | #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) | 288 | #define TestClearPageReclaim(page) test_and_clear_bit(PG_reclaim, &(page)->flags) |
289 | 289 | ||
290 | #ifdef CONFIG_HUGETLB_PAGE | ||
291 | #define PageCompound(page) test_bit(PG_compound, &(page)->flags) | 290 | #define PageCompound(page) test_bit(PG_compound, &(page)->flags) |
292 | #else | ||
293 | #define PageCompound(page) 0 | ||
294 | #endif | ||
295 | #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) | 291 | #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) |
296 | #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) | 292 | #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) |
297 | 293 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index 856d232c7562..d81b050e5955 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -47,6 +47,7 @@ struct usb_driver; | |||
47 | * @urb_list: urbs queued to this endpoint; maintained by usbcore | 47 | * @urb_list: urbs queued to this endpoint; maintained by usbcore |
48 | * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH) | 48 | * @hcpriv: for use by HCD; typically holds hardware dma queue head (QH) |
49 | * with one or more transfer descriptors (TDs) per urb | 49 | * with one or more transfer descriptors (TDs) per urb |
50 | * @kobj: kobject for sysfs info | ||
50 | * @extra: descriptors following this endpoint in the configuration | 51 | * @extra: descriptors following this endpoint in the configuration |
51 | * @extralen: how many bytes of "extra" are valid | 52 | * @extralen: how many bytes of "extra" are valid |
52 | * | 53 | * |
diff --git a/include/net/route.h b/include/net/route.h index dbe79ca67d31..e3e5436f8017 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -126,6 +126,9 @@ extern int ip_rt_ioctl(unsigned int cmd, void __user *arg); | |||
126 | extern void ip_rt_get_source(u8 *src, struct rtable *rt); | 126 | extern void ip_rt_get_source(u8 *src, struct rtable *rt); |
127 | extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); | 127 | extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); |
128 | 128 | ||
129 | struct in_ifaddr; | ||
130 | extern void fib_add_ifaddr(struct in_ifaddr *); | ||
131 | |||
129 | static inline void ip_rt_put(struct rtable * rt) | 132 | static inline void ip_rt_put(struct rtable * rt) |
130 | { | 133 | { |
131 | if (rt) | 134 | if (rt) |
diff --git a/kernel/fork.c b/kernel/fork.c index e0d0b77343f8..1c1cf8dc396b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -263,7 +263,7 @@ static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm) | |||
263 | rb_parent = &tmp->vm_rb; | 263 | rb_parent = &tmp->vm_rb; |
264 | 264 | ||
265 | mm->map_count++; | 265 | mm->map_count++; |
266 | retval = copy_page_range(mm, oldmm, tmp); | 266 | retval = copy_page_range(mm, oldmm, mpnt); |
267 | 267 | ||
268 | if (tmp->vm_ops && tmp->vm_ops->open) | 268 | if (tmp->vm_ops && tmp->vm_ops->open) |
269 | tmp->vm_ops->open(tmp); | 269 | tmp->vm_ops->open(tmp); |
diff --git a/kernel/futex.c b/kernel/futex.c index aca8d10704f6..5872e3507f35 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -201,21 +201,6 @@ static int get_futex_key(unsigned long uaddr, union futex_key *key) | |||
201 | * from swap. But that's a lot of code to duplicate here | 201 | * from swap. But that's a lot of code to duplicate here |
202 | * for a rare case, so we simply fetch the page. | 202 | * for a rare case, so we simply fetch the page. |
203 | */ | 203 | */ |
204 | |||
205 | /* | ||
206 | * Do a quick atomic lookup first - this is the fastpath. | ||
207 | */ | ||
208 | page = follow_page(mm, uaddr, FOLL_TOUCH|FOLL_GET); | ||
209 | if (likely(page != NULL)) { | ||
210 | key->shared.pgoff = | ||
211 | page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT); | ||
212 | put_page(page); | ||
213 | return 0; | ||
214 | } | ||
215 | |||
216 | /* | ||
217 | * Do it the general way. | ||
218 | */ | ||
219 | err = get_user_pages(current, mm, uaddr, 1, 0, 0, &page, NULL); | 204 | err = get_user_pages(current, mm, uaddr, 1, 0, 0, &page, NULL); |
220 | if (err >= 0) { | 205 | if (err >= 0) { |
221 | key->shared.pgoff = | 206 | key->shared.pgoff = |
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 3bd7226d15fa..81c49a4d679e 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c | |||
@@ -36,6 +36,9 @@ void synchronize_irq(unsigned int irq) | |||
36 | { | 36 | { |
37 | struct irq_desc *desc = irq_desc + irq; | 37 | struct irq_desc *desc = irq_desc + irq; |
38 | 38 | ||
39 | if (irq >= NR_IRQS) | ||
40 | return; | ||
41 | |||
39 | while (desc->status & IRQ_INPROGRESS) | 42 | while (desc->status & IRQ_INPROGRESS) |
40 | cpu_relax(); | 43 | cpu_relax(); |
41 | } | 44 | } |
@@ -60,6 +63,9 @@ void disable_irq_nosync(unsigned int irq) | |||
60 | irq_desc_t *desc = irq_desc + irq; | 63 | irq_desc_t *desc = irq_desc + irq; |
61 | unsigned long flags; | 64 | unsigned long flags; |
62 | 65 | ||
66 | if (irq >= NR_IRQS) | ||
67 | return; | ||
68 | |||
63 | spin_lock_irqsave(&desc->lock, flags); | 69 | spin_lock_irqsave(&desc->lock, flags); |
64 | if (!desc->depth++) { | 70 | if (!desc->depth++) { |
65 | desc->status |= IRQ_DISABLED; | 71 | desc->status |= IRQ_DISABLED; |
@@ -86,6 +92,9 @@ void disable_irq(unsigned int irq) | |||
86 | { | 92 | { |
87 | irq_desc_t *desc = irq_desc + irq; | 93 | irq_desc_t *desc = irq_desc + irq; |
88 | 94 | ||
95 | if (irq >= NR_IRQS) | ||
96 | return; | ||
97 | |||
89 | disable_irq_nosync(irq); | 98 | disable_irq_nosync(irq); |
90 | if (desc->action) | 99 | if (desc->action) |
91 | synchronize_irq(irq); | 100 | synchronize_irq(irq); |
@@ -108,6 +117,9 @@ void enable_irq(unsigned int irq) | |||
108 | irq_desc_t *desc = irq_desc + irq; | 117 | irq_desc_t *desc = irq_desc + irq; |
109 | unsigned long flags; | 118 | unsigned long flags; |
110 | 119 | ||
120 | if (irq >= NR_IRQS) | ||
121 | return; | ||
122 | |||
111 | spin_lock_irqsave(&desc->lock, flags); | 123 | spin_lock_irqsave(&desc->lock, flags); |
112 | switch (desc->depth) { | 124 | switch (desc->depth) { |
113 | case 0: | 125 | case 0: |
@@ -163,6 +175,9 @@ int setup_irq(unsigned int irq, struct irqaction * new) | |||
163 | unsigned long flags; | 175 | unsigned long flags; |
164 | int shared = 0; | 176 | int shared = 0; |
165 | 177 | ||
178 | if (irq >= NR_IRQS) | ||
179 | return -EINVAL; | ||
180 | |||
166 | if (desc->handler == &no_irq_type) | 181 | if (desc->handler == &no_irq_type) |
167 | return -ENOSYS; | 182 | return -ENOSYS; |
168 | /* | 183 | /* |
diff --git a/kernel/printk.c b/kernel/printk.c index ac8a08f36207..5287be83e3e7 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -956,7 +956,7 @@ int unregister_console(struct console *console) | |||
956 | if (console_drivers == console) { | 956 | if (console_drivers == console) { |
957 | console_drivers=console->next; | 957 | console_drivers=console->next; |
958 | res = 0; | 958 | res = 0; |
959 | } else { | 959 | } else if (console_drivers) { |
960 | for (a=console_drivers->next, b=console_drivers ; | 960 | for (a=console_drivers->next, b=console_drivers ; |
961 | a; b=a, a=b->next) { | 961 | a; b=a, a=b->next) { |
962 | if (a == console) { | 962 | if (a == console) { |
diff --git a/mm/Kconfig b/mm/Kconfig index ae9ce6b73e8a..21eb51d4da8f 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -125,12 +125,10 @@ comment "Memory hotplug is currently incompatible with Software Suspend" | |||
125 | # space can be handled with less contention: split it at this NR_CPUS. | 125 | # space can be handled with less contention: split it at this NR_CPUS. |
126 | # Default to 4 for wider testing, though 8 might be more appropriate. | 126 | # Default to 4 for wider testing, though 8 might be more appropriate. |
127 | # ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock. | 127 | # ARM's adjust_pte (unused if VIPT) depends on mm-wide page_table_lock. |
128 | # PA-RISC's debug spinlock_t is too large for the 32-bit struct page. | 128 | # PA-RISC 7xxx's spinlock_t would enlarge struct page from 32 to 44 bytes. |
129 | # ARM26 and SPARC32 and PPC64 may use one page for multiple page tables. | ||
130 | # | 129 | # |
131 | config SPLIT_PTLOCK_CPUS | 130 | config SPLIT_PTLOCK_CPUS |
132 | int | 131 | int |
133 | default "4096" if ARM && !CPU_CACHE_VIPT | 132 | default "4096" if ARM && !CPU_CACHE_VIPT |
134 | default "4096" if PARISC && DEBUG_SPINLOCK && !64BIT | 133 | default "4096" if PARISC && !PA20 |
135 | default "4096" if ARM26 || SPARC32 || PPC64 | ||
136 | default "4" | 134 | default "4" |
diff --git a/mm/fremap.c b/mm/fremap.c index d862be3bc3e3..007cbad9331e 100644 --- a/mm/fremap.c +++ b/mm/fremap.c | |||
@@ -65,7 +65,7 @@ int install_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
65 | pte_t pte_val; | 65 | pte_t pte_val; |
66 | spinlock_t *ptl; | 66 | spinlock_t *ptl; |
67 | 67 | ||
68 | BUG_ON(vma->vm_flags & VM_RESERVED); | 68 | BUG_ON(vma->vm_flags & VM_UNPAGED); |
69 | 69 | ||
70 | pgd = pgd_offset(mm, addr); | 70 | pgd = pgd_offset(mm, addr); |
71 | pud = pud_alloc(mm, pgd, addr); | 71 | pud = pud_alloc(mm, pgd, addr); |
@@ -122,7 +122,7 @@ int install_file_pte(struct mm_struct *mm, struct vm_area_struct *vma, | |||
122 | pte_t pte_val; | 122 | pte_t pte_val; |
123 | spinlock_t *ptl; | 123 | spinlock_t *ptl; |
124 | 124 | ||
125 | BUG_ON(vma->vm_flags & VM_RESERVED); | 125 | BUG_ON(vma->vm_flags & VM_UNPAGED); |
126 | 126 | ||
127 | pgd = pgd_offset(mm, addr); | 127 | pgd = pgd_offset(mm, addr); |
128 | pud = pud_alloc(mm, pgd, addr); | 128 | pud = pud_alloc(mm, pgd, addr); |
@@ -204,12 +204,10 @@ asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size, | |||
204 | * Make sure the vma is shared, that it supports prefaulting, | 204 | * Make sure the vma is shared, that it supports prefaulting, |
205 | * and that the remapped range is valid and fully within | 205 | * and that the remapped range is valid and fully within |
206 | * the single existing vma. vm_private_data is used as a | 206 | * the single existing vma. vm_private_data is used as a |
207 | * swapout cursor in a VM_NONLINEAR vma (unless VM_RESERVED | 207 | * swapout cursor in a VM_NONLINEAR vma. |
208 | * or VM_LOCKED, but VM_LOCKED could be revoked later on). | ||
209 | */ | 208 | */ |
210 | if (vma && (vma->vm_flags & VM_SHARED) && | 209 | if (vma && (vma->vm_flags & VM_SHARED) && |
211 | (!vma->vm_private_data || | 210 | (!vma->vm_private_data || (vma->vm_flags & VM_NONLINEAR)) && |
212 | (vma->vm_flags & (VM_NONLINEAR|VM_RESERVED))) && | ||
213 | vma->vm_ops && vma->vm_ops->populate && | 211 | vma->vm_ops && vma->vm_ops->populate && |
214 | end > start && start >= vma->vm_start && | 212 | end > start && start >= vma->vm_start && |
215 | end <= vma->vm_end) { | 213 | end <= vma->vm_end) { |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 728e9bda12ea..3e52df7c471b 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -22,6 +22,10 @@ unsigned long max_huge_pages; | |||
22 | static struct list_head hugepage_freelists[MAX_NUMNODES]; | 22 | static struct list_head hugepage_freelists[MAX_NUMNODES]; |
23 | static unsigned int nr_huge_pages_node[MAX_NUMNODES]; | 23 | static unsigned int nr_huge_pages_node[MAX_NUMNODES]; |
24 | static unsigned int free_huge_pages_node[MAX_NUMNODES]; | 24 | static unsigned int free_huge_pages_node[MAX_NUMNODES]; |
25 | |||
26 | /* | ||
27 | * Protects updates to hugepage_freelists, nr_huge_pages, and free_huge_pages | ||
28 | */ | ||
25 | static DEFINE_SPINLOCK(hugetlb_lock); | 29 | static DEFINE_SPINLOCK(hugetlb_lock); |
26 | 30 | ||
27 | static void enqueue_huge_page(struct page *page) | 31 | static void enqueue_huge_page(struct page *page) |
@@ -61,8 +65,10 @@ static struct page *alloc_fresh_huge_page(void) | |||
61 | HUGETLB_PAGE_ORDER); | 65 | HUGETLB_PAGE_ORDER); |
62 | nid = (nid + 1) % num_online_nodes(); | 66 | nid = (nid + 1) % num_online_nodes(); |
63 | if (page) { | 67 | if (page) { |
68 | spin_lock(&hugetlb_lock); | ||
64 | nr_huge_pages++; | 69 | nr_huge_pages++; |
65 | nr_huge_pages_node[page_to_nid(page)]++; | 70 | nr_huge_pages_node[page_to_nid(page)]++; |
71 | spin_unlock(&hugetlb_lock); | ||
66 | } | 72 | } |
67 | return page; | 73 | return page; |
68 | } | 74 | } |
diff --git a/mm/madvise.c b/mm/madvise.c index 17aaf3e16449..328a3bcce527 100644 --- a/mm/madvise.c +++ b/mm/madvise.c | |||
@@ -126,7 +126,7 @@ static long madvise_dontneed(struct vm_area_struct * vma, | |||
126 | unsigned long start, unsigned long end) | 126 | unsigned long start, unsigned long end) |
127 | { | 127 | { |
128 | *prev = vma; | 128 | *prev = vma; |
129 | if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_RESERVED)) | 129 | if (vma->vm_flags & (VM_LOCKED|VM_HUGETLB|VM_UNPAGED)) |
130 | return -EINVAL; | 130 | return -EINVAL; |
131 | 131 | ||
132 | if (unlikely(vma->vm_flags & VM_NONLINEAR)) { | 132 | if (unlikely(vma->vm_flags & VM_NONLINEAR)) { |
diff --git a/mm/memory.c b/mm/memory.c index 2998cfc12f5b..d1f46f4e4c8a 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -334,7 +334,7 @@ static inline void add_mm_rss(struct mm_struct *mm, int file_rss, int anon_rss) | |||
334 | 334 | ||
335 | /* | 335 | /* |
336 | * This function is called to print an error when a pte in a | 336 | * This function is called to print an error when a pte in a |
337 | * !VM_RESERVED region is found pointing to an invalid pfn (which | 337 | * !VM_UNPAGED region is found pointing to an invalid pfn (which |
338 | * is an error. | 338 | * is an error. |
339 | * | 339 | * |
340 | * The calling function must still handle the error. | 340 | * The calling function must still handle the error. |
@@ -350,6 +350,22 @@ void print_bad_pte(struct vm_area_struct *vma, pte_t pte, unsigned long vaddr) | |||
350 | } | 350 | } |
351 | 351 | ||
352 | /* | 352 | /* |
353 | * page_is_anon applies strict checks for an anonymous page belonging to | ||
354 | * this vma at this address. It is used on VM_UNPAGED vmas, which are | ||
355 | * usually populated with shared originals (which must not be counted), | ||
356 | * but occasionally contain private COWed copies (when !VM_SHARED, or | ||
357 | * perhaps via ptrace when VM_SHARED). An mmap of /dev/mem might window | ||
358 | * free pages, pages from other processes, or from other parts of this: | ||
359 | * it's tricky, but try not to be deceived by foreign anonymous pages. | ||
360 | */ | ||
361 | static inline int page_is_anon(struct page *page, | ||
362 | struct vm_area_struct *vma, unsigned long addr) | ||
363 | { | ||
364 | return page && PageAnon(page) && page_mapped(page) && | ||
365 | page_address_in_vma(page, vma) == addr; | ||
366 | } | ||
367 | |||
368 | /* | ||
353 | * copy one vm_area from one task to the other. Assumes the page tables | 369 | * copy one vm_area from one task to the other. Assumes the page tables |
354 | * already present in the new task to be cleared in the whole range | 370 | * already present in the new task to be cleared in the whole range |
355 | * covered by this vma. | 371 | * covered by this vma. |
@@ -381,23 +397,22 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm, | |||
381 | goto out_set_pte; | 397 | goto out_set_pte; |
382 | } | 398 | } |
383 | 399 | ||
384 | /* If the region is VM_RESERVED, the mapping is not | ||
385 | * mapped via rmap - duplicate the pte as is. | ||
386 | */ | ||
387 | if (vm_flags & VM_RESERVED) | ||
388 | goto out_set_pte; | ||
389 | |||
390 | pfn = pte_pfn(pte); | 400 | pfn = pte_pfn(pte); |
391 | /* If the pte points outside of valid memory but | 401 | page = pfn_valid(pfn)? pfn_to_page(pfn): NULL; |
392 | * the region is not VM_RESERVED, we have a problem. | 402 | |
403 | if (unlikely(vm_flags & VM_UNPAGED)) | ||
404 | if (!page_is_anon(page, vma, addr)) | ||
405 | goto out_set_pte; | ||
406 | |||
407 | /* | ||
408 | * If the pte points outside of valid memory but | ||
409 | * the region is not VM_UNPAGED, we have a problem. | ||
393 | */ | 410 | */ |
394 | if (unlikely(!pfn_valid(pfn))) { | 411 | if (unlikely(!page)) { |
395 | print_bad_pte(vma, pte, addr); | 412 | print_bad_pte(vma, pte, addr); |
396 | goto out_set_pte; /* try to do something sane */ | 413 | goto out_set_pte; /* try to do something sane */ |
397 | } | 414 | } |
398 | 415 | ||
399 | page = pfn_to_page(pfn); | ||
400 | |||
401 | /* | 416 | /* |
402 | * If it's a COW mapping, write protect it both | 417 | * If it's a COW mapping, write protect it both |
403 | * in the parent and the child | 418 | * in the parent and the child |
@@ -528,7 +543,7 @@ int copy_page_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, | |||
528 | * readonly mappings. The tradeoff is that copy_page_range is more | 543 | * readonly mappings. The tradeoff is that copy_page_range is more |
529 | * efficient than faulting. | 544 | * efficient than faulting. |
530 | */ | 545 | */ |
531 | if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_RESERVED))) { | 546 | if (!(vma->vm_flags & (VM_HUGETLB|VM_NONLINEAR|VM_UNPAGED))) { |
532 | if (!vma->anon_vma) | 547 | if (!vma->anon_vma) |
533 | return 0; | 548 | return 0; |
534 | } | 549 | } |
@@ -568,17 +583,20 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb, | |||
568 | continue; | 583 | continue; |
569 | } | 584 | } |
570 | if (pte_present(ptent)) { | 585 | if (pte_present(ptent)) { |
571 | struct page *page = NULL; | 586 | struct page *page; |
587 | unsigned long pfn; | ||
572 | 588 | ||
573 | (*zap_work) -= PAGE_SIZE; | 589 | (*zap_work) -= PAGE_SIZE; |
574 | 590 | ||
575 | if (!(vma->vm_flags & VM_RESERVED)) { | 591 | pfn = pte_pfn(ptent); |
576 | unsigned long pfn = pte_pfn(ptent); | 592 | page = pfn_valid(pfn)? pfn_to_page(pfn): NULL; |
577 | if (unlikely(!pfn_valid(pfn))) | 593 | |
578 | print_bad_pte(vma, ptent, addr); | 594 | if (unlikely(vma->vm_flags & VM_UNPAGED)) { |
579 | else | 595 | if (!page_is_anon(page, vma, addr)) |
580 | page = pfn_to_page(pfn); | 596 | page = NULL; |
581 | } | 597 | } else if (unlikely(!page)) |
598 | print_bad_pte(vma, ptent, addr); | ||
599 | |||
582 | if (unlikely(details) && page) { | 600 | if (unlikely(details) && page) { |
583 | /* | 601 | /* |
584 | * unmap_shared_mapping_pages() wants to | 602 | * unmap_shared_mapping_pages() wants to |
@@ -968,7 +986,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
968 | continue; | 986 | continue; |
969 | } | 987 | } |
970 | 988 | ||
971 | if (!vma || (vma->vm_flags & (VM_IO | VM_RESERVED)) | 989 | if (!vma || (vma->vm_flags & VM_IO) |
972 | || !(vm_flags & vma->vm_flags)) | 990 | || !(vm_flags & vma->vm_flags)) |
973 | return i ? : -EFAULT; | 991 | return i ? : -EFAULT; |
974 | 992 | ||
@@ -1191,10 +1209,16 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, | |||
1191 | * rest of the world about it: | 1209 | * rest of the world about it: |
1192 | * VM_IO tells people not to look at these pages | 1210 | * VM_IO tells people not to look at these pages |
1193 | * (accesses can have side effects). | 1211 | * (accesses can have side effects). |
1194 | * VM_RESERVED tells the core MM not to "manage" these pages | 1212 | * VM_RESERVED is specified all over the place, because |
1195 | * (e.g. refcount, mapcount, try to swap them out). | 1213 | * in 2.4 it kept swapout's vma scan off this vma; but |
1214 | * in 2.6 the LRU scan won't even find its pages, so this | ||
1215 | * flag means no more than count its pages in reserved_vm, | ||
1216 | * and omit it from core dump, even when VM_IO turned off. | ||
1217 | * VM_UNPAGED tells the core MM not to "manage" these pages | ||
1218 | * (e.g. refcount, mapcount, try to swap them out): in | ||
1219 | * particular, zap_pte_range does not try to free them. | ||
1196 | */ | 1220 | */ |
1197 | vma->vm_flags |= VM_IO | VM_RESERVED; | 1221 | vma->vm_flags |= VM_IO | VM_RESERVED | VM_UNPAGED; |
1198 | 1222 | ||
1199 | BUG_ON(addr >= end); | 1223 | BUG_ON(addr >= end); |
1200 | pfn -= addr >> PAGE_SHIFT; | 1224 | pfn -= addr >> PAGE_SHIFT; |
@@ -1271,22 +1295,29 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1271 | unsigned long address, pte_t *page_table, pmd_t *pmd, | 1295 | unsigned long address, pte_t *page_table, pmd_t *pmd, |
1272 | spinlock_t *ptl, pte_t orig_pte) | 1296 | spinlock_t *ptl, pte_t orig_pte) |
1273 | { | 1297 | { |
1274 | struct page *old_page, *new_page; | 1298 | struct page *old_page, *src_page, *new_page; |
1275 | unsigned long pfn = pte_pfn(orig_pte); | 1299 | unsigned long pfn = pte_pfn(orig_pte); |
1276 | pte_t entry; | 1300 | pte_t entry; |
1277 | int ret = VM_FAULT_MINOR; | 1301 | int ret = VM_FAULT_MINOR; |
1278 | 1302 | ||
1279 | BUG_ON(vma->vm_flags & VM_RESERVED); | ||
1280 | |||
1281 | if (unlikely(!pfn_valid(pfn))) { | 1303 | if (unlikely(!pfn_valid(pfn))) { |
1282 | /* | 1304 | /* |
1283 | * Page table corrupted: show pte and kill process. | 1305 | * Page table corrupted: show pte and kill process. |
1306 | * Or it's an attempt to COW an out-of-map VM_UNPAGED | ||
1307 | * entry, which copy_user_highpage does not support. | ||
1284 | */ | 1308 | */ |
1285 | print_bad_pte(vma, orig_pte, address); | 1309 | print_bad_pte(vma, orig_pte, address); |
1286 | ret = VM_FAULT_OOM; | 1310 | ret = VM_FAULT_OOM; |
1287 | goto unlock; | 1311 | goto unlock; |
1288 | } | 1312 | } |
1289 | old_page = pfn_to_page(pfn); | 1313 | old_page = pfn_to_page(pfn); |
1314 | src_page = old_page; | ||
1315 | |||
1316 | if (unlikely(vma->vm_flags & VM_UNPAGED)) | ||
1317 | if (!page_is_anon(old_page, vma, address)) { | ||
1318 | old_page = NULL; | ||
1319 | goto gotten; | ||
1320 | } | ||
1290 | 1321 | ||
1291 | if (PageAnon(old_page) && !TestSetPageLocked(old_page)) { | 1322 | if (PageAnon(old_page) && !TestSetPageLocked(old_page)) { |
1292 | int reuse = can_share_swap_page(old_page); | 1323 | int reuse = can_share_swap_page(old_page); |
@@ -1307,11 +1338,12 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1307 | * Ok, we need to copy. Oh, well.. | 1338 | * Ok, we need to copy. Oh, well.. |
1308 | */ | 1339 | */ |
1309 | page_cache_get(old_page); | 1340 | page_cache_get(old_page); |
1341 | gotten: | ||
1310 | pte_unmap_unlock(page_table, ptl); | 1342 | pte_unmap_unlock(page_table, ptl); |
1311 | 1343 | ||
1312 | if (unlikely(anon_vma_prepare(vma))) | 1344 | if (unlikely(anon_vma_prepare(vma))) |
1313 | goto oom; | 1345 | goto oom; |
1314 | if (old_page == ZERO_PAGE(address)) { | 1346 | if (src_page == ZERO_PAGE(address)) { |
1315 | new_page = alloc_zeroed_user_highpage(vma, address); | 1347 | new_page = alloc_zeroed_user_highpage(vma, address); |
1316 | if (!new_page) | 1348 | if (!new_page) |
1317 | goto oom; | 1349 | goto oom; |
@@ -1319,7 +1351,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1319 | new_page = alloc_page_vma(GFP_HIGHUSER, vma, address); | 1351 | new_page = alloc_page_vma(GFP_HIGHUSER, vma, address); |
1320 | if (!new_page) | 1352 | if (!new_page) |
1321 | goto oom; | 1353 | goto oom; |
1322 | copy_user_highpage(new_page, old_page, address); | 1354 | copy_user_highpage(new_page, src_page, address); |
1323 | } | 1355 | } |
1324 | 1356 | ||
1325 | /* | 1357 | /* |
@@ -1327,11 +1359,14 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1327 | */ | 1359 | */ |
1328 | page_table = pte_offset_map_lock(mm, pmd, address, &ptl); | 1360 | page_table = pte_offset_map_lock(mm, pmd, address, &ptl); |
1329 | if (likely(pte_same(*page_table, orig_pte))) { | 1361 | if (likely(pte_same(*page_table, orig_pte))) { |
1330 | page_remove_rmap(old_page); | 1362 | if (old_page) { |
1331 | if (!PageAnon(old_page)) { | 1363 | page_remove_rmap(old_page); |
1364 | if (!PageAnon(old_page)) { | ||
1365 | dec_mm_counter(mm, file_rss); | ||
1366 | inc_mm_counter(mm, anon_rss); | ||
1367 | } | ||
1368 | } else | ||
1332 | inc_mm_counter(mm, anon_rss); | 1369 | inc_mm_counter(mm, anon_rss); |
1333 | dec_mm_counter(mm, file_rss); | ||
1334 | } | ||
1335 | flush_cache_page(vma, address, pfn); | 1370 | flush_cache_page(vma, address, pfn); |
1336 | entry = mk_pte(new_page, vma->vm_page_prot); | 1371 | entry = mk_pte(new_page, vma->vm_page_prot); |
1337 | entry = maybe_mkwrite(pte_mkdirty(entry), vma); | 1372 | entry = maybe_mkwrite(pte_mkdirty(entry), vma); |
@@ -1345,13 +1380,16 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1345 | new_page = old_page; | 1380 | new_page = old_page; |
1346 | ret |= VM_FAULT_WRITE; | 1381 | ret |= VM_FAULT_WRITE; |
1347 | } | 1382 | } |
1348 | page_cache_release(new_page); | 1383 | if (new_page) |
1349 | page_cache_release(old_page); | 1384 | page_cache_release(new_page); |
1385 | if (old_page) | ||
1386 | page_cache_release(old_page); | ||
1350 | unlock: | 1387 | unlock: |
1351 | pte_unmap_unlock(page_table, ptl); | 1388 | pte_unmap_unlock(page_table, ptl); |
1352 | return ret; | 1389 | return ret; |
1353 | oom: | 1390 | oom: |
1354 | page_cache_release(old_page); | 1391 | if (old_page) |
1392 | page_cache_release(old_page); | ||
1355 | return VM_FAULT_OOM; | 1393 | return VM_FAULT_OOM; |
1356 | } | 1394 | } |
1357 | 1395 | ||
@@ -1774,7 +1812,16 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1774 | spinlock_t *ptl; | 1812 | spinlock_t *ptl; |
1775 | pte_t entry; | 1813 | pte_t entry; |
1776 | 1814 | ||
1777 | if (write_access) { | 1815 | /* |
1816 | * A VM_UNPAGED vma will normally be filled with present ptes | ||
1817 | * by remap_pfn_range, and never arrive here; but it might have | ||
1818 | * holes, or if !VM_DONTEXPAND, mremap might have expanded it. | ||
1819 | * It's weird enough handling anon pages in unpaged vmas, we do | ||
1820 | * not want to worry about ZERO_PAGEs too (it may or may not | ||
1821 | * matter if their counts wrap): just give them anon pages. | ||
1822 | */ | ||
1823 | |||
1824 | if (write_access || (vma->vm_flags & VM_UNPAGED)) { | ||
1778 | /* Allocate our own private page. */ | 1825 | /* Allocate our own private page. */ |
1779 | pte_unmap(page_table); | 1826 | pte_unmap(page_table); |
1780 | 1827 | ||
@@ -1849,6 +1896,7 @@ static int do_no_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1849 | int anon = 0; | 1896 | int anon = 0; |
1850 | 1897 | ||
1851 | pte_unmap(page_table); | 1898 | pte_unmap(page_table); |
1899 | BUG_ON(vma->vm_flags & VM_UNPAGED); | ||
1852 | 1900 | ||
1853 | if (vma->vm_file) { | 1901 | if (vma->vm_file) { |
1854 | mapping = vma->vm_file->f_mapping; | 1902 | mapping = vma->vm_file->f_mapping; |
@@ -1924,7 +1972,7 @@ retry: | |||
1924 | inc_mm_counter(mm, anon_rss); | 1972 | inc_mm_counter(mm, anon_rss); |
1925 | lru_cache_add_active(new_page); | 1973 | lru_cache_add_active(new_page); |
1926 | page_add_anon_rmap(new_page, vma, address); | 1974 | page_add_anon_rmap(new_page, vma, address); |
1927 | } else if (!(vma->vm_flags & VM_RESERVED)) { | 1975 | } else { |
1928 | inc_mm_counter(mm, file_rss); | 1976 | inc_mm_counter(mm, file_rss); |
1929 | page_add_file_rmap(new_page); | 1977 | page_add_file_rmap(new_page); |
1930 | } | 1978 | } |
@@ -2203,7 +2251,7 @@ static int __init gate_vma_init(void) | |||
2203 | gate_vma.vm_start = FIXADDR_USER_START; | 2251 | gate_vma.vm_start = FIXADDR_USER_START; |
2204 | gate_vma.vm_end = FIXADDR_USER_END; | 2252 | gate_vma.vm_end = FIXADDR_USER_END; |
2205 | gate_vma.vm_page_prot = PAGE_READONLY; | 2253 | gate_vma.vm_page_prot = PAGE_READONLY; |
2206 | gate_vma.vm_flags = VM_RESERVED; | 2254 | gate_vma.vm_flags = 0; |
2207 | return 0; | 2255 | return 0; |
2208 | } | 2256 | } |
2209 | __initcall(gate_vma_init); | 2257 | __initcall(gate_vma_init); |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 5abc57c2b8bd..5609a31bdf22 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -269,7 +269,7 @@ check_range(struct mm_struct *mm, unsigned long start, unsigned long end, | |||
269 | first = find_vma(mm, start); | 269 | first = find_vma(mm, start); |
270 | if (!first) | 270 | if (!first) |
271 | return ERR_PTR(-EFAULT); | 271 | return ERR_PTR(-EFAULT); |
272 | if (first->vm_flags & VM_RESERVED) | 272 | if (first->vm_flags & VM_UNPAGED) |
273 | return ERR_PTR(-EACCES); | 273 | return ERR_PTR(-EACCES); |
274 | prev = NULL; | 274 | prev = NULL; |
275 | for (vma = first; vma && vma->vm_start < end; vma = vma->vm_next) { | 275 | for (vma = first; vma && vma->vm_start < end; vma = vma->vm_next) { |
@@ -1076,17 +1076,6 @@ munmap_back: | |||
1076 | error = file->f_op->mmap(file, vma); | 1076 | error = file->f_op->mmap(file, vma); |
1077 | if (error) | 1077 | if (error) |
1078 | goto unmap_and_free_vma; | 1078 | goto unmap_and_free_vma; |
1079 | if ((vma->vm_flags & (VM_SHARED | VM_WRITE | VM_RESERVED)) | ||
1080 | == (VM_WRITE | VM_RESERVED)) { | ||
1081 | printk(KERN_WARNING "program %s is using MAP_PRIVATE, " | ||
1082 | "PROT_WRITE mmap of VM_RESERVED memory, which " | ||
1083 | "is deprecated. Please report this to " | ||
1084 | "linux-kernel@vger.kernel.org\n",current->comm); | ||
1085 | if (vma->vm_ops && vma->vm_ops->close) | ||
1086 | vma->vm_ops->close(vma); | ||
1087 | error = -EACCES; | ||
1088 | goto unmap_and_free_vma; | ||
1089 | } | ||
1090 | } else if (vm_flags & VM_SHARED) { | 1079 | } else if (vm_flags & VM_SHARED) { |
1091 | error = shmem_zero_setup(vma); | 1080 | error = shmem_zero_setup(vma); |
1092 | if (error) | 1081 | if (error) |
diff --git a/mm/mprotect.c b/mm/mprotect.c index 17a2b52b753b..653b8571c1ed 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -124,14 +124,6 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, | |||
124 | * a MAP_NORESERVE private mapping to writable will now reserve. | 124 | * a MAP_NORESERVE private mapping to writable will now reserve. |
125 | */ | 125 | */ |
126 | if (newflags & VM_WRITE) { | 126 | if (newflags & VM_WRITE) { |
127 | if (oldflags & VM_RESERVED) { | ||
128 | BUG_ON(oldflags & VM_WRITE); | ||
129 | printk(KERN_WARNING "program %s is using MAP_PRIVATE, " | ||
130 | "PROT_WRITE mprotect of VM_RESERVED memory, " | ||
131 | "which is deprecated. Please report this to " | ||
132 | "linux-kernel@vger.kernel.org\n",current->comm); | ||
133 | return -EACCES; | ||
134 | } | ||
135 | if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_SHARED|VM_HUGETLB))) { | 127 | if (!(oldflags & (VM_ACCOUNT|VM_WRITE|VM_SHARED|VM_HUGETLB))) { |
136 | charged = nrpages; | 128 | charged = nrpages; |
137 | if (security_vm_enough_memory(charged)) | 129 | if (security_vm_enough_memory(charged)) |
diff --git a/mm/msync.c b/mm/msync.c index 0e040e9c39d8..b3f4caf3010b 100644 --- a/mm/msync.c +++ b/mm/msync.c | |||
@@ -97,9 +97,9 @@ static void msync_page_range(struct vm_area_struct *vma, | |||
97 | /* For hugepages we can't go walking the page table normally, | 97 | /* For hugepages we can't go walking the page table normally, |
98 | * but that's ok, hugetlbfs is memory based, so we don't need | 98 | * but that's ok, hugetlbfs is memory based, so we don't need |
99 | * to do anything more on an msync(). | 99 | * to do anything more on an msync(). |
100 | * Can't do anything with VM_RESERVED regions either. | 100 | * Can't do anything with VM_UNPAGED regions either. |
101 | */ | 101 | */ |
102 | if (vma->vm_flags & (VM_HUGETLB|VM_RESERVED)) | 102 | if (vma->vm_flags & (VM_HUGETLB|VM_UNPAGED)) |
103 | return; | 103 | return; |
104 | 104 | ||
105 | BUG_ON(addr >= end); | 105 | BUG_ON(addr >= end); |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index bd4de592dc23..1731236dec35 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -140,18 +140,13 @@ static void bad_page(const char *function, struct page *page) | |||
140 | 1 << PG_reclaim | | 140 | 1 << PG_reclaim | |
141 | 1 << PG_slab | | 141 | 1 << PG_slab | |
142 | 1 << PG_swapcache | | 142 | 1 << PG_swapcache | |
143 | 1 << PG_writeback | | 143 | 1 << PG_writeback ); |
144 | 1 << PG_reserved ); | ||
145 | set_page_count(page, 0); | 144 | set_page_count(page, 0); |
146 | reset_page_mapcount(page); | 145 | reset_page_mapcount(page); |
147 | page->mapping = NULL; | 146 | page->mapping = NULL; |
148 | add_taint(TAINT_BAD_PAGE); | 147 | add_taint(TAINT_BAD_PAGE); |
149 | } | 148 | } |
150 | 149 | ||
151 | #ifndef CONFIG_HUGETLB_PAGE | ||
152 | #define prep_compound_page(page, order) do { } while (0) | ||
153 | #define destroy_compound_page(page, order) do { } while (0) | ||
154 | #else | ||
155 | /* | 150 | /* |
156 | * Higher-order pages are called "compound pages". They are structured thusly: | 151 | * Higher-order pages are called "compound pages". They are structured thusly: |
157 | * | 152 | * |
@@ -205,7 +200,6 @@ static void destroy_compound_page(struct page *page, unsigned long order) | |||
205 | ClearPageCompound(p); | 200 | ClearPageCompound(p); |
206 | } | 201 | } |
207 | } | 202 | } |
208 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
209 | 203 | ||
210 | /* | 204 | /* |
211 | * function for dealing with page's order in buddy system. | 205 | * function for dealing with page's order in buddy system. |
@@ -340,7 +334,7 @@ static inline void __free_pages_bulk (struct page *page, | |||
340 | zone->free_area[order].nr_free++; | 334 | zone->free_area[order].nr_free++; |
341 | } | 335 | } |
342 | 336 | ||
343 | static inline void free_pages_check(const char *function, struct page *page) | 337 | static inline int free_pages_check(const char *function, struct page *page) |
344 | { | 338 | { |
345 | if ( page_mapcount(page) || | 339 | if ( page_mapcount(page) || |
346 | page->mapping != NULL || | 340 | page->mapping != NULL || |
@@ -358,6 +352,12 @@ static inline void free_pages_check(const char *function, struct page *page) | |||
358 | bad_page(function, page); | 352 | bad_page(function, page); |
359 | if (PageDirty(page)) | 353 | if (PageDirty(page)) |
360 | __ClearPageDirty(page); | 354 | __ClearPageDirty(page); |
355 | /* | ||
356 | * For now, we report if PG_reserved was found set, but do not | ||
357 | * clear it, and do not free the page. But we shall soon need | ||
358 | * to do more, for when the ZERO_PAGE count wraps negative. | ||
359 | */ | ||
360 | return PageReserved(page); | ||
361 | } | 361 | } |
362 | 362 | ||
363 | /* | 363 | /* |
@@ -397,11 +397,10 @@ void __free_pages_ok(struct page *page, unsigned int order) | |||
397 | { | 397 | { |
398 | LIST_HEAD(list); | 398 | LIST_HEAD(list); |
399 | int i; | 399 | int i; |
400 | int reserved = 0; | ||
400 | 401 | ||
401 | arch_free_page(page, order); | 402 | arch_free_page(page, order); |
402 | 403 | ||
403 | mod_page_state(pgfree, 1 << order); | ||
404 | |||
405 | #ifndef CONFIG_MMU | 404 | #ifndef CONFIG_MMU |
406 | if (order > 0) | 405 | if (order > 0) |
407 | for (i = 1 ; i < (1 << order) ; ++i) | 406 | for (i = 1 ; i < (1 << order) ; ++i) |
@@ -409,8 +408,12 @@ void __free_pages_ok(struct page *page, unsigned int order) | |||
409 | #endif | 408 | #endif |
410 | 409 | ||
411 | for (i = 0 ; i < (1 << order) ; ++i) | 410 | for (i = 0 ; i < (1 << order) ; ++i) |
412 | free_pages_check(__FUNCTION__, page + i); | 411 | reserved += free_pages_check(__FUNCTION__, page + i); |
412 | if (reserved) | ||
413 | return; | ||
414 | |||
413 | list_add(&page->lru, &list); | 415 | list_add(&page->lru, &list); |
416 | mod_page_state(pgfree, 1 << order); | ||
414 | kernel_map_pages(page, 1<<order, 0); | 417 | kernel_map_pages(page, 1<<order, 0); |
415 | free_pages_bulk(page_zone(page), 1, &list, order); | 418 | free_pages_bulk(page_zone(page), 1, &list, order); |
416 | } | 419 | } |
@@ -468,7 +471,7 @@ void set_page_refs(struct page *page, int order) | |||
468 | /* | 471 | /* |
469 | * This page is about to be returned from the page allocator | 472 | * This page is about to be returned from the page allocator |
470 | */ | 473 | */ |
471 | static void prep_new_page(struct page *page, int order) | 474 | static int prep_new_page(struct page *page, int order) |
472 | { | 475 | { |
473 | if ( page_mapcount(page) || | 476 | if ( page_mapcount(page) || |
474 | page->mapping != NULL || | 477 | page->mapping != NULL || |
@@ -486,12 +489,20 @@ static void prep_new_page(struct page *page, int order) | |||
486 | 1 << PG_reserved ))) | 489 | 1 << PG_reserved ))) |
487 | bad_page(__FUNCTION__, page); | 490 | bad_page(__FUNCTION__, page); |
488 | 491 | ||
492 | /* | ||
493 | * For now, we report if PG_reserved was found set, but do not | ||
494 | * clear it, and do not allocate the page: as a safety net. | ||
495 | */ | ||
496 | if (PageReserved(page)) | ||
497 | return 1; | ||
498 | |||
489 | page->flags &= ~(1 << PG_uptodate | 1 << PG_error | | 499 | page->flags &= ~(1 << PG_uptodate | 1 << PG_error | |
490 | 1 << PG_referenced | 1 << PG_arch_1 | | 500 | 1 << PG_referenced | 1 << PG_arch_1 | |
491 | 1 << PG_checked | 1 << PG_mappedtodisk); | 501 | 1 << PG_checked | 1 << PG_mappedtodisk); |
492 | set_page_private(page, 0); | 502 | set_page_private(page, 0); |
493 | set_page_refs(page, order); | 503 | set_page_refs(page, order); |
494 | kernel_map_pages(page, 1 << order, 1); | 504 | kernel_map_pages(page, 1 << order, 1); |
505 | return 0; | ||
495 | } | 506 | } |
496 | 507 | ||
497 | /* | 508 | /* |
@@ -674,11 +685,14 @@ static void fastcall free_hot_cold_page(struct page *page, int cold) | |||
674 | 685 | ||
675 | arch_free_page(page, 0); | 686 | arch_free_page(page, 0); |
676 | 687 | ||
677 | kernel_map_pages(page, 1, 0); | ||
678 | inc_page_state(pgfree); | ||
679 | if (PageAnon(page)) | 688 | if (PageAnon(page)) |
680 | page->mapping = NULL; | 689 | page->mapping = NULL; |
681 | free_pages_check(__FUNCTION__, page); | 690 | if (free_pages_check(__FUNCTION__, page)) |
691 | return; | ||
692 | |||
693 | inc_page_state(pgfree); | ||
694 | kernel_map_pages(page, 1, 0); | ||
695 | |||
682 | pcp = &zone_pcp(zone, get_cpu())->pcp[cold]; | 696 | pcp = &zone_pcp(zone, get_cpu())->pcp[cold]; |
683 | local_irq_save(flags); | 697 | local_irq_save(flags); |
684 | list_add(&page->lru, &pcp->list); | 698 | list_add(&page->lru, &pcp->list); |
@@ -717,12 +731,14 @@ static struct page * | |||
717 | buffered_rmqueue(struct zone *zone, int order, gfp_t gfp_flags) | 731 | buffered_rmqueue(struct zone *zone, int order, gfp_t gfp_flags) |
718 | { | 732 | { |
719 | unsigned long flags; | 733 | unsigned long flags; |
720 | struct page *page = NULL; | 734 | struct page *page; |
721 | int cold = !!(gfp_flags & __GFP_COLD); | 735 | int cold = !!(gfp_flags & __GFP_COLD); |
722 | 736 | ||
737 | again: | ||
723 | if (order == 0) { | 738 | if (order == 0) { |
724 | struct per_cpu_pages *pcp; | 739 | struct per_cpu_pages *pcp; |
725 | 740 | ||
741 | page = NULL; | ||
726 | pcp = &zone_pcp(zone, get_cpu())->pcp[cold]; | 742 | pcp = &zone_pcp(zone, get_cpu())->pcp[cold]; |
727 | local_irq_save(flags); | 743 | local_irq_save(flags); |
728 | if (pcp->count <= pcp->low) | 744 | if (pcp->count <= pcp->low) |
@@ -744,7 +760,8 @@ buffered_rmqueue(struct zone *zone, int order, gfp_t gfp_flags) | |||
744 | if (page != NULL) { | 760 | if (page != NULL) { |
745 | BUG_ON(bad_range(zone, page)); | 761 | BUG_ON(bad_range(zone, page)); |
746 | mod_page_state_zone(zone, pgalloc, 1 << order); | 762 | mod_page_state_zone(zone, pgalloc, 1 << order); |
747 | prep_new_page(page, order); | 763 | if (prep_new_page(page, order)) |
764 | goto again; | ||
748 | 765 | ||
749 | if (gfp_flags & __GFP_ZERO) | 766 | if (gfp_flags & __GFP_ZERO) |
750 | prep_zero_page(page, order, gfp_flags); | 767 | prep_zero_page(page, order, gfp_flags); |
@@ -225,7 +225,9 @@ vma_address(struct page *page, struct vm_area_struct *vma) | |||
225 | 225 | ||
226 | /* | 226 | /* |
227 | * At what user virtual address is page expected in vma? checking that the | 227 | * At what user virtual address is page expected in vma? checking that the |
228 | * page matches the vma: currently only used by unuse_process, on anon pages. | 228 | * page matches the vma: currently only used on anon pages, by unuse_vma; |
229 | * and by extraordinary checks on anon pages in VM_UNPAGED vmas, taking | ||
230 | * care that an mmap of /dev/mem might window free and foreign pages. | ||
229 | */ | 231 | */ |
230 | unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) | 232 | unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) |
231 | { | 233 | { |
@@ -234,7 +236,8 @@ unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma) | |||
234 | (void *)page->mapping - PAGE_MAPPING_ANON) | 236 | (void *)page->mapping - PAGE_MAPPING_ANON) |
235 | return -EFAULT; | 237 | return -EFAULT; |
236 | } else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) { | 238 | } else if (page->mapping && !(vma->vm_flags & VM_NONLINEAR)) { |
237 | if (vma->vm_file->f_mapping != page->mapping) | 239 | if (!vma->vm_file || |
240 | vma->vm_file->f_mapping != page->mapping) | ||
238 | return -EFAULT; | 241 | return -EFAULT; |
239 | } else | 242 | } else |
240 | return -EFAULT; | 243 | return -EFAULT; |
@@ -529,10 +532,8 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma) | |||
529 | * If the page is mlock()d, we cannot swap it out. | 532 | * If the page is mlock()d, we cannot swap it out. |
530 | * If it's recently referenced (perhaps page_referenced | 533 | * If it's recently referenced (perhaps page_referenced |
531 | * skipped over this mm) then we should reactivate it. | 534 | * skipped over this mm) then we should reactivate it. |
532 | * | ||
533 | * Pages belonging to VM_RESERVED regions should not happen here. | ||
534 | */ | 535 | */ |
535 | if ((vma->vm_flags & (VM_LOCKED|VM_RESERVED)) || | 536 | if ((vma->vm_flags & VM_LOCKED) || |
536 | ptep_clear_flush_young(vma, address, pte)) { | 537 | ptep_clear_flush_young(vma, address, pte)) { |
537 | ret = SWAP_FAIL; | 538 | ret = SWAP_FAIL; |
538 | goto out_unmap; | 539 | goto out_unmap; |
@@ -727,7 +728,7 @@ static int try_to_unmap_file(struct page *page) | |||
727 | 728 | ||
728 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, | 729 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, |
729 | shared.vm_set.list) { | 730 | shared.vm_set.list) { |
730 | if (vma->vm_flags & (VM_LOCKED|VM_RESERVED)) | 731 | if (vma->vm_flags & VM_LOCKED) |
731 | continue; | 732 | continue; |
732 | cursor = (unsigned long) vma->vm_private_data; | 733 | cursor = (unsigned long) vma->vm_private_data; |
733 | if (cursor > max_nl_cursor) | 734 | if (cursor > max_nl_cursor) |
@@ -761,7 +762,7 @@ static int try_to_unmap_file(struct page *page) | |||
761 | do { | 762 | do { |
762 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, | 763 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, |
763 | shared.vm_set.list) { | 764 | shared.vm_set.list) { |
764 | if (vma->vm_flags & (VM_LOCKED|VM_RESERVED)) | 765 | if (vma->vm_flags & VM_LOCKED) |
765 | continue; | 766 | continue; |
766 | cursor = (unsigned long) vma->vm_private_data; | 767 | cursor = (unsigned long) vma->vm_private_data; |
767 | while ( cursor < max_nl_cursor && | 768 | while ( cursor < max_nl_cursor && |
@@ -783,11 +784,8 @@ static int try_to_unmap_file(struct page *page) | |||
783 | * in locked vmas). Reset cursor on all unreserved nonlinear | 784 | * in locked vmas). Reset cursor on all unreserved nonlinear |
784 | * vmas, now forgetting on which ones it had fallen behind. | 785 | * vmas, now forgetting on which ones it had fallen behind. |
785 | */ | 786 | */ |
786 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, | 787 | list_for_each_entry(vma, &mapping->i_mmap_nonlinear, shared.vm_set.list) |
787 | shared.vm_set.list) { | 788 | vma->vm_private_data = NULL; |
788 | if (!(vma->vm_flags & VM_RESERVED)) | ||
789 | vma->vm_private_data = NULL; | ||
790 | } | ||
791 | out: | 789 | out: |
792 | spin_unlock(&mapping->i_mmap_lock); | 790 | spin_unlock(&mapping->i_mmap_lock); |
793 | return ret; | 791 | return ret; |
@@ -34,8 +34,6 @@ | |||
34 | /* How many pages do we try to swap or page in/out together? */ | 34 | /* How many pages do we try to swap or page in/out together? */ |
35 | int page_cluster; | 35 | int page_cluster; |
36 | 36 | ||
37 | #ifdef CONFIG_HUGETLB_PAGE | ||
38 | |||
39 | void put_page(struct page *page) | 37 | void put_page(struct page *page) |
40 | { | 38 | { |
41 | if (unlikely(PageCompound(page))) { | 39 | if (unlikely(PageCompound(page))) { |
@@ -52,7 +50,6 @@ void put_page(struct page *page) | |||
52 | __page_cache_release(page); | 50 | __page_cache_release(page); |
53 | } | 51 | } |
54 | EXPORT_SYMBOL(put_page); | 52 | EXPORT_SYMBOL(put_page); |
55 | #endif | ||
56 | 53 | ||
57 | /* | 54 | /* |
58 | * Writeback is about to end against a page which has been marked for immediate | 55 | * Writeback is about to end against a page which has been marked for immediate |
diff --git a/mm/truncate.c b/mm/truncate.c index 29c18f68dc35..9173ab500604 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -282,8 +282,8 @@ int invalidate_inode_pages2_range(struct address_space *mapping, | |||
282 | * Zap the rest of the file in one hit. | 282 | * Zap the rest of the file in one hit. |
283 | */ | 283 | */ |
284 | unmap_mapping_range(mapping, | 284 | unmap_mapping_range(mapping, |
285 | page_index << PAGE_CACHE_SHIFT, | 285 | (loff_t)page_index<<PAGE_CACHE_SHIFT, |
286 | (end - page_index + 1) | 286 | (loff_t)(end - page_index + 1) |
287 | << PAGE_CACHE_SHIFT, | 287 | << PAGE_CACHE_SHIFT, |
288 | 0); | 288 | 0); |
289 | did_range_unmap = 1; | 289 | did_range_unmap = 1; |
@@ -292,7 +292,7 @@ int invalidate_inode_pages2_range(struct address_space *mapping, | |||
292 | * Just zap this page | 292 | * Just zap this page |
293 | */ | 293 | */ |
294 | unmap_mapping_range(mapping, | 294 | unmap_mapping_range(mapping, |
295 | page_index << PAGE_CACHE_SHIFT, | 295 | (loff_t)page_index<<PAGE_CACHE_SHIFT, |
296 | PAGE_CACHE_SIZE, 0); | 296 | PAGE_CACHE_SIZE, 0); |
297 | } | 297 | } |
298 | } | 298 | } |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index defcf6a8607c..975abe254b7a 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -366,6 +366,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) | |||
366 | 366 | ||
367 | spin_lock_bh(&br->lock); | 367 | spin_lock_bh(&br->lock); |
368 | br_stp_recalculate_bridge_id(br); | 368 | br_stp_recalculate_bridge_id(br); |
369 | br_features_recompute(br); | ||
369 | if ((br->dev->flags & IFF_UP) | 370 | if ((br->dev->flags & IFF_UP) |
370 | && (dev->flags & IFF_UP) && netif_carrier_ok(dev)) | 371 | && (dev->flags & IFF_UP) && netif_carrier_ok(dev)) |
371 | br_stp_enable_port(p); | 372 | br_stp_enable_port(p); |
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 4ec4b2ca6ab1..04a6fe3e95a2 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -234,7 +234,10 @@ static void inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap, | |||
234 | int destroy) | 234 | int destroy) |
235 | { | 235 | { |
236 | struct in_ifaddr *promote = NULL; | 236 | struct in_ifaddr *promote = NULL; |
237 | struct in_ifaddr *ifa1 = *ifap; | 237 | struct in_ifaddr *ifa, *ifa1 = *ifap; |
238 | struct in_ifaddr *last_prim = in_dev->ifa_list; | ||
239 | struct in_ifaddr *prev_prom = NULL; | ||
240 | int do_promote = IN_DEV_PROMOTE_SECONDARIES(in_dev); | ||
238 | 241 | ||
239 | ASSERT_RTNL(); | 242 | ASSERT_RTNL(); |
240 | 243 | ||
@@ -243,18 +246,22 @@ static void inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap, | |||
243 | **/ | 246 | **/ |
244 | 247 | ||
245 | if (!(ifa1->ifa_flags & IFA_F_SECONDARY)) { | 248 | if (!(ifa1->ifa_flags & IFA_F_SECONDARY)) { |
246 | struct in_ifaddr *ifa; | ||
247 | struct in_ifaddr **ifap1 = &ifa1->ifa_next; | 249 | struct in_ifaddr **ifap1 = &ifa1->ifa_next; |
248 | 250 | ||
249 | while ((ifa = *ifap1) != NULL) { | 251 | while ((ifa = *ifap1) != NULL) { |
252 | if (!(ifa->ifa_flags & IFA_F_SECONDARY) && | ||
253 | ifa1->ifa_scope <= ifa->ifa_scope) | ||
254 | last_prim = ifa; | ||
255 | |||
250 | if (!(ifa->ifa_flags & IFA_F_SECONDARY) || | 256 | if (!(ifa->ifa_flags & IFA_F_SECONDARY) || |
251 | ifa1->ifa_mask != ifa->ifa_mask || | 257 | ifa1->ifa_mask != ifa->ifa_mask || |
252 | !inet_ifa_match(ifa1->ifa_address, ifa)) { | 258 | !inet_ifa_match(ifa1->ifa_address, ifa)) { |
253 | ifap1 = &ifa->ifa_next; | 259 | ifap1 = &ifa->ifa_next; |
260 | prev_prom = ifa; | ||
254 | continue; | 261 | continue; |
255 | } | 262 | } |
256 | 263 | ||
257 | if (!IN_DEV_PROMOTE_SECONDARIES(in_dev)) { | 264 | if (!do_promote) { |
258 | *ifap1 = ifa->ifa_next; | 265 | *ifap1 = ifa->ifa_next; |
259 | 266 | ||
260 | rtmsg_ifa(RTM_DELADDR, ifa); | 267 | rtmsg_ifa(RTM_DELADDR, ifa); |
@@ -283,18 +290,31 @@ static void inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap, | |||
283 | */ | 290 | */ |
284 | rtmsg_ifa(RTM_DELADDR, ifa1); | 291 | rtmsg_ifa(RTM_DELADDR, ifa1); |
285 | notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa1); | 292 | notifier_call_chain(&inetaddr_chain, NETDEV_DOWN, ifa1); |
286 | if (destroy) { | ||
287 | inet_free_ifa(ifa1); | ||
288 | 293 | ||
289 | if (!in_dev->ifa_list) | 294 | if (promote) { |
290 | inetdev_destroy(in_dev); | 295 | |
291 | } | 296 | if (prev_prom) { |
297 | prev_prom->ifa_next = promote->ifa_next; | ||
298 | promote->ifa_next = last_prim->ifa_next; | ||
299 | last_prim->ifa_next = promote; | ||
300 | } | ||
292 | 301 | ||
293 | if (promote && IN_DEV_PROMOTE_SECONDARIES(in_dev)) { | ||
294 | /* not sure if we should send a delete notify first? */ | ||
295 | promote->ifa_flags &= ~IFA_F_SECONDARY; | 302 | promote->ifa_flags &= ~IFA_F_SECONDARY; |
296 | rtmsg_ifa(RTM_NEWADDR, promote); | 303 | rtmsg_ifa(RTM_NEWADDR, promote); |
297 | notifier_call_chain(&inetaddr_chain, NETDEV_UP, promote); | 304 | notifier_call_chain(&inetaddr_chain, NETDEV_UP, promote); |
305 | for (ifa = promote->ifa_next; ifa; ifa = ifa->ifa_next) { | ||
306 | if (ifa1->ifa_mask != ifa->ifa_mask || | ||
307 | !inet_ifa_match(ifa1->ifa_address, ifa)) | ||
308 | continue; | ||
309 | fib_add_ifaddr(ifa); | ||
310 | } | ||
311 | |||
312 | } | ||
313 | if (destroy) { | ||
314 | inet_free_ifa(ifa1); | ||
315 | |||
316 | if (!in_dev->ifa_list) | ||
317 | inetdev_destroy(in_dev); | ||
298 | } | 318 | } |
299 | } | 319 | } |
300 | 320 | ||
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 2267c1fad879..882f88f6d13b 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -407,7 +407,7 @@ static void fib_magic(int cmd, int type, u32 dst, int dst_len, struct in_ifaddr | |||
407 | tb->tb_delete(tb, &req.rtm, &rta, &req.nlh, NULL); | 407 | tb->tb_delete(tb, &req.rtm, &rta, &req.nlh, NULL); |
408 | } | 408 | } |
409 | 409 | ||
410 | static void fib_add_ifaddr(struct in_ifaddr *ifa) | 410 | void fib_add_ifaddr(struct in_ifaddr *ifa) |
411 | { | 411 | { |
412 | struct in_device *in_dev = ifa->ifa_dev; | 412 | struct in_device *in_dev = ifa->ifa_dev; |
413 | struct net_device *dev = in_dev->dev; | 413 | struct net_device *dev = in_dev->dev; |
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index de9f4464438d..3fce91bcc0ba 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/netlink.h> | 28 | #include <linux/netlink.h> |
29 | #include <linux/spinlock.h> | 29 | #include <linux/spinlock.h> |
30 | #include <linux/interrupt.h> | ||
30 | #include <linux/notifier.h> | 31 | #include <linux/notifier.h> |
31 | 32 | ||
32 | #include <linux/netfilter.h> | 33 | #include <linux/netfilter.h> |
@@ -59,11 +60,13 @@ ctnetlink_dump_tuples_proto(struct sk_buff *skb, | |||
59 | 60 | ||
60 | NFA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum); | 61 | NFA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum); |
61 | 62 | ||
63 | /* If no protocol helper is found, this function will return the | ||
64 | * generic protocol helper, so proto won't *ever* be NULL */ | ||
62 | proto = ip_conntrack_proto_find_get(tuple->dst.protonum); | 65 | proto = ip_conntrack_proto_find_get(tuple->dst.protonum); |
63 | if (likely(proto && proto->tuple_to_nfattr)) { | 66 | if (likely(proto->tuple_to_nfattr)) |
64 | ret = proto->tuple_to_nfattr(skb, tuple); | 67 | ret = proto->tuple_to_nfattr(skb, tuple); |
65 | ip_conntrack_proto_put(proto); | 68 | |
66 | } | 69 | ip_conntrack_proto_put(proto); |
67 | 70 | ||
68 | return ret; | 71 | return ret; |
69 | 72 | ||
@@ -128,9 +131,11 @@ ctnetlink_dump_protoinfo(struct sk_buff *skb, const struct ip_conntrack *ct) | |||
128 | 131 | ||
129 | struct nfattr *nest_proto; | 132 | struct nfattr *nest_proto; |
130 | int ret; | 133 | int ret; |
131 | 134 | ||
132 | if (!proto || !proto->to_nfattr) | 135 | if (!proto->to_nfattr) { |
136 | ip_conntrack_proto_put(proto); | ||
133 | return 0; | 137 | return 0; |
138 | } | ||
134 | 139 | ||
135 | nest_proto = NFA_NEST(skb, CTA_PROTOINFO); | 140 | nest_proto = NFA_NEST(skb, CTA_PROTOINFO); |
136 | 141 | ||
@@ -527,10 +532,10 @@ ctnetlink_parse_tuple_proto(struct nfattr *attr, | |||
527 | 532 | ||
528 | proto = ip_conntrack_proto_find_get(tuple->dst.protonum); | 533 | proto = ip_conntrack_proto_find_get(tuple->dst.protonum); |
529 | 534 | ||
530 | if (likely(proto && proto->nfattr_to_tuple)) { | 535 | if (likely(proto->nfattr_to_tuple)) |
531 | ret = proto->nfattr_to_tuple(tb, tuple); | 536 | ret = proto->nfattr_to_tuple(tb, tuple); |
532 | ip_conntrack_proto_put(proto); | 537 | |
533 | } | 538 | ip_conntrack_proto_put(proto); |
534 | 539 | ||
535 | return ret; | 540 | return ret; |
536 | } | 541 | } |
@@ -596,8 +601,6 @@ static int ctnetlink_parse_nat_proto(struct nfattr *attr, | |||
596 | return -EINVAL; | 601 | return -EINVAL; |
597 | 602 | ||
598 | npt = ip_nat_proto_find_get(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum); | 603 | npt = ip_nat_proto_find_get(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum); |
599 | if (!npt) | ||
600 | return 0; | ||
601 | 604 | ||
602 | if (!npt->nfattr_to_range) { | 605 | if (!npt->nfattr_to_range) { |
603 | ip_nat_proto_put(npt); | 606 | ip_nat_proto_put(npt); |
@@ -957,8 +960,6 @@ ctnetlink_change_protoinfo(struct ip_conntrack *ct, struct nfattr *cda[]) | |||
957 | nfattr_parse_nested(tb, CTA_PROTOINFO_MAX, attr); | 960 | nfattr_parse_nested(tb, CTA_PROTOINFO_MAX, attr); |
958 | 961 | ||
959 | proto = ip_conntrack_proto_find_get(npt); | 962 | proto = ip_conntrack_proto_find_get(npt); |
960 | if (!proto) | ||
961 | return -EINVAL; | ||
962 | 963 | ||
963 | if (proto->from_nfattr) | 964 | if (proto->from_nfattr) |
964 | err = proto->from_nfattr(tb, ct); | 965 | err = proto->from_nfattr(tb, ct); |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 8c38ee6d255e..96020d7087e8 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -476,7 +476,7 @@ static int netlink_autobind(struct socket *sock) | |||
476 | struct hlist_head *head; | 476 | struct hlist_head *head; |
477 | struct sock *osk; | 477 | struct sock *osk; |
478 | struct hlist_node *node; | 478 | struct hlist_node *node; |
479 | s32 pid = current->pid; | 479 | s32 pid = current->tgid; |
480 | int err; | 480 | int err; |
481 | static s32 rover = -4097; | 481 | static s32 rover = -4097; |
482 | 482 | ||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 81e00a6c19de..e3b242daf53c 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -39,23 +39,27 @@ static kmem_cache_t *rpc_inode_cachep __read_mostly; | |||
39 | #define RPC_UPCALL_TIMEOUT (30*HZ) | 39 | #define RPC_UPCALL_TIMEOUT (30*HZ) |
40 | 40 | ||
41 | static void | 41 | static void |
42 | __rpc_purge_upcall(struct inode *inode, int err) | 42 | __rpc_purge_list(struct rpc_inode *rpci, struct list_head *head, int err) |
43 | { | 43 | { |
44 | struct rpc_inode *rpci = RPC_I(inode); | ||
45 | struct rpc_pipe_msg *msg; | 44 | struct rpc_pipe_msg *msg; |
45 | void (*destroy_msg)(struct rpc_pipe_msg *); | ||
46 | 46 | ||
47 | while (!list_empty(&rpci->pipe)) { | 47 | destroy_msg = rpci->ops->destroy_msg; |
48 | msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list); | 48 | while (!list_empty(head)) { |
49 | msg = list_entry(head->next, struct rpc_pipe_msg, list); | ||
49 | list_del_init(&msg->list); | 50 | list_del_init(&msg->list); |
50 | msg->errno = err; | 51 | msg->errno = err; |
51 | rpci->ops->destroy_msg(msg); | 52 | destroy_msg(msg); |
52 | } | ||
53 | while (!list_empty(&rpci->in_upcall)) { | ||
54 | msg = list_entry(rpci->pipe.next, struct rpc_pipe_msg, list); | ||
55 | list_del_init(&msg->list); | ||
56 | msg->errno = err; | ||
57 | rpci->ops->destroy_msg(msg); | ||
58 | } | 53 | } |
54 | } | ||
55 | |||
56 | static void | ||
57 | __rpc_purge_upcall(struct inode *inode, int err) | ||
58 | { | ||
59 | struct rpc_inode *rpci = RPC_I(inode); | ||
60 | |||
61 | __rpc_purge_list(rpci, &rpci->pipe, err); | ||
62 | __rpc_purge_list(rpci, &rpci->in_upcall, err); | ||
59 | rpci->pipelen = 0; | 63 | rpci->pipelen = 0; |
60 | wake_up(&rpci->waitq); | 64 | wake_up(&rpci->waitq); |
61 | } | 65 | } |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 9d67782b812f..a96153fc793f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -129,8 +129,8 @@ endif | |||
129 | HOSTCFLAGS_lex.zconf.o := -I$(src) | 129 | HOSTCFLAGS_lex.zconf.o := -I$(src) |
130 | HOSTCFLAGS_zconf.tab.o := -I$(src) | 130 | HOSTCFLAGS_zconf.tab.o := -I$(src) |
131 | 131 | ||
132 | HOSTLOADLIBES_qconf = -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(LIBS_QT) -ldl | 132 | HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl |
133 | HOSTCXXFLAGS_qconf.o = -I$(QTDIR)/include -D LKC_DIRECT_LINK | 133 | HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK |
134 | 134 | ||
135 | HOSTLOADLIBES_gconf = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs` | 135 | HOSTLOADLIBES_gconf = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs` |
136 | HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \ | 136 | HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \ |
@@ -139,40 +139,50 @@ HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \ | |||
139 | $(obj)/qconf.o: $(obj)/.tmp_qtcheck | 139 | $(obj)/qconf.o: $(obj)/.tmp_qtcheck |
140 | 140 | ||
141 | ifeq ($(qconf-target),1) | 141 | ifeq ($(qconf-target),1) |
142 | MOC = $(QTDIR)/bin/moc | 142 | $(obj)/.tmp_qtcheck: $(src)/Makefile |
143 | QTLIBPATH = $(QTDIR)/lib | ||
144 | -include $(obj)/.tmp_qtcheck | 143 | -include $(obj)/.tmp_qtcheck |
145 | 144 | ||
146 | # QT needs some extra effort... | 145 | # QT needs some extra effort... |
147 | $(obj)/.tmp_qtcheck: | 146 | $(obj)/.tmp_qtcheck: |
148 | @set -e; for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ | 147 | @set -e; echo " CHECK qt"; dir=""; pkg=""; \ |
149 | if [ -f $$d/include/qconfig.h ]; then DIR=$$d; break; fi; \ | 148 | pkg-config --exists qt 2> /dev/null && pkg=qt; \ |
150 | done; \ | 149 | pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ |
151 | if [ -z "$$DIR" ]; then \ | 150 | if [ -n "$$pkg" ]; then \ |
152 | echo "*"; \ | 151 | cflags="\$$(shell pkg-config $$pkg --cflags)"; \ |
153 | echo "* Unable to find the QT installation. Please make sure that the"; \ | 152 | libs="\$$(shell pkg-config $$pkg --libs)"; \ |
154 | echo "* QT development package is correctly installed and the QTDIR"; \ | 153 | moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ |
155 | echo "* environment variable is set to the correct location."; \ | 154 | dir="$$(pkg-config $$pkg --variable=prefix)"; \ |
156 | echo "*"; \ | ||
157 | false; \ | ||
158 | fi; \ | ||
159 | LIBPATH=$$DIR/lib; LIB=qt; \ | ||
160 | if [ -f $$QTLIB/libqt-mt.so ] ; then \ | ||
161 | LIB=qt-mt; \ | ||
162 | LIBPATH=$$QTLIB; \ | ||
163 | else \ | 155 | else \ |
164 | $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ | 156 | for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ |
165 | LIBPATH=$$DIR/lib/$$($(HOSTCXX) -print-multi-os-directory); \ | 157 | if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ |
166 | if [ -f $$LIBPATH/libqt-mt.so ]; then LIB=qt-mt; fi; \ | 158 | done; \ |
159 | if [ -z "$$dir" ]; then \ | ||
160 | echo "*"; \ | ||
161 | echo "* Unable to find the QT installation. Please make sure that"; \ | ||
162 | echo "* the QT development package is correctly installed and"; \ | ||
163 | echo "* either install pkg-config or set the QTDIR environment"; \ | ||
164 | echo "* variable to the correct location."; \ | ||
165 | echo "*"; \ | ||
166 | false; \ | ||
167 | fi; \ | ||
168 | libpath=$$dir/lib; lib=qt; osdir=""; \ | ||
169 | $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ | ||
170 | osdir=x$$($(HOSTCXX) -print-multi-os-directory); \ | ||
171 | test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \ | ||
172 | test -f $$libpath/libqt-mt.so && lib=qt-mt; \ | ||
173 | cflags="-I$$dir/include"; \ | ||
174 | libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \ | ||
175 | moc="$$dir/bin/moc"; \ | ||
167 | fi; \ | 176 | fi; \ |
168 | echo "QTDIR=$$DIR" > $@; echo "QTLIBPATH=$$LIBPATH" >> $@; \ | 177 | if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \ |
169 | echo "LIBS_QT=$$LIB" >> $@; \ | ||
170 | if [ ! -x $$DIR/bin/moc -a -x /usr/bin/moc ]; then \ | ||
171 | echo "*"; \ | 178 | echo "*"; \ |
172 | echo "* Unable to find $$DIR/bin/moc, using /usr/bin/moc instead."; \ | 179 | echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \ |
173 | echo "*"; \ | 180 | echo "*"; \ |
174 | echo "MOC=/usr/bin/moc" >> $@; \ | 181 | moc="/usr/bin/moc"; \ |
175 | fi | 182 | fi; \ |
183 | echo "KC_QT_CFLAGS=$$cflags" > $@; \ | ||
184 | echo "KC_QT_LIBS=$$libs" >> $@; \ | ||
185 | echo "KC_QT_MOC=$$moc" >> $@ | ||
176 | endif | 186 | endif |
177 | 187 | ||
178 | $(obj)/gconf.o: $(obj)/.tmp_gtkcheck | 188 | $(obj)/gconf.o: $(obj)/.tmp_gtkcheck |
@@ -210,7 +220,7 @@ $(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h | |||
210 | $(obj)/gconf.o: $(obj)/lkc_defs.h | 220 | $(obj)/gconf.o: $(obj)/lkc_defs.h |
211 | 221 | ||
212 | $(obj)/%.moc: $(src)/%.h | 222 | $(obj)/%.moc: $(src)/%.h |
213 | $(MOC) -i $< -o $@ | 223 | $(KC_QT_MOC) -i $< -o $@ |
214 | 224 | ||
215 | $(obj)/lkc_defs.h: $(src)/lkc_proto.h | 225 | $(obj)/lkc_defs.h: $(src)/lkc_proto.h |
216 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' | 226 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' |
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index 129abab5ce98..e4b8959dd4bb 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c | |||
@@ -197,6 +197,7 @@ void *snd_malloc_pages(size_t size, gfp_t gfp_flags) | |||
197 | 197 | ||
198 | snd_assert(size > 0, return NULL); | 198 | snd_assert(size > 0, return NULL); |
199 | snd_assert(gfp_flags != 0, return NULL); | 199 | snd_assert(gfp_flags != 0, return NULL); |
200 | gfp_flags |= __GFP_COMP; /* compound page lets parts be mapped */ | ||
200 | pg = get_order(size); | 201 | pg = get_order(size); |
201 | if ((res = (void *) __get_free_pages(gfp_flags, pg)) != NULL) { | 202 | if ((res = (void *) __get_free_pages(gfp_flags, pg)) != NULL) { |
202 | mark_pages(virt_to_page(res), pg); | 203 | mark_pages(virt_to_page(res), pg); |
@@ -241,6 +242,7 @@ static void *snd_malloc_dev_pages(struct device *dev, size_t size, dma_addr_t *d | |||
241 | snd_assert(dma != NULL, return NULL); | 242 | snd_assert(dma != NULL, return NULL); |
242 | pg = get_order(size); | 243 | pg = get_order(size); |
243 | gfp_flags = GFP_KERNEL | 244 | gfp_flags = GFP_KERNEL |
245 | | __GFP_COMP /* compound page lets parts be mapped */ | ||
244 | | __GFP_NORETRY /* don't trigger OOM-killer */ | 246 | | __GFP_NORETRY /* don't trigger OOM-killer */ |
245 | | __GFP_NOWARN; /* no stack trace print - this call is non-critical */ | 247 | | __GFP_NOWARN; /* no stack trace print - this call is non-critical */ |
246 | res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, gfp_flags); | 248 | res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, gfp_flags); |
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index 0dc828ff9e94..c9136a98755f 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c | |||
@@ -691,6 +691,7 @@ static struct page * snd_usX2Y_hwdep_pcm_vm_nopage(struct vm_area_struct *area, | |||
691 | snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM); | 691 | snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM); |
692 | vaddr = (char*)((usX2Ydev_t*)area->vm_private_data)->hwdep_pcm_shm + offset; | 692 | vaddr = (char*)((usX2Ydev_t*)area->vm_private_data)->hwdep_pcm_shm + offset; |
693 | page = virt_to_page(vaddr); | 693 | page = virt_to_page(vaddr); |
694 | get_page(page); | ||
694 | 695 | ||
695 | if (type) | 696 | if (type) |
696 | *type = VM_FAULT_MINOR; | 697 | *type = VM_FAULT_MINOR; |