diff options
105 files changed, 1000 insertions, 519 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 04e6c819b28a..bc693fffabe0 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
| @@ -418,6 +418,14 @@ When: 2.6.33 | |||
| 418 | Why: Should be implemented in userspace, policy daemon. | 418 | Why: Should be implemented in userspace, policy daemon. |
| 419 | Who: Johannes Berg <johannes@sipsolutions.net> | 419 | Who: Johannes Berg <johannes@sipsolutions.net> |
| 420 | 420 | ||
| 421 | --------------------------- | ||
| 422 | |||
| 423 | What: CONFIG_INOTIFY | ||
| 424 | When: 2.6.33 | ||
| 425 | Why: last user (audit) will be converted to the newer more generic | ||
| 426 | and more easily maintained fsnotify subsystem | ||
| 427 | Who: Eric Paris <eparis@redhat.com> | ||
| 428 | |||
| 421 | ---------------------------- | 429 | ---------------------------- |
| 422 | 430 | ||
| 423 | What: lock_policy_rwsem_* and unlock_policy_rwsem_* will not be | 431 | What: lock_policy_rwsem_* and unlock_policy_rwsem_* will not be |
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index dcbd502c8792..82def883361b 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
| @@ -353,10 +353,20 @@ power[1-*]_average Average power use | |||
| 353 | Unit: microWatt | 353 | Unit: microWatt |
| 354 | RO | 354 | RO |
| 355 | 355 | ||
| 356 | power[1-*]_average_interval Power use averaging interval | 356 | power[1-*]_average_interval Power use averaging interval. A poll |
| 357 | notification is sent to this file if the | ||
| 358 | hardware changes the averaging interval. | ||
| 357 | Unit: milliseconds | 359 | Unit: milliseconds |
| 358 | RW | 360 | RW |
| 359 | 361 | ||
| 362 | power[1-*]_average_interval_max Maximum power use averaging interval | ||
| 363 | Unit: milliseconds | ||
| 364 | RO | ||
| 365 | |||
| 366 | power[1-*]_average_interval_min Minimum power use averaging interval | ||
| 367 | Unit: milliseconds | ||
| 368 | RO | ||
| 369 | |||
| 360 | power[1-*]_average_highest Historical average maximum power use | 370 | power[1-*]_average_highest Historical average maximum power use |
| 361 | Unit: microWatt | 371 | Unit: microWatt |
| 362 | RO | 372 | RO |
| @@ -365,6 +375,18 @@ power[1-*]_average_lowest Historical average minimum power use | |||
| 365 | Unit: microWatt | 375 | Unit: microWatt |
| 366 | RO | 376 | RO |
| 367 | 377 | ||
| 378 | power[1-*]_average_max A poll notification is sent to | ||
| 379 | power[1-*]_average when power use | ||
| 380 | rises above this value. | ||
| 381 | Unit: microWatt | ||
| 382 | RW | ||
| 383 | |||
| 384 | power[1-*]_average_min A poll notification is sent to | ||
| 385 | power[1-*]_average when power use | ||
| 386 | sinks below this value. | ||
| 387 | Unit: microWatt | ||
| 388 | RW | ||
| 389 | |||
| 368 | power[1-*]_input Instantaneous power use | 390 | power[1-*]_input Instantaneous power use |
| 369 | Unit: microWatt | 391 | Unit: microWatt |
| 370 | RO | 392 | RO |
| @@ -381,6 +403,39 @@ power[1-*]_reset_history Reset input_highest, input_lowest, | |||
| 381 | average_highest and average_lowest. | 403 | average_highest and average_lowest. |
| 382 | WO | 404 | WO |
| 383 | 405 | ||
| 406 | power[1-*]_accuracy Accuracy of the power meter. | ||
| 407 | Unit: Percent | ||
| 408 | RO | ||
| 409 | |||
| 410 | power[1-*]_alarm 1 if the system is drawing more power than the | ||
| 411 | cap allows; 0 otherwise. A poll notification is | ||
| 412 | sent to this file when the power use exceeds the | ||
| 413 | cap. This file only appears if the cap is known | ||
| 414 | to be enforced by hardware. | ||
| 415 | RO | ||
| 416 | |||
| 417 | power[1-*]_cap If power use rises above this limit, the | ||
| 418 | system should take action to reduce power use. | ||
| 419 | A poll notification is sent to this file if the | ||
| 420 | cap is changed by the hardware. The *_cap | ||
| 421 | files only appear if the cap is known to be | ||
| 422 | enforced by hardware. | ||
| 423 | Unit: microWatt | ||
| 424 | RW | ||
| 425 | |||
| 426 | power[1-*]_cap_hyst Margin of hysteresis built around capping and | ||
| 427 | notification. | ||
| 428 | Unit: microWatt | ||
| 429 | RW | ||
| 430 | |||
| 431 | power[1-*]_cap_max Maximum cap that can be set. | ||
| 432 | Unit: microWatt | ||
| 433 | RO | ||
| 434 | |||
| 435 | power[1-*]_cap_min Minimum cap that can be set. | ||
| 436 | Unit: microWatt | ||
| 437 | RO | ||
| 438 | |||
| 384 | ********** | 439 | ********** |
| 385 | * Energy * | 440 | * Energy * |
| 386 | ********** | 441 | ********** |
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index ba9373f82ab5..098de5bce00a 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
| @@ -42,7 +42,6 @@ | |||
| 42 | #include <signal.h> | 42 | #include <signal.h> |
| 43 | #include "linux/lguest_launcher.h" | 43 | #include "linux/lguest_launcher.h" |
| 44 | #include "linux/virtio_config.h" | 44 | #include "linux/virtio_config.h" |
| 45 | #include <linux/virtio_ids.h> | ||
| 46 | #include "linux/virtio_net.h" | 45 | #include "linux/virtio_net.h" |
| 47 | #include "linux/virtio_blk.h" | 46 | #include "linux/virtio_blk.h" |
| 48 | #include "linux/virtio_console.h" | 47 | #include "linux/virtio_console.h" |
diff --git a/MAINTAINERS b/MAINTAINERS index 88241154f4ce..ece9f60dc5d5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -65,43 +65,51 @@ trivial patch so apply some common sense. | |||
| 65 | 65 | ||
| 66 | 8. Happy hacking. | 66 | 8. Happy hacking. |
| 67 | 67 | ||
| 68 | ----------------------------------- | 68 | Descriptions of section entries: |
| 69 | 69 | ||
| 70 | Maintainers List (try to look for most precise areas first) | 70 | P: Person (obsolete) |
| 71 | M: Mail patches to: FullName <address@domain> | ||
| 72 | L: Mailing list that is relevant to this area | ||
| 73 | W: Web-page with status/info | ||
| 74 | T: SCM tree type and location. Type is one of: git, hg, quilt, stgit. | ||
| 75 | S: Status, one of the following: | ||
| 76 | Supported: Someone is actually paid to look after this. | ||
| 77 | Maintained: Someone actually looks after it. | ||
| 78 | Odd Fixes: It has a maintainer but they don't have time to do | ||
| 79 | much other than throw the odd patch in. See below.. | ||
| 80 | Orphan: No current maintainer [but maybe you could take the | ||
| 81 | role as you write your new code]. | ||
| 82 | Obsolete: Old code. Something tagged obsolete generally means | ||
| 83 | it has been replaced by a better system and you | ||
| 84 | should be using that. | ||
| 85 | F: Files and directories with wildcard patterns. | ||
| 86 | A trailing slash includes all files and subdirectory files. | ||
| 87 | F: drivers/net/ all files in and below drivers/net | ||
| 88 | F: drivers/net/* all files in drivers/net, but not below | ||
| 89 | F: */net/* all files in "any top level directory"/net | ||
| 90 | One pattern per line. Multiple F: lines acceptable. | ||
| 91 | X: Files and directories that are NOT maintained, same rules as F: | ||
| 92 | Files exclusions are tested before file matches. | ||
| 93 | Can be useful for excluding a specific subdirectory, for instance: | ||
| 94 | F: net/ | ||
| 95 | X: net/ipv6/ | ||
| 96 | matches all files in and below net excluding net/ipv6/ | ||
| 97 | K: Keyword perl extended regex pattern to match content in a | ||
| 98 | patch or file. For instance: | ||
| 99 | K: of_get_profile | ||
| 100 | matches patches or files that contain "of_get_profile" | ||
| 101 | K: \b(printk|pr_(info|err))\b | ||
| 102 | matches patches or files that contain one or more of the words | ||
| 103 | printk, pr_info or pr_err | ||
| 104 | One regex pattern per line. Multiple K: lines acceptable. | ||
| 71 | 105 | ||
| 72 | Note: For the hard of thinking, this list is meant to remain in alphabetical | 106 | Note: For the hard of thinking, this list is meant to remain in alphabetical |
| 73 | order. If you could add yourselves to it in alphabetical order that would be | 107 | order. If you could add yourselves to it in alphabetical order that would be |
| 74 | so much easier [Ed] | 108 | so much easier [Ed] |
| 75 | 109 | ||
| 76 | P: Person (obsolete) | 110 | Maintainers List (try to look for most precise areas first) |
| 77 | M: Mail patches to: FullName <address@domain> | ||
| 78 | L: Mailing list that is relevant to this area | ||
| 79 | W: Web-page with status/info | ||
| 80 | T: SCM tree type and location. Type is one of: git, hg, quilt, stgit. | ||
| 81 | S: Status, one of the following: | ||
| 82 | |||
| 83 | Supported: Someone is actually paid to look after this. | ||
| 84 | Maintained: Someone actually looks after it. | ||
| 85 | Odd Fixes: It has a maintainer but they don't have time to do | ||
| 86 | much other than throw the odd patch in. See below.. | ||
| 87 | Orphan: No current maintainer [but maybe you could take the | ||
| 88 | role as you write your new code]. | ||
| 89 | Obsolete: Old code. Something tagged obsolete generally means | ||
| 90 | it has been replaced by a better system and you | ||
| 91 | should be using that. | ||
| 92 | 111 | ||
| 93 | F: Files and directories with wildcard patterns. | 112 | ----------------------------------- |
| 94 | A trailing slash includes all files and subdirectory files. | ||
| 95 | F: drivers/net/ all files in and below drivers/net | ||
| 96 | F: drivers/net/* all files in drivers/net, but not below | ||
| 97 | F: */net/* all files in "any top level directory"/net | ||
| 98 | One pattern per line. Multiple F: lines acceptable. | ||
| 99 | X: Files and directories that are NOT maintained, same rules as F: | ||
| 100 | Files exclusions are tested before file matches. | ||
| 101 | Can be useful for excluding a specific subdirectory, for instance: | ||
| 102 | F: net/ | ||
| 103 | X: net/ipv6/ | ||
| 104 | matches all files in and below net excluding net/ipv6/ | ||
| 105 | 113 | ||
| 106 | 3C505 NETWORK DRIVER | 114 | 3C505 NETWORK DRIVER |
| 107 | M: Philip Blundell <philb@gnu.org> | 115 | M: Philip Blundell <philb@gnu.org> |
| @@ -992,7 +1000,7 @@ F: drivers/net/atlx/ | |||
| 992 | 1000 | ||
| 993 | ATM | 1001 | ATM |
| 994 | M: Chas Williams <chas@cmf.nrl.navy.mil> | 1002 | M: Chas Williams <chas@cmf.nrl.navy.mil> |
| 995 | L: linux-atm-general@lists.sourceforge.net (subscribers-only) | 1003 | L: linux-atm-general@lists.sourceforge.net (moderated for non-subscribers) |
| 996 | L: netdev@vger.kernel.org | 1004 | L: netdev@vger.kernel.org |
| 997 | W: http://linux-atm.sourceforge.net | 1005 | W: http://linux-atm.sourceforge.net |
| 998 | S: Maintained | 1006 | S: Maintained |
| @@ -2151,7 +2159,7 @@ S: Supported | |||
| 2151 | F: arch/powerpc/sysdev/qe_lib/ | 2159 | F: arch/powerpc/sysdev/qe_lib/ |
| 2152 | F: arch/powerpc/include/asm/*qe.h | 2160 | F: arch/powerpc/include/asm/*qe.h |
| 2153 | 2161 | ||
| 2154 | FREESCALE USB PERIPHERIAL DRIVERS | 2162 | FREESCALE USB PERIPHERAL DRIVERS |
| 2155 | M: Li Yang <leoli@freescale.com> | 2163 | M: Li Yang <leoli@freescale.com> |
| 2156 | L: linux-usb@vger.kernel.org | 2164 | L: linux-usb@vger.kernel.org |
| 2157 | L: linuxppc-dev@ozlabs.org | 2165 | L: linuxppc-dev@ozlabs.org |
| @@ -2202,18 +2210,6 @@ F: Documentation/filesystems/caching/ | |||
| 2202 | F: fs/fscache/ | 2210 | F: fs/fscache/ |
| 2203 | F: include/linux/fscache*.h | 2211 | F: include/linux/fscache*.h |
| 2204 | 2212 | ||
| 2205 | TRACING | ||
| 2206 | M: Steven Rostedt <rostedt@goodmis.org> | ||
| 2207 | M: Frederic Weisbecker <fweisbec@gmail.com> | ||
| 2208 | M: Ingo Molnar <mingo@redhat.com> | ||
| 2209 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git tracing/core | ||
| 2210 | S: Maintained | ||
| 2211 | F: Documentation/trace/ftrace.txt | ||
| 2212 | F: arch/*/*/*/ftrace.h | ||
| 2213 | F: arch/*/kernel/ftrace.c | ||
| 2214 | F: include/*/ftrace.h include/trace/ include/linux/trace*.h | ||
| 2215 | F: kernel/trace/ | ||
| 2216 | |||
| 2217 | FUJITSU FR-V (FRV) PORT | 2213 | FUJITSU FR-V (FRV) PORT |
| 2218 | M: David Howells <dhowells@redhat.com> | 2214 | M: David Howells <dhowells@redhat.com> |
| 2219 | S: Maintained | 2215 | S: Maintained |
| @@ -2272,9 +2268,8 @@ S: Maintained | |||
| 2272 | F: include/asm-generic | 2268 | F: include/asm-generic |
| 2273 | 2269 | ||
| 2274 | GENERIC UIO DRIVER FOR PCI DEVICES | 2270 | GENERIC UIO DRIVER FOR PCI DEVICES |
| 2275 | M: Michael S. Tsirkin <mst@redhat.com> | 2271 | M: "Michael S. Tsirkin" <mst@redhat.com> |
| 2276 | L: kvm@vger.kernel.org | 2272 | L: kvm@vger.kernel.org |
| 2277 | L: linux-kernel@vger.kernel.org | ||
| 2278 | S: Supported | 2273 | S: Supported |
| 2279 | F: drivers/uio/uio_pci_generic.c | 2274 | F: drivers/uio/uio_pci_generic.c |
| 2280 | 2275 | ||
| @@ -3004,8 +2999,8 @@ F: scripts/Makefile.* | |||
| 3004 | 2999 | ||
| 3005 | KERNEL JANITORS | 3000 | KERNEL JANITORS |
| 3006 | L: kernel-janitors@vger.kernel.org | 3001 | L: kernel-janitors@vger.kernel.org |
| 3007 | W: http://www.kerneljanitors.org/ | 3002 | W: http://janitor.kernelnewbies.org/ |
| 3008 | S: Maintained | 3003 | S: Odd Fixes |
| 3009 | 3004 | ||
| 3010 | KERNEL NFSD, SUNRPC, AND LOCKD SERVERS | 3005 | KERNEL NFSD, SUNRPC, AND LOCKD SERVERS |
| 3011 | M: "J. Bruce Fields" <bfields@fieldses.org> | 3006 | M: "J. Bruce Fields" <bfields@fieldses.org> |
| @@ -3785,7 +3780,7 @@ F: drivers/video/riva/ | |||
| 3785 | F: drivers/video/nvidia/ | 3780 | F: drivers/video/nvidia/ |
| 3786 | 3781 | ||
| 3787 | OMAP SUPPORT | 3782 | OMAP SUPPORT |
| 3788 | M: "Tony Lindgren <tony@atomide.com>" <tony@atomide.com> | 3783 | M: Tony Lindgren <tony@atomide.com> |
| 3789 | L: linux-omap@vger.kernel.org | 3784 | L: linux-omap@vger.kernel.org |
| 3790 | W: http://www.muru.com/linux/omap/ | 3785 | W: http://www.muru.com/linux/omap/ |
| 3791 | W: http://linux.omap.com/ | 3786 | W: http://linux.omap.com/ |
| @@ -3890,6 +3885,15 @@ S: Maintained | |||
| 3890 | F: Documentation/i2c/busses/i2c-ocores | 3885 | F: Documentation/i2c/busses/i2c-ocores |
| 3891 | F: drivers/i2c/busses/i2c-ocores.c | 3886 | F: drivers/i2c/busses/i2c-ocores.c |
| 3892 | 3887 | ||
| 3888 | OPEN FIRMWARE AND FLATTENED DEVICE TREE | ||
| 3889 | M: Grant Likely <grant.likely@secretlab.ca> | ||
| 3890 | L: devicetree-discuss@lists.ozlabs.org | ||
| 3891 | W: http://fdt.secretlab.ca | ||
| 3892 | S: Maintained | ||
| 3893 | F: drivers/of | ||
| 3894 | F: include/linux/of*.h | ||
| 3895 | K: of_get_property | ||
| 3896 | |||
| 3893 | OPROFILE | 3897 | OPROFILE |
| 3894 | M: Robert Richter <robert.richter@amd.com> | 3898 | M: Robert Richter <robert.richter@amd.com> |
| 3895 | L: oprofile-list@lists.sf.net | 3899 | L: oprofile-list@lists.sf.net |
| @@ -4325,7 +4329,7 @@ F: drivers/video/aty/aty128fb.c | |||
| 4325 | RALINK RT2X00 WIRELESS LAN DRIVER | 4329 | RALINK RT2X00 WIRELESS LAN DRIVER |
| 4326 | P: rt2x00 project | 4330 | P: rt2x00 project |
| 4327 | L: linux-wireless@vger.kernel.org | 4331 | L: linux-wireless@vger.kernel.org |
| 4328 | L: users@rt2x00.serialmonkey.com | 4332 | L: users@rt2x00.serialmonkey.com (moderated for non-subscribers) |
| 4329 | W: http://rt2x00.serialmonkey.com/ | 4333 | W: http://rt2x00.serialmonkey.com/ |
| 4330 | S: Maintained | 4334 | S: Maintained |
| 4331 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git | 4335 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git |
| @@ -4534,12 +4538,11 @@ F: kernel/sched* | |||
| 4534 | F: include/linux/sched.h | 4538 | F: include/linux/sched.h |
| 4535 | 4539 | ||
| 4536 | SCORE ARCHITECTURE | 4540 | SCORE ARCHITECTURE |
| 4537 | P: Chen Liqin | 4541 | M: Chen Liqin <liqin.chen@sunplusct.com> |
| 4538 | M: liqin.chen@sunplusct.com | 4542 | M: Lennox Wu <lennox.wu@gmail.com> |
| 4539 | P: Lennox Wu | ||
| 4540 | M: lennox.wu@gmail.com | ||
| 4541 | W: http://www.sunplusct.com | 4543 | W: http://www.sunplusct.com |
| 4542 | S: Supported | 4544 | S: Supported |
| 4545 | F: arch/score/ | ||
| 4543 | 4546 | ||
| 4544 | SCSI CDROM DRIVER | 4547 | SCSI CDROM DRIVER |
| 4545 | M: Jens Axboe <axboe@kernel.dk> | 4548 | M: Jens Axboe <axboe@kernel.dk> |
| @@ -4612,20 +4615,20 @@ S: Maintained | |||
| 4612 | F: drivers/mmc/host/sdricoh_cs.c | 4615 | F: drivers/mmc/host/sdricoh_cs.c |
| 4613 | 4616 | ||
| 4614 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER | 4617 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER |
| 4615 | S: Orphan | 4618 | S: Orphan |
| 4616 | L: linux-mmc@vger.kernel.org | 4619 | L: linux-mmc@vger.kernel.org |
| 4617 | F: drivers/mmc/host/sdhci.* | 4620 | F: drivers/mmc/host/sdhci.* |
| 4618 | 4621 | ||
| 4619 | SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF) | 4622 | SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF) |
| 4620 | M: Anton Vorontsov <avorontsov@ru.mvista.com> | 4623 | M: Anton Vorontsov <avorontsov@ru.mvista.com> |
| 4621 | L: linuxppc-dev@ozlabs.org | 4624 | L: linuxppc-dev@ozlabs.org |
| 4622 | L: linux-mmc@vger.kernel.org | 4625 | L: linux-mmc@vger.kernel.org |
| 4623 | S: Maintained | 4626 | S: Maintained |
| 4624 | F: drivers/mmc/host/sdhci-of.* | 4627 | F: drivers/mmc/host/sdhci-of.* |
| 4625 | 4628 | ||
| 4626 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER | 4629 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER |
| 4627 | M: Ben Dooks <ben-linux@fluff.org> | 4630 | M: Ben Dooks <ben-linux@fluff.org> |
| 4628 | L: linux-mmc@vger.kernel.org | 4631 | L: linux-mmc@vger.kernel.org |
| 4629 | S: Maintained | 4632 | S: Maintained |
| 4630 | F: drivers/mmc/host/sdhci-s3c.c | 4633 | F: drivers/mmc/host/sdhci-s3c.c |
| 4631 | 4634 | ||
| @@ -4728,8 +4731,7 @@ F: drivers/usb/gadget/lh7a40* | |||
| 4728 | F: drivers/usb/host/ohci-lh7a40* | 4731 | F: drivers/usb/host/ohci-lh7a40* |
| 4729 | 4732 | ||
| 4730 | SIMPLE FIRMWARE INTERFACE (SFI) | 4733 | SIMPLE FIRMWARE INTERFACE (SFI) |
| 4731 | P: Len Brown | 4734 | M: Len Brown <lenb@kernel.org> |
| 4732 | M: lenb@kernel.org | ||
| 4733 | L: sfi-devel@simplefirmware.org | 4735 | L: sfi-devel@simplefirmware.org |
| 4734 | W: http://simplefirmware.org/ | 4736 | W: http://simplefirmware.org/ |
| 4735 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6.git | 4737 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6.git |
| @@ -5177,6 +5179,20 @@ L: tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers) | |||
| 5177 | S: Maintained | 5179 | S: Maintained |
| 5178 | F: drivers/char/tpm/ | 5180 | F: drivers/char/tpm/ |
| 5179 | 5181 | ||
| 5182 | TRACING | ||
| 5183 | M: Steven Rostedt <rostedt@goodmis.org> | ||
| 5184 | M: Frederic Weisbecker <fweisbec@gmail.com> | ||
| 5185 | M: Ingo Molnar <mingo@redhat.com> | ||
| 5186 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git tracing/core | ||
| 5187 | S: Maintained | ||
| 5188 | F: Documentation/trace/ftrace.txt | ||
| 5189 | F: arch/*/*/*/ftrace.h | ||
| 5190 | F: arch/*/kernel/ftrace.c | ||
| 5191 | F: include/*/ftrace.h | ||
| 5192 | F: include/linux/trace*.h | ||
| 5193 | F: include/trace/ | ||
| 5194 | F: kernel/trace/ | ||
| 5195 | |||
| 5180 | TRIVIAL PATCHES | 5196 | TRIVIAL PATCHES |
| 5181 | M: Jiri Kosina <trivial@kernel.org> | 5197 | M: Jiri Kosina <trivial@kernel.org> |
| 5182 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git | 5198 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git |
| @@ -5743,8 +5759,7 @@ S: Maintained | |||
| 5743 | F: drivers/scsi/wd7000.c | 5759 | F: drivers/scsi/wd7000.c |
| 5744 | 5760 | ||
| 5745 | WINBOND CIR DRIVER | 5761 | WINBOND CIR DRIVER |
| 5746 | P: David Härdeman | 5762 | M: David Härdeman <david@hardeman.nu> |
| 5747 | M: david@hardeman.nu | ||
| 5748 | S: Maintained | 5763 | S: Maintained |
| 5749 | F: drivers/input/misc/winbond-cir.c | 5764 | F: drivers/input/misc/winbond-cir.c |
| 5750 | 5765 | ||
| @@ -5801,9 +5816,7 @@ F: drivers/input/touchscreen/*wm97* | |||
| 5801 | F: include/linux/wm97xx.h | 5816 | F: include/linux/wm97xx.h |
| 5802 | 5817 | ||
| 5803 | WOLFSON MICROELECTRONICS PMIC DRIVERS | 5818 | WOLFSON MICROELECTRONICS PMIC DRIVERS |
| 5804 | P: Mark Brown | 5819 | M: Mark Brown <broonie@opensource.wolfsonmicro.com> |
| 5805 | M: broonie@opensource.wolfsonmicro.com | ||
| 5806 | L: linux-kernel@vger.kernel.org | ||
| 5807 | T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus | 5820 | T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus |
| 5808 | W: http://opensource.wolfsonmicro.com/node/8 | 5821 | W: http://opensource.wolfsonmicro.com/node/8 |
| 5809 | S: Supported | 5822 | S: Supported |
diff --git a/arch/frv/kernel/signal.c b/arch/frv/kernel/signal.c index 6b0a2b6fed6a..0974c0ecc594 100644 --- a/arch/frv/kernel/signal.c +++ b/arch/frv/kernel/signal.c | |||
| @@ -527,7 +527,7 @@ static void do_signal(void) | |||
| 527 | 527 | ||
| 528 | no_signal: | 528 | no_signal: |
| 529 | /* Did we come from a system call? */ | 529 | /* Did we come from a system call? */ |
| 530 | if (__frame->syscallno >= 0) { | 530 | if (__frame->syscallno != -1) { |
| 531 | /* Restart the system call - no handlers present */ | 531 | /* Restart the system call - no handlers present */ |
| 532 | switch (__frame->gr8) { | 532 | switch (__frame->gr8) { |
| 533 | case -ERESTARTNOHAND: | 533 | case -ERESTARTNOHAND: |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index b940424f8ccc..0dc7e3cbeffa 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
| @@ -37,7 +37,6 @@ config SUPERH32 | |||
| 37 | select HAVE_FTRACE_MCOUNT_RECORD | 37 | select HAVE_FTRACE_MCOUNT_RECORD |
| 38 | select HAVE_DYNAMIC_FTRACE | 38 | select HAVE_DYNAMIC_FTRACE |
| 39 | select HAVE_FUNCTION_TRACE_MCOUNT_TEST | 39 | select HAVE_FUNCTION_TRACE_MCOUNT_TEST |
| 40 | select HAVE_FTRACE_SYSCALLS | ||
| 41 | select HAVE_FUNCTION_GRAPH_TRACER | 40 | select HAVE_FUNCTION_GRAPH_TRACER |
| 42 | select HAVE_ARCH_KGDB | 41 | select HAVE_ARCH_KGDB |
| 43 | select ARCH_HIBERNATION_POSSIBLE if MMU | 42 | select ARCH_HIBERNATION_POSSIBLE if MMU |
diff --git a/arch/sh/boards/mach-landisk/gio.c b/arch/sh/boards/mach-landisk/gio.c index 25cdf7358000..528013188196 100644 --- a/arch/sh/boards/mach-landisk/gio.c +++ b/arch/sh/boards/mach-landisk/gio.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | */ | 14 | */ |
| 15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
| 17 | #include <linux/smp_lock.h> | ||
| 18 | #include <linux/kdev_t.h> | 17 | #include <linux/kdev_t.h> |
| 19 | #include <linux/cdev.h> | 18 | #include <linux/cdev.h> |
| 20 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
| @@ -35,7 +34,7 @@ static int gio_open(struct inode *inode, struct file *filp) | |||
| 35 | int minor; | 34 | int minor; |
| 36 | int ret = -ENOENT; | 35 | int ret = -ENOENT; |
| 37 | 36 | ||
| 38 | lock_kernel(); | 37 | preempt_disable(); |
| 39 | minor = MINOR(inode->i_rdev); | 38 | minor = MINOR(inode->i_rdev); |
| 40 | if (minor < DEVCOUNT) { | 39 | if (minor < DEVCOUNT) { |
| 41 | if (openCnt > 0) { | 40 | if (openCnt > 0) { |
| @@ -45,7 +44,7 @@ static int gio_open(struct inode *inode, struct file *filp) | |||
| 45 | ret = 0; | 44 | ret = 0; |
| 46 | } | 45 | } |
| 47 | } | 46 | } |
| 48 | unlock_kernel(); | 47 | preempt_enable(); |
| 49 | return ret; | 48 | return ret; |
| 50 | } | 49 | } |
| 51 | 50 | ||
| @@ -60,8 +59,7 @@ static int gio_close(struct inode *inode, struct file *filp) | |||
| 60 | return 0; | 59 | return 0; |
| 61 | } | 60 | } |
| 62 | 61 | ||
| 63 | static int gio_ioctl(struct inode *inode, struct file *filp, | 62 | static long gio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
| 64 | unsigned int cmd, unsigned long arg) | ||
| 65 | { | 63 | { |
| 66 | unsigned int data; | 64 | unsigned int data; |
| 67 | static unsigned int addr = 0; | 65 | static unsigned int addr = 0; |
| @@ -129,7 +127,7 @@ static const struct file_operations gio_fops = { | |||
| 129 | .owner = THIS_MODULE, | 127 | .owner = THIS_MODULE, |
| 130 | .open = gio_open, /* open */ | 128 | .open = gio_open, /* open */ |
| 131 | .release = gio_close, /* release */ | 129 | .release = gio_close, /* release */ |
| 132 | .ioctl = gio_ioctl, /* ioctl */ | 130 | .unlocked_ioctl = gio_ioctl, |
| 133 | }; | 131 | }; |
| 134 | 132 | ||
| 135 | static int __init gio_init(void) | 133 | static int __init gio_init(void) |
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c index a98c7d8984fa..519e2d16cd06 100644 --- a/arch/sh/mm/cache-sh4.c +++ b/arch/sh/mm/cache-sh4.c | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | #define MAX_DCACHE_PAGES 64 /* XXX: Tune for ways */ | 26 | #define MAX_DCACHE_PAGES 64 /* XXX: Tune for ways */ |
| 27 | #define MAX_ICACHE_PAGES 32 | 27 | #define MAX_ICACHE_PAGES 32 |
| 28 | 28 | ||
| 29 | static void __flush_cache_4096(unsigned long addr, unsigned long phys, | 29 | static void __flush_cache_one(unsigned long addr, unsigned long phys, |
| 30 | unsigned long exec_offset); | 30 | unsigned long exec_offset); |
| 31 | 31 | ||
| 32 | /* | 32 | /* |
| @@ -89,8 +89,7 @@ static void __uses_jump_to_uncached sh4_flush_icache_range(void *args) | |||
| 89 | local_irq_restore(flags); | 89 | local_irq_restore(flags); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | static inline void flush_cache_4096(unsigned long start, | 92 | static inline void flush_cache_one(unsigned long start, unsigned long phys) |
| 93 | unsigned long phys) | ||
| 94 | { | 93 | { |
| 95 | unsigned long flags, exec_offset = 0; | 94 | unsigned long flags, exec_offset = 0; |
| 96 | 95 | ||
| @@ -103,8 +102,7 @@ static inline void flush_cache_4096(unsigned long start, | |||
| 103 | exec_offset = 0x20000000; | 102 | exec_offset = 0x20000000; |
| 104 | 103 | ||
| 105 | local_irq_save(flags); | 104 | local_irq_save(flags); |
| 106 | __flush_cache_4096(start | SH_CACHE_ASSOC, | 105 | __flush_cache_one(start | SH_CACHE_ASSOC, P1SEGADDR(phys), exec_offset); |
| 107 | P1SEGADDR(phys), exec_offset); | ||
| 108 | local_irq_restore(flags); | 106 | local_irq_restore(flags); |
| 109 | } | 107 | } |
| 110 | 108 | ||
| @@ -129,8 +127,8 @@ static void sh4_flush_dcache_page(void *arg) | |||
| 129 | 127 | ||
| 130 | /* Loop all the D-cache */ | 128 | /* Loop all the D-cache */ |
| 131 | n = boot_cpu_data.dcache.n_aliases; | 129 | n = boot_cpu_data.dcache.n_aliases; |
| 132 | for (i = 0; i < n; i++, addr += 4096) | 130 | for (i = 0; i < n; i++, addr += PAGE_SIZE) |
| 133 | flush_cache_4096(addr, phys); | 131 | flush_cache_one(addr, phys); |
| 134 | } | 132 | } |
| 135 | 133 | ||
| 136 | wmb(); | 134 | wmb(); |
| @@ -318,11 +316,11 @@ static void sh4_flush_cache_page(void *args) | |||
| 318 | /* We only need to flush D-cache when we have alias */ | 316 | /* We only need to flush D-cache when we have alias */ |
| 319 | if ((address^phys) & alias_mask) { | 317 | if ((address^phys) & alias_mask) { |
| 320 | /* Loop 4K of the D-cache */ | 318 | /* Loop 4K of the D-cache */ |
| 321 | flush_cache_4096( | 319 | flush_cache_one( |
| 322 | CACHE_OC_ADDRESS_ARRAY | (address & alias_mask), | 320 | CACHE_OC_ADDRESS_ARRAY | (address & alias_mask), |
| 323 | phys); | 321 | phys); |
| 324 | /* Loop another 4K of the D-cache */ | 322 | /* Loop another 4K of the D-cache */ |
| 325 | flush_cache_4096( | 323 | flush_cache_one( |
| 326 | CACHE_OC_ADDRESS_ARRAY | (phys & alias_mask), | 324 | CACHE_OC_ADDRESS_ARRAY | (phys & alias_mask), |
| 327 | phys); | 325 | phys); |
| 328 | } | 326 | } |
| @@ -337,7 +335,7 @@ static void sh4_flush_cache_page(void *args) | |||
| 337 | * kernel has never executed the code through its identity | 335 | * kernel has never executed the code through its identity |
| 338 | * translation. | 336 | * translation. |
| 339 | */ | 337 | */ |
| 340 | flush_cache_4096( | 338 | flush_cache_one( |
| 341 | CACHE_IC_ADDRESS_ARRAY | (address & alias_mask), | 339 | CACHE_IC_ADDRESS_ARRAY | (address & alias_mask), |
| 342 | phys); | 340 | phys); |
| 343 | } | 341 | } |
| @@ -393,7 +391,7 @@ static void sh4_flush_cache_range(void *args) | |||
| 393 | } | 391 | } |
| 394 | 392 | ||
| 395 | /** | 393 | /** |
| 396 | * __flush_cache_4096 | 394 | * __flush_cache_one |
| 397 | * | 395 | * |
| 398 | * @addr: address in memory mapped cache array | 396 | * @addr: address in memory mapped cache array |
| 399 | * @phys: P1 address to flush (has to match tags if addr has 'A' bit | 397 | * @phys: P1 address to flush (has to match tags if addr has 'A' bit |
| @@ -406,7 +404,7 @@ static void sh4_flush_cache_range(void *args) | |||
| 406 | * operation (purge/write-back) is selected by the lower 2 bits of | 404 | * operation (purge/write-back) is selected by the lower 2 bits of |
| 407 | * 'phys'. | 405 | * 'phys'. |
| 408 | */ | 406 | */ |
| 409 | static void __flush_cache_4096(unsigned long addr, unsigned long phys, | 407 | static void __flush_cache_one(unsigned long addr, unsigned long phys, |
| 410 | unsigned long exec_offset) | 408 | unsigned long exec_offset) |
| 411 | { | 409 | { |
| 412 | int way_count; | 410 | int way_count; |
diff --git a/arch/sh/mm/cache.c b/arch/sh/mm/cache.c index 5e1091be9dc4..a2dc7f9ecc51 100644 --- a/arch/sh/mm/cache.c +++ b/arch/sh/mm/cache.c | |||
| @@ -265,6 +265,8 @@ static void __init emit_cache_params(void) | |||
| 265 | 265 | ||
| 266 | void __init cpu_cache_init(void) | 266 | void __init cpu_cache_init(void) |
| 267 | { | 267 | { |
| 268 | unsigned int cache_disabled = !(__raw_readl(CCR) & CCR_CACHE_ENABLE); | ||
| 269 | |||
| 268 | compute_alias(&boot_cpu_data.icache); | 270 | compute_alias(&boot_cpu_data.icache); |
| 269 | compute_alias(&boot_cpu_data.dcache); | 271 | compute_alias(&boot_cpu_data.dcache); |
| 270 | compute_alias(&boot_cpu_data.scache); | 272 | compute_alias(&boot_cpu_data.scache); |
| @@ -273,6 +275,13 @@ void __init cpu_cache_init(void) | |||
| 273 | __flush_purge_region = noop__flush_region; | 275 | __flush_purge_region = noop__flush_region; |
| 274 | __flush_invalidate_region = noop__flush_region; | 276 | __flush_invalidate_region = noop__flush_region; |
| 275 | 277 | ||
| 278 | /* | ||
| 279 | * No flushing is necessary in the disabled cache case so we can | ||
| 280 | * just keep the noop functions in local_flush_..() and __flush_..() | ||
| 281 | */ | ||
| 282 | if (unlikely(cache_disabled)) | ||
| 283 | goto skip; | ||
| 284 | |||
| 276 | if (boot_cpu_data.family == CPU_FAMILY_SH2) { | 285 | if (boot_cpu_data.family == CPU_FAMILY_SH2) { |
| 277 | extern void __weak sh2_cache_init(void); | 286 | extern void __weak sh2_cache_init(void); |
| 278 | 287 | ||
| @@ -312,5 +321,6 @@ void __init cpu_cache_init(void) | |||
| 312 | sh5_cache_init(); | 321 | sh5_cache_init(); |
| 313 | } | 322 | } |
| 314 | 323 | ||
| 324 | skip: | ||
| 315 | emit_cache_params(); | 325 | emit_cache_params(); |
| 316 | } | 326 | } |
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 585edebe12cf..49c552c060e9 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
| @@ -82,7 +82,7 @@ static int aes_set_key_common(struct crypto_tfm *tfm, void *raw_ctx, | |||
| 82 | return -EINVAL; | 82 | return -EINVAL; |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | if (irq_fpu_usable()) | 85 | if (!irq_fpu_usable()) |
| 86 | err = crypto_aes_expand_key(ctx, in_key, key_len); | 86 | err = crypto_aes_expand_key(ctx, in_key, key_len); |
| 87 | else { | 87 | else { |
| 88 | kernel_fpu_begin(); | 88 | kernel_fpu_begin(); |
| @@ -103,7 +103,7 @@ static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) | |||
| 103 | { | 103 | { |
| 104 | struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); | 104 | struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); |
| 105 | 105 | ||
| 106 | if (irq_fpu_usable()) | 106 | if (!irq_fpu_usable()) |
| 107 | crypto_aes_encrypt_x86(ctx, dst, src); | 107 | crypto_aes_encrypt_x86(ctx, dst, src); |
| 108 | else { | 108 | else { |
| 109 | kernel_fpu_begin(); | 109 | kernel_fpu_begin(); |
| @@ -116,7 +116,7 @@ static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) | |||
| 116 | { | 116 | { |
| 117 | struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); | 117 | struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); |
| 118 | 118 | ||
| 119 | if (irq_fpu_usable()) | 119 | if (!irq_fpu_usable()) |
| 120 | crypto_aes_decrypt_x86(ctx, dst, src); | 120 | crypto_aes_decrypt_x86(ctx, dst, src); |
| 121 | else { | 121 | else { |
| 122 | kernel_fpu_begin(); | 122 | kernel_fpu_begin(); |
| @@ -342,7 +342,7 @@ static int ablk_encrypt(struct ablkcipher_request *req) | |||
| 342 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); | 342 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); |
| 343 | struct async_aes_ctx *ctx = crypto_ablkcipher_ctx(tfm); | 343 | struct async_aes_ctx *ctx = crypto_ablkcipher_ctx(tfm); |
| 344 | 344 | ||
| 345 | if (irq_fpu_usable()) { | 345 | if (!irq_fpu_usable()) { |
| 346 | struct ablkcipher_request *cryptd_req = | 346 | struct ablkcipher_request *cryptd_req = |
| 347 | ablkcipher_request_ctx(req); | 347 | ablkcipher_request_ctx(req); |
| 348 | memcpy(cryptd_req, req, sizeof(*req)); | 348 | memcpy(cryptd_req, req, sizeof(*req)); |
| @@ -363,7 +363,7 @@ static int ablk_decrypt(struct ablkcipher_request *req) | |||
| 363 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); | 363 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); |
| 364 | struct async_aes_ctx *ctx = crypto_ablkcipher_ctx(tfm); | 364 | struct async_aes_ctx *ctx = crypto_ablkcipher_ctx(tfm); |
| 365 | 365 | ||
| 366 | if (irq_fpu_usable()) { | 366 | if (!irq_fpu_usable()) { |
| 367 | struct ablkcipher_request *cryptd_req = | 367 | struct ablkcipher_request *cryptd_req = |
| 368 | ablkcipher_request_ctx(req); | 368 | ablkcipher_request_ctx(req); |
| 369 | memcpy(cryptd_req, req, sizeof(*req)); | 369 | memcpy(cryptd_req, req, sizeof(*req)); |
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 82ad523b4901..144e7f60b5e2 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c | |||
| @@ -116,7 +116,7 @@ static s64 __kpit_elapsed(struct kvm *kvm) | |||
| 116 | * itself with the initial count and continues counting | 116 | * itself with the initial count and continues counting |
| 117 | * from there. | 117 | * from there. |
| 118 | */ | 118 | */ |
| 119 | remaining = hrtimer_expires_remaining(&ps->pit_timer.timer); | 119 | remaining = hrtimer_get_remaining(&ps->pit_timer.timer); |
| 120 | elapsed = ps->pit_timer.period - ktime_to_ns(remaining); | 120 | elapsed = ps->pit_timer.period - ktime_to_ns(remaining); |
| 121 | elapsed = mod_64(elapsed, ps->pit_timer.period); | 121 | elapsed = mod_64(elapsed, ps->pit_timer.period); |
| 122 | 122 | ||
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 7024224f0fc8..23c217692ea9 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
| @@ -521,7 +521,7 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic) | |||
| 521 | if (apic_get_reg(apic, APIC_TMICT) == 0) | 521 | if (apic_get_reg(apic, APIC_TMICT) == 0) |
| 522 | return 0; | 522 | return 0; |
| 523 | 523 | ||
| 524 | remaining = hrtimer_expires_remaining(&apic->lapic_timer.timer); | 524 | remaining = hrtimer_get_remaining(&apic->lapic_timer.timer); |
| 525 | if (ktime_to_ns(remaining) < 0) | 525 | if (ktime_to_ns(remaining) < 0) |
| 526 | remaining = ktime_set(0, 0); | 526 | remaining = ktime_set(0, 0); |
| 527 | 527 | ||
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 685a4ffac8e6..818b92ad82cf 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
| @@ -748,7 +748,8 @@ static int rmap_write_protect(struct kvm *kvm, u64 gfn) | |||
| 748 | return write_protected; | 748 | return write_protected; |
| 749 | } | 749 | } |
| 750 | 750 | ||
| 751 | static int kvm_unmap_rmapp(struct kvm *kvm, unsigned long *rmapp, u64 data) | 751 | static int kvm_unmap_rmapp(struct kvm *kvm, unsigned long *rmapp, |
| 752 | unsigned long data) | ||
| 752 | { | 753 | { |
| 753 | u64 *spte; | 754 | u64 *spte; |
| 754 | int need_tlb_flush = 0; | 755 | int need_tlb_flush = 0; |
| @@ -763,7 +764,8 @@ static int kvm_unmap_rmapp(struct kvm *kvm, unsigned long *rmapp, u64 data) | |||
| 763 | return need_tlb_flush; | 764 | return need_tlb_flush; |
| 764 | } | 765 | } |
| 765 | 766 | ||
| 766 | static int kvm_set_pte_rmapp(struct kvm *kvm, unsigned long *rmapp, u64 data) | 767 | static int kvm_set_pte_rmapp(struct kvm *kvm, unsigned long *rmapp, |
| 768 | unsigned long data) | ||
| 767 | { | 769 | { |
| 768 | int need_flush = 0; | 770 | int need_flush = 0; |
| 769 | u64 *spte, new_spte; | 771 | u64 *spte, new_spte; |
| @@ -799,9 +801,10 @@ static int kvm_set_pte_rmapp(struct kvm *kvm, unsigned long *rmapp, u64 data) | |||
| 799 | return 0; | 801 | return 0; |
| 800 | } | 802 | } |
| 801 | 803 | ||
| 802 | static int kvm_handle_hva(struct kvm *kvm, unsigned long hva, u64 data, | 804 | static int kvm_handle_hva(struct kvm *kvm, unsigned long hva, |
| 805 | unsigned long data, | ||
| 803 | int (*handler)(struct kvm *kvm, unsigned long *rmapp, | 806 | int (*handler)(struct kvm *kvm, unsigned long *rmapp, |
| 804 | u64 data)) | 807 | unsigned long data)) |
| 805 | { | 808 | { |
| 806 | int i, j; | 809 | int i, j; |
| 807 | int retval = 0; | 810 | int retval = 0; |
| @@ -846,10 +849,11 @@ int kvm_unmap_hva(struct kvm *kvm, unsigned long hva) | |||
| 846 | 849 | ||
| 847 | void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte) | 850 | void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte) |
| 848 | { | 851 | { |
| 849 | kvm_handle_hva(kvm, hva, (u64)&pte, kvm_set_pte_rmapp); | 852 | kvm_handle_hva(kvm, hva, (unsigned long)&pte, kvm_set_pte_rmapp); |
| 850 | } | 853 | } |
| 851 | 854 | ||
| 852 | static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp, u64 data) | 855 | static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp, |
| 856 | unsigned long data) | ||
| 853 | { | 857 | { |
| 854 | u64 *spte; | 858 | u64 *spte; |
| 855 | int young = 0; | 859 | int young = 0; |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index b1a257746a19..a06f5d6375a8 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -575,7 +575,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
| 575 | { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb700 }, /* ATI SB700/800 */ | 575 | { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb700 }, /* ATI SB700/800 */ |
| 576 | 576 | ||
| 577 | /* AMD */ | 577 | /* AMD */ |
| 578 | { PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD SB900 */ | 578 | { PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD Hudson-2 */ |
| 579 | /* AMD is using RAID class only for ahci controllers */ | 579 | /* AMD is using RAID class only for ahci controllers */ |
| 580 | { PCI_VENDOR_ID_AMD, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 580 | { PCI_VENDOR_ID_AMD, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
| 581 | PCI_CLASS_STORAGE_RAID << 8, 0xffffff, board_ahci }, | 581 | PCI_CLASS_STORAGE_RAID << 8, 0xffffff, board_ahci }, |
| @@ -605,6 +605,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
| 605 | { PCI_VDEVICE(NVIDIA, 0x0559), board_ahci_yesncq }, /* MCP67 */ | 605 | { PCI_VDEVICE(NVIDIA, 0x0559), board_ahci_yesncq }, /* MCP67 */ |
| 606 | { PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_yesncq }, /* MCP67 */ | 606 | { PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_yesncq }, /* MCP67 */ |
| 607 | { PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_yesncq }, /* MCP67 */ | 607 | { PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_yesncq }, /* MCP67 */ |
| 608 | { PCI_VDEVICE(NVIDIA, 0x0580), board_ahci_yesncq }, /* Linux ID */ | ||
| 608 | { PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_yesncq }, /* MCP73 */ | 609 | { PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_yesncq }, /* MCP73 */ |
| 609 | { PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_yesncq }, /* MCP73 */ | 610 | { PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_yesncq }, /* MCP73 */ |
| 610 | { PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_yesncq }, /* MCP73 */ | 611 | { PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_yesncq }, /* MCP73 */ |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b525a0981348..d7f0f1b1ae3e 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -5028,12 +5028,14 @@ void ata_qc_complete(struct ata_queued_cmd *qc) | |||
| 5028 | qc->flags |= ATA_QCFLAG_FAILED; | 5028 | qc->flags |= ATA_QCFLAG_FAILED; |
| 5029 | 5029 | ||
| 5030 | if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) { | 5030 | if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) { |
| 5031 | if (!ata_tag_internal(qc->tag)) { | 5031 | /* always fill result TF for failed qc */ |
| 5032 | /* always fill result TF for failed qc */ | 5032 | fill_result_tf(qc); |
| 5033 | fill_result_tf(qc); | 5033 | |
| 5034 | if (!ata_tag_internal(qc->tag)) | ||
| 5034 | ata_qc_schedule_eh(qc); | 5035 | ata_qc_schedule_eh(qc); |
| 5035 | return; | 5036 | else |
| 5036 | } | 5037 | __ata_qc_complete(qc); |
| 5038 | return; | ||
| 5037 | } | 5039 | } |
| 5038 | 5040 | ||
| 5039 | WARN_ON_ONCE(ap->pflags & ATA_PFLAG_FROZEN); | 5041 | WARN_ON_ONCE(ap->pflags & ATA_PFLAG_FROZEN); |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 0a97822da211..bba2ae5df1c2 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
| @@ -2981,12 +2981,14 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link, | |||
| 2981 | * device detection messages backwards. | 2981 | * device detection messages backwards. |
| 2982 | */ | 2982 | */ |
| 2983 | ata_for_each_dev(dev, link, ALL) { | 2983 | ata_for_each_dev(dev, link, ALL) { |
| 2984 | if (!(new_mask & (1 << dev->devno)) || | 2984 | if (!(new_mask & (1 << dev->devno))) |
| 2985 | dev->class == ATA_DEV_PMP) | ||
| 2986 | continue; | 2985 | continue; |
| 2987 | 2986 | ||
| 2988 | dev->class = ehc->classes[dev->devno]; | 2987 | dev->class = ehc->classes[dev->devno]; |
| 2989 | 2988 | ||
| 2989 | if (dev->class == ATA_DEV_PMP) | ||
| 2990 | continue; | ||
| 2991 | |||
| 2990 | ehc->i.flags |= ATA_EHI_PRINTINFO; | 2992 | ehc->i.flags |= ATA_EHI_PRINTINFO; |
| 2991 | rc = ata_dev_configure(dev); | 2993 | rc = ata_dev_configure(dev); |
| 2992 | ehc->i.flags &= ~ATA_EHI_PRINTINFO; | 2994 | ehc->i.flags &= ~ATA_EHI_PRINTINFO; |
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index aa4b3f6ae771..ae4454d4e955 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c | |||
| @@ -246,7 +246,7 @@ static const struct pci_device_id atiixp[] = { | |||
| 246 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), }, | 246 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), }, |
| 247 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), }, | 247 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), }, |
| 248 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), }, | 248 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), }, |
| 249 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_SB900_IDE), }, | 249 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_HUDSON2_IDE), }, |
| 250 | 250 | ||
| 251 | { }, | 251 | { }, |
| 252 | }; | 252 | }; |
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c index f49814d6fd2e..3bbed8322ecf 100644 --- a/drivers/ata/pata_sc1200.c +++ b/drivers/ata/pata_sc1200.c | |||
| @@ -235,8 +235,7 @@ static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 235 | .udma_mask = ATA_UDMA2, | 235 | .udma_mask = ATA_UDMA2, |
| 236 | .port_ops = &sc1200_port_ops | 236 | .port_ops = &sc1200_port_ops |
| 237 | }; | 237 | }; |
| 238 | /* Can't enable port 2 yet, see top comments */ | 238 | const struct ata_port_info *ppi[] = { &info, NULL }; |
| 239 | const struct ata_port_info *ppi[] = { &info, }; | ||
| 240 | 239 | ||
| 241 | return ata_pci_sff_init_one(dev, ppi, &sc1200_sht, NULL); | 240 | return ata_pci_sff_init_one(dev, ppi, &sc1200_sht, NULL); |
| 242 | } | 241 | } |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 45657cacec43..88984b803d6d 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
| @@ -111,7 +111,7 @@ static const struct via_isa_bridge { | |||
| 111 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 111 | { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
| 112 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA }, | 112 | { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA }, |
| 113 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES }, | 113 | { "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES }, |
| 114 | { "vt6415", PCI_DEVICE_ID_VIA_6415, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES }, | 114 | { "vt6415", PCI_DEVICE_ID_VIA_6415, 0x00, 0xff, VIA_UDMA_133 | VIA_BAD_AST | VIA_NO_ENABLES }, |
| 115 | { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 115 | { "vt8237a", PCI_DEVICE_ID_VIA_8237A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
| 116 | { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 116 | { "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
| 117 | { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, | 117 | { "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 17f9ff9067a2..6f5093b7c8c5 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
| @@ -1382,6 +1382,25 @@ static int mv_qc_defer(struct ata_queued_cmd *qc) | |||
| 1382 | */ | 1382 | */ |
| 1383 | if (pp->pp_flags & MV_PP_FLAG_DELAYED_EH) | 1383 | if (pp->pp_flags & MV_PP_FLAG_DELAYED_EH) |
| 1384 | return ATA_DEFER_PORT; | 1384 | return ATA_DEFER_PORT; |
| 1385 | |||
| 1386 | /* PIO commands need exclusive link: no other commands [DMA or PIO] | ||
| 1387 | * can run concurrently. | ||
| 1388 | * set excl_link when we want to send a PIO command in DMA mode | ||
| 1389 | * or a non-NCQ command in NCQ mode. | ||
| 1390 | * When we receive a command from that link, and there are no | ||
| 1391 | * outstanding commands, mark a flag to clear excl_link and let | ||
| 1392 | * the command go through. | ||
| 1393 | */ | ||
| 1394 | if (unlikely(ap->excl_link)) { | ||
| 1395 | if (link == ap->excl_link) { | ||
| 1396 | if (ap->nr_active_links) | ||
| 1397 | return ATA_DEFER_PORT; | ||
| 1398 | qc->flags |= ATA_QCFLAG_CLEAR_EXCL; | ||
| 1399 | return 0; | ||
| 1400 | } else | ||
| 1401 | return ATA_DEFER_PORT; | ||
| 1402 | } | ||
| 1403 | |||
| 1385 | /* | 1404 | /* |
| 1386 | * If the port is completely idle, then allow the new qc. | 1405 | * If the port is completely idle, then allow the new qc. |
| 1387 | */ | 1406 | */ |
| @@ -1395,8 +1414,14 @@ static int mv_qc_defer(struct ata_queued_cmd *qc) | |||
| 1395 | * doesn't allow it. | 1414 | * doesn't allow it. |
| 1396 | */ | 1415 | */ |
| 1397 | if ((pp->pp_flags & MV_PP_FLAG_EDMA_EN) && | 1416 | if ((pp->pp_flags & MV_PP_FLAG_EDMA_EN) && |
| 1398 | (pp->pp_flags & MV_PP_FLAG_NCQ_EN) && ata_is_ncq(qc->tf.protocol)) | 1417 | (pp->pp_flags & MV_PP_FLAG_NCQ_EN)) { |
| 1399 | return 0; | 1418 | if (ata_is_ncq(qc->tf.protocol)) |
| 1419 | return 0; | ||
| 1420 | else { | ||
| 1421 | ap->excl_link = link; | ||
| 1422 | return ATA_DEFER_PORT; | ||
| 1423 | } | ||
| 1424 | } | ||
| 1400 | 1425 | ||
| 1401 | return ATA_DEFER_PORT; | 1426 | return ATA_DEFER_PORT; |
| 1402 | } | 1427 | } |
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 86a40582999c..1eb4e020eb5c 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
| @@ -1594,9 +1594,21 @@ static int nv_hardreset(struct ata_link *link, unsigned int *class, | |||
| 1594 | !ata_dev_enabled(link->device)) | 1594 | !ata_dev_enabled(link->device)) |
| 1595 | sata_link_hardreset(link, sata_deb_timing_hotplug, deadline, | 1595 | sata_link_hardreset(link, sata_deb_timing_hotplug, deadline, |
| 1596 | NULL, NULL); | 1596 | NULL, NULL); |
| 1597 | else if (!(ehc->i.flags & ATA_EHI_QUIET)) | 1597 | else { |
| 1598 | ata_link_printk(link, KERN_INFO, | 1598 | const unsigned long *timing = sata_ehc_deb_timing(ehc); |
| 1599 | "nv: skipping hardreset on occupied port\n"); | 1599 | int rc; |
| 1600 | |||
| 1601 | if (!(ehc->i.flags & ATA_EHI_QUIET)) | ||
| 1602 | ata_link_printk(link, KERN_INFO, "nv: skipping " | ||
| 1603 | "hardreset on occupied port\n"); | ||
| 1604 | |||
| 1605 | /* make sure the link is online */ | ||
| 1606 | rc = sata_link_resume(link, timing, deadline); | ||
| 1607 | /* whine about phy resume failure but proceed */ | ||
| 1608 | if (rc && rc != -EOPNOTSUPP) | ||
| 1609 | ata_link_printk(link, KERN_WARNING, "failed to resume " | ||
| 1610 | "link (errno=%d)\n", rc); | ||
| 1611 | } | ||
| 1600 | 1612 | ||
| 1601 | /* device signature acquisition is unreliable */ | 1613 | /* device signature acquisition is unreliable */ |
| 1602 | return -EAGAIN; | 1614 | return -EAGAIN; |
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index edda9ea7c626..bd112c8c7bcd 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
| @@ -949,7 +949,7 @@ static int loop_clr_fd(struct loop_device *lo, struct block_device *bdev) | |||
| 949 | lo->lo_state = Lo_unbound; | 949 | lo->lo_state = Lo_unbound; |
| 950 | /* This is safe: open() is still holding a reference. */ | 950 | /* This is safe: open() is still holding a reference. */ |
| 951 | module_put(THIS_MODULE); | 951 | module_put(THIS_MODULE); |
| 952 | if (max_part > 0) | 952 | if (max_part > 0 && bdev) |
| 953 | ioctl_by_bdev(bdev, BLKRRPART, 0); | 953 | ioctl_by_bdev(bdev, BLKRRPART, 0); |
| 954 | mutex_unlock(&lo->lo_ctl_mutex); | 954 | mutex_unlock(&lo->lo_ctl_mutex); |
| 955 | /* | 955 | /* |
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 43f19389647a..51042f0ba7e1 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | #include <linux/blkdev.h> | 3 | #include <linux/blkdev.h> |
| 4 | #include <linux/hdreg.h> | 4 | #include <linux/hdreg.h> |
| 5 | #include <linux/virtio.h> | 5 | #include <linux/virtio.h> |
| 6 | #include <linux/virtio_ids.h> | ||
| 7 | #include <linux/virtio_blk.h> | 6 | #include <linux/virtio_blk.h> |
| 8 | #include <linux/scatterlist.h> | 7 | #include <linux/scatterlist.h> |
| 9 | 8 | ||
| @@ -183,34 +182,6 @@ static void do_virtblk_request(struct request_queue *q) | |||
| 183 | vblk->vq->vq_ops->kick(vblk->vq); | 182 | vblk->vq->vq_ops->kick(vblk->vq); |
| 184 | } | 183 | } |
| 185 | 184 | ||
| 186 | /* return ATA identify data | ||
| 187 | */ | ||
| 188 | static int virtblk_identify(struct gendisk *disk, void *argp) | ||
| 189 | { | ||
| 190 | struct virtio_blk *vblk = disk->private_data; | ||
| 191 | void *opaque; | ||
| 192 | int err = -ENOMEM; | ||
| 193 | |||
| 194 | opaque = kmalloc(VIRTIO_BLK_ID_BYTES, GFP_KERNEL); | ||
| 195 | if (!opaque) | ||
| 196 | goto out; | ||
| 197 | |||
| 198 | err = virtio_config_buf(vblk->vdev, VIRTIO_BLK_F_IDENTIFY, | ||
| 199 | offsetof(struct virtio_blk_config, identify), opaque, | ||
| 200 | VIRTIO_BLK_ID_BYTES); | ||
| 201 | |||
| 202 | if (err) | ||
| 203 | goto out_kfree; | ||
| 204 | |||
| 205 | if (copy_to_user(argp, opaque, VIRTIO_BLK_ID_BYTES)) | ||
| 206 | err = -EFAULT; | ||
| 207 | |||
| 208 | out_kfree: | ||
| 209 | kfree(opaque); | ||
| 210 | out: | ||
| 211 | return err; | ||
| 212 | } | ||
| 213 | |||
| 214 | static void virtblk_prepare_flush(struct request_queue *q, struct request *req) | 185 | static void virtblk_prepare_flush(struct request_queue *q, struct request *req) |
| 215 | { | 186 | { |
| 216 | req->cmd_type = REQ_TYPE_LINUX_BLOCK; | 187 | req->cmd_type = REQ_TYPE_LINUX_BLOCK; |
| @@ -222,10 +193,6 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, | |||
| 222 | { | 193 | { |
| 223 | struct gendisk *disk = bdev->bd_disk; | 194 | struct gendisk *disk = bdev->bd_disk; |
| 224 | struct virtio_blk *vblk = disk->private_data; | 195 | struct virtio_blk *vblk = disk->private_data; |
| 225 | void __user *argp = (void __user *)data; | ||
| 226 | |||
| 227 | if (cmd == HDIO_GET_IDENTITY) | ||
| 228 | return virtblk_identify(disk, argp); | ||
| 229 | 196 | ||
| 230 | /* | 197 | /* |
| 231 | * Only allow the generic SCSI ioctls if the host can support it. | 198 | * Only allow the generic SCSI ioctls if the host can support it. |
| @@ -233,7 +200,8 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, | |||
| 233 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) | 200 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) |
| 234 | return -ENOTTY; | 201 | return -ENOTTY; |
| 235 | 202 | ||
| 236 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); | 203 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, |
| 204 | (void __user *)data); | ||
| 237 | } | 205 | } |
| 238 | 206 | ||
| 239 | /* We provide getgeo only to please some old bootloader/partitioning tools */ | 207 | /* We provide getgeo only to please some old bootloader/partitioning tools */ |
| @@ -332,7 +300,6 @@ static int __devinit virtblk_probe(struct virtio_device *vdev) | |||
| 332 | } | 300 | } |
| 333 | 301 | ||
| 334 | vblk->disk->queue->queuedata = vblk; | 302 | vblk->disk->queue->queuedata = vblk; |
| 335 | queue_flag_set_unlocked(QUEUE_FLAG_VIRT, vblk->disk->queue); | ||
| 336 | 303 | ||
| 337 | if (index < 26) { | 304 | if (index < 26) { |
| 338 | sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26); | 305 | sprintf(vblk->disk->disk_name, "vd%c", 'a' + index % 26); |
| @@ -445,7 +412,7 @@ static struct virtio_device_id id_table[] = { | |||
| 445 | static unsigned int features[] = { | 412 | static unsigned int features[] = { |
| 446 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, | 413 | VIRTIO_BLK_F_BARRIER, VIRTIO_BLK_F_SEG_MAX, VIRTIO_BLK_F_SIZE_MAX, |
| 447 | VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE, | 414 | VIRTIO_BLK_F_GEOMETRY, VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE, |
| 448 | VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_IDENTIFY, VIRTIO_BLK_F_FLUSH | 415 | VIRTIO_BLK_F_SCSI, VIRTIO_BLK_F_FLUSH |
| 449 | }; | 416 | }; |
| 450 | 417 | ||
| 451 | /* | 418 | /* |
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index 962968f05b94..915157fcff98 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c | |||
| @@ -21,7 +21,6 @@ | |||
| 21 | #include <linux/scatterlist.h> | 21 | #include <linux/scatterlist.h> |
| 22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
| 23 | #include <linux/virtio.h> | 23 | #include <linux/virtio.h> |
| 24 | #include <linux/virtio_ids.h> | ||
| 25 | #include <linux/virtio_rng.h> | 24 | #include <linux/virtio_rng.h> |
| 26 | 25 | ||
| 27 | /* The host will fill any buffer we give it with sweet, sweet randomness. We | 26 | /* The host will fill any buffer we give it with sweet, sweet randomness. We |
| @@ -117,7 +116,7 @@ static int virtrng_probe(struct virtio_device *vdev) | |||
| 117 | return 0; | 116 | return 0; |
| 118 | } | 117 | } |
| 119 | 118 | ||
| 120 | static void virtrng_remove(struct virtio_device *vdev) | 119 | static void __devexit virtrng_remove(struct virtio_device *vdev) |
| 121 | { | 120 | { |
| 122 | vdev->config->reset(vdev); | 121 | vdev->config->reset(vdev); |
| 123 | hwrng_unregister(&virtio_hwrng); | 122 | hwrng_unregister(&virtio_hwrng); |
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 0d328b59568d..a035ae39a359 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
| @@ -31,7 +31,6 @@ | |||
| 31 | #include <linux/err.h> | 31 | #include <linux/err.h> |
| 32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
| 33 | #include <linux/virtio.h> | 33 | #include <linux/virtio.h> |
| 34 | #include <linux/virtio_ids.h> | ||
| 35 | #include <linux/virtio_console.h> | 34 | #include <linux/virtio_console.h> |
| 36 | #include "hvc_console.h" | 35 | #include "hvc_console.h" |
| 37 | 36 | ||
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index ad41f19b8e3f..12fdd3987a36 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
| @@ -76,8 +76,11 @@ static void cpuidle_idle_call(void) | |||
| 76 | #endif | 76 | #endif |
| 77 | /* ask the governor for the next state */ | 77 | /* ask the governor for the next state */ |
| 78 | next_state = cpuidle_curr_governor->select(dev); | 78 | next_state = cpuidle_curr_governor->select(dev); |
| 79 | if (need_resched()) | 79 | if (need_resched()) { |
| 80 | local_irq_enable(); | ||
| 80 | return; | 81 | return; |
| 82 | } | ||
| 83 | |||
| 81 | target_state = &dev->states[next_state]; | 84 | target_state = &dev->states[next_state]; |
| 82 | 85 | ||
| 83 | /* enter the state and update stats */ | 86 | /* enter the state and update stats */ |
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c index 76cb6b345e7b..0af80577dc7b 100644 --- a/drivers/crypto/padlock-sha.c +++ b/drivers/crypto/padlock-sha.c | |||
| @@ -24,6 +24,12 @@ | |||
| 24 | #include <asm/i387.h> | 24 | #include <asm/i387.h> |
| 25 | #include "padlock.h" | 25 | #include "padlock.h" |
| 26 | 26 | ||
| 27 | #ifdef CONFIG_64BIT | ||
| 28 | #define STACK_ALIGN 16 | ||
| 29 | #else | ||
| 30 | #define STACK_ALIGN 4 | ||
| 31 | #endif | ||
| 32 | |||
| 27 | struct padlock_sha_desc { | 33 | struct padlock_sha_desc { |
| 28 | struct shash_desc fallback; | 34 | struct shash_desc fallback; |
| 29 | }; | 35 | }; |
| @@ -64,7 +70,9 @@ static int padlock_sha1_finup(struct shash_desc *desc, const u8 *in, | |||
| 64 | /* We can't store directly to *out as it may be unaligned. */ | 70 | /* We can't store directly to *out as it may be unaligned. */ |
| 65 | /* BTW Don't reduce the buffer size below 128 Bytes! | 71 | /* BTW Don't reduce the buffer size below 128 Bytes! |
| 66 | * PadLock microcode needs it that big. */ | 72 | * PadLock microcode needs it that big. */ |
| 67 | char result[128] __attribute__ ((aligned(PADLOCK_ALIGNMENT))); | 73 | char buf[128 + PADLOCK_ALIGNMENT - STACK_ALIGN] __attribute__ |
| 74 | ((aligned(STACK_ALIGN))); | ||
| 75 | char *result = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT); | ||
| 68 | struct padlock_sha_desc *dctx = shash_desc_ctx(desc); | 76 | struct padlock_sha_desc *dctx = shash_desc_ctx(desc); |
| 69 | struct sha1_state state; | 77 | struct sha1_state state; |
| 70 | unsigned int space; | 78 | unsigned int space; |
| @@ -128,7 +136,9 @@ static int padlock_sha256_finup(struct shash_desc *desc, const u8 *in, | |||
| 128 | /* We can't store directly to *out as it may be unaligned. */ | 136 | /* We can't store directly to *out as it may be unaligned. */ |
| 129 | /* BTW Don't reduce the buffer size below 128 Bytes! | 137 | /* BTW Don't reduce the buffer size below 128 Bytes! |
| 130 | * PadLock microcode needs it that big. */ | 138 | * PadLock microcode needs it that big. */ |
| 131 | char result[128] __attribute__ ((aligned(PADLOCK_ALIGNMENT))); | 139 | char buf[128 + PADLOCK_ALIGNMENT - STACK_ALIGN] __attribute__ |
| 140 | ((aligned(STACK_ALIGN))); | ||
| 141 | char *result = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT); | ||
| 132 | struct padlock_sha_desc *dctx = shash_desc_ctx(desc); | 142 | struct padlock_sha_desc *dctx = shash_desc_ctx(desc); |
| 133 | struct sha256_state state; | 143 | struct sha256_state state; |
| 134 | unsigned int space; | 144 | unsigned int space; |
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 4f4ac82382f7..d4560d9d5a83 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
| @@ -1122,7 +1122,7 @@ static void k8_read_dram_base_limit(struct amd64_pvt *pvt, int dram) | |||
| 1122 | debugf0("Reading K8_DRAM_BASE_LOW failed\n"); | 1122 | debugf0("Reading K8_DRAM_BASE_LOW failed\n"); |
| 1123 | 1123 | ||
| 1124 | /* Extract parts into separate data entries */ | 1124 | /* Extract parts into separate data entries */ |
| 1125 | pvt->dram_base[dram] = ((u64) low & 0xFFFF0000) << 24; | 1125 | pvt->dram_base[dram] = ((u64) low & 0xFFFF0000) << 8; |
| 1126 | pvt->dram_IntlvEn[dram] = (low >> 8) & 0x7; | 1126 | pvt->dram_IntlvEn[dram] = (low >> 8) & 0x7; |
| 1127 | pvt->dram_rw_en[dram] = (low & 0x3); | 1127 | pvt->dram_rw_en[dram] = (low & 0x3); |
| 1128 | 1128 | ||
| @@ -1135,7 +1135,7 @@ static void k8_read_dram_base_limit(struct amd64_pvt *pvt, int dram) | |||
| 1135 | * Extract parts into separate data entries. Limit is the HIGHEST memory | 1135 | * Extract parts into separate data entries. Limit is the HIGHEST memory |
| 1136 | * location of the region, so lower 24 bits need to be all ones | 1136 | * location of the region, so lower 24 bits need to be all ones |
| 1137 | */ | 1137 | */ |
| 1138 | pvt->dram_limit[dram] = (((u64) low & 0xFFFF0000) << 24) | 0x00FFFFFF; | 1138 | pvt->dram_limit[dram] = (((u64) low & 0xFFFF0000) << 8) | 0x00FFFFFF; |
| 1139 | pvt->dram_IntlvSel[dram] = (low >> 8) & 0x7; | 1139 | pvt->dram_IntlvSel[dram] = (low >> 8) & 0x7; |
| 1140 | pvt->dram_DstNode[dram] = (low & 0x7); | 1140 | pvt->dram_DstNode[dram] = (low & 0x7); |
| 1141 | } | 1141 | } |
| @@ -1369,7 +1369,7 @@ static void f10_read_dram_base_limit(struct amd64_pvt *pvt, int dram) | |||
| 1369 | pvt->dram_IntlvEn[dram] = (low_base >> 8) & 0x7; | 1369 | pvt->dram_IntlvEn[dram] = (low_base >> 8) & 0x7; |
| 1370 | 1370 | ||
| 1371 | pvt->dram_base[dram] = (((u64)high_base & 0x000000FF) << 40) | | 1371 | pvt->dram_base[dram] = (((u64)high_base & 0x000000FF) << 40) | |
| 1372 | (((u64)low_base & 0xFFFF0000) << 24); | 1372 | (((u64)low_base & 0xFFFF0000) << 8); |
| 1373 | 1373 | ||
| 1374 | low_offset = K8_DRAM_LIMIT_LOW + (dram << 3); | 1374 | low_offset = K8_DRAM_LIMIT_LOW + (dram << 3); |
| 1375 | high_offset = F10_DRAM_LIMIT_HIGH + (dram << 3); | 1375 | high_offset = F10_DRAM_LIMIT_HIGH + (dram << 3); |
| @@ -1391,7 +1391,7 @@ static void f10_read_dram_base_limit(struct amd64_pvt *pvt, int dram) | |||
| 1391 | * memory location of the region, so low 24 bits need to be all ones. | 1391 | * memory location of the region, so low 24 bits need to be all ones. |
| 1392 | */ | 1392 | */ |
| 1393 | pvt->dram_limit[dram] = (((u64)high_limit & 0x000000FF) << 40) | | 1393 | pvt->dram_limit[dram] = (((u64)high_limit & 0x000000FF) << 40) | |
| 1394 | (((u64) low_limit & 0xFFFF0000) << 24) | | 1394 | (((u64) low_limit & 0xFFFF0000) << 8) | |
| 1395 | 0x00FFFFFF; | 1395 | 0x00FFFFFF; |
| 1396 | } | 1396 | } |
| 1397 | 1397 | ||
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index d335086f4a26..77a9579d7167 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c | |||
| @@ -1173,7 +1173,7 @@ static void i5000_get_mc_regs(struct mem_ctl_info *mci) | |||
| 1173 | pci_read_config_word(pvt->branch_1, where, | 1173 | pci_read_config_word(pvt->branch_1, where, |
| 1174 | &pvt->b1_mtr[slot_row]); | 1174 | &pvt->b1_mtr[slot_row]); |
| 1175 | debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row, | 1175 | debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row, |
| 1176 | where, pvt->b0_mtr[slot_row]); | 1176 | where, pvt->b1_mtr[slot_row]); |
| 1177 | } else { | 1177 | } else { |
| 1178 | pvt->b1_mtr[slot_row] = 0; | 1178 | pvt->b1_mtr[slot_row] = 0; |
| 1179 | } | 1179 | } |
| @@ -1232,7 +1232,7 @@ static int i5000_init_csrows(struct mem_ctl_info *mci) | |||
| 1232 | struct csrow_info *p_csrow; | 1232 | struct csrow_info *p_csrow; |
| 1233 | int empty, channel_count; | 1233 | int empty, channel_count; |
| 1234 | int max_csrows; | 1234 | int max_csrows; |
| 1235 | int mtr; | 1235 | int mtr, mtr1; |
| 1236 | int csrow_megs; | 1236 | int csrow_megs; |
| 1237 | int channel; | 1237 | int channel; |
| 1238 | int csrow; | 1238 | int csrow; |
| @@ -1251,9 +1251,10 @@ static int i5000_init_csrows(struct mem_ctl_info *mci) | |||
| 1251 | 1251 | ||
| 1252 | /* use branch 0 for the basis */ | 1252 | /* use branch 0 for the basis */ |
| 1253 | mtr = pvt->b0_mtr[csrow >> 1]; | 1253 | mtr = pvt->b0_mtr[csrow >> 1]; |
| 1254 | mtr1 = pvt->b1_mtr[csrow >> 1]; | ||
| 1254 | 1255 | ||
| 1255 | /* if no DIMMS on this row, continue */ | 1256 | /* if no DIMMS on this row, continue */ |
| 1256 | if (!MTR_DIMMS_PRESENT(mtr)) | 1257 | if (!MTR_DIMMS_PRESENT(mtr) && !MTR_DIMMS_PRESENT(mtr1)) |
| 1257 | continue; | 1258 | continue; |
| 1258 | 1259 | ||
| 1259 | /* FAKE OUT VALUES, FIXME */ | 1260 | /* FAKE OUT VALUES, FIXME */ |
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c index b08b6d8e2dc7..f99d10655ed4 100644 --- a/drivers/edac/i5400_edac.c +++ b/drivers/edac/i5400_edac.c | |||
| @@ -46,9 +46,10 @@ | |||
| 46 | /* Limits for i5400 */ | 46 | /* Limits for i5400 */ |
| 47 | #define NUM_MTRS_PER_BRANCH 4 | 47 | #define NUM_MTRS_PER_BRANCH 4 |
| 48 | #define CHANNELS_PER_BRANCH 2 | 48 | #define CHANNELS_PER_BRANCH 2 |
| 49 | #define MAX_DIMMS_PER_CHANNEL NUM_MTRS_PER_BRANCH | ||
| 49 | #define MAX_CHANNELS 4 | 50 | #define MAX_CHANNELS 4 |
| 50 | #define MAX_DIMMS (MAX_CHANNELS * 4) /* Up to 4 DIMM's per channel */ | 51 | /* max possible csrows per channel */ |
| 51 | #define MAX_CSROWS (MAX_DIMMS * 2) /* max possible csrows per channel */ | 52 | #define MAX_CSROWS (MAX_DIMMS_PER_CHANNEL) |
| 52 | 53 | ||
| 53 | /* Device 16, | 54 | /* Device 16, |
| 54 | * Function 0: System Address | 55 | * Function 0: System Address |
| @@ -331,7 +332,6 @@ static const struct i5400_dev_info i5400_devs[] = { | |||
| 331 | 332 | ||
| 332 | struct i5400_dimm_info { | 333 | struct i5400_dimm_info { |
| 333 | int megabytes; /* size, 0 means not present */ | 334 | int megabytes; /* size, 0 means not present */ |
| 334 | int dual_rank; | ||
| 335 | }; | 335 | }; |
| 336 | 336 | ||
| 337 | /* driver private data structure */ | 337 | /* driver private data structure */ |
| @@ -849,11 +849,9 @@ static int determine_mtr(struct i5400_pvt *pvt, int csrow, int channel) | |||
| 849 | int n; | 849 | int n; |
| 850 | 850 | ||
| 851 | /* There is one MTR for each slot pair of FB-DIMMs, | 851 | /* There is one MTR for each slot pair of FB-DIMMs, |
| 852 | Each slot may have one or two ranks (2 csrows), | ||
| 853 | Each slot pair may be at branch 0 or branch 1. | 852 | Each slot pair may be at branch 0 or branch 1. |
| 854 | So, csrow should be divided by eight | ||
| 855 | */ | 853 | */ |
| 856 | n = csrow >> 3; | 854 | n = csrow; |
| 857 | 855 | ||
| 858 | if (n >= NUM_MTRS_PER_BRANCH) { | 856 | if (n >= NUM_MTRS_PER_BRANCH) { |
| 859 | debugf0("ERROR: trying to access an invalid csrow: %d\n", | 857 | debugf0("ERROR: trying to access an invalid csrow: %d\n", |
| @@ -905,25 +903,22 @@ static void handle_channel(struct i5400_pvt *pvt, int csrow, int channel, | |||
| 905 | amb_present_reg = determine_amb_present_reg(pvt, channel); | 903 | amb_present_reg = determine_amb_present_reg(pvt, channel); |
| 906 | 904 | ||
| 907 | /* Determine if there is a DIMM present in this DIMM slot */ | 905 | /* Determine if there is a DIMM present in this DIMM slot */ |
| 908 | if (amb_present_reg & (1 << (csrow >> 1))) { | 906 | if (amb_present_reg & (1 << csrow)) { |
| 909 | dinfo->dual_rank = MTR_DIMM_RANK(mtr); | 907 | /* Start with the number of bits for a Bank |
| 910 | 908 | * on the DRAM */ | |
| 911 | if (!((dinfo->dual_rank == 0) && | 909 | addrBits = MTR_DRAM_BANKS_ADDR_BITS(mtr); |
| 912 | ((csrow & 0x1) == 0x1))) { | 910 | /* Add thenumber of ROW bits */ |
| 913 | /* Start with the number of bits for a Bank | 911 | addrBits += MTR_DIMM_ROWS_ADDR_BITS(mtr); |
| 914 | * on the DRAM */ | 912 | /* add the number of COLUMN bits */ |
| 915 | addrBits = MTR_DRAM_BANKS_ADDR_BITS(mtr); | 913 | addrBits += MTR_DIMM_COLS_ADDR_BITS(mtr); |
| 916 | /* Add thenumber of ROW bits */ | 914 | /* add the number of RANK bits */ |
| 917 | addrBits += MTR_DIMM_ROWS_ADDR_BITS(mtr); | 915 | addrBits += MTR_DIMM_RANK(mtr); |
| 918 | /* add the number of COLUMN bits */ | 916 | |
| 919 | addrBits += MTR_DIMM_COLS_ADDR_BITS(mtr); | 917 | addrBits += 6; /* add 64 bits per DIMM */ |
| 920 | 918 | addrBits -= 20; /* divide by 2^^20 */ | |
| 921 | addrBits += 6; /* add 64 bits per DIMM */ | 919 | addrBits -= 3; /* 8 bits per bytes */ |
| 922 | addrBits -= 20; /* divide by 2^^20 */ | 920 | |
| 923 | addrBits -= 3; /* 8 bits per bytes */ | 921 | dinfo->megabytes = 1 << addrBits; |
| 924 | |||
| 925 | dinfo->megabytes = 1 << addrBits; | ||
| 926 | } | ||
| 927 | } | 922 | } |
| 928 | } | 923 | } |
| 929 | } | 924 | } |
| @@ -951,12 +946,12 @@ static void calculate_dimm_size(struct i5400_pvt *pvt) | |||
| 951 | return; | 946 | return; |
| 952 | } | 947 | } |
| 953 | 948 | ||
| 954 | /* Scan all the actual CSROWS (which is # of DIMMS * 2) | 949 | /* Scan all the actual CSROWS |
| 955 | * and calculate the information for each DIMM | 950 | * and calculate the information for each DIMM |
| 956 | * Start with the highest csrow first, to display it first | 951 | * Start with the highest csrow first, to display it first |
| 957 | * and work toward the 0th csrow | 952 | * and work toward the 0th csrow |
| 958 | */ | 953 | */ |
| 959 | max_csrows = pvt->maxdimmperch * 2; | 954 | max_csrows = pvt->maxdimmperch; |
| 960 | for (csrow = max_csrows - 1; csrow >= 0; csrow--) { | 955 | for (csrow = max_csrows - 1; csrow >= 0; csrow--) { |
| 961 | 956 | ||
| 962 | /* on an odd csrow, first output a 'boundary' marker, | 957 | /* on an odd csrow, first output a 'boundary' marker, |
| @@ -1064,7 +1059,7 @@ static void i5400_get_mc_regs(struct mem_ctl_info *mci) | |||
| 1064 | 1059 | ||
| 1065 | /* Get the set of MTR[0-3] regs by each branch */ | 1060 | /* Get the set of MTR[0-3] regs by each branch */ |
| 1066 | for (slot_row = 0; slot_row < NUM_MTRS_PER_BRANCH; slot_row++) { | 1061 | for (slot_row = 0; slot_row < NUM_MTRS_PER_BRANCH; slot_row++) { |
| 1067 | int where = MTR0 + (slot_row * sizeof(u32)); | 1062 | int where = MTR0 + (slot_row * sizeof(u16)); |
| 1068 | 1063 | ||
| 1069 | /* Branch 0 set of MTR registers */ | 1064 | /* Branch 0 set of MTR registers */ |
| 1070 | pci_read_config_word(pvt->branch_0, where, | 1065 | pci_read_config_word(pvt->branch_0, where, |
| @@ -1146,7 +1141,7 @@ static int i5400_init_csrows(struct mem_ctl_info *mci) | |||
| 1146 | pvt = mci->pvt_info; | 1141 | pvt = mci->pvt_info; |
| 1147 | 1142 | ||
| 1148 | channel_count = pvt->maxch; | 1143 | channel_count = pvt->maxch; |
| 1149 | max_csrows = pvt->maxdimmperch * 2; | 1144 | max_csrows = pvt->maxdimmperch; |
| 1150 | 1145 | ||
| 1151 | empty = 1; /* Assume NO memory */ | 1146 | empty = 1; /* Assume NO memory */ |
| 1152 | 1147 | ||
| @@ -1215,28 +1210,6 @@ static void i5400_enable_error_reporting(struct mem_ctl_info *mci) | |||
| 1215 | } | 1210 | } |
| 1216 | 1211 | ||
| 1217 | /* | 1212 | /* |
| 1218 | * i5400_get_dimm_and_channel_counts(pdev, &num_csrows, &num_channels) | ||
| 1219 | * | ||
| 1220 | * ask the device how many channels are present and how many CSROWS | ||
| 1221 | * as well | ||
| 1222 | */ | ||
| 1223 | static void i5400_get_dimm_and_channel_counts(struct pci_dev *pdev, | ||
| 1224 | int *num_dimms_per_channel, | ||
| 1225 | int *num_channels) | ||
| 1226 | { | ||
| 1227 | u8 value; | ||
| 1228 | |||
| 1229 | /* Need to retrieve just how many channels and dimms per channel are | ||
| 1230 | * supported on this memory controller | ||
| 1231 | */ | ||
| 1232 | pci_read_config_byte(pdev, MAXDIMMPERCH, &value); | ||
| 1233 | *num_dimms_per_channel = (int)value * 2; | ||
| 1234 | |||
| 1235 | pci_read_config_byte(pdev, MAXCH, &value); | ||
| 1236 | *num_channels = (int)value; | ||
| 1237 | } | ||
| 1238 | |||
| 1239 | /* | ||
| 1240 | * i5400_probe1 Probe for ONE instance of device to see if it is | 1213 | * i5400_probe1 Probe for ONE instance of device to see if it is |
| 1241 | * present. | 1214 | * present. |
| 1242 | * return: | 1215 | * return: |
| @@ -1263,22 +1236,16 @@ static int i5400_probe1(struct pci_dev *pdev, int dev_idx) | |||
| 1263 | if (PCI_FUNC(pdev->devfn) != 0) | 1236 | if (PCI_FUNC(pdev->devfn) != 0) |
| 1264 | return -ENODEV; | 1237 | return -ENODEV; |
| 1265 | 1238 | ||
| 1266 | /* Ask the devices for the number of CSROWS and CHANNELS so | 1239 | /* As we don't have a motherboard identification routine to determine |
| 1267 | * that we can calculate the memory resources, etc | ||
| 1268 | * | ||
| 1269 | * The Chipset will report what it can handle which will be greater | ||
| 1270 | * or equal to what the motherboard manufacturer will implement. | ||
| 1271 | * | ||
| 1272 | * As we don't have a motherboard identification routine to determine | ||
| 1273 | * actual number of slots/dimms per channel, we thus utilize the | 1240 | * actual number of slots/dimms per channel, we thus utilize the |
| 1274 | * resource as specified by the chipset. Thus, we might have | 1241 | * resource as specified by the chipset. Thus, we might have |
| 1275 | * have more DIMMs per channel than actually on the mobo, but this | 1242 | * have more DIMMs per channel than actually on the mobo, but this |
| 1276 | * allows the driver to support upto the chipset max, without | 1243 | * allows the driver to support upto the chipset max, without |
| 1277 | * some fancy mobo determination. | 1244 | * some fancy mobo determination. |
| 1278 | */ | 1245 | */ |
| 1279 | i5400_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel, | 1246 | num_dimms_per_channel = MAX_DIMMS_PER_CHANNEL; |
| 1280 | &num_channels); | 1247 | num_channels = MAX_CHANNELS; |
| 1281 | num_csrows = num_dimms_per_channel * 2; | 1248 | num_csrows = num_dimms_per_channel; |
| 1282 | 1249 | ||
| 1283 | debugf0("MC: %s(): Number of - Channels= %d DIMMS= %d CSROWS= %d\n", | 1250 | debugf0("MC: %s(): Number of - Channels= %d DIMMS= %d CSROWS= %d\n", |
| 1284 | __func__, num_channels, num_dimms_per_channel, num_csrows); | 1251 | __func__, num_channels, num_dimms_per_channel, num_csrows); |
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 157f6504f25e..cf27402af97b 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
| @@ -26,7 +26,9 @@ | |||
| 26 | #include "mpc85xx_edac.h" | 26 | #include "mpc85xx_edac.h" |
| 27 | 27 | ||
| 28 | static int edac_dev_idx; | 28 | static int edac_dev_idx; |
| 29 | #ifdef CONFIG_PCI | ||
| 29 | static int edac_pci_idx; | 30 | static int edac_pci_idx; |
| 31 | #endif | ||
| 30 | static int edac_mc_idx; | 32 | static int edac_mc_idx; |
| 31 | 33 | ||
| 32 | static u32 orig_ddr_err_disable; | 34 | static u32 orig_ddr_err_disable; |
diff --git a/drivers/gpio/twl4030-gpio.c b/drivers/gpio/twl4030-gpio.c index afad14792141..49384a7c5492 100644 --- a/drivers/gpio/twl4030-gpio.c +++ b/drivers/gpio/twl4030-gpio.c | |||
| @@ -460,7 +460,8 @@ no_irqs: | |||
| 460 | return ret; | 460 | return ret; |
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | static int __devexit gpio_twl4030_remove(struct platform_device *pdev) | 463 | /* Cannot use __devexit as gpio_twl4030_probe() calls us */ |
| 464 | static int gpio_twl4030_remove(struct platform_device *pdev) | ||
| 464 | { | 465 | { |
| 465 | struct twl4030_gpio_platform_data *pdata = pdev->dev.platform_data; | 466 | struct twl4030_gpio_platform_data *pdata = pdev->dev.platform_data; |
| 466 | int status; | 467 | int status; |
| @@ -493,7 +494,7 @@ static struct platform_driver gpio_twl4030_driver = { | |||
| 493 | .driver.name = "twl4030_gpio", | 494 | .driver.name = "twl4030_gpio", |
| 494 | .driver.owner = THIS_MODULE, | 495 | .driver.owner = THIS_MODULE, |
| 495 | .probe = gpio_twl4030_probe, | 496 | .probe = gpio_twl4030_probe, |
| 496 | .remove = __devexit_p(gpio_twl4030_remove), | 497 | .remove = gpio_twl4030_remove, |
| 497 | }; | 498 | }; |
| 498 | 499 | ||
| 499 | static int __init gpio_twl4030_init(void) | 500 | static int __init gpio_twl4030_init(void) |
diff --git a/drivers/hwmon/hp_accel.c b/drivers/hwmon/hp_accel.c index 6679854c85b0..be475e844c2a 100644 --- a/drivers/hwmon/hp_accel.c +++ b/drivers/hwmon/hp_accel.c | |||
| @@ -197,11 +197,13 @@ static struct dmi_system_id lis3lv02d_dmi_ids[] = { | |||
| 197 | AXIS_DMI_MATCH("HP2133", "HP 2133", xy_rotated_left), | 197 | AXIS_DMI_MATCH("HP2133", "HP 2133", xy_rotated_left), |
| 198 | AXIS_DMI_MATCH("HP2140", "HP 2140", xy_swap_inverted), | 198 | AXIS_DMI_MATCH("HP2140", "HP 2140", xy_swap_inverted), |
| 199 | AXIS_DMI_MATCH("NC653x", "HP Compaq 653", xy_rotated_left_usd), | 199 | AXIS_DMI_MATCH("NC653x", "HP Compaq 653", xy_rotated_left_usd), |
| 200 | AXIS_DMI_MATCH("NC673x", "HP Compaq 673", xy_rotated_left_usd), | 200 | AXIS_DMI_MATCH("NC6730b", "HP Compaq 6730b", xy_rotated_left_usd), |
| 201 | AXIS_DMI_MATCH("NC6730s", "HP Compaq 6730s", xy_swap), | ||
| 201 | AXIS_DMI_MATCH("NC651xx", "HP Compaq 651", xy_rotated_right), | 202 | AXIS_DMI_MATCH("NC651xx", "HP Compaq 651", xy_rotated_right), |
| 202 | AXIS_DMI_MATCH("NC6710x", "HP Compaq 6710", xy_swap_yz_inverted), | 203 | AXIS_DMI_MATCH("NC6710x", "HP Compaq 6710", xy_swap_yz_inverted), |
| 203 | AXIS_DMI_MATCH("NC6715x", "HP Compaq 6715", y_inverted), | 204 | AXIS_DMI_MATCH("NC6715x", "HP Compaq 6715", y_inverted), |
| 204 | AXIS_DMI_MATCH("NC693xx", "HP EliteBook 693", xy_rotated_right), | 205 | AXIS_DMI_MATCH("NC693xx", "HP EliteBook 693", xy_rotated_right), |
| 206 | AXIS_DMI_MATCH("NC693xx", "HP EliteBook 853", xy_swap), | ||
| 205 | /* Intel-based HP Pavilion dv5 */ | 207 | /* Intel-based HP Pavilion dv5 */ |
| 206 | AXIS_DMI_MATCH2("HPDV5_I", | 208 | AXIS_DMI_MATCH2("HPDV5_I", |
| 207 | PRODUCT_NAME, "HP Pavilion dv5", | 209 | PRODUCT_NAME, "HP Pavilion dv5", |
| @@ -214,6 +216,7 @@ static struct dmi_system_id lis3lv02d_dmi_ids[] = { | |||
| 214 | y_inverted), | 216 | y_inverted), |
| 215 | AXIS_DMI_MATCH("DV7", "HP Pavilion dv7", x_inverted), | 217 | AXIS_DMI_MATCH("DV7", "HP Pavilion dv7", x_inverted), |
| 216 | AXIS_DMI_MATCH("HP8710", "HP Compaq 8710", y_inverted), | 218 | AXIS_DMI_MATCH("HP8710", "HP Compaq 8710", y_inverted), |
| 219 | AXIS_DMI_MATCH("HDX18", "HP HDX 18", x_inverted), | ||
| 217 | { NULL, } | 220 | { NULL, } |
| 218 | /* Laptop models without axis info (yet): | 221 | /* Laptop models without axis info (yet): |
| 219 | * "NC6910" "HP Compaq 6910" | 222 | * "NC6910" "HP Compaq 6910" |
diff --git a/drivers/ide/atiixp.c b/drivers/ide/atiixp.c index 6396c3ad3252..837322b10a4c 100644 --- a/drivers/ide/atiixp.c +++ b/drivers/ide/atiixp.c | |||
| @@ -177,7 +177,7 @@ static const struct pci_device_id atiixp_pci_tbl[] = { | |||
| 177 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), 0 }, | 177 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), 0 }, |
| 178 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), 1 }, | 178 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), 1 }, |
| 179 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), 0 }, | 179 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP700_IDE), 0 }, |
| 180 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_SB900_IDE), 0 }, | 180 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_HUDSON2_IDE), 0 }, |
| 181 | { 0, }, | 181 | { 0, }, |
| 182 | }; | 182 | }; |
| 183 | MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); | 183 | MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); |
diff --git a/drivers/input/input.c b/drivers/input/input.c index c6f88ebb40c7..cc763c96fada 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
| @@ -782,10 +782,29 @@ static unsigned int input_proc_devices_poll(struct file *file, poll_table *wait) | |||
| 782 | return 0; | 782 | return 0; |
| 783 | } | 783 | } |
| 784 | 784 | ||
| 785 | union input_seq_state { | ||
| 786 | struct { | ||
| 787 | unsigned short pos; | ||
| 788 | bool mutex_acquired; | ||
| 789 | }; | ||
| 790 | void *p; | ||
| 791 | }; | ||
| 792 | |||
| 785 | static void *input_devices_seq_start(struct seq_file *seq, loff_t *pos) | 793 | static void *input_devices_seq_start(struct seq_file *seq, loff_t *pos) |
| 786 | { | 794 | { |
| 787 | if (mutex_lock_interruptible(&input_mutex)) | 795 | union input_seq_state *state = (union input_seq_state *)&seq->private; |
| 788 | return NULL; | 796 | int error; |
| 797 | |||
| 798 | /* We need to fit into seq->private pointer */ | ||
| 799 | BUILD_BUG_ON(sizeof(union input_seq_state) != sizeof(seq->private)); | ||
| 800 | |||
| 801 | error = mutex_lock_interruptible(&input_mutex); | ||
| 802 | if (error) { | ||
| 803 | state->mutex_acquired = false; | ||
| 804 | return ERR_PTR(error); | ||
| 805 | } | ||
| 806 | |||
| 807 | state->mutex_acquired = true; | ||
| 789 | 808 | ||
| 790 | return seq_list_start(&input_dev_list, *pos); | 809 | return seq_list_start(&input_dev_list, *pos); |
| 791 | } | 810 | } |
| @@ -795,9 +814,12 @@ static void *input_devices_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
| 795 | return seq_list_next(v, &input_dev_list, pos); | 814 | return seq_list_next(v, &input_dev_list, pos); |
| 796 | } | 815 | } |
| 797 | 816 | ||
| 798 | static void input_devices_seq_stop(struct seq_file *seq, void *v) | 817 | static void input_seq_stop(struct seq_file *seq, void *v) |
| 799 | { | 818 | { |
| 800 | mutex_unlock(&input_mutex); | 819 | union input_seq_state *state = (union input_seq_state *)&seq->private; |
| 820 | |||
| 821 | if (state->mutex_acquired) | ||
| 822 | mutex_unlock(&input_mutex); | ||
| 801 | } | 823 | } |
| 802 | 824 | ||
| 803 | static void input_seq_print_bitmap(struct seq_file *seq, const char *name, | 825 | static void input_seq_print_bitmap(struct seq_file *seq, const char *name, |
| @@ -861,7 +883,7 @@ static int input_devices_seq_show(struct seq_file *seq, void *v) | |||
| 861 | static const struct seq_operations input_devices_seq_ops = { | 883 | static const struct seq_operations input_devices_seq_ops = { |
| 862 | .start = input_devices_seq_start, | 884 | .start = input_devices_seq_start, |
| 863 | .next = input_devices_seq_next, | 885 | .next = input_devices_seq_next, |
| 864 | .stop = input_devices_seq_stop, | 886 | .stop = input_seq_stop, |
| 865 | .show = input_devices_seq_show, | 887 | .show = input_devices_seq_show, |
| 866 | }; | 888 | }; |
| 867 | 889 | ||
| @@ -881,40 +903,49 @@ static const struct file_operations input_devices_fileops = { | |||
| 881 | 903 | ||
| 882 | static void *input_handlers_seq_start(struct seq_file *seq, loff_t *pos) | 904 | static void *input_handlers_seq_start(struct seq_file *seq, loff_t *pos) |
| 883 | { | 905 | { |
| 884 | if (mutex_lock_interruptible(&input_mutex)) | 906 | union input_seq_state *state = (union input_seq_state *)&seq->private; |
| 885 | return NULL; | 907 | int error; |
| 908 | |||
| 909 | /* We need to fit into seq->private pointer */ | ||
| 910 | BUILD_BUG_ON(sizeof(union input_seq_state) != sizeof(seq->private)); | ||
| 911 | |||
| 912 | error = mutex_lock_interruptible(&input_mutex); | ||
| 913 | if (error) { | ||
| 914 | state->mutex_acquired = false; | ||
| 915 | return ERR_PTR(error); | ||
| 916 | } | ||
| 917 | |||
| 918 | state->mutex_acquired = true; | ||
| 919 | state->pos = *pos; | ||
| 886 | 920 | ||
| 887 | seq->private = (void *)(unsigned long)*pos; | ||
| 888 | return seq_list_start(&input_handler_list, *pos); | 921 | return seq_list_start(&input_handler_list, *pos); |
| 889 | } | 922 | } |
| 890 | 923 | ||
| 891 | static void *input_handlers_seq_next(struct seq_file *seq, void *v, loff_t *pos) | 924 | static void *input_handlers_seq_next(struct seq_file *seq, void *v, loff_t *pos) |
| 892 | { | 925 | { |
| 893 | seq->private = (void *)(unsigned long)(*pos + 1); | 926 | union input_seq_state *state = (union input_seq_state *)&seq->private; |
| 894 | return seq_list_next(v, &input_handler_list, pos); | ||
| 895 | } | ||
| 896 | 927 | ||
| 897 | static void input_handlers_seq_stop(struct seq_file *seq, void *v) | 928 | state->pos = *pos + 1; |
| 898 | { | 929 | return seq_list_next(v, &input_handler_list, pos); |
| 899 | mutex_unlock(&input_mutex); | ||
| 900 | } | 930 | } |
| 901 | 931 | ||
| 902 | static int input_handlers_seq_show(struct seq_file *seq, void *v) | 932 | static int input_handlers_seq_show(struct seq_file *seq, void *v) |
| 903 | { | 933 | { |
| 904 | struct input_handler *handler = container_of(v, struct input_handler, node); | 934 | struct input_handler *handler = container_of(v, struct input_handler, node); |
| 935 | union input_seq_state *state = (union input_seq_state *)&seq->private; | ||
| 905 | 936 | ||
| 906 | seq_printf(seq, "N: Number=%ld Name=%s", | 937 | seq_printf(seq, "N: Number=%u Name=%s", state->pos, handler->name); |
| 907 | (unsigned long)seq->private, handler->name); | ||
| 908 | if (handler->fops) | 938 | if (handler->fops) |
| 909 | seq_printf(seq, " Minor=%d", handler->minor); | 939 | seq_printf(seq, " Minor=%d", handler->minor); |
| 910 | seq_putc(seq, '\n'); | 940 | seq_putc(seq, '\n'); |
| 911 | 941 | ||
| 912 | return 0; | 942 | return 0; |
| 913 | } | 943 | } |
| 944 | |||
| 914 | static const struct seq_operations input_handlers_seq_ops = { | 945 | static const struct seq_operations input_handlers_seq_ops = { |
| 915 | .start = input_handlers_seq_start, | 946 | .start = input_handlers_seq_start, |
| 916 | .next = input_handlers_seq_next, | 947 | .next = input_handlers_seq_next, |
| 917 | .stop = input_handlers_seq_stop, | 948 | .stop = input_seq_stop, |
| 918 | .show = input_handlers_seq_show, | 949 | .show = input_handlers_seq_show, |
| 919 | }; | 950 | }; |
| 920 | 951 | ||
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index 4709e15af607..a6512372c7a3 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c | |||
| @@ -574,11 +574,22 @@ static void atkbd_event_work(struct work_struct *work) | |||
| 574 | 574 | ||
| 575 | mutex_lock(&atkbd->event_mutex); | 575 | mutex_lock(&atkbd->event_mutex); |
| 576 | 576 | ||
| 577 | if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) | 577 | if (!atkbd->enabled) { |
| 578 | atkbd_set_leds(atkbd); | 578 | /* |
| 579 | * Serio ports are resumed asynchronously so while driver core | ||
| 580 | * thinks that device is already fully operational in reality | ||
| 581 | * it may not be ready yet. In this case we need to keep | ||
| 582 | * rescheduling till reconnect completes. | ||
| 583 | */ | ||
| 584 | schedule_delayed_work(&atkbd->event_work, | ||
| 585 | msecs_to_jiffies(100)); | ||
| 586 | } else { | ||
| 587 | if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) | ||
| 588 | atkbd_set_leds(atkbd); | ||
| 579 | 589 | ||
| 580 | if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask)) | 590 | if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask)) |
| 581 | atkbd_set_repeat_rate(atkbd); | 591 | atkbd_set_repeat_rate(atkbd); |
| 592 | } | ||
| 582 | 593 | ||
| 583 | mutex_unlock(&atkbd->event_mutex); | 594 | mutex_unlock(&atkbd->event_mutex); |
| 584 | } | 595 | } |
| @@ -770,6 +781,30 @@ static int atkbd_select_set(struct atkbd *atkbd, int target_set, int allow_extra | |||
| 770 | return 3; | 781 | return 3; |
| 771 | } | 782 | } |
| 772 | 783 | ||
| 784 | static int atkbd_reset_state(struct atkbd *atkbd) | ||
| 785 | { | ||
| 786 | struct ps2dev *ps2dev = &atkbd->ps2dev; | ||
| 787 | unsigned char param[1]; | ||
| 788 | |||
| 789 | /* | ||
| 790 | * Set the LEDs to a predefined state (all off). | ||
| 791 | */ | ||
| 792 | |||
| 793 | param[0] = 0; | ||
| 794 | if (ps2_command(ps2dev, param, ATKBD_CMD_SETLEDS)) | ||
| 795 | return -1; | ||
| 796 | |||
| 797 | /* | ||
| 798 | * Set autorepeat to fastest possible. | ||
| 799 | */ | ||
| 800 | |||
| 801 | param[0] = 0; | ||
| 802 | if (ps2_command(ps2dev, param, ATKBD_CMD_SETREP)) | ||
| 803 | return -1; | ||
| 804 | |||
| 805 | return 0; | ||
| 806 | } | ||
| 807 | |||
| 773 | static int atkbd_activate(struct atkbd *atkbd) | 808 | static int atkbd_activate(struct atkbd *atkbd) |
| 774 | { | 809 | { |
| 775 | struct ps2dev *ps2dev = &atkbd->ps2dev; | 810 | struct ps2dev *ps2dev = &atkbd->ps2dev; |
| @@ -852,29 +887,6 @@ static unsigned int atkbd_hp_forced_release_keys[] = { | |||
| 852 | }; | 887 | }; |
| 853 | 888 | ||
| 854 | /* | 889 | /* |
| 855 | * Inventec system with broken key release on volume keys | ||
| 856 | */ | ||
| 857 | static unsigned int atkbd_inventec_forced_release_keys[] = { | ||
| 858 | 0xae, 0xb0, -1U | ||
| 859 | }; | ||
| 860 | |||
| 861 | /* | ||
| 862 | * Perform fixup for HP Pavilion ZV6100 laptop that doesn't generate release | ||
| 863 | * for its volume buttons | ||
| 864 | */ | ||
| 865 | static unsigned int atkbd_hp_zv6100_forced_release_keys[] = { | ||
| 866 | 0xae, 0xb0, -1U | ||
| 867 | }; | ||
| 868 | |||
| 869 | /* | ||
| 870 | * Perform fixup for HP (Compaq) Presario R4000 R4100 R4200 that don't generate | ||
| 871 | * release for their volume buttons | ||
| 872 | */ | ||
| 873 | static unsigned int atkbd_hp_r4000_forced_release_keys[] = { | ||
| 874 | 0xae, 0xb0, -1U | ||
| 875 | }; | ||
| 876 | |||
| 877 | /* | ||
| 878 | * Samsung NC10,NC20 with Fn+F? key release not working | 890 | * Samsung NC10,NC20 with Fn+F? key release not working |
| 879 | */ | 891 | */ |
| 880 | static unsigned int atkbd_samsung_forced_release_keys[] = { | 892 | static unsigned int atkbd_samsung_forced_release_keys[] = { |
| @@ -882,14 +894,6 @@ static unsigned int atkbd_samsung_forced_release_keys[] = { | |||
| 882 | }; | 894 | }; |
| 883 | 895 | ||
| 884 | /* | 896 | /* |
| 885 | * The volume up and volume down special keys on a Fujitsu Amilo PA 1510 laptop | ||
| 886 | * do not generate release events so we have to do it ourselves. | ||
| 887 | */ | ||
| 888 | static unsigned int atkbd_amilo_pa1510_forced_release_keys[] = { | ||
| 889 | 0xb0, 0xae, -1U | ||
| 890 | }; | ||
| 891 | |||
| 892 | /* | ||
| 893 | * Amilo Pi 3525 key release for Fn+Volume keys not working | 897 | * Amilo Pi 3525 key release for Fn+Volume keys not working |
| 894 | */ | 898 | */ |
| 895 | static unsigned int atkbd_amilo_pi3525_forced_release_keys[] = { | 899 | static unsigned int atkbd_amilo_pi3525_forced_release_keys[] = { |
| @@ -911,6 +915,14 @@ static unsigned int atkdb_soltech_ta12_forced_release_keys[] = { | |||
| 911 | }; | 915 | }; |
| 912 | 916 | ||
| 913 | /* | 917 | /* |
| 918 | * Many notebooks don't send key release event for volume up/down | ||
| 919 | * keys, with key list below common among them | ||
| 920 | */ | ||
| 921 | static unsigned int atkbd_volume_forced_release_keys[] = { | ||
| 922 | 0xae, 0xb0, -1U | ||
| 923 | }; | ||
| 924 | |||
| 925 | /* | ||
| 914 | * atkbd_set_keycode_table() initializes keyboard's keycode table | 926 | * atkbd_set_keycode_table() initializes keyboard's keycode table |
| 915 | * according to the selected scancode set | 927 | * according to the selected scancode set |
| 916 | */ | 928 | */ |
| @@ -1087,6 +1099,7 @@ static int atkbd_connect(struct serio *serio, struct serio_driver *drv) | |||
| 1087 | } | 1099 | } |
| 1088 | 1100 | ||
| 1089 | atkbd->set = atkbd_select_set(atkbd, atkbd_set, atkbd_extra); | 1101 | atkbd->set = atkbd_select_set(atkbd, atkbd_set, atkbd_extra); |
| 1102 | atkbd_reset_state(atkbd); | ||
| 1090 | atkbd_activate(atkbd); | 1103 | atkbd_activate(atkbd); |
| 1091 | 1104 | ||
| 1092 | } else { | 1105 | } else { |
| @@ -1267,6 +1280,7 @@ static ssize_t atkbd_set_extra(struct atkbd *atkbd, const char *buf, size_t coun | |||
| 1267 | 1280 | ||
| 1268 | atkbd->dev = new_dev; | 1281 | atkbd->dev = new_dev; |
| 1269 | atkbd->set = atkbd_select_set(atkbd, atkbd->set, value); | 1282 | atkbd->set = atkbd_select_set(atkbd, atkbd->set, value); |
| 1283 | atkbd_reset_state(atkbd); | ||
| 1270 | atkbd_activate(atkbd); | 1284 | atkbd_activate(atkbd); |
| 1271 | atkbd_set_keycode_table(atkbd); | 1285 | atkbd_set_keycode_table(atkbd); |
| 1272 | atkbd_set_device_attrs(atkbd); | 1286 | atkbd_set_device_attrs(atkbd); |
| @@ -1548,7 +1562,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
| 1548 | DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion ZV6100"), | 1562 | DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion ZV6100"), |
| 1549 | }, | 1563 | }, |
| 1550 | .callback = atkbd_setup_forced_release, | 1564 | .callback = atkbd_setup_forced_release, |
| 1551 | .driver_data = atkbd_hp_zv6100_forced_release_keys, | 1565 | .driver_data = atkbd_volume_forced_release_keys, |
| 1552 | }, | 1566 | }, |
| 1553 | { | 1567 | { |
| 1554 | .ident = "HP Presario R4000", | 1568 | .ident = "HP Presario R4000", |
| @@ -1557,7 +1571,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
| 1557 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4000"), | 1571 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4000"), |
| 1558 | }, | 1572 | }, |
| 1559 | .callback = atkbd_setup_forced_release, | 1573 | .callback = atkbd_setup_forced_release, |
| 1560 | .driver_data = atkbd_hp_r4000_forced_release_keys, | 1574 | .driver_data = atkbd_volume_forced_release_keys, |
| 1561 | }, | 1575 | }, |
| 1562 | { | 1576 | { |
| 1563 | .ident = "HP Presario R4100", | 1577 | .ident = "HP Presario R4100", |
| @@ -1566,7 +1580,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
| 1566 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4100"), | 1580 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4100"), |
| 1567 | }, | 1581 | }, |
| 1568 | .callback = atkbd_setup_forced_release, | 1582 | .callback = atkbd_setup_forced_release, |
| 1569 | .driver_data = atkbd_hp_r4000_forced_release_keys, | 1583 | .driver_data = atkbd_volume_forced_release_keys, |
| 1570 | }, | 1584 | }, |
| 1571 | { | 1585 | { |
| 1572 | .ident = "HP Presario R4200", | 1586 | .ident = "HP Presario R4200", |
| @@ -1575,7 +1589,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
| 1575 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4200"), | 1589 | DMI_MATCH(DMI_PRODUCT_NAME, "Presario R4200"), |
| 1576 | }, | 1590 | }, |
| 1577 | .callback = atkbd_setup_forced_release, | 1591 | .callback = atkbd_setup_forced_release, |
| 1578 | .driver_data = atkbd_hp_r4000_forced_release_keys, | 1592 | .driver_data = atkbd_volume_forced_release_keys, |
| 1579 | }, | 1593 | }, |
| 1580 | { | 1594 | { |
| 1581 | .ident = "Inventec Symphony", | 1595 | .ident = "Inventec Symphony", |
| @@ -1584,7 +1598,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
| 1584 | DMI_MATCH(DMI_PRODUCT_NAME, "SYMPHONY 6.0/7.0"), | 1598 | DMI_MATCH(DMI_PRODUCT_NAME, "SYMPHONY 6.0/7.0"), |
| 1585 | }, | 1599 | }, |
| 1586 | .callback = atkbd_setup_forced_release, | 1600 | .callback = atkbd_setup_forced_release, |
| 1587 | .driver_data = atkbd_inventec_forced_release_keys, | 1601 | .driver_data = atkbd_volume_forced_release_keys, |
| 1588 | }, | 1602 | }, |
| 1589 | { | 1603 | { |
| 1590 | .ident = "Samsung NC10", | 1604 | .ident = "Samsung NC10", |
| @@ -1620,7 +1634,7 @@ static struct dmi_system_id atkbd_dmi_quirk_table[] __initdata = { | |||
| 1620 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pa 1510"), | 1634 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pa 1510"), |
| 1621 | }, | 1635 | }, |
| 1622 | .callback = atkbd_setup_forced_release, | 1636 | .callback = atkbd_setup_forced_release, |
| 1623 | .driver_data = atkbd_amilo_pa1510_forced_release_keys, | 1637 | .driver_data = atkbd_volume_forced_release_keys, |
| 1624 | }, | 1638 | }, |
| 1625 | { | 1639 | { |
| 1626 | .ident = "Fujitsu Amilo Pi 3525", | 1640 | .ident = "Fujitsu Amilo Pi 3525", |
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index 216a559f55ea..ea821b546969 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c | |||
| @@ -209,7 +209,7 @@ static inline int hp_sdc_rtc_read_rt(struct timeval *res) { | |||
| 209 | 209 | ||
| 210 | /* Read the i8042 fast handshake timer */ | 210 | /* Read the i8042 fast handshake timer */ |
| 211 | static inline int hp_sdc_rtc_read_fhs(struct timeval *res) { | 211 | static inline int hp_sdc_rtc_read_fhs(struct timeval *res) { |
| 212 | uint64_t raw; | 212 | int64_t raw; |
| 213 | unsigned int tenms; | 213 | unsigned int tenms; |
| 214 | 214 | ||
| 215 | raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_FHS, 2); | 215 | raw = hp_sdc_rtc_read_i8042timer(HP_SDC_CMD_LOAD_FHS, 2); |
diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index de745d751162..ab5dc5f5fd83 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c | |||
| @@ -219,7 +219,7 @@ static const struct ps2pp_info *get_model_info(unsigned char model) | |||
| 219 | PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | | 219 | PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | |
| 220 | PS2PP_EXTRA_BTN | PS2PP_NAV_BTN | PS2PP_HWHEEL }, | 220 | PS2PP_EXTRA_BTN | PS2PP_NAV_BTN | PS2PP_HWHEEL }, |
| 221 | { 72, PS2PP_KIND_TRACKMAN, 0 }, /* T-CH11: TrackMan Marble */ | 221 | { 72, PS2PP_KIND_TRACKMAN, 0 }, /* T-CH11: TrackMan Marble */ |
| 222 | { 73, 0, PS2PP_SIDE_BTN }, | 222 | { 73, PS2PP_KIND_TRACKMAN, PS2PP_SIDE_BTN }, /* TrackMan FX */ |
| 223 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 223 | { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
| 224 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, | 224 | { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, |
| 225 | { 79, PS2PP_KIND_TRACKMAN, PS2PP_WHEEL }, /* TrackMan with wheel */ | 225 | { 79, PS2PP_KIND_TRACKMAN, PS2PP_WHEEL }, /* TrackMan with wheel */ |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index b66ff1ac7dea..f4a61252bcc9 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
| @@ -652,6 +652,16 @@ static const struct dmi_system_id toshiba_dmi_table[] = { | |||
| 652 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 652 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
| 653 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"), | 653 | DMI_MATCH(DMI_PRODUCT_NAME, "PORTEGE M300"), |
| 654 | }, | 654 | }, |
| 655 | |||
| 656 | }, | ||
| 657 | { | ||
| 658 | .ident = "Toshiba Portege M300", | ||
| 659 | .matches = { | ||
| 660 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
| 661 | DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"), | ||
| 662 | DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"), | ||
| 663 | }, | ||
| 664 | |||
| 655 | }, | 665 | }, |
| 656 | { } | 666 | { } |
| 657 | }; | 667 | }; |
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index a39bc4eb902b..a537925f7651 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
| @@ -327,6 +327,17 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
| 327 | }, | 327 | }, |
| 328 | }, | 328 | }, |
| 329 | { | 329 | { |
| 330 | /* | ||
| 331 | * Reset and GET ID commands issued via KBD port are | ||
| 332 | * sometimes being delivered to AUX3. | ||
| 333 | */ | ||
| 334 | .ident = "Sony Vaio FZ-240E", | ||
| 335 | .matches = { | ||
| 336 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), | ||
| 337 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"), | ||
| 338 | }, | ||
| 339 | }, | ||
| 340 | { | ||
| 330 | .ident = "Amoi M636/A737", | 341 | .ident = "Amoi M636/A737", |
| 331 | .matches = { | 342 | .matches = { |
| 332 | DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), | 343 | DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), |
| @@ -661,7 +672,7 @@ static void i8042_pnp_exit(void) | |||
| 661 | static int __init i8042_pnp_init(void) | 672 | static int __init i8042_pnp_init(void) |
| 662 | { | 673 | { |
| 663 | char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 }; | 674 | char kbd_irq_str[4] = { 0 }, aux_irq_str[4] = { 0 }; |
| 664 | int pnp_data_busted = false; | 675 | bool pnp_data_busted = false; |
| 665 | int err; | 676 | int err; |
| 666 | 677 | ||
| 667 | #ifdef CONFIG_X86 | 678 | #ifdef CONFIG_X86 |
diff --git a/drivers/md/dm-exception-store.c b/drivers/md/dm-exception-store.c index 556acff3952f..7dbe652efb5a 100644 --- a/drivers/md/dm-exception-store.c +++ b/drivers/md/dm-exception-store.c | |||
| @@ -138,16 +138,6 @@ int dm_exception_store_type_unregister(struct dm_exception_store_type *type) | |||
| 138 | } | 138 | } |
| 139 | EXPORT_SYMBOL(dm_exception_store_type_unregister); | 139 | EXPORT_SYMBOL(dm_exception_store_type_unregister); |
| 140 | 140 | ||
| 141 | /* | ||
| 142 | * Round a number up to the nearest 'size' boundary. size must | ||
| 143 | * be a power of 2. | ||
| 144 | */ | ||
| 145 | static ulong round_up(ulong n, ulong size) | ||
| 146 | { | ||
| 147 | size--; | ||
| 148 | return (n + size) & ~size; | ||
| 149 | } | ||
| 150 | |||
| 151 | static int set_chunk_size(struct dm_exception_store *store, | 141 | static int set_chunk_size(struct dm_exception_store *store, |
| 152 | const char *chunk_size_arg, char **error) | 142 | const char *chunk_size_arg, char **error) |
| 153 | { | 143 | { |
| @@ -155,7 +145,8 @@ static int set_chunk_size(struct dm_exception_store *store, | |||
| 155 | char *value; | 145 | char *value; |
| 156 | 146 | ||
| 157 | chunk_size_ulong = simple_strtoul(chunk_size_arg, &value, 10); | 147 | chunk_size_ulong = simple_strtoul(chunk_size_arg, &value, 10); |
| 158 | if (*chunk_size_arg == '\0' || *value != '\0') { | 148 | if (*chunk_size_arg == '\0' || *value != '\0' || |
| 149 | chunk_size_ulong > UINT_MAX) { | ||
| 159 | *error = "Invalid chunk size"; | 150 | *error = "Invalid chunk size"; |
| 160 | return -EINVAL; | 151 | return -EINVAL; |
| 161 | } | 152 | } |
| @@ -165,40 +156,35 @@ static int set_chunk_size(struct dm_exception_store *store, | |||
| 165 | return 0; | 156 | return 0; |
| 166 | } | 157 | } |
| 167 | 158 | ||
| 168 | /* | 159 | return dm_exception_store_set_chunk_size(store, |
| 169 | * Chunk size must be multiple of page size. Silently | 160 | (unsigned) chunk_size_ulong, |
| 170 | * round up if it's not. | ||
| 171 | */ | ||
| 172 | chunk_size_ulong = round_up(chunk_size_ulong, PAGE_SIZE >> 9); | ||
| 173 | |||
| 174 | return dm_exception_store_set_chunk_size(store, chunk_size_ulong, | ||
| 175 | error); | 161 | error); |
| 176 | } | 162 | } |
| 177 | 163 | ||
| 178 | int dm_exception_store_set_chunk_size(struct dm_exception_store *store, | 164 | int dm_exception_store_set_chunk_size(struct dm_exception_store *store, |
| 179 | unsigned long chunk_size_ulong, | 165 | unsigned chunk_size, |
| 180 | char **error) | 166 | char **error) |
| 181 | { | 167 | { |
| 182 | /* Check chunk_size is a power of 2 */ | 168 | /* Check chunk_size is a power of 2 */ |
| 183 | if (!is_power_of_2(chunk_size_ulong)) { | 169 | if (!is_power_of_2(chunk_size)) { |
| 184 | *error = "Chunk size is not a power of 2"; | 170 | *error = "Chunk size is not a power of 2"; |
| 185 | return -EINVAL; | 171 | return -EINVAL; |
| 186 | } | 172 | } |
| 187 | 173 | ||
| 188 | /* Validate the chunk size against the device block size */ | 174 | /* Validate the chunk size against the device block size */ |
| 189 | if (chunk_size_ulong % (bdev_logical_block_size(store->cow->bdev) >> 9)) { | 175 | if (chunk_size % (bdev_logical_block_size(store->cow->bdev) >> 9)) { |
| 190 | *error = "Chunk size is not a multiple of device blocksize"; | 176 | *error = "Chunk size is not a multiple of device blocksize"; |
| 191 | return -EINVAL; | 177 | return -EINVAL; |
| 192 | } | 178 | } |
| 193 | 179 | ||
| 194 | if (chunk_size_ulong > INT_MAX >> SECTOR_SHIFT) { | 180 | if (chunk_size > INT_MAX >> SECTOR_SHIFT) { |
| 195 | *error = "Chunk size is too high"; | 181 | *error = "Chunk size is too high"; |
| 196 | return -EINVAL; | 182 | return -EINVAL; |
| 197 | } | 183 | } |
| 198 | 184 | ||
| 199 | store->chunk_size = chunk_size_ulong; | 185 | store->chunk_size = chunk_size; |
| 200 | store->chunk_mask = chunk_size_ulong - 1; | 186 | store->chunk_mask = chunk_size - 1; |
| 201 | store->chunk_shift = ffs(chunk_size_ulong) - 1; | 187 | store->chunk_shift = ffs(chunk_size) - 1; |
| 202 | 188 | ||
| 203 | return 0; | 189 | return 0; |
| 204 | } | 190 | } |
| @@ -251,7 +237,7 @@ int dm_exception_store_create(struct dm_target *ti, int argc, char **argv, | |||
| 251 | 237 | ||
| 252 | r = set_chunk_size(tmp_store, argv[2], &ti->error); | 238 | r = set_chunk_size(tmp_store, argv[2], &ti->error); |
| 253 | if (r) | 239 | if (r) |
| 254 | goto bad_cow; | 240 | goto bad_ctr; |
| 255 | 241 | ||
| 256 | r = type->ctr(tmp_store, 0, NULL); | 242 | r = type->ctr(tmp_store, 0, NULL); |
| 257 | if (r) { | 243 | if (r) { |
diff --git a/drivers/md/dm-exception-store.h b/drivers/md/dm-exception-store.h index 812c71872ba0..8a223a48802c 100644 --- a/drivers/md/dm-exception-store.h +++ b/drivers/md/dm-exception-store.h | |||
| @@ -101,9 +101,9 @@ struct dm_exception_store { | |||
| 101 | struct dm_dev *cow; | 101 | struct dm_dev *cow; |
| 102 | 102 | ||
| 103 | /* Size of data blocks saved - must be a power of 2 */ | 103 | /* Size of data blocks saved - must be a power of 2 */ |
| 104 | chunk_t chunk_size; | 104 | unsigned chunk_size; |
| 105 | chunk_t chunk_mask; | 105 | unsigned chunk_mask; |
| 106 | chunk_t chunk_shift; | 106 | unsigned chunk_shift; |
| 107 | 107 | ||
| 108 | void *context; | 108 | void *context; |
| 109 | }; | 109 | }; |
| @@ -169,7 +169,7 @@ int dm_exception_store_type_register(struct dm_exception_store_type *type); | |||
| 169 | int dm_exception_store_type_unregister(struct dm_exception_store_type *type); | 169 | int dm_exception_store_type_unregister(struct dm_exception_store_type *type); |
| 170 | 170 | ||
| 171 | int dm_exception_store_set_chunk_size(struct dm_exception_store *store, | 171 | int dm_exception_store_set_chunk_size(struct dm_exception_store *store, |
| 172 | unsigned long chunk_size_ulong, | 172 | unsigned chunk_size, |
| 173 | char **error); | 173 | char **error); |
| 174 | 174 | ||
| 175 | int dm_exception_store_create(struct dm_target *ti, int argc, char **argv, | 175 | int dm_exception_store_create(struct dm_target *ti, int argc, char **argv, |
diff --git a/drivers/md/dm-log-userspace-base.c b/drivers/md/dm-log-userspace-base.c index 652bd33109e3..7ac2c1450d10 100644 --- a/drivers/md/dm-log-userspace-base.c +++ b/drivers/md/dm-log-userspace-base.c | |||
| @@ -156,7 +156,7 @@ static int userspace_ctr(struct dm_dirty_log *log, struct dm_target *ti, | |||
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | /* The ptr value is sufficient for local unique id */ | 158 | /* The ptr value is sufficient for local unique id */ |
| 159 | lc->luid = (uint64_t)lc; | 159 | lc->luid = (unsigned long)lc; |
| 160 | 160 | ||
| 161 | lc->ti = ti; | 161 | lc->ti = ti; |
| 162 | 162 | ||
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index d5b2e08750d5..0c746420c008 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c | |||
| @@ -284,12 +284,13 @@ static int read_header(struct pstore *ps, int *new_snapshot) | |||
| 284 | { | 284 | { |
| 285 | int r; | 285 | int r; |
| 286 | struct disk_header *dh; | 286 | struct disk_header *dh; |
| 287 | chunk_t chunk_size; | 287 | unsigned chunk_size; |
| 288 | int chunk_size_supplied = 1; | 288 | int chunk_size_supplied = 1; |
| 289 | char *chunk_err; | 289 | char *chunk_err; |
| 290 | 290 | ||
| 291 | /* | 291 | /* |
| 292 | * Use default chunk size (or hardsect_size, if larger) if none supplied | 292 | * Use default chunk size (or logical_block_size, if larger) |
| 293 | * if none supplied | ||
| 293 | */ | 294 | */ |
| 294 | if (!ps->store->chunk_size) { | 295 | if (!ps->store->chunk_size) { |
| 295 | ps->store->chunk_size = max(DM_CHUNK_SIZE_DEFAULT_SECTORS, | 296 | ps->store->chunk_size = max(DM_CHUNK_SIZE_DEFAULT_SECTORS, |
| @@ -334,10 +335,9 @@ static int read_header(struct pstore *ps, int *new_snapshot) | |||
| 334 | return 0; | 335 | return 0; |
| 335 | 336 | ||
| 336 | if (chunk_size_supplied) | 337 | if (chunk_size_supplied) |
| 337 | DMWARN("chunk size %llu in device metadata overrides " | 338 | DMWARN("chunk size %u in device metadata overrides " |
| 338 | "table chunk size of %llu.", | 339 | "table chunk size of %u.", |
| 339 | (unsigned long long)chunk_size, | 340 | chunk_size, ps->store->chunk_size); |
| 340 | (unsigned long long)ps->store->chunk_size); | ||
| 341 | 341 | ||
| 342 | /* We had a bogus chunk_size. Fix stuff up. */ | 342 | /* We had a bogus chunk_size. Fix stuff up. */ |
| 343 | free_area(ps); | 343 | free_area(ps); |
| @@ -345,8 +345,8 @@ static int read_header(struct pstore *ps, int *new_snapshot) | |||
| 345 | r = dm_exception_store_set_chunk_size(ps->store, chunk_size, | 345 | r = dm_exception_store_set_chunk_size(ps->store, chunk_size, |
| 346 | &chunk_err); | 346 | &chunk_err); |
| 347 | if (r) { | 347 | if (r) { |
| 348 | DMERR("invalid on-disk chunk size %llu: %s.", | 348 | DMERR("invalid on-disk chunk size %u: %s.", |
| 349 | (unsigned long long)chunk_size, chunk_err); | 349 | chunk_size, chunk_err); |
| 350 | return r; | 350 | return r; |
| 351 | } | 351 | } |
| 352 | 352 | ||
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 57f1bf7f3b7a..3a3ba46e6d4b 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
| @@ -296,6 +296,7 @@ static void __insert_origin(struct origin *o) | |||
| 296 | */ | 296 | */ |
| 297 | static int register_snapshot(struct dm_snapshot *snap) | 297 | static int register_snapshot(struct dm_snapshot *snap) |
| 298 | { | 298 | { |
| 299 | struct dm_snapshot *l; | ||
| 299 | struct origin *o, *new_o; | 300 | struct origin *o, *new_o; |
| 300 | struct block_device *bdev = snap->origin->bdev; | 301 | struct block_device *bdev = snap->origin->bdev; |
| 301 | 302 | ||
| @@ -319,7 +320,11 @@ static int register_snapshot(struct dm_snapshot *snap) | |||
| 319 | __insert_origin(o); | 320 | __insert_origin(o); |
| 320 | } | 321 | } |
| 321 | 322 | ||
| 322 | list_add_tail(&snap->list, &o->snapshots); | 323 | /* Sort the list according to chunk size, largest-first smallest-last */ |
| 324 | list_for_each_entry(l, &o->snapshots, list) | ||
| 325 | if (l->store->chunk_size < snap->store->chunk_size) | ||
| 326 | break; | ||
| 327 | list_add_tail(&snap->list, &l->list); | ||
| 323 | 328 | ||
| 324 | up_write(&_origins_lock); | 329 | up_write(&_origins_lock); |
| 325 | return 0; | 330 | return 0; |
| @@ -668,6 +673,11 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
| 668 | bio_list_init(&s->queued_bios); | 673 | bio_list_init(&s->queued_bios); |
| 669 | INIT_WORK(&s->queued_bios_work, flush_queued_bios); | 674 | INIT_WORK(&s->queued_bios_work, flush_queued_bios); |
| 670 | 675 | ||
| 676 | if (!s->store->chunk_size) { | ||
| 677 | ti->error = "Chunk size not set"; | ||
| 678 | goto bad_load_and_register; | ||
| 679 | } | ||
| 680 | |||
| 671 | /* Add snapshot to the list of snapshots for this origin */ | 681 | /* Add snapshot to the list of snapshots for this origin */ |
| 672 | /* Exceptions aren't triggered till snapshot_resume() is called */ | 682 | /* Exceptions aren't triggered till snapshot_resume() is called */ |
| 673 | if (register_snapshot(s)) { | 683 | if (register_snapshot(s)) { |
| @@ -951,7 +961,7 @@ static void start_copy(struct dm_snap_pending_exception *pe) | |||
| 951 | 961 | ||
| 952 | src.bdev = bdev; | 962 | src.bdev = bdev; |
| 953 | src.sector = chunk_to_sector(s->store, pe->e.old_chunk); | 963 | src.sector = chunk_to_sector(s->store, pe->e.old_chunk); |
| 954 | src.count = min(s->store->chunk_size, dev_size - src.sector); | 964 | src.count = min((sector_t)s->store->chunk_size, dev_size - src.sector); |
| 955 | 965 | ||
| 956 | dest.bdev = s->store->cow->bdev; | 966 | dest.bdev = s->store->cow->bdev; |
| 957 | dest.sector = chunk_to_sector(s->store, pe->e.new_chunk); | 967 | dest.sector = chunk_to_sector(s->store, pe->e.new_chunk); |
| @@ -1142,6 +1152,8 @@ static int snapshot_status(struct dm_target *ti, status_type_t type, | |||
| 1142 | unsigned sz = 0; | 1152 | unsigned sz = 0; |
| 1143 | struct dm_snapshot *snap = ti->private; | 1153 | struct dm_snapshot *snap = ti->private; |
| 1144 | 1154 | ||
| 1155 | down_write(&snap->lock); | ||
| 1156 | |||
| 1145 | switch (type) { | 1157 | switch (type) { |
| 1146 | case STATUSTYPE_INFO: | 1158 | case STATUSTYPE_INFO: |
| 1147 | if (!snap->valid) | 1159 | if (!snap->valid) |
| @@ -1173,6 +1185,8 @@ static int snapshot_status(struct dm_target *ti, status_type_t type, | |||
| 1173 | break; | 1185 | break; |
| 1174 | } | 1186 | } |
| 1175 | 1187 | ||
| 1188 | up_write(&snap->lock); | ||
| 1189 | |||
| 1176 | return 0; | 1190 | return 0; |
| 1177 | } | 1191 | } |
| 1178 | 1192 | ||
| @@ -1388,7 +1402,7 @@ static void origin_resume(struct dm_target *ti) | |||
| 1388 | struct dm_dev *dev = ti->private; | 1402 | struct dm_dev *dev = ti->private; |
| 1389 | struct dm_snapshot *snap; | 1403 | struct dm_snapshot *snap; |
| 1390 | struct origin *o; | 1404 | struct origin *o; |
| 1391 | chunk_t chunk_size = 0; | 1405 | unsigned chunk_size = 0; |
| 1392 | 1406 | ||
| 1393 | down_read(&_origins_lock); | 1407 | down_read(&_origins_lock); |
| 1394 | o = __lookup_origin(dev->bdev); | 1408 | o = __lookup_origin(dev->bdev); |
| @@ -1465,7 +1479,7 @@ static int __init dm_snapshot_init(void) | |||
| 1465 | r = dm_register_target(&snapshot_target); | 1479 | r = dm_register_target(&snapshot_target); |
| 1466 | if (r) { | 1480 | if (r) { |
| 1467 | DMERR("snapshot target register failed %d", r); | 1481 | DMERR("snapshot target register failed %d", r); |
| 1468 | return r; | 1482 | goto bad_register_snapshot_target; |
| 1469 | } | 1483 | } |
| 1470 | 1484 | ||
| 1471 | r = dm_register_target(&origin_target); | 1485 | r = dm_register_target(&origin_target); |
| @@ -1522,6 +1536,9 @@ bad2: | |||
| 1522 | dm_unregister_target(&origin_target); | 1536 | dm_unregister_target(&origin_target); |
| 1523 | bad1: | 1537 | bad1: |
| 1524 | dm_unregister_target(&snapshot_target); | 1538 | dm_unregister_target(&snapshot_target); |
| 1539 | |||
| 1540 | bad_register_snapshot_target: | ||
| 1541 | dm_exception_store_exit(); | ||
| 1525 | return r; | 1542 | return r; |
| 1526 | } | 1543 | } |
| 1527 | 1544 | ||
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 376f1ab48a24..724efc63904d 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
| @@ -47,6 +47,7 @@ struct dm_io { | |||
| 47 | atomic_t io_count; | 47 | atomic_t io_count; |
| 48 | struct bio *bio; | 48 | struct bio *bio; |
| 49 | unsigned long start_time; | 49 | unsigned long start_time; |
| 50 | spinlock_t endio_lock; | ||
| 50 | }; | 51 | }; |
| 51 | 52 | ||
| 52 | /* | 53 | /* |
| @@ -578,8 +579,12 @@ static void dec_pending(struct dm_io *io, int error) | |||
| 578 | struct mapped_device *md = io->md; | 579 | struct mapped_device *md = io->md; |
| 579 | 580 | ||
| 580 | /* Push-back supersedes any I/O errors */ | 581 | /* Push-back supersedes any I/O errors */ |
| 581 | if (error && !(io->error > 0 && __noflush_suspending(md))) | 582 | if (unlikely(error)) { |
| 582 | io->error = error; | 583 | spin_lock_irqsave(&io->endio_lock, flags); |
| 584 | if (!(io->error > 0 && __noflush_suspending(md))) | ||
| 585 | io->error = error; | ||
| 586 | spin_unlock_irqrestore(&io->endio_lock, flags); | ||
| 587 | } | ||
| 583 | 588 | ||
| 584 | if (atomic_dec_and_test(&io->io_count)) { | 589 | if (atomic_dec_and_test(&io->io_count)) { |
| 585 | if (io->error == DM_ENDIO_REQUEUE) { | 590 | if (io->error == DM_ENDIO_REQUEUE) { |
| @@ -1226,6 +1231,7 @@ static void __split_and_process_bio(struct mapped_device *md, struct bio *bio) | |||
| 1226 | atomic_set(&ci.io->io_count, 1); | 1231 | atomic_set(&ci.io->io_count, 1); |
| 1227 | ci.io->bio = bio; | 1232 | ci.io->bio = bio; |
| 1228 | ci.io->md = md; | 1233 | ci.io->md = md; |
| 1234 | spin_lock_init(&ci.io->endio_lock); | ||
| 1229 | ci.sector = bio->bi_sector; | 1235 | ci.sector = bio->bi_sector; |
| 1230 | ci.sector_count = bio_sectors(bio); | 1236 | ci.sector_count = bio_sectors(bio); |
| 1231 | if (unlikely(bio_empty_barrier(bio))) | 1237 | if (unlikely(bio_empty_barrier(bio))) |
| @@ -1822,6 +1828,7 @@ static struct mapped_device *alloc_dev(int minor) | |||
| 1822 | bad_bdev: | 1828 | bad_bdev: |
| 1823 | destroy_workqueue(md->wq); | 1829 | destroy_workqueue(md->wq); |
| 1824 | bad_thread: | 1830 | bad_thread: |
| 1831 | del_gendisk(md->disk); | ||
| 1825 | put_disk(md->disk); | 1832 | put_disk(md->disk); |
| 1826 | bad_disk: | 1833 | bad_disk: |
| 1827 | blk_cleanup_queue(md->queue); | 1834 | blk_cleanup_queue(md->queue); |
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index e556d42cc45a..63924e0c7ea9 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c | |||
| @@ -72,7 +72,6 @@ | |||
| 72 | #include <asm/irq.h> | 72 | #include <asm/irq.h> |
| 73 | #include <asm/gpio.h> | 73 | #include <asm/gpio.h> |
| 74 | 74 | ||
| 75 | #include <asm/mach/mmc.h> | ||
| 76 | #include <mach/board.h> | 75 | #include <mach/board.h> |
| 77 | #include <mach/cpu.h> | 76 | #include <mach/cpu.h> |
| 78 | #include <mach/at91_mci.h> | 77 | #include <mach/at91_mci.h> |
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 4487cc097911..0aecaaebef3d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
| @@ -2013,7 +2013,7 @@ static struct platform_driver omap_hsmmc_driver = { | |||
| 2013 | static int __init omap_hsmmc_init(void) | 2013 | static int __init omap_hsmmc_init(void) |
| 2014 | { | 2014 | { |
| 2015 | /* Register the MMC driver */ | 2015 | /* Register the MMC driver */ |
| 2016 | return platform_driver_register(&omap_hsmmc_driver); | 2016 | return platform_driver_probe(&omap_hsmmc_driver, omap_hsmmc_probe); |
| 2017 | } | 2017 | } |
| 2018 | 2018 | ||
| 2019 | static void __exit omap_hsmmc_cleanup(void) | 2019 | static void __exit omap_hsmmc_cleanup(void) |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 89876ade5e33..28a0eda92680 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
| @@ -243,15 +243,26 @@ static int be_POST_stage_get(struct be_adapter *adapter, u16 *stage) | |||
| 243 | 243 | ||
| 244 | int be_cmd_POST(struct be_adapter *adapter) | 244 | int be_cmd_POST(struct be_adapter *adapter) |
| 245 | { | 245 | { |
| 246 | u16 stage, error; | 246 | u16 stage; |
| 247 | int status, timeout = 0; | ||
| 247 | 248 | ||
| 248 | error = be_POST_stage_get(adapter, &stage); | 249 | do { |
| 249 | if (error || stage != POST_STAGE_ARMFW_RDY) { | 250 | status = be_POST_stage_get(adapter, &stage); |
| 250 | dev_err(&adapter->pdev->dev, "POST failed.\n"); | 251 | if (status) { |
| 251 | return -1; | 252 | dev_err(&adapter->pdev->dev, "POST error; stage=0x%x\n", |
| 252 | } | 253 | stage); |
| 254 | return -1; | ||
| 255 | } else if (stage != POST_STAGE_ARMFW_RDY) { | ||
| 256 | set_current_state(TASK_INTERRUPTIBLE); | ||
| 257 | schedule_timeout(2 * HZ); | ||
| 258 | timeout += 2; | ||
| 259 | } else { | ||
| 260 | return 0; | ||
| 261 | } | ||
| 262 | } while (timeout < 20); | ||
| 253 | 263 | ||
| 254 | return 0; | 264 | dev_err(&adapter->pdev->dev, "POST timeout; stage=0x%x\n", stage); |
| 265 | return -1; | ||
| 255 | } | 266 | } |
| 256 | 267 | ||
| 257 | static inline void *embedded_payload(struct be_mcc_wrb *wrb) | 268 | static inline void *embedded_payload(struct be_mcc_wrb *wrb) |
| @@ -729,8 +740,8 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q, | |||
| 729 | /* Create an rx filtering policy configuration on an i/f | 740 | /* Create an rx filtering policy configuration on an i/f |
| 730 | * Uses mbox | 741 | * Uses mbox |
| 731 | */ | 742 | */ |
| 732 | int be_cmd_if_create(struct be_adapter *adapter, u32 flags, u8 *mac, | 743 | int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags, |
| 733 | bool pmac_invalid, u32 *if_handle, u32 *pmac_id) | 744 | u8 *mac, bool pmac_invalid, u32 *if_handle, u32 *pmac_id) |
| 734 | { | 745 | { |
| 735 | struct be_mcc_wrb *wrb; | 746 | struct be_mcc_wrb *wrb; |
| 736 | struct be_cmd_req_if_create *req; | 747 | struct be_cmd_req_if_create *req; |
| @@ -746,8 +757,8 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 flags, u8 *mac, | |||
| 746 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, | 757 | be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, |
| 747 | OPCODE_COMMON_NTWK_INTERFACE_CREATE, sizeof(*req)); | 758 | OPCODE_COMMON_NTWK_INTERFACE_CREATE, sizeof(*req)); |
| 748 | 759 | ||
| 749 | req->capability_flags = cpu_to_le32(flags); | 760 | req->capability_flags = cpu_to_le32(cap_flags); |
| 750 | req->enable_flags = cpu_to_le32(flags); | 761 | req->enable_flags = cpu_to_le32(en_flags); |
| 751 | req->pmac_invalid = pmac_invalid; | 762 | req->pmac_invalid = pmac_invalid; |
| 752 | if (!pmac_invalid) | 763 | if (!pmac_invalid) |
| 753 | memcpy(req->mac_addr, mac, ETH_ALEN); | 764 | memcpy(req->mac_addr, mac, ETH_ALEN); |
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h index a86f917f85f4..49953787e41c 100644 --- a/drivers/net/benet/be_cmds.h +++ b/drivers/net/benet/be_cmds.h | |||
| @@ -720,8 +720,9 @@ extern int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr, | |||
| 720 | extern int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr, | 720 | extern int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr, |
| 721 | u32 if_id, u32 *pmac_id); | 721 | u32 if_id, u32 *pmac_id); |
| 722 | extern int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, u32 pmac_id); | 722 | extern int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, u32 pmac_id); |
| 723 | extern int be_cmd_if_create(struct be_adapter *adapter, u32 if_flags, u8 *mac, | 723 | extern int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, |
| 724 | bool pmac_invalid, u32 *if_handle, u32 *pmac_id); | 724 | u32 en_flags, u8 *mac, bool pmac_invalid, |
| 725 | u32 *if_handle, u32 *pmac_id); | ||
| 725 | extern int be_cmd_if_destroy(struct be_adapter *adapter, u32 if_handle); | 726 | extern int be_cmd_if_destroy(struct be_adapter *adapter, u32 if_handle); |
| 726 | extern int be_cmd_eq_create(struct be_adapter *adapter, | 727 | extern int be_cmd_eq_create(struct be_adapter *adapter, |
| 727 | struct be_queue_info *eq, int eq_delay); | 728 | struct be_queue_info *eq, int eq_delay); |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 6d5e81f7046f..1f941f027718 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
| @@ -1620,19 +1620,22 @@ static int be_open(struct net_device *netdev) | |||
| 1620 | static int be_setup(struct be_adapter *adapter) | 1620 | static int be_setup(struct be_adapter *adapter) |
| 1621 | { | 1621 | { |
| 1622 | struct net_device *netdev = adapter->netdev; | 1622 | struct net_device *netdev = adapter->netdev; |
| 1623 | u32 if_flags; | 1623 | u32 cap_flags, en_flags; |
| 1624 | int status; | 1624 | int status; |
| 1625 | 1625 | ||
| 1626 | if_flags = BE_IF_FLAGS_BROADCAST | BE_IF_FLAGS_PROMISCUOUS | | 1626 | cap_flags = BE_IF_FLAGS_UNTAGGED | BE_IF_FLAGS_BROADCAST | |
| 1627 | BE_IF_FLAGS_MCAST_PROMISCUOUS | BE_IF_FLAGS_UNTAGGED | | 1627 | BE_IF_FLAGS_MCAST_PROMISCUOUS | |
| 1628 | BE_IF_FLAGS_PASS_L3L4_ERRORS; | 1628 | BE_IF_FLAGS_PROMISCUOUS | |
| 1629 | status = be_cmd_if_create(adapter, if_flags, netdev->dev_addr, | 1629 | BE_IF_FLAGS_PASS_L3L4_ERRORS; |
| 1630 | false/* pmac_invalid */, &adapter->if_handle, | 1630 | en_flags = BE_IF_FLAGS_UNTAGGED | BE_IF_FLAGS_BROADCAST | |
| 1631 | &adapter->pmac_id); | 1631 | BE_IF_FLAGS_PASS_L3L4_ERRORS; |
| 1632 | |||
| 1633 | status = be_cmd_if_create(adapter, cap_flags, en_flags, | ||
| 1634 | netdev->dev_addr, false/* pmac_invalid */, | ||
| 1635 | &adapter->if_handle, &adapter->pmac_id); | ||
| 1632 | if (status != 0) | 1636 | if (status != 0) |
| 1633 | goto do_none; | 1637 | goto do_none; |
| 1634 | 1638 | ||
| 1635 | |||
| 1636 | status = be_tx_queues_create(adapter); | 1639 | status = be_tx_queues_create(adapter); |
| 1637 | if (status != 0) | 1640 | if (status != 0) |
| 1638 | goto if_destroy; | 1641 | goto if_destroy; |
| @@ -2055,6 +2058,10 @@ static int be_hw_up(struct be_adapter *adapter) | |||
| 2055 | if (status) | 2058 | if (status) |
| 2056 | return status; | 2059 | return status; |
| 2057 | 2060 | ||
| 2061 | status = be_cmd_reset_function(adapter); | ||
| 2062 | if (status) | ||
| 2063 | return status; | ||
| 2064 | |||
| 2058 | status = be_cmd_get_fw_ver(adapter, adapter->fw_ver); | 2065 | status = be_cmd_get_fw_ver(adapter, adapter->fw_ver); |
| 2059 | if (status) | 2066 | if (status) |
| 2060 | return status; | 2067 | return status; |
| @@ -2108,10 +2115,6 @@ static int __devinit be_probe(struct pci_dev *pdev, | |||
| 2108 | if (status) | 2115 | if (status) |
| 2109 | goto free_netdev; | 2116 | goto free_netdev; |
| 2110 | 2117 | ||
| 2111 | status = be_cmd_reset_function(adapter); | ||
| 2112 | if (status) | ||
| 2113 | goto ctrl_clean; | ||
| 2114 | |||
| 2115 | status = be_stats_init(adapter); | 2118 | status = be_stats_init(adapter); |
| 2116 | if (status) | 2119 | if (status) |
| 2117 | goto ctrl_clean; | 2120 | goto ctrl_clean; |
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index 9c950bb5e90c..f7d9ac8324cb 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c | |||
| @@ -223,24 +223,25 @@ struct ethoc_bd { | |||
| 223 | u32 addr; | 223 | u32 addr; |
| 224 | }; | 224 | }; |
| 225 | 225 | ||
| 226 | static u32 ethoc_read(struct ethoc *dev, loff_t offset) | 226 | static inline u32 ethoc_read(struct ethoc *dev, loff_t offset) |
| 227 | { | 227 | { |
| 228 | return ioread32(dev->iobase + offset); | 228 | return ioread32(dev->iobase + offset); |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | static void ethoc_write(struct ethoc *dev, loff_t offset, u32 data) | 231 | static inline void ethoc_write(struct ethoc *dev, loff_t offset, u32 data) |
| 232 | { | 232 | { |
| 233 | iowrite32(data, dev->iobase + offset); | 233 | iowrite32(data, dev->iobase + offset); |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | static void ethoc_read_bd(struct ethoc *dev, int index, struct ethoc_bd *bd) | 236 | static inline void ethoc_read_bd(struct ethoc *dev, int index, |
| 237 | struct ethoc_bd *bd) | ||
| 237 | { | 238 | { |
| 238 | loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd)); | 239 | loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd)); |
| 239 | bd->stat = ethoc_read(dev, offset + 0); | 240 | bd->stat = ethoc_read(dev, offset + 0); |
| 240 | bd->addr = ethoc_read(dev, offset + 4); | 241 | bd->addr = ethoc_read(dev, offset + 4); |
| 241 | } | 242 | } |
| 242 | 243 | ||
| 243 | static void ethoc_write_bd(struct ethoc *dev, int index, | 244 | static inline void ethoc_write_bd(struct ethoc *dev, int index, |
| 244 | const struct ethoc_bd *bd) | 245 | const struct ethoc_bd *bd) |
| 245 | { | 246 | { |
| 246 | loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd)); | 247 | loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd)); |
| @@ -248,33 +249,33 @@ static void ethoc_write_bd(struct ethoc *dev, int index, | |||
| 248 | ethoc_write(dev, offset + 4, bd->addr); | 249 | ethoc_write(dev, offset + 4, bd->addr); |
| 249 | } | 250 | } |
| 250 | 251 | ||
| 251 | static void ethoc_enable_irq(struct ethoc *dev, u32 mask) | 252 | static inline void ethoc_enable_irq(struct ethoc *dev, u32 mask) |
| 252 | { | 253 | { |
| 253 | u32 imask = ethoc_read(dev, INT_MASK); | 254 | u32 imask = ethoc_read(dev, INT_MASK); |
| 254 | imask |= mask; | 255 | imask |= mask; |
| 255 | ethoc_write(dev, INT_MASK, imask); | 256 | ethoc_write(dev, INT_MASK, imask); |
| 256 | } | 257 | } |
| 257 | 258 | ||
| 258 | static void ethoc_disable_irq(struct ethoc *dev, u32 mask) | 259 | static inline void ethoc_disable_irq(struct ethoc *dev, u32 mask) |
| 259 | { | 260 | { |
| 260 | u32 imask = ethoc_read(dev, INT_MASK); | 261 | u32 imask = ethoc_read(dev, INT_MASK); |
| 261 | imask &= ~mask; | 262 | imask &= ~mask; |
| 262 | ethoc_write(dev, INT_MASK, imask); | 263 | ethoc_write(dev, INT_MASK, imask); |
| 263 | } | 264 | } |
| 264 | 265 | ||
| 265 | static void ethoc_ack_irq(struct ethoc *dev, u32 mask) | 266 | static inline void ethoc_ack_irq(struct ethoc *dev, u32 mask) |
| 266 | { | 267 | { |
| 267 | ethoc_write(dev, INT_SOURCE, mask); | 268 | ethoc_write(dev, INT_SOURCE, mask); |
| 268 | } | 269 | } |
| 269 | 270 | ||
| 270 | static void ethoc_enable_rx_and_tx(struct ethoc *dev) | 271 | static inline void ethoc_enable_rx_and_tx(struct ethoc *dev) |
| 271 | { | 272 | { |
| 272 | u32 mode = ethoc_read(dev, MODER); | 273 | u32 mode = ethoc_read(dev, MODER); |
| 273 | mode |= MODER_RXEN | MODER_TXEN; | 274 | mode |= MODER_RXEN | MODER_TXEN; |
| 274 | ethoc_write(dev, MODER, mode); | 275 | ethoc_write(dev, MODER, mode); |
| 275 | } | 276 | } |
| 276 | 277 | ||
| 277 | static void ethoc_disable_rx_and_tx(struct ethoc *dev) | 278 | static inline void ethoc_disable_rx_and_tx(struct ethoc *dev) |
| 278 | { | 279 | { |
| 279 | u32 mode = ethoc_read(dev, MODER); | 280 | u32 mode = ethoc_read(dev, MODER); |
| 280 | mode &= ~(MODER_RXEN | MODER_TXEN); | 281 | mode &= ~(MODER_RXEN | MODER_TXEN); |
| @@ -508,7 +509,7 @@ static irqreturn_t ethoc_interrupt(int irq, void *dev_id) | |||
| 508 | return IRQ_NONE; | 509 | return IRQ_NONE; |
| 509 | } | 510 | } |
| 510 | 511 | ||
| 511 | ethoc_ack_irq(priv, INT_MASK_ALL); | 512 | ethoc_ack_irq(priv, pending); |
| 512 | 513 | ||
| 513 | if (pending & INT_MASK_BUSY) { | 514 | if (pending & INT_MASK_BUSY) { |
| 514 | dev_err(&dev->dev, "packet dropped\n"); | 515 | dev_err(&dev->dev, "packet dropped\n"); |
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 29234380e6c6..16a1d58419d9 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c | |||
| @@ -1654,7 +1654,7 @@ static const struct net_device_ops fec_netdev_ops = { | |||
| 1654 | * | 1654 | * |
| 1655 | * index is only used in legacy code | 1655 | * index is only used in legacy code |
| 1656 | */ | 1656 | */ |
| 1657 | int __init fec_enet_init(struct net_device *dev, int index) | 1657 | static int fec_enet_init(struct net_device *dev, int index) |
| 1658 | { | 1658 | { |
| 1659 | struct fec_enet_private *fep = netdev_priv(dev); | 1659 | struct fec_enet_private *fep = netdev_priv(dev); |
| 1660 | struct bufdesc *cbd_base; | 1660 | struct bufdesc *cbd_base; |
diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c index 237835864357..a23f739d222f 100644 --- a/drivers/net/ks8851.c +++ b/drivers/net/ks8851.c | |||
| @@ -171,6 +171,36 @@ static void ks8851_wrreg16(struct ks8851_net *ks, unsigned reg, unsigned val) | |||
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | /** | 173 | /** |
| 174 | * ks8851_wrreg8 - write 8bit register value to chip | ||
| 175 | * @ks: The chip state | ||
| 176 | * @reg: The register address | ||
| 177 | * @val: The value to write | ||
| 178 | * | ||
| 179 | * Issue a write to put the value @val into the register specified in @reg. | ||
| 180 | */ | ||
| 181 | static void ks8851_wrreg8(struct ks8851_net *ks, unsigned reg, unsigned val) | ||
| 182 | { | ||
| 183 | struct spi_transfer *xfer = &ks->spi_xfer1; | ||
| 184 | struct spi_message *msg = &ks->spi_msg1; | ||
| 185 | __le16 txb[2]; | ||
| 186 | int ret; | ||
| 187 | int bit; | ||
| 188 | |||
| 189 | bit = 1 << (reg & 3); | ||
| 190 | |||
| 191 | txb[0] = cpu_to_le16(MK_OP(bit, reg) | KS_SPIOP_WR); | ||
| 192 | txb[1] = val; | ||
| 193 | |||
| 194 | xfer->tx_buf = txb; | ||
| 195 | xfer->rx_buf = NULL; | ||
| 196 | xfer->len = 3; | ||
| 197 | |||
| 198 | ret = spi_sync(ks->spidev, msg); | ||
| 199 | if (ret < 0) | ||
| 200 | ks_err(ks, "spi_sync() failed\n"); | ||
| 201 | } | ||
| 202 | |||
| 203 | /** | ||
| 174 | * ks8851_rx_1msg - select whether to use one or two messages for spi read | 204 | * ks8851_rx_1msg - select whether to use one or two messages for spi read |
| 175 | * @ks: The device structure | 205 | * @ks: The device structure |
| 176 | * | 206 | * |
| @@ -322,13 +352,12 @@ static void ks8851_soft_reset(struct ks8851_net *ks, unsigned op) | |||
| 322 | static int ks8851_write_mac_addr(struct net_device *dev) | 352 | static int ks8851_write_mac_addr(struct net_device *dev) |
| 323 | { | 353 | { |
| 324 | struct ks8851_net *ks = netdev_priv(dev); | 354 | struct ks8851_net *ks = netdev_priv(dev); |
| 325 | u16 *mcp = (u16 *)dev->dev_addr; | 355 | int i; |
| 326 | 356 | ||
| 327 | mutex_lock(&ks->lock); | 357 | mutex_lock(&ks->lock); |
| 328 | 358 | ||
| 329 | ks8851_wrreg16(ks, KS_MARL, mcp[0]); | 359 | for (i = 0; i < ETH_ALEN; i++) |
| 330 | ks8851_wrreg16(ks, KS_MARM, mcp[1]); | 360 | ks8851_wrreg8(ks, KS_MAR(i), dev->dev_addr[i]); |
| 331 | ks8851_wrreg16(ks, KS_MARH, mcp[2]); | ||
| 332 | 361 | ||
| 333 | mutex_unlock(&ks->lock); | 362 | mutex_unlock(&ks->lock); |
| 334 | 363 | ||
| @@ -951,7 +980,7 @@ static void ks8851_set_rx_mode(struct net_device *dev) | |||
| 951 | mcptr = mcptr->next; | 980 | mcptr = mcptr->next; |
| 952 | } | 981 | } |
| 953 | 982 | ||
| 954 | rxctrl.rxcr1 = RXCR1_RXME | RXCR1_RXAE | RXCR1_RXPAFMA; | 983 | rxctrl.rxcr1 = RXCR1_RXME | RXCR1_RXPAFMA; |
| 955 | } else { | 984 | } else { |
| 956 | /* just accept broadcast / unicast */ | 985 | /* just accept broadcast / unicast */ |
| 957 | rxctrl.rxcr1 = RXCR1_RXPAFMA; | 986 | rxctrl.rxcr1 = RXCR1_RXPAFMA; |
| @@ -1239,6 +1268,9 @@ static int __devinit ks8851_probe(struct spi_device *spi) | |||
| 1239 | ndev->netdev_ops = &ks8851_netdev_ops; | 1268 | ndev->netdev_ops = &ks8851_netdev_ops; |
| 1240 | ndev->irq = spi->irq; | 1269 | ndev->irq = spi->irq; |
| 1241 | 1270 | ||
| 1271 | /* issue a global soft reset to reset the device. */ | ||
| 1272 | ks8851_soft_reset(ks, GRR_GSR); | ||
| 1273 | |||
| 1242 | /* simple check for a valid chip being connected to the bus */ | 1274 | /* simple check for a valid chip being connected to the bus */ |
| 1243 | 1275 | ||
| 1244 | if ((ks8851_rdreg16(ks, KS_CIDER) & ~CIDER_REV_MASK) != CIDER_ID) { | 1276 | if ((ks8851_rdreg16(ks, KS_CIDER) & ~CIDER_REV_MASK) != CIDER_ID) { |
diff --git a/drivers/net/ks8851.h b/drivers/net/ks8851.h index 85abe147afbf..f52c312cc356 100644 --- a/drivers/net/ks8851.h +++ b/drivers/net/ks8851.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #define CCR_32PIN (1 << 0) | 16 | #define CCR_32PIN (1 << 0) |
| 17 | 17 | ||
| 18 | /* MAC address registers */ | 18 | /* MAC address registers */ |
| 19 | #define KS_MAR(_m) 0x15 - (_m) | ||
| 19 | #define KS_MARL 0x10 | 20 | #define KS_MARL 0x10 |
| 20 | #define KS_MARM 0x12 | 21 | #define KS_MARM 0x12 |
| 21 | #define KS_MARH 0x14 | 22 | #define KS_MARH 0x14 |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index f9364d0678f2..d6c7ac68f6ea 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
| @@ -3545,7 +3545,7 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np, | |||
| 3545 | rp->rcr_index = index; | 3545 | rp->rcr_index = index; |
| 3546 | 3546 | ||
| 3547 | skb_reserve(skb, NET_IP_ALIGN); | 3547 | skb_reserve(skb, NET_IP_ALIGN); |
| 3548 | __pskb_pull_tail(skb, min(len, NIU_RXPULL_MAX)); | 3548 | __pskb_pull_tail(skb, min(len, VLAN_ETH_HLEN)); |
| 3549 | 3549 | ||
| 3550 | rp->rx_packets++; | 3550 | rp->rx_packets++; |
| 3551 | rp->rx_bytes += skb->len; | 3551 | rp->rx_bytes += skb->len; |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 8d009760277c..3709d6af9abf 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
| @@ -22,7 +22,6 @@ | |||
| 22 | #include <linux/ethtool.h> | 22 | #include <linux/ethtool.h> |
| 23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
| 24 | #include <linux/virtio.h> | 24 | #include <linux/virtio.h> |
| 25 | #include <linux/virtio_ids.h> | ||
| 26 | #include <linux/virtio_net.h> | 25 | #include <linux/virtio_net.h> |
| 27 | #include <linux/scatterlist.h> | 26 | #include <linux/scatterlist.h> |
| 28 | #include <linux/if_vlan.h> | 27 | #include <linux/if_vlan.h> |
| @@ -454,7 +453,7 @@ static unsigned int free_old_xmit_skbs(struct virtnet_info *vi) | |||
| 454 | vi->dev->stats.tx_bytes += skb->len; | 453 | vi->dev->stats.tx_bytes += skb->len; |
| 455 | vi->dev->stats.tx_packets++; | 454 | vi->dev->stats.tx_packets++; |
| 456 | tot_sgs += skb_vnet_hdr(skb)->num_sg; | 455 | tot_sgs += skb_vnet_hdr(skb)->num_sg; |
| 457 | kfree_skb(skb); | 456 | dev_kfree_skb_any(skb); |
| 458 | } | 457 | } |
| 459 | return tot_sgs; | 458 | return tot_sgs; |
| 460 | } | 459 | } |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 6a16f76f277e..004353a46af0 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
| @@ -481,7 +481,8 @@ vmxnet3_rq_alloc_rx_buf(struct vmxnet3_rx_queue *rq, u32 ring_idx, | |||
| 481 | } | 481 | } |
| 482 | rq->uncommitted[ring_idx] += num_allocated; | 482 | rq->uncommitted[ring_idx] += num_allocated; |
| 483 | 483 | ||
| 484 | dprintk(KERN_ERR "alloc_rx_buf: %d allocated, next2fill %u, next2comp " | 484 | dev_dbg(&adapter->netdev->dev, |
| 485 | "alloc_rx_buf: %d allocated, next2fill %u, next2comp " | ||
| 485 | "%u, uncommited %u\n", num_allocated, ring->next2fill, | 486 | "%u, uncommited %u\n", num_allocated, ring->next2fill, |
| 486 | ring->next2comp, rq->uncommitted[ring_idx]); | 487 | ring->next2comp, rq->uncommitted[ring_idx]); |
| 487 | 488 | ||
| @@ -539,7 +540,8 @@ vmxnet3_map_pkt(struct sk_buff *skb, struct vmxnet3_tx_ctx *ctx, | |||
| 539 | tbi = tq->buf_info + tq->tx_ring.next2fill; | 540 | tbi = tq->buf_info + tq->tx_ring.next2fill; |
| 540 | tbi->map_type = VMXNET3_MAP_NONE; | 541 | tbi->map_type = VMXNET3_MAP_NONE; |
| 541 | 542 | ||
| 542 | dprintk(KERN_ERR "txd[%u]: 0x%Lx 0x%x 0x%x\n", | 543 | dev_dbg(&adapter->netdev->dev, |
| 544 | "txd[%u]: 0x%Lx 0x%x 0x%x\n", | ||
| 543 | tq->tx_ring.next2fill, ctx->sop_txd->txd.addr, | 545 | tq->tx_ring.next2fill, ctx->sop_txd->txd.addr, |
| 544 | ctx->sop_txd->dword[2], ctx->sop_txd->dword[3]); | 546 | ctx->sop_txd->dword[2], ctx->sop_txd->dword[3]); |
| 545 | vmxnet3_cmd_ring_adv_next2fill(&tq->tx_ring); | 547 | vmxnet3_cmd_ring_adv_next2fill(&tq->tx_ring); |
| @@ -572,7 +574,8 @@ vmxnet3_map_pkt(struct sk_buff *skb, struct vmxnet3_tx_ctx *ctx, | |||
| 572 | gdesc->dword[2] = dw2 | buf_size; | 574 | gdesc->dword[2] = dw2 | buf_size; |
| 573 | gdesc->dword[3] = 0; | 575 | gdesc->dword[3] = 0; |
| 574 | 576 | ||
| 575 | dprintk(KERN_ERR "txd[%u]: 0x%Lx 0x%x 0x%x\n", | 577 | dev_dbg(&adapter->netdev->dev, |
| 578 | "txd[%u]: 0x%Lx 0x%x 0x%x\n", | ||
| 576 | tq->tx_ring.next2fill, gdesc->txd.addr, | 579 | tq->tx_ring.next2fill, gdesc->txd.addr, |
| 577 | gdesc->dword[2], gdesc->dword[3]); | 580 | gdesc->dword[2], gdesc->dword[3]); |
| 578 | vmxnet3_cmd_ring_adv_next2fill(&tq->tx_ring); | 581 | vmxnet3_cmd_ring_adv_next2fill(&tq->tx_ring); |
| @@ -600,7 +603,8 @@ vmxnet3_map_pkt(struct sk_buff *skb, struct vmxnet3_tx_ctx *ctx, | |||
| 600 | gdesc->dword[2] = dw2 | frag->size; | 603 | gdesc->dword[2] = dw2 | frag->size; |
| 601 | gdesc->dword[3] = 0; | 604 | gdesc->dword[3] = 0; |
| 602 | 605 | ||
| 603 | dprintk(KERN_ERR "txd[%u]: 0x%llu %u %u\n", | 606 | dev_dbg(&adapter->netdev->dev, |
| 607 | "txd[%u]: 0x%llu %u %u\n", | ||
| 604 | tq->tx_ring.next2fill, gdesc->txd.addr, | 608 | tq->tx_ring.next2fill, gdesc->txd.addr, |
| 605 | gdesc->dword[2], gdesc->dword[3]); | 609 | gdesc->dword[2], gdesc->dword[3]); |
| 606 | vmxnet3_cmd_ring_adv_next2fill(&tq->tx_ring); | 610 | vmxnet3_cmd_ring_adv_next2fill(&tq->tx_ring); |
| @@ -697,7 +701,8 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
| 697 | tdd = tq->data_ring.base + tq->tx_ring.next2fill; | 701 | tdd = tq->data_ring.base + tq->tx_ring.next2fill; |
| 698 | 702 | ||
| 699 | memcpy(tdd->data, skb->data, ctx->copy_size); | 703 | memcpy(tdd->data, skb->data, ctx->copy_size); |
| 700 | dprintk(KERN_ERR "copy %u bytes to dataRing[%u]\n", | 704 | dev_dbg(&adapter->netdev->dev, |
| 705 | "copy %u bytes to dataRing[%u]\n", | ||
| 701 | ctx->copy_size, tq->tx_ring.next2fill); | 706 | ctx->copy_size, tq->tx_ring.next2fill); |
| 702 | return 1; | 707 | return 1; |
| 703 | 708 | ||
| @@ -808,7 +813,8 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
| 808 | 813 | ||
| 809 | if (count > vmxnet3_cmd_ring_desc_avail(&tq->tx_ring)) { | 814 | if (count > vmxnet3_cmd_ring_desc_avail(&tq->tx_ring)) { |
| 810 | tq->stats.tx_ring_full++; | 815 | tq->stats.tx_ring_full++; |
| 811 | dprintk(KERN_ERR "tx queue stopped on %s, next2comp %u" | 816 | dev_dbg(&adapter->netdev->dev, |
| 817 | "tx queue stopped on %s, next2comp %u" | ||
| 812 | " next2fill %u\n", adapter->netdev->name, | 818 | " next2fill %u\n", adapter->netdev->name, |
| 813 | tq->tx_ring.next2comp, tq->tx_ring.next2fill); | 819 | tq->tx_ring.next2comp, tq->tx_ring.next2fill); |
| 814 | 820 | ||
| @@ -853,7 +859,8 @@ vmxnet3_tq_xmit(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, | |||
| 853 | 859 | ||
| 854 | /* finally flips the GEN bit of the SOP desc */ | 860 | /* finally flips the GEN bit of the SOP desc */ |
| 855 | gdesc->dword[2] ^= VMXNET3_TXD_GEN; | 861 | gdesc->dword[2] ^= VMXNET3_TXD_GEN; |
| 856 | dprintk(KERN_ERR "txd[%u]: SOP 0x%Lx 0x%x 0x%x\n", | 862 | dev_dbg(&adapter->netdev->dev, |
| 863 | "txd[%u]: SOP 0x%Lx 0x%x 0x%x\n", | ||
| 857 | (u32)((union Vmxnet3_GenericDesc *)ctx.sop_txd - | 864 | (u32)((union Vmxnet3_GenericDesc *)ctx.sop_txd - |
| 858 | tq->tx_ring.base), gdesc->txd.addr, gdesc->dword[2], | 865 | tq->tx_ring.base), gdesc->txd.addr, gdesc->dword[2], |
| 859 | gdesc->dword[3]); | 866 | gdesc->dword[3]); |
| @@ -990,7 +997,8 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq, | |||
| 990 | if (unlikely(rcd->len == 0)) { | 997 | if (unlikely(rcd->len == 0)) { |
| 991 | /* Pretend the rx buffer is skipped. */ | 998 | /* Pretend the rx buffer is skipped. */ |
| 992 | BUG_ON(!(rcd->sop && rcd->eop)); | 999 | BUG_ON(!(rcd->sop && rcd->eop)); |
| 993 | dprintk(KERN_ERR "rxRing[%u][%u] 0 length\n", | 1000 | dev_dbg(&adapter->netdev->dev, |
| 1001 | "rxRing[%u][%u] 0 length\n", | ||
| 994 | ring_idx, idx); | 1002 | ring_idx, idx); |
| 995 | goto rcd_done; | 1003 | goto rcd_done; |
| 996 | } | 1004 | } |
| @@ -1683,7 +1691,8 @@ vmxnet3_activate_dev(struct vmxnet3_adapter *adapter) | |||
| 1683 | int err; | 1691 | int err; |
| 1684 | u32 ret; | 1692 | u32 ret; |
| 1685 | 1693 | ||
| 1686 | dprintk(KERN_ERR "%s: skb_buf_size %d, rx_buf_per_pkt %d, ring sizes" | 1694 | dev_dbg(&adapter->netdev->dev, |
| 1695 | "%s: skb_buf_size %d, rx_buf_per_pkt %d, ring sizes" | ||
| 1687 | " %u %u %u\n", adapter->netdev->name, adapter->skb_buf_size, | 1696 | " %u %u %u\n", adapter->netdev->name, adapter->skb_buf_size, |
| 1688 | adapter->rx_buf_per_pkt, adapter->tx_queue.tx_ring.size, | 1697 | adapter->rx_buf_per_pkt, adapter->tx_queue.tx_ring.size, |
| 1689 | adapter->rx_queue.rx_ring[0].size, | 1698 | adapter->rx_queue.rx_ring[0].size, |
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h index 6bb91576e999..3c0d70d58111 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
| 31 | #include <linux/ethtool.h> | 31 | #include <linux/ethtool.h> |
| 32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
| 33 | #include <linux/device.h> | ||
| 33 | #include <linux/netdevice.h> | 34 | #include <linux/netdevice.h> |
| 34 | #include <linux/pci.h> | 35 | #include <linux/pci.h> |
| 35 | #include <linux/ethtool.h> | 36 | #include <linux/ethtool.h> |
| @@ -59,7 +60,6 @@ | |||
| 59 | #include <linux/if_vlan.h> | 60 | #include <linux/if_vlan.h> |
| 60 | #include <linux/if_arp.h> | 61 | #include <linux/if_arp.h> |
| 61 | #include <linux/inetdevice.h> | 62 | #include <linux/inetdevice.h> |
| 62 | #include <linux/dst.h> | ||
| 63 | 63 | ||
| 64 | #include "vmxnet3_defs.h" | 64 | #include "vmxnet3_defs.h" |
| 65 | 65 | ||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index a790b1771f9f..245d2cdb4765 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -1009,7 +1009,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, | |||
| 1009 | 1009 | ||
| 1010 | static void __devinit quirk_amd_ide_mode(struct pci_dev *pdev) | 1010 | static void __devinit quirk_amd_ide_mode(struct pci_dev *pdev) |
| 1011 | { | 1011 | { |
| 1012 | /* set SBX00 SATA in IDE mode to AHCI mode */ | 1012 | /* set SBX00/Hudson-2 SATA in IDE mode to AHCI mode */ |
| 1013 | u8 tmp; | 1013 | u8 tmp; |
| 1014 | 1014 | ||
| 1015 | pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp); | 1015 | pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp); |
| @@ -1028,8 +1028,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk | |||
| 1028 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode); | 1028 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode); |
| 1029 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); | 1029 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); |
| 1030 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); | 1030 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); |
| 1031 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_SB900_SATA_IDE, quirk_amd_ide_mode); | 1031 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE, quirk_amd_ide_mode); |
| 1032 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_SB900_SATA_IDE, quirk_amd_ide_mode); | 1032 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE, quirk_amd_ide_mode); |
| 1033 | 1033 | ||
| 1034 | /* | 1034 | /* |
| 1035 | * Serverworks CSB5 IDE does not fully support native mode | 1035 | * Serverworks CSB5 IDE does not fully support native mode |
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index e7108e75653d..42e8550cd2b6 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
| @@ -1561,11 +1561,16 @@ enum pci_board_num_t { | |||
| 1561 | pbn_exar_XR17C152, | 1561 | pbn_exar_XR17C152, |
| 1562 | pbn_exar_XR17C154, | 1562 | pbn_exar_XR17C154, |
| 1563 | pbn_exar_XR17C158, | 1563 | pbn_exar_XR17C158, |
| 1564 | pbn_exar_ibm_saturn, | ||
| 1564 | pbn_pasemi_1682M, | 1565 | pbn_pasemi_1682M, |
| 1565 | pbn_ni8430_2, | 1566 | pbn_ni8430_2, |
| 1566 | pbn_ni8430_4, | 1567 | pbn_ni8430_4, |
| 1567 | pbn_ni8430_8, | 1568 | pbn_ni8430_8, |
| 1568 | pbn_ni8430_16, | 1569 | pbn_ni8430_16, |
| 1570 | pbn_ADDIDATA_PCIe_1_3906250, | ||
| 1571 | pbn_ADDIDATA_PCIe_2_3906250, | ||
| 1572 | pbn_ADDIDATA_PCIe_4_3906250, | ||
| 1573 | pbn_ADDIDATA_PCIe_8_3906250, | ||
| 1569 | }; | 1574 | }; |
| 1570 | 1575 | ||
| 1571 | /* | 1576 | /* |
| @@ -2146,6 +2151,13 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
| 2146 | .base_baud = 921600, | 2151 | .base_baud = 921600, |
| 2147 | .uart_offset = 0x200, | 2152 | .uart_offset = 0x200, |
| 2148 | }, | 2153 | }, |
| 2154 | [pbn_exar_ibm_saturn] = { | ||
| 2155 | .flags = FL_BASE0, | ||
| 2156 | .num_ports = 1, | ||
| 2157 | .base_baud = 921600, | ||
| 2158 | .uart_offset = 0x200, | ||
| 2159 | }, | ||
| 2160 | |||
| 2149 | /* | 2161 | /* |
| 2150 | * PA Semi PWRficient PA6T-1682M on-chip UART | 2162 | * PA Semi PWRficient PA6T-1682M on-chip UART |
| 2151 | */ | 2163 | */ |
| @@ -2185,6 +2197,37 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
| 2185 | .uart_offset = 0x10, | 2197 | .uart_offset = 0x10, |
| 2186 | .first_offset = 0x800, | 2198 | .first_offset = 0x800, |
| 2187 | }, | 2199 | }, |
| 2200 | /* | ||
| 2201 | * ADDI-DATA GmbH PCI-Express communication cards <info@addi-data.com> | ||
| 2202 | */ | ||
| 2203 | [pbn_ADDIDATA_PCIe_1_3906250] = { | ||
| 2204 | .flags = FL_BASE0, | ||
| 2205 | .num_ports = 1, | ||
| 2206 | .base_baud = 3906250, | ||
| 2207 | .uart_offset = 0x200, | ||
| 2208 | .first_offset = 0x1000, | ||
| 2209 | }, | ||
| 2210 | [pbn_ADDIDATA_PCIe_2_3906250] = { | ||
| 2211 | .flags = FL_BASE0, | ||
| 2212 | .num_ports = 2, | ||
| 2213 | .base_baud = 3906250, | ||
| 2214 | .uart_offset = 0x200, | ||
| 2215 | .first_offset = 0x1000, | ||
| 2216 | }, | ||
| 2217 | [pbn_ADDIDATA_PCIe_4_3906250] = { | ||
| 2218 | .flags = FL_BASE0, | ||
| 2219 | .num_ports = 4, | ||
| 2220 | .base_baud = 3906250, | ||
| 2221 | .uart_offset = 0x200, | ||
| 2222 | .first_offset = 0x1000, | ||
| 2223 | }, | ||
| 2224 | [pbn_ADDIDATA_PCIe_8_3906250] = { | ||
| 2225 | .flags = FL_BASE0, | ||
| 2226 | .num_ports = 8, | ||
| 2227 | .base_baud = 3906250, | ||
| 2228 | .uart_offset = 0x200, | ||
| 2229 | .first_offset = 0x1000, | ||
| 2230 | }, | ||
| 2188 | }; | 2231 | }; |
| 2189 | 2232 | ||
| 2190 | static const struct pci_device_id softmodem_blacklist[] = { | 2233 | static const struct pci_device_id softmodem_blacklist[] = { |
| @@ -2649,6 +2692,9 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
| 2649 | PCI_SUBVENDOR_ID_CONNECT_TECH, | 2692 | PCI_SUBVENDOR_ID_CONNECT_TECH, |
| 2650 | PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485, 0, 0, | 2693 | PCI_SUBDEVICE_ID_CONNECT_TECH_PCI_UART_8_485, 0, 0, |
| 2651 | pbn_b0_8_1843200_200 }, | 2694 | pbn_b0_8_1843200_200 }, |
| 2695 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C152, | ||
| 2696 | PCI_VENDOR_ID_IBM, PCI_SUBDEVICE_ID_IBM_SATURN_SERIAL_ONE_PORT, | ||
| 2697 | 0, 0, pbn_exar_ibm_saturn }, | ||
| 2652 | 2698 | ||
| 2653 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530, | 2699 | { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_U530, |
| 2654 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 2700 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
| @@ -3556,6 +3602,38 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
| 3556 | 0, | 3602 | 0, |
| 3557 | pbn_b0_8_115200 }, | 3603 | pbn_b0_8_115200 }, |
| 3558 | 3604 | ||
| 3605 | { PCI_VENDOR_ID_ADDIDATA, | ||
| 3606 | PCI_DEVICE_ID_ADDIDATA_APCIe7500, | ||
| 3607 | PCI_ANY_ID, | ||
| 3608 | PCI_ANY_ID, | ||
| 3609 | 0, | ||
| 3610 | 0, | ||
| 3611 | pbn_ADDIDATA_PCIe_4_3906250 }, | ||
| 3612 | |||
| 3613 | { PCI_VENDOR_ID_ADDIDATA, | ||
| 3614 | PCI_DEVICE_ID_ADDIDATA_APCIe7420, | ||
| 3615 | PCI_ANY_ID, | ||
| 3616 | PCI_ANY_ID, | ||
| 3617 | 0, | ||
| 3618 | 0, | ||
| 3619 | pbn_ADDIDATA_PCIe_2_3906250 }, | ||
| 3620 | |||
| 3621 | { PCI_VENDOR_ID_ADDIDATA, | ||
| 3622 | PCI_DEVICE_ID_ADDIDATA_APCIe7300, | ||
| 3623 | PCI_ANY_ID, | ||
| 3624 | PCI_ANY_ID, | ||
| 3625 | 0, | ||
| 3626 | 0, | ||
| 3627 | pbn_ADDIDATA_PCIe_1_3906250 }, | ||
| 3628 | |||
| 3629 | { PCI_VENDOR_ID_ADDIDATA, | ||
| 3630 | PCI_DEVICE_ID_ADDIDATA_APCIe7800, | ||
| 3631 | PCI_ANY_ID, | ||
| 3632 | PCI_ANY_ID, | ||
| 3633 | 0, | ||
| 3634 | 0, | ||
| 3635 | pbn_ADDIDATA_PCIe_8_3906250 }, | ||
| 3636 | |||
| 3559 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, | 3637 | { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835, |
| 3560 | PCI_VENDOR_ID_IBM, 0x0299, | 3638 | PCI_VENDOR_ID_IBM, 0x0299, |
| 3561 | 0, 0, pbn_b0_bt_2_115200 }, | 3639 | 0, 0, pbn_b0_bt_2_115200 }, |
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 3551c5cb7094..9d948bccafaf 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
| @@ -1531,7 +1531,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev) | |||
| 1531 | void *data; | 1531 | void *data; |
| 1532 | int ret; | 1532 | int ret; |
| 1533 | 1533 | ||
| 1534 | BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE)); | 1534 | BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1)); |
| 1535 | 1535 | ||
| 1536 | port = &atmel_ports[pdev->id]; | 1536 | port = &atmel_ports[pdev->id]; |
| 1537 | port->backup_imr = 0; | 1537 | port->backup_imr = 0; |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 200c22f55130..9dd588042880 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
| @@ -19,7 +19,6 @@ | |||
| 19 | */ | 19 | */ |
| 20 | //#define DEBUG | 20 | //#define DEBUG |
| 21 | #include <linux/virtio.h> | 21 | #include <linux/virtio.h> |
| 22 | #include <linux/virtio_ids.h> | ||
| 23 | #include <linux/virtio_balloon.h> | 22 | #include <linux/virtio_balloon.h> |
| 24 | #include <linux/swap.h> | 23 | #include <linux/swap.h> |
| 25 | #include <linux/kthread.h> | 24 | #include <linux/kthread.h> |
| @@ -248,7 +247,7 @@ out: | |||
| 248 | return err; | 247 | return err; |
| 249 | } | 248 | } |
| 250 | 249 | ||
| 251 | static void virtballoon_remove(struct virtio_device *vdev) | 250 | static void __devexit virtballoon_remove(struct virtio_device *vdev) |
| 252 | { | 251 | { |
| 253 | struct virtio_balloon *vb = vdev->priv; | 252 | struct virtio_balloon *vb = vdev->priv; |
| 254 | 253 | ||
diff --git a/fs/hfs/btree.c b/fs/hfs/btree.c index 9b9d6395bad3..052f214ea6f0 100644 --- a/fs/hfs/btree.c +++ b/fs/hfs/btree.c | |||
| @@ -58,6 +58,11 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke | |||
| 58 | } | 58 | } |
| 59 | unlock_new_inode(tree->inode); | 59 | unlock_new_inode(tree->inode); |
| 60 | 60 | ||
| 61 | if (!HFS_I(tree->inode)->first_blocks) { | ||
| 62 | printk(KERN_ERR "hfs: invalid btree extent records (0 size).\n"); | ||
| 63 | goto free_inode; | ||
| 64 | } | ||
| 65 | |||
| 61 | mapping = tree->inode->i_mapping; | 66 | mapping = tree->inode->i_mapping; |
| 62 | page = read_mapping_page(mapping, 0, NULL); | 67 | page = read_mapping_page(mapping, 0, NULL); |
| 63 | if (IS_ERR(page)) | 68 | if (IS_ERR(page)) |
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c index 175d08eacc86..bed78ac8f6d1 100644 --- a/fs/hfsplus/wrapper.c +++ b/fs/hfsplus/wrapper.c | |||
| @@ -99,6 +99,10 @@ int hfsplus_read_wrapper(struct super_block *sb) | |||
| 99 | 99 | ||
| 100 | if (hfsplus_get_last_session(sb, &part_start, &part_size)) | 100 | if (hfsplus_get_last_session(sb, &part_start, &part_size)) |
| 101 | return -EINVAL; | 101 | return -EINVAL; |
| 102 | if ((u64)part_start + part_size > 0x100000000ULL) { | ||
| 103 | pr_err("hfs: volumes larger than 2TB are not supported yet\n"); | ||
| 104 | return -EINVAL; | ||
| 105 | } | ||
| 102 | while (1) { | 106 | while (1) { |
| 103 | bh = sb_bread512(sb, part_start + HFSPLUS_VOLHEAD_SECTOR, vhdr); | 107 | bh = sb_bread512(sb, part_start + HFSPLUS_VOLHEAD_SECTOR, vhdr); |
| 104 | if (!bh) | 108 | if (!bh) |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index a2c18acb8568..90be551b80c1 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
| @@ -1253,6 +1253,7 @@ static int nfs_parse_mount_options(char *raw, | |||
| 1253 | default: | 1253 | default: |
| 1254 | dfprintk(MOUNT, "NFS: unrecognized " | 1254 | dfprintk(MOUNT, "NFS: unrecognized " |
| 1255 | "transport protocol\n"); | 1255 | "transport protocol\n"); |
| 1256 | kfree(string); | ||
| 1256 | return 0; | 1257 | return 0; |
| 1257 | } | 1258 | } |
| 1258 | break; | 1259 | break; |
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index 828a889be909..7e54e52964dd 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c | |||
| @@ -91,6 +91,7 @@ static int dnotify_handle_event(struct fsnotify_group *group, | |||
| 91 | struct dnotify_struct *dn; | 91 | struct dnotify_struct *dn; |
| 92 | struct dnotify_struct **prev; | 92 | struct dnotify_struct **prev; |
| 93 | struct fown_struct *fown; | 93 | struct fown_struct *fown; |
| 94 | __u32 test_mask = event->mask & ~FS_EVENT_ON_CHILD; | ||
| 94 | 95 | ||
| 95 | to_tell = event->to_tell; | 96 | to_tell = event->to_tell; |
| 96 | 97 | ||
| @@ -106,7 +107,7 @@ static int dnotify_handle_event(struct fsnotify_group *group, | |||
| 106 | spin_lock(&entry->lock); | 107 | spin_lock(&entry->lock); |
| 107 | prev = &dnentry->dn; | 108 | prev = &dnentry->dn; |
| 108 | while ((dn = *prev) != NULL) { | 109 | while ((dn = *prev) != NULL) { |
| 109 | if ((dn->dn_mask & event->mask) == 0) { | 110 | if ((dn->dn_mask & test_mask) == 0) { |
| 110 | prev = &dn->dn_next; | 111 | prev = &dn->dn_next; |
| 111 | continue; | 112 | continue; |
| 112 | } | 113 | } |
diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index c8a07c65482b..3165d85aada2 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c | |||
| @@ -324,11 +324,11 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry, | |||
| 324 | spin_lock(&group->mark_lock); | 324 | spin_lock(&group->mark_lock); |
| 325 | spin_lock(&inode->i_lock); | 325 | spin_lock(&inode->i_lock); |
| 326 | 326 | ||
| 327 | entry->group = group; | ||
| 328 | entry->inode = inode; | ||
| 329 | |||
| 330 | lentry = fsnotify_find_mark_entry(group, inode); | 327 | lentry = fsnotify_find_mark_entry(group, inode); |
| 331 | if (!lentry) { | 328 | if (!lentry) { |
| 329 | entry->group = group; | ||
| 330 | entry->inode = inode; | ||
| 331 | |||
| 332 | hlist_add_head(&entry->i_list, &inode->i_fsnotify_mark_entries); | 332 | hlist_add_head(&entry->i_list, &inode->i_fsnotify_mark_entries); |
| 333 | list_add(&entry->g_list, &group->mark_entries); | 333 | list_add(&entry->g_list, &group->mark_entries); |
| 334 | 334 | ||
diff --git a/fs/notify/notification.c b/fs/notify/notification.c index 3816d5750dd5..b8bf53b4c108 100644 --- a/fs/notify/notification.c +++ b/fs/notify/notification.c | |||
| @@ -143,7 +143,7 @@ static bool event_compare(struct fsnotify_event *old, struct fsnotify_event *new | |||
| 143 | /* remember, after old was put on the wait_q we aren't | 143 | /* remember, after old was put on the wait_q we aren't |
| 144 | * allowed to look at the inode any more, only thing | 144 | * allowed to look at the inode any more, only thing |
| 145 | * left to check was if the file_name is the same */ | 145 | * left to check was if the file_name is the same */ |
| 146 | if (old->name_len && | 146 | if (!old->name_len || |
| 147 | !strcmp(old->file_name, new->file_name)) | 147 | !strcmp(old->file_name, new->file_name)) |
| 148 | return true; | 148 | return true; |
| 149 | break; | 149 | break; |
| @@ -777,36 +777,55 @@ pipe_rdwr_release(struct inode *inode, struct file *filp) | |||
| 777 | static int | 777 | static int |
| 778 | pipe_read_open(struct inode *inode, struct file *filp) | 778 | pipe_read_open(struct inode *inode, struct file *filp) |
| 779 | { | 779 | { |
| 780 | /* We could have perhaps used atomic_t, but this and friends | 780 | int ret = -ENOENT; |
| 781 | below are the only places. So it doesn't seem worthwhile. */ | 781 | |
| 782 | mutex_lock(&inode->i_mutex); | 782 | mutex_lock(&inode->i_mutex); |
| 783 | inode->i_pipe->readers++; | 783 | |
| 784 | if (inode->i_pipe) { | ||
| 785 | ret = 0; | ||
| 786 | inode->i_pipe->readers++; | ||
| 787 | } | ||
| 788 | |||
| 784 | mutex_unlock(&inode->i_mutex); | 789 | mutex_unlock(&inode->i_mutex); |
| 785 | 790 | ||
| 786 | return 0; | 791 | return ret; |
| 787 | } | 792 | } |
| 788 | 793 | ||
| 789 | static int | 794 | static int |
| 790 | pipe_write_open(struct inode *inode, struct file *filp) | 795 | pipe_write_open(struct inode *inode, struct file *filp) |
| 791 | { | 796 | { |
| 797 | int ret = -ENOENT; | ||
| 798 | |||
| 792 | mutex_lock(&inode->i_mutex); | 799 | mutex_lock(&inode->i_mutex); |
| 793 | inode->i_pipe->writers++; | 800 | |
| 801 | if (inode->i_pipe) { | ||
| 802 | ret = 0; | ||
| 803 | inode->i_pipe->writers++; | ||
| 804 | } | ||
| 805 | |||
| 794 | mutex_unlock(&inode->i_mutex); | 806 | mutex_unlock(&inode->i_mutex); |
| 795 | 807 | ||
| 796 | return 0; | 808 | return ret; |
| 797 | } | 809 | } |
| 798 | 810 | ||
| 799 | static int | 811 | static int |
| 800 | pipe_rdwr_open(struct inode *inode, struct file *filp) | 812 | pipe_rdwr_open(struct inode *inode, struct file *filp) |
| 801 | { | 813 | { |
| 814 | int ret = -ENOENT; | ||
| 815 | |||
| 802 | mutex_lock(&inode->i_mutex); | 816 | mutex_lock(&inode->i_mutex); |
| 803 | if (filp->f_mode & FMODE_READ) | 817 | |
| 804 | inode->i_pipe->readers++; | 818 | if (inode->i_pipe) { |
| 805 | if (filp->f_mode & FMODE_WRITE) | 819 | ret = 0; |
| 806 | inode->i_pipe->writers++; | 820 | if (filp->f_mode & FMODE_READ) |
| 821 | inode->i_pipe->readers++; | ||
| 822 | if (filp->f_mode & FMODE_WRITE) | ||
| 823 | inode->i_pipe->writers++; | ||
| 824 | } | ||
| 825 | |||
| 807 | mutex_unlock(&inode->i_mutex); | 826 | mutex_unlock(&inode->i_mutex); |
| 808 | 827 | ||
| 809 | return 0; | 828 | return ret; |
| 810 | } | 829 | } |
| 811 | 830 | ||
| 812 | /* | 831 | /* |
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c index c7bff4f603ff..a65239cfd97e 100644 --- a/fs/proc/meminfo.c +++ b/fs/proc/meminfo.c | |||
| @@ -99,7 +99,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v) | |||
| 99 | "VmallocUsed: %8lu kB\n" | 99 | "VmallocUsed: %8lu kB\n" |
| 100 | "VmallocChunk: %8lu kB\n" | 100 | "VmallocChunk: %8lu kB\n" |
| 101 | #ifdef CONFIG_MEMORY_FAILURE | 101 | #ifdef CONFIG_MEMORY_FAILURE |
| 102 | "HardwareCorrupted: %8lu kB\n" | 102 | "HardwareCorrupted: %5lu kB\n" |
| 103 | #endif | 103 | #endif |
| 104 | , | 104 | , |
| 105 | K(i.totalram), | 105 | K(i.totalram), |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 3f384d4b163a..1feed71551c9 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
| @@ -364,6 +364,7 @@ unifdef-y += utsname.h | |||
| 364 | unifdef-y += videodev2.h | 364 | unifdef-y += videodev2.h |
| 365 | unifdef-y += videodev.h | 365 | unifdef-y += videodev.h |
| 366 | unifdef-y += virtio_config.h | 366 | unifdef-y += virtio_config.h |
| 367 | unifdef-y += virtio_ids.h | ||
| 367 | unifdef-y += virtio_blk.h | 368 | unifdef-y += virtio_blk.h |
| 368 | unifdef-y += virtio_net.h | 369 | unifdef-y += virtio_net.h |
| 369 | unifdef-y += virtio_9p.h | 370 | unifdef-y += virtio_9p.h |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 44717eb47639..79a2340d83cd 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -291,8 +291,15 @@ struct global_attr { | |||
| 291 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 291 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
| 292 | int cpufreq_update_policy(unsigned int cpu); | 292 | int cpufreq_update_policy(unsigned int cpu); |
| 293 | 293 | ||
| 294 | #ifdef CONFIG_CPU_FREQ | ||
| 294 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | 295 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ |
| 295 | unsigned int cpufreq_get(unsigned int cpu); | 296 | unsigned int cpufreq_get(unsigned int cpu); |
| 297 | #else | ||
| 298 | static inline unsigned int cpufreq_get(unsigned int cpu) | ||
| 299 | { | ||
| 300 | return 0; | ||
| 301 | } | ||
| 302 | #endif | ||
| 296 | 303 | ||
| 297 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ | 304 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ |
| 298 | #ifdef CONFIG_CPU_FREQ | 305 | #ifdef CONFIG_CPU_FREQ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f490e7a7307a..b0f0f3851cd4 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -379,9 +379,6 @@ | |||
| 379 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | 379 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c |
| 380 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 | 380 | #define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390 |
| 381 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c | 381 | #define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c |
| 382 | /* AMD SB Chipset */ | ||
| 383 | #define PCI_DEVICE_ID_AMD_SB900_IDE 0x780c | ||
| 384 | #define PCI_DEVICE_ID_AMD_SB900_SATA_IDE 0x7800 | ||
| 385 | 382 | ||
| 386 | #define PCI_VENDOR_ID_VLSI 0x1004 | 383 | #define PCI_VENDOR_ID_VLSI 0x1004 |
| 387 | #define PCI_DEVICE_ID_VLSI_82C592 0x0005 | 384 | #define PCI_DEVICE_ID_VLSI_82C592 0x0005 |
| @@ -485,6 +482,9 @@ | |||
| 485 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 | 482 | #define PCI_DEVICE_ID_IBM_ICOM_V2_ONE_PORT_RVX_ONE_PORT_MDM_PCIE 0x0361 |
| 486 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 | 483 | #define PCI_DEVICE_ID_IBM_ICOM_FOUR_PORT_MODEL 0x252 |
| 487 | 484 | ||
| 485 | #define PCI_SUBVENDOR_ID_IBM 0x1014 | ||
| 486 | #define PCI_SUBDEVICE_ID_IBM_SATURN_SERIAL_ONE_PORT 0x03d4 | ||
| 487 | |||
| 488 | #define PCI_VENDOR_ID_UNISYS 0x1018 | 488 | #define PCI_VENDOR_ID_UNISYS 0x1018 |
| 489 | #define PCI_DEVICE_ID_UNISYS_DMA_DIRECTOR 0x001C | 489 | #define PCI_DEVICE_ID_UNISYS_DMA_DIRECTOR 0x001C |
| 490 | 490 | ||
| @@ -553,9 +553,10 @@ | |||
| 553 | #define PCI_DEVICE_ID_AMD_CS5536_UDC 0x2096 | 553 | #define PCI_DEVICE_ID_AMD_CS5536_UDC 0x2096 |
| 554 | #define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097 | 554 | #define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097 |
| 555 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A | 555 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A |
| 556 | |||
| 557 | #define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081 | 556 | #define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081 |
| 558 | #define PCI_DEVICE_ID_AMD_LX_AES 0x2082 | 557 | #define PCI_DEVICE_ID_AMD_LX_AES 0x2082 |
| 558 | #define PCI_DEVICE_ID_AMD_HUDSON2_IDE 0x780c | ||
| 559 | #define PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE 0x7800 | ||
| 559 | 560 | ||
| 560 | #define PCI_VENDOR_ID_TRIDENT 0x1023 | 561 | #define PCI_VENDOR_ID_TRIDENT 0x1023 |
| 561 | #define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000 | 562 | #define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000 |
| @@ -2162,6 +2163,10 @@ | |||
| 2162 | #define PCI_DEVICE_ID_ADDIDATA_APCI7420_3 0x700D | 2163 | #define PCI_DEVICE_ID_ADDIDATA_APCI7420_3 0x700D |
| 2163 | #define PCI_DEVICE_ID_ADDIDATA_APCI7300_3 0x700E | 2164 | #define PCI_DEVICE_ID_ADDIDATA_APCI7300_3 0x700E |
| 2164 | #define PCI_DEVICE_ID_ADDIDATA_APCI7800_3 0x700F | 2165 | #define PCI_DEVICE_ID_ADDIDATA_APCI7800_3 0x700F |
| 2166 | #define PCI_DEVICE_ID_ADDIDATA_APCIe7300 0x7010 | ||
| 2167 | #define PCI_DEVICE_ID_ADDIDATA_APCIe7420 0x7011 | ||
| 2168 | #define PCI_DEVICE_ID_ADDIDATA_APCIe7500 0x7012 | ||
| 2169 | #define PCI_DEVICE_ID_ADDIDATA_APCIe7800 0x7013 | ||
| 2165 | 2170 | ||
| 2166 | #define PCI_VENDOR_ID_PDC 0x15e9 | 2171 | #define PCI_VENDOR_ID_PDC 0x15e9 |
| 2167 | 2172 | ||
diff --git a/include/linux/string.h b/include/linux/string.h index 489019ef1694..b8508868d5ad 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
| @@ -62,7 +62,7 @@ extern char * strnchr(const char *, size_t, int); | |||
| 62 | #ifndef __HAVE_ARCH_STRRCHR | 62 | #ifndef __HAVE_ARCH_STRRCHR |
| 63 | extern char * strrchr(const char *,int); | 63 | extern char * strrchr(const char *,int); |
| 64 | #endif | 64 | #endif |
| 65 | extern char * strstrip(char *); | 65 | extern char * __must_check strstrip(char *); |
| 66 | #ifndef __HAVE_ARCH_STRSTR | 66 | #ifndef __HAVE_ARCH_STRSTR |
| 67 | extern char * strstr(const char *,const char *); | 67 | extern char * strstr(const char *,const char *); |
| 68 | #endif | 68 | #endif |
diff --git a/include/linux/virtio_9p.h b/include/linux/virtio_9p.h index ea7226a45acb..095e10d148b4 100644 --- a/include/linux/virtio_9p.h +++ b/include/linux/virtio_9p.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_VIRTIO_9P_H | 2 | #define _LINUX_VIRTIO_9P_H |
| 3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
| 4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
| 5 | #include <linux/virtio_ids.h> | ||
| 5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
| 6 | 7 | ||
| 7 | /* Maximum number of virtio channels per partition (1 for now) */ | 8 | /* Maximum number of virtio channels per partition (1 for now) */ |
diff --git a/include/linux/virtio_balloon.h b/include/linux/virtio_balloon.h index 09d730085060..1418f048cb34 100644 --- a/include/linux/virtio_balloon.h +++ b/include/linux/virtio_balloon.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_VIRTIO_BALLOON_H | 2 | #define _LINUX_VIRTIO_BALLOON_H |
| 3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
| 4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
| 5 | #include <linux/virtio_ids.h> | ||
| 5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
| 6 | 7 | ||
| 7 | /* The feature bitmap for virtio balloon */ | 8 | /* The feature bitmap for virtio balloon */ |
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index 15cb666581d7..fd294c56d571 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
| 4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | #include <linux/virtio_ids.h> | ||
| 6 | #include <linux/virtio_config.h> | 7 | #include <linux/virtio_config.h> |
| 7 | 8 | ||
| 8 | /* Feature bits */ | 9 | /* Feature bits */ |
| @@ -13,11 +14,8 @@ | |||
| 13 | #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ | 14 | #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ |
| 14 | #define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ | 15 | #define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ |
| 15 | #define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ | 16 | #define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ |
| 16 | #define VIRTIO_BLK_F_IDENTIFY 8 /* ATA IDENTIFY supported */ | ||
| 17 | #define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */ | 17 | #define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */ |
| 18 | 18 | ||
| 19 | #define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ | ||
| 20 | |||
| 21 | struct virtio_blk_config { | 19 | struct virtio_blk_config { |
| 22 | /* The capacity (in 512-byte sectors). */ | 20 | /* The capacity (in 512-byte sectors). */ |
| 23 | __u64 capacity; | 21 | __u64 capacity; |
| @@ -33,7 +31,6 @@ struct virtio_blk_config { | |||
| 33 | } geometry; | 31 | } geometry; |
| 34 | /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ | 32 | /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ |
| 35 | __u32 blk_size; | 33 | __u32 blk_size; |
| 36 | __u8 identify[VIRTIO_BLK_ID_BYTES]; | ||
| 37 | } __attribute__((packed)); | 34 | } __attribute__((packed)); |
| 38 | 35 | ||
| 39 | /* | 36 | /* |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index b5f519806014..fe885174cc1f 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #ifndef _LINUX_VIRTIO_CONSOLE_H | 1 | #ifndef _LINUX_VIRTIO_CONSOLE_H |
| 2 | #define _LINUX_VIRTIO_CONSOLE_H | 2 | #define _LINUX_VIRTIO_CONSOLE_H |
| 3 | #include <linux/types.h> | 3 | #include <linux/types.h> |
| 4 | #include <linux/virtio_ids.h> | ||
| 4 | #include <linux/virtio_config.h> | 5 | #include <linux/virtio_config.h> |
| 5 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | 6 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so |
| 6 | * anyone can use the definitions to implement compatible drivers/servers. */ | 7 | * anyone can use the definitions to implement compatible drivers/servers. */ |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 1f41734bbb77..085e42298ce5 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
| 4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | #include <linux/virtio_ids.h> | ||
| 6 | #include <linux/virtio_config.h> | 7 | #include <linux/virtio_config.h> |
| 7 | #include <linux/if_ether.h> | 8 | #include <linux/if_ether.h> |
| 8 | 9 | ||
diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h index 48121c3c434b..c4d5de896f0c 100644 --- a/include/linux/virtio_rng.h +++ b/include/linux/virtio_rng.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_VIRTIO_RNG_H | 2 | #define _LINUX_VIRTIO_RNG_H |
| 3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
| 4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
| 5 | #include <linux/virtio_ids.h> | ||
| 5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
| 6 | 7 | ||
| 7 | #endif /* _LINUX_VIRTIO_RNG_H */ | 8 | #endif /* _LINUX_VIRTIO_RNG_H */ |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index b63b80fac567..f93ad90a601b 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
| @@ -130,11 +130,11 @@ struct inet_timewait_sock { | |||
| 130 | __u16 tw_num; | 130 | __u16 tw_num; |
| 131 | kmemcheck_bitfield_begin(flags); | 131 | kmemcheck_bitfield_begin(flags); |
| 132 | /* And these are ours. */ | 132 | /* And these are ours. */ |
| 133 | __u8 tw_ipv6only:1, | 133 | unsigned int tw_ipv6only : 1, |
| 134 | tw_transparent:1; | 134 | tw_transparent : 1, |
| 135 | /* 14 bits hole, try to pack */ | 135 | tw_pad : 14, /* 14 bits hole */ |
| 136 | tw_ipv6_offset : 16; | ||
| 136 | kmemcheck_bitfield_end(flags); | 137 | kmemcheck_bitfield_end(flags); |
| 137 | __u16 tw_ipv6_offset; | ||
| 138 | unsigned long tw_ttd; | 138 | unsigned long tw_ttd; |
| 139 | struct inet_bind_bucket *tw_tb; | 139 | struct inet_bind_bucket *tw_tb; |
| 140 | struct hlist_node tw_death_node; | 140 | struct hlist_node tw_death_node; |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ca83b73fba19..0249f4be9b5c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
| @@ -1710,14 +1710,13 @@ static ssize_t cgroup_write_X64(struct cgroup *cgrp, struct cftype *cft, | |||
| 1710 | return -EFAULT; | 1710 | return -EFAULT; |
| 1711 | 1711 | ||
| 1712 | buffer[nbytes] = 0; /* nul-terminate */ | 1712 | buffer[nbytes] = 0; /* nul-terminate */ |
| 1713 | strstrip(buffer); | ||
| 1714 | if (cft->write_u64) { | 1713 | if (cft->write_u64) { |
| 1715 | u64 val = simple_strtoull(buffer, &end, 0); | 1714 | u64 val = simple_strtoull(strstrip(buffer), &end, 0); |
| 1716 | if (*end) | 1715 | if (*end) |
| 1717 | return -EINVAL; | 1716 | return -EINVAL; |
| 1718 | retval = cft->write_u64(cgrp, cft, val); | 1717 | retval = cft->write_u64(cgrp, cft, val); |
| 1719 | } else { | 1718 | } else { |
| 1720 | s64 val = simple_strtoll(buffer, &end, 0); | 1719 | s64 val = simple_strtoll(strstrip(buffer), &end, 0); |
| 1721 | if (*end) | 1720 | if (*end) |
| 1722 | return -EINVAL; | 1721 | return -EINVAL; |
| 1723 | retval = cft->write_s64(cgrp, cft, val); | 1722 | retval = cft->write_s64(cgrp, cft, val); |
| @@ -1753,8 +1752,7 @@ static ssize_t cgroup_write_string(struct cgroup *cgrp, struct cftype *cft, | |||
| 1753 | } | 1752 | } |
| 1754 | 1753 | ||
| 1755 | buffer[nbytes] = 0; /* nul-terminate */ | 1754 | buffer[nbytes] = 0; /* nul-terminate */ |
| 1756 | strstrip(buffer); | 1755 | retval = cft->write_string(cgrp, cft, strstrip(buffer)); |
| 1757 | retval = cft->write_string(cgrp, cft, buffer); | ||
| 1758 | if (!retval) | 1756 | if (!retval) |
| 1759 | retval = nbytes; | 1757 | retval = nbytes; |
| 1760 | out: | 1758 | out: |
diff --git a/kernel/exit.c b/kernel/exit.c index e61891f80123..f7864ac2ecc1 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
| @@ -359,10 +359,8 @@ void __set_special_pids(struct pid *pid) | |||
| 359 | { | 359 | { |
| 360 | struct task_struct *curr = current->group_leader; | 360 | struct task_struct *curr = current->group_leader; |
| 361 | 361 | ||
| 362 | if (task_session(curr) != pid) { | 362 | if (task_session(curr) != pid) |
| 363 | change_pid(curr, PIDTYPE_SID, pid); | 363 | change_pid(curr, PIDTYPE_SID, pid); |
| 364 | proc_sid_connector(curr); | ||
| 365 | } | ||
| 366 | 364 | ||
| 367 | if (task_pgrp(curr) != pid) | 365 | if (task_pgrp(curr) != pid) |
| 368 | change_pid(curr, PIDTYPE_PGID, pid); | 366 | change_pid(curr, PIDTYPE_PGID, pid); |
diff --git a/kernel/power/suspend_test.c b/kernel/power/suspend_test.c index 17d8bb1acf9c..25596e450ac7 100644 --- a/kernel/power/suspend_test.c +++ b/kernel/power/suspend_test.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | * The time it takes is system-specific though, so when we test this | 19 | * The time it takes is system-specific though, so when we test this |
| 20 | * during system bootup we allow a LOT of time. | 20 | * during system bootup we allow a LOT of time. |
| 21 | */ | 21 | */ |
| 22 | #define TEST_SUSPEND_SECONDS 5 | 22 | #define TEST_SUSPEND_SECONDS 10 |
| 23 | 23 | ||
| 24 | static unsigned long suspend_test_start_time; | 24 | static unsigned long suspend_test_start_time; |
| 25 | 25 | ||
| @@ -49,7 +49,8 @@ void suspend_test_finish(const char *label) | |||
| 49 | * has some performance issues. The stack dump of a WARN_ON | 49 | * has some performance issues. The stack dump of a WARN_ON |
| 50 | * is more likely to get the right attention than a printk... | 50 | * is more likely to get the right attention than a printk... |
| 51 | */ | 51 | */ |
| 52 | WARN(msec > (TEST_SUSPEND_SECONDS * 1000), "Component: %s\n", label); | 52 | WARN(msec > (TEST_SUSPEND_SECONDS * 1000), |
| 53 | "Component: %s, time: %u\n", label, msec); | ||
| 53 | } | 54 | } |
| 54 | 55 | ||
| 55 | /* | 56 | /* |
diff --git a/kernel/sys.c b/kernel/sys.c index 255475d163e0..1828f8d10844 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
| @@ -1110,6 +1110,8 @@ SYSCALL_DEFINE0(setsid) | |||
| 1110 | err = session; | 1110 | err = session; |
| 1111 | out: | 1111 | out: |
| 1112 | write_unlock_irq(&tasklist_lock); | 1112 | write_unlock_irq(&tasklist_lock); |
| 1113 | if (err > 0) | ||
| 1114 | proc_sid_connector(group_leader); | ||
| 1113 | return err; | 1115 | return err; |
| 1114 | } | 1116 | } |
| 1115 | 1117 | ||
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index b38423ca711a..b6e7aaea4604 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c | |||
| @@ -1521,7 +1521,7 @@ int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table) | |||
| 1521 | if (!table->ctl_name && table->strategy) | 1521 | if (!table->ctl_name && table->strategy) |
| 1522 | set_fail(&fail, table, "Strategy without ctl_name"); | 1522 | set_fail(&fail, table, "Strategy without ctl_name"); |
| 1523 | #endif | 1523 | #endif |
| 1524 | #ifdef CONFIG_PROC_FS | 1524 | #ifdef CONFIG_PROC_SYSCTL |
| 1525 | if (table->procname && !table->proc_handler) | 1525 | if (table->procname && !table->proc_handler) |
| 1526 | set_fail(&fail, table, "No proc_handler"); | 1526 | set_fail(&fail, table, "No proc_handler"); |
| 1527 | #endif | 1527 | #endif |
diff --git a/mm/Kconfig b/mm/Kconfig index 57963c6063d1..f791196cee8c 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
| @@ -67,7 +67,7 @@ config DISCONTIGMEM | |||
| 67 | 67 | ||
| 68 | config SPARSEMEM | 68 | config SPARSEMEM |
| 69 | def_bool y | 69 | def_bool y |
| 70 | depends on SPARSEMEM_MANUAL | 70 | depends on (!SELECT_MEMORY_MODEL && ARCH_SPARSEMEM_ENABLE) || SPARSEMEM_MANUAL |
| 71 | 71 | ||
| 72 | config FLATMEM | 72 | config FLATMEM |
| 73 | def_bool y | 73 | def_bool y |
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 729d4b15b645..7fc2130d2737 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
| 36 | #include <linux/page-flags.h> | 36 | #include <linux/page-flags.h> |
| 37 | #include <linux/sched.h> | 37 | #include <linux/sched.h> |
| 38 | #include <linux/ksm.h> | ||
| 38 | #include <linux/rmap.h> | 39 | #include <linux/rmap.h> |
| 39 | #include <linux/pagemap.h> | 40 | #include <linux/pagemap.h> |
| 40 | #include <linux/swap.h> | 41 | #include <linux/swap.h> |
| @@ -661,7 +662,7 @@ static void hwpoison_user_mappings(struct page *p, unsigned long pfn, | |||
| 661 | int i; | 662 | int i; |
| 662 | int kill = 1; | 663 | int kill = 1; |
| 663 | 664 | ||
| 664 | if (PageReserved(p) || PageCompound(p) || PageSlab(p)) | 665 | if (PageReserved(p) || PageCompound(p) || PageSlab(p) || PageKsm(p)) |
| 665 | return; | 666 | return; |
| 666 | 667 | ||
| 667 | if (!PageLRU(p)) | 668 | if (!PageLRU(p)) |
diff --git a/mm/memory.c b/mm/memory.c index 7e91b5f9f690..60ea601e03ea 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
| @@ -641,6 +641,7 @@ static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, | |||
| 641 | pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma, | 641 | pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma, |
| 642 | unsigned long addr, unsigned long end) | 642 | unsigned long addr, unsigned long end) |
| 643 | { | 643 | { |
| 644 | pte_t *orig_src_pte, *orig_dst_pte; | ||
| 644 | pte_t *src_pte, *dst_pte; | 645 | pte_t *src_pte, *dst_pte; |
| 645 | spinlock_t *src_ptl, *dst_ptl; | 646 | spinlock_t *src_ptl, *dst_ptl; |
| 646 | int progress = 0; | 647 | int progress = 0; |
| @@ -654,6 +655,8 @@ again: | |||
| 654 | src_pte = pte_offset_map_nested(src_pmd, addr); | 655 | src_pte = pte_offset_map_nested(src_pmd, addr); |
| 655 | src_ptl = pte_lockptr(src_mm, src_pmd); | 656 | src_ptl = pte_lockptr(src_mm, src_pmd); |
| 656 | spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING); | 657 | spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING); |
| 658 | orig_src_pte = src_pte; | ||
| 659 | orig_dst_pte = dst_pte; | ||
| 657 | arch_enter_lazy_mmu_mode(); | 660 | arch_enter_lazy_mmu_mode(); |
| 658 | 661 | ||
| 659 | do { | 662 | do { |
| @@ -677,9 +680,9 @@ again: | |||
| 677 | 680 | ||
| 678 | arch_leave_lazy_mmu_mode(); | 681 | arch_leave_lazy_mmu_mode(); |
| 679 | spin_unlock(src_ptl); | 682 | spin_unlock(src_ptl); |
| 680 | pte_unmap_nested(src_pte - 1); | 683 | pte_unmap_nested(orig_src_pte); |
| 681 | add_mm_rss(dst_mm, rss[0], rss[1]); | 684 | add_mm_rss(dst_mm, rss[0], rss[1]); |
| 682 | pte_unmap_unlock(dst_pte - 1, dst_ptl); | 685 | pte_unmap_unlock(orig_dst_pte, dst_ptl); |
| 683 | cond_resched(); | 686 | cond_resched(); |
| 684 | if (addr != end) | 687 | if (addr != end) |
| 685 | goto again; | 688 | goto again; |
| @@ -1820,10 +1823,10 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd, | |||
| 1820 | token = pmd_pgtable(*pmd); | 1823 | token = pmd_pgtable(*pmd); |
| 1821 | 1824 | ||
| 1822 | do { | 1825 | do { |
| 1823 | err = fn(pte, token, addr, data); | 1826 | err = fn(pte++, token, addr, data); |
| 1824 | if (err) | 1827 | if (err) |
| 1825 | break; | 1828 | break; |
| 1826 | } while (pte++, addr += PAGE_SIZE, addr != end); | 1829 | } while (addr += PAGE_SIZE, addr != end); |
| 1827 | 1830 | ||
| 1828 | arch_leave_lazy_mmu_mode(); | 1831 | arch_leave_lazy_mmu_mode(); |
| 1829 | 1832 | ||
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 7dd9d9f80694..4545d5944243 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
| @@ -1024,7 +1024,7 @@ static long do_mbind(unsigned long start, unsigned long len, | |||
| 1024 | 1024 | ||
| 1025 | err = migrate_prep(); | 1025 | err = migrate_prep(); |
| 1026 | if (err) | 1026 | if (err) |
| 1027 | return err; | 1027 | goto mpol_out; |
| 1028 | } | 1028 | } |
| 1029 | { | 1029 | { |
| 1030 | NODEMASK_SCRATCH(scratch); | 1030 | NODEMASK_SCRATCH(scratch); |
| @@ -1039,10 +1039,9 @@ static long do_mbind(unsigned long start, unsigned long len, | |||
| 1039 | err = -ENOMEM; | 1039 | err = -ENOMEM; |
| 1040 | NODEMASK_SCRATCH_FREE(scratch); | 1040 | NODEMASK_SCRATCH_FREE(scratch); |
| 1041 | } | 1041 | } |
| 1042 | if (err) { | 1042 | if (err) |
| 1043 | mpol_put(new); | 1043 | goto mpol_out; |
| 1044 | return err; | 1044 | |
| 1045 | } | ||
| 1046 | vma = check_range(mm, start, end, nmask, | 1045 | vma = check_range(mm, start, end, nmask, |
| 1047 | flags | MPOL_MF_INVERT, &pagelist); | 1046 | flags | MPOL_MF_INVERT, &pagelist); |
| 1048 | 1047 | ||
| @@ -1058,9 +1057,11 @@ static long do_mbind(unsigned long start, unsigned long len, | |||
| 1058 | 1057 | ||
| 1059 | if (!err && nr_failed && (flags & MPOL_MF_STRICT)) | 1058 | if (!err && nr_failed && (flags & MPOL_MF_STRICT)) |
| 1060 | err = -EIO; | 1059 | err = -EIO; |
| 1061 | } | 1060 | } else |
| 1061 | putback_lru_pages(&pagelist); | ||
| 1062 | 1062 | ||
| 1063 | up_write(&mm->mmap_sem); | 1063 | up_write(&mm->mmap_sem); |
| 1064 | mpol_out: | ||
| 1064 | mpol_put(new); | 1065 | mpol_put(new); |
| 1065 | return err; | 1066 | return err; |
| 1066 | } | 1067 | } |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index bf720550b44d..cdcedf661616 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -2183,7 +2183,7 @@ void show_free_areas(void) | |||
| 2183 | printk("active_anon:%lu inactive_anon:%lu isolated_anon:%lu\n" | 2183 | printk("active_anon:%lu inactive_anon:%lu isolated_anon:%lu\n" |
| 2184 | " active_file:%lu inactive_file:%lu isolated_file:%lu\n" | 2184 | " active_file:%lu inactive_file:%lu isolated_file:%lu\n" |
| 2185 | " unevictable:%lu" | 2185 | " unevictable:%lu" |
| 2186 | " dirty:%lu writeback:%lu unstable:%lu buffer:%lu\n" | 2186 | " dirty:%lu writeback:%lu unstable:%lu\n" |
| 2187 | " free:%lu slab_reclaimable:%lu slab_unreclaimable:%lu\n" | 2187 | " free:%lu slab_reclaimable:%lu slab_unreclaimable:%lu\n" |
| 2188 | " mapped:%lu shmem:%lu pagetables:%lu bounce:%lu\n", | 2188 | " mapped:%lu shmem:%lu pagetables:%lu bounce:%lu\n", |
| 2189 | global_page_state(NR_ACTIVE_ANON), | 2189 | global_page_state(NR_ACTIVE_ANON), |
| @@ -2196,7 +2196,6 @@ void show_free_areas(void) | |||
| 2196 | global_page_state(NR_FILE_DIRTY), | 2196 | global_page_state(NR_FILE_DIRTY), |
| 2197 | global_page_state(NR_WRITEBACK), | 2197 | global_page_state(NR_WRITEBACK), |
| 2198 | global_page_state(NR_UNSTABLE_NFS), | 2198 | global_page_state(NR_UNSTABLE_NFS), |
| 2199 | nr_blockdev_pages(), | ||
| 2200 | global_page_state(NR_FREE_PAGES), | 2199 | global_page_state(NR_FREE_PAGES), |
| 2201 | global_page_state(NR_SLAB_RECLAIMABLE), | 2200 | global_page_state(NR_SLAB_RECLAIMABLE), |
| 2202 | global_page_state(NR_SLAB_UNRECLAIMABLE), | 2201 | global_page_state(NR_SLAB_UNRECLAIMABLE), |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 64e438898832..777af57fd8c8 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
| @@ -544,6 +544,16 @@ redo: | |||
| 544 | */ | 544 | */ |
| 545 | lru = LRU_UNEVICTABLE; | 545 | lru = LRU_UNEVICTABLE; |
| 546 | add_page_to_unevictable_list(page); | 546 | add_page_to_unevictable_list(page); |
| 547 | /* | ||
| 548 | * When racing with an mlock clearing (page is | ||
| 549 | * unlocked), make sure that if the other thread does | ||
| 550 | * not observe our setting of PG_lru and fails | ||
| 551 | * isolation, we see PG_mlocked cleared below and move | ||
| 552 | * the page back to the evictable list. | ||
| 553 | * | ||
| 554 | * The other side is TestClearPageMlocked(). | ||
| 555 | */ | ||
| 556 | smp_mb(); | ||
| 547 | } | 557 | } |
| 548 | 558 | ||
| 549 | /* | 559 | /* |
| @@ -1088,7 +1098,7 @@ static unsigned long shrink_inactive_list(unsigned long max_scan, | |||
| 1088 | int lumpy_reclaim = 0; | 1098 | int lumpy_reclaim = 0; |
| 1089 | 1099 | ||
| 1090 | while (unlikely(too_many_isolated(zone, file, sc))) { | 1100 | while (unlikely(too_many_isolated(zone, file, sc))) { |
| 1091 | congestion_wait(WRITE, HZ/10); | 1101 | congestion_wait(BLK_RW_ASYNC, HZ/10); |
| 1092 | 1102 | ||
| 1093 | /* We are about to die and free our memory. Return now. */ | 1103 | /* We are about to die and free our memory. Return now. */ |
| 1094 | if (fatal_signal_pending(current)) | 1104 | if (fatal_signal_pending(current)) |
| @@ -1356,7 +1366,7 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, | |||
| 1356 | * IO, plus JVM can create lots of anon VM_EXEC pages, | 1366 | * IO, plus JVM can create lots of anon VM_EXEC pages, |
| 1357 | * so we ignore them here. | 1367 | * so we ignore them here. |
| 1358 | */ | 1368 | */ |
| 1359 | if ((vm_flags & VM_EXEC) && !PageAnon(page)) { | 1369 | if ((vm_flags & VM_EXEC) && page_is_file_cache(page)) { |
| 1360 | list_add(&page->lru, &l_active); | 1370 | list_add(&page->lru, &l_active); |
| 1361 | continue; | 1371 | continue; |
| 1362 | } | 1372 | } |
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index b2e07f0dd298..ea1e3daabefe 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
| @@ -43,7 +43,6 @@ | |||
| 43 | #include <net/9p/transport.h> | 43 | #include <net/9p/transport.h> |
| 44 | #include <linux/scatterlist.h> | 44 | #include <linux/scatterlist.h> |
| 45 | #include <linux/virtio.h> | 45 | #include <linux/virtio.h> |
| 46 | #include <linux/virtio_ids.h> | ||
| 47 | #include <linux/virtio_9p.h> | 46 | #include <linux/virtio_9p.h> |
| 48 | 47 | ||
| 49 | #define VIRTQUEUE_NUM 128 | 48 | #define VIRTQUEUE_NUM 128 |
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index 7f939ce29801..2bc6f6a8de68 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
| @@ -92,6 +92,8 @@ static void add_conn(struct work_struct *work) | |||
| 92 | 92 | ||
| 93 | dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); | 93 | dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); |
| 94 | 94 | ||
| 95 | dev_set_drvdata(&conn->dev, conn); | ||
| 96 | |||
| 95 | if (device_add(&conn->dev) < 0) { | 97 | if (device_add(&conn->dev) < 0) { |
| 96 | BT_ERR("Failed to register connection device"); | 98 | BT_ERR("Failed to register connection device"); |
| 97 | return; | 99 | return; |
| @@ -144,8 +146,6 @@ void hci_conn_init_sysfs(struct hci_conn *conn) | |||
| 144 | conn->dev.class = bt_class; | 146 | conn->dev.class = bt_class; |
| 145 | conn->dev.parent = &hdev->dev; | 147 | conn->dev.parent = &hdev->dev; |
| 146 | 148 | ||
| 147 | dev_set_drvdata(&conn->dev, conn); | ||
| 148 | |||
| 149 | device_initialize(&conn->dev); | 149 | device_initialize(&conn->dev); |
| 150 | 150 | ||
| 151 | INIT_WORK(&conn->work_add, add_conn); | 151 | INIT_WORK(&conn->work_add, add_conn); |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 555d9da1869b..77e9fb130adb 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
| @@ -555,12 +555,12 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status) | |||
| 555 | 555 | ||
| 556 | conn->feat_mask = 0; | 556 | conn->feat_mask = 0; |
| 557 | 557 | ||
| 558 | setup_timer(&conn->info_timer, l2cap_info_timeout, | ||
| 559 | (unsigned long) conn); | ||
| 560 | |||
| 561 | spin_lock_init(&conn->lock); | 558 | spin_lock_init(&conn->lock); |
| 562 | rwlock_init(&conn->chan_list.lock); | 559 | rwlock_init(&conn->chan_list.lock); |
| 563 | 560 | ||
| 561 | setup_timer(&conn->info_timer, l2cap_info_timeout, | ||
| 562 | (unsigned long) conn); | ||
| 563 | |||
| 564 | conn->disc_reason = 0x13; | 564 | conn->disc_reason = 0x13; |
| 565 | 565 | ||
| 566 | return conn; | 566 | return conn; |
| @@ -783,6 +783,9 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent) | |||
| 783 | /* Default config options */ | 783 | /* Default config options */ |
| 784 | pi->conf_len = 0; | 784 | pi->conf_len = 0; |
| 785 | pi->flush_to = L2CAP_DEFAULT_FLUSH_TO; | 785 | pi->flush_to = L2CAP_DEFAULT_FLUSH_TO; |
| 786 | skb_queue_head_init(TX_QUEUE(sk)); | ||
| 787 | skb_queue_head_init(SREJ_QUEUE(sk)); | ||
| 788 | INIT_LIST_HEAD(SREJ_LIST(sk)); | ||
| 786 | } | 789 | } |
| 787 | 790 | ||
| 788 | static struct proto l2cap_proto = { | 791 | static struct proto l2cap_proto = { |
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 4351ca2cf0b8..537731b3bcb3 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
| @@ -446,6 +446,28 @@ extern int sysctl_tcp_synack_retries; | |||
| 446 | 446 | ||
| 447 | EXPORT_SYMBOL_GPL(inet_csk_reqsk_queue_hash_add); | 447 | EXPORT_SYMBOL_GPL(inet_csk_reqsk_queue_hash_add); |
| 448 | 448 | ||
| 449 | /* Decide when to expire the request and when to resend SYN-ACK */ | ||
| 450 | static inline void syn_ack_recalc(struct request_sock *req, const int thresh, | ||
| 451 | const int max_retries, | ||
| 452 | const u8 rskq_defer_accept, | ||
| 453 | int *expire, int *resend) | ||
| 454 | { | ||
| 455 | if (!rskq_defer_accept) { | ||
| 456 | *expire = req->retrans >= thresh; | ||
| 457 | *resend = 1; | ||
| 458 | return; | ||
| 459 | } | ||
| 460 | *expire = req->retrans >= thresh && | ||
| 461 | (!inet_rsk(req)->acked || req->retrans >= max_retries); | ||
| 462 | /* | ||
| 463 | * Do not resend while waiting for data after ACK, | ||
| 464 | * start to resend on end of deferring period to give | ||
| 465 | * last chance for data or ACK to create established socket. | ||
| 466 | */ | ||
| 467 | *resend = !inet_rsk(req)->acked || | ||
| 468 | req->retrans >= rskq_defer_accept - 1; | ||
| 469 | } | ||
| 470 | |||
| 449 | void inet_csk_reqsk_queue_prune(struct sock *parent, | 471 | void inet_csk_reqsk_queue_prune(struct sock *parent, |
| 450 | const unsigned long interval, | 472 | const unsigned long interval, |
| 451 | const unsigned long timeout, | 473 | const unsigned long timeout, |
| @@ -501,9 +523,15 @@ void inet_csk_reqsk_queue_prune(struct sock *parent, | |||
| 501 | reqp=&lopt->syn_table[i]; | 523 | reqp=&lopt->syn_table[i]; |
| 502 | while ((req = *reqp) != NULL) { | 524 | while ((req = *reqp) != NULL) { |
| 503 | if (time_after_eq(now, req->expires)) { | 525 | if (time_after_eq(now, req->expires)) { |
| 504 | if ((req->retrans < thresh || | 526 | int expire = 0, resend = 0; |
| 505 | (inet_rsk(req)->acked && req->retrans < max_retries)) | 527 | |
| 506 | && !req->rsk_ops->rtx_syn_ack(parent, req)) { | 528 | syn_ack_recalc(req, thresh, max_retries, |
| 529 | queue->rskq_defer_accept, | ||
| 530 | &expire, &resend); | ||
| 531 | if (!expire && | ||
| 532 | (!resend || | ||
| 533 | !req->rsk_ops->rtx_syn_ack(parent, req) || | ||
| 534 | inet_rsk(req)->acked)) { | ||
| 507 | unsigned long timeo; | 535 | unsigned long timeo; |
| 508 | 536 | ||
| 509 | if (req->retrans++ == 0) | 537 | if (req->retrans++ == 0) |
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 0c0b6e363a20..e982b5c1ee17 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c | |||
| @@ -634,17 +634,16 @@ static int do_ip_setsockopt(struct sock *sk, int level, | |||
| 634 | break; | 634 | break; |
| 635 | } | 635 | } |
| 636 | dev = ip_dev_find(sock_net(sk), mreq.imr_address.s_addr); | 636 | dev = ip_dev_find(sock_net(sk), mreq.imr_address.s_addr); |
| 637 | if (dev) { | 637 | if (dev) |
| 638 | mreq.imr_ifindex = dev->ifindex; | 638 | mreq.imr_ifindex = dev->ifindex; |
| 639 | dev_put(dev); | ||
| 640 | } | ||
| 641 | } else | 639 | } else |
| 642 | dev = __dev_get_by_index(sock_net(sk), mreq.imr_ifindex); | 640 | dev = dev_get_by_index(sock_net(sk), mreq.imr_ifindex); |
| 643 | 641 | ||
| 644 | 642 | ||
| 645 | err = -EADDRNOTAVAIL; | 643 | err = -EADDRNOTAVAIL; |
| 646 | if (!dev) | 644 | if (!dev) |
| 647 | break; | 645 | break; |
| 646 | dev_put(dev); | ||
| 648 | 647 | ||
| 649 | err = -EINVAL; | 648 | err = -EINVAL; |
| 650 | if (sk->sk_bound_dev_if && | 649 | if (sk->sk_bound_dev_if && |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 64d0af675823..90b2e0649bfb 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
| @@ -326,6 +326,43 @@ void tcp_enter_memory_pressure(struct sock *sk) | |||
| 326 | 326 | ||
| 327 | EXPORT_SYMBOL(tcp_enter_memory_pressure); | 327 | EXPORT_SYMBOL(tcp_enter_memory_pressure); |
| 328 | 328 | ||
| 329 | /* Convert seconds to retransmits based on initial and max timeout */ | ||
| 330 | static u8 secs_to_retrans(int seconds, int timeout, int rto_max) | ||
| 331 | { | ||
| 332 | u8 res = 0; | ||
| 333 | |||
| 334 | if (seconds > 0) { | ||
| 335 | int period = timeout; | ||
| 336 | |||
| 337 | res = 1; | ||
| 338 | while (seconds > period && res < 255) { | ||
| 339 | res++; | ||
| 340 | timeout <<= 1; | ||
| 341 | if (timeout > rto_max) | ||
| 342 | timeout = rto_max; | ||
| 343 | period += timeout; | ||
| 344 | } | ||
| 345 | } | ||
| 346 | return res; | ||
| 347 | } | ||
| 348 | |||
| 349 | /* Convert retransmits to seconds based on initial and max timeout */ | ||
| 350 | static int retrans_to_secs(u8 retrans, int timeout, int rto_max) | ||
| 351 | { | ||
| 352 | int period = 0; | ||
| 353 | |||
| 354 | if (retrans > 0) { | ||
| 355 | period = timeout; | ||
| 356 | while (--retrans) { | ||
| 357 | timeout <<= 1; | ||
| 358 | if (timeout > rto_max) | ||
| 359 | timeout = rto_max; | ||
| 360 | period += timeout; | ||
| 361 | } | ||
| 362 | } | ||
| 363 | return period; | ||
| 364 | } | ||
| 365 | |||
| 329 | /* | 366 | /* |
| 330 | * Wait for a TCP event. | 367 | * Wait for a TCP event. |
| 331 | * | 368 | * |
| @@ -1405,7 +1442,9 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
| 1405 | goto found_ok_skb; | 1442 | goto found_ok_skb; |
| 1406 | if (tcp_hdr(skb)->fin) | 1443 | if (tcp_hdr(skb)->fin) |
| 1407 | goto found_fin_ok; | 1444 | goto found_fin_ok; |
| 1408 | WARN_ON(!(flags & MSG_PEEK)); | 1445 | if (WARN_ON(!(flags & MSG_PEEK))) |
| 1446 | printk(KERN_INFO "recvmsg bug 2: copied %X " | ||
| 1447 | "seq %X\n", *seq, TCP_SKB_CB(skb)->seq); | ||
| 1409 | } | 1448 | } |
| 1410 | 1449 | ||
| 1411 | /* Well, if we have backlog, try to process it now yet. */ | 1450 | /* Well, if we have backlog, try to process it now yet. */ |
| @@ -2163,16 +2202,10 @@ static int do_tcp_setsockopt(struct sock *sk, int level, | |||
| 2163 | break; | 2202 | break; |
| 2164 | 2203 | ||
| 2165 | case TCP_DEFER_ACCEPT: | 2204 | case TCP_DEFER_ACCEPT: |
| 2166 | icsk->icsk_accept_queue.rskq_defer_accept = 0; | 2205 | /* Translate value in seconds to number of retransmits */ |
| 2167 | if (val > 0) { | 2206 | icsk->icsk_accept_queue.rskq_defer_accept = |
| 2168 | /* Translate value in seconds to number of | 2207 | secs_to_retrans(val, TCP_TIMEOUT_INIT / HZ, |
| 2169 | * retransmits */ | 2208 | TCP_RTO_MAX / HZ); |
| 2170 | while (icsk->icsk_accept_queue.rskq_defer_accept < 32 && | ||
| 2171 | val > ((TCP_TIMEOUT_INIT / HZ) << | ||
| 2172 | icsk->icsk_accept_queue.rskq_defer_accept)) | ||
| 2173 | icsk->icsk_accept_queue.rskq_defer_accept++; | ||
| 2174 | icsk->icsk_accept_queue.rskq_defer_accept++; | ||
| 2175 | } | ||
| 2176 | break; | 2209 | break; |
| 2177 | 2210 | ||
| 2178 | case TCP_WINDOW_CLAMP: | 2211 | case TCP_WINDOW_CLAMP: |
| @@ -2353,8 +2386,8 @@ static int do_tcp_getsockopt(struct sock *sk, int level, | |||
| 2353 | val = (val ? : sysctl_tcp_fin_timeout) / HZ; | 2386 | val = (val ? : sysctl_tcp_fin_timeout) / HZ; |
| 2354 | break; | 2387 | break; |
| 2355 | case TCP_DEFER_ACCEPT: | 2388 | case TCP_DEFER_ACCEPT: |
| 2356 | val = !icsk->icsk_accept_queue.rskq_defer_accept ? 0 : | 2389 | val = retrans_to_secs(icsk->icsk_accept_queue.rskq_defer_accept, |
| 2357 | ((TCP_TIMEOUT_INIT / HZ) << (icsk->icsk_accept_queue.rskq_defer_accept - 1)); | 2390 | TCP_TIMEOUT_INIT / HZ, TCP_RTO_MAX / HZ); |
| 2358 | break; | 2391 | break; |
| 2359 | case TCP_WINDOW_CLAMP: | 2392 | case TCP_WINDOW_CLAMP: |
| 2360 | val = tp->window_clamp; | 2393 | val = tp->window_clamp; |
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index e320afea07fc..4c03598ed924 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
| @@ -641,10 +641,9 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb, | |||
| 641 | if (!(flg & TCP_FLAG_ACK)) | 641 | if (!(flg & TCP_FLAG_ACK)) |
| 642 | return NULL; | 642 | return NULL; |
| 643 | 643 | ||
| 644 | /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */ | 644 | /* While TCP_DEFER_ACCEPT is active, drop bare ACK. */ |
| 645 | if (inet_csk(sk)->icsk_accept_queue.rskq_defer_accept && | 645 | if (req->retrans < inet_csk(sk)->icsk_accept_queue.rskq_defer_accept && |
| 646 | TCP_SKB_CB(skb)->end_seq == tcp_rsk(req)->rcv_isn + 1) { | 646 | TCP_SKB_CB(skb)->end_seq == tcp_rsk(req)->rcv_isn + 1) { |
| 647 | inet_csk(sk)->icsk_accept_queue.rskq_defer_accept--; | ||
| 648 | inet_rsk(req)->acked = 1; | 647 | inet_rsk(req)->acked = 1; |
| 649 | return NULL; | 648 | return NULL; |
| 650 | } | 649 | } |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 14f54eb5a7fc..4f7aaf6996a3 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
| @@ -496,13 +496,17 @@ done: | |||
| 496 | goto e_inval; | 496 | goto e_inval; |
| 497 | 497 | ||
| 498 | if (val) { | 498 | if (val) { |
| 499 | struct net_device *dev; | ||
| 500 | |||
| 499 | if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val) | 501 | if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val) |
| 500 | goto e_inval; | 502 | goto e_inval; |
| 501 | 503 | ||
| 502 | if (__dev_get_by_index(net, val) == NULL) { | 504 | dev = dev_get_by_index(net, val); |
| 505 | if (!dev) { | ||
| 503 | retv = -ENODEV; | 506 | retv = -ENODEV; |
| 504 | break; | 507 | break; |
| 505 | } | 508 | } |
| 509 | dev_put(dev); | ||
| 506 | } | 510 | } |
| 507 | np->mcast_oif = val; | 511 | np->mcast_oif = val; |
| 508 | retv = 0; | 512 | retv = 0; |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 51ab497115eb..fc820cd75453 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
| @@ -1074,6 +1074,8 @@ restart: | |||
| 1074 | err = -ECONNREFUSED; | 1074 | err = -ECONNREFUSED; |
| 1075 | if (other->sk_state != TCP_LISTEN) | 1075 | if (other->sk_state != TCP_LISTEN) |
| 1076 | goto out_unlock; | 1076 | goto out_unlock; |
| 1077 | if (other->sk_shutdown & RCV_SHUTDOWN) | ||
| 1078 | goto out_unlock; | ||
| 1077 | 1079 | ||
| 1078 | if (unix_recvq_full(other)) { | 1080 | if (unix_recvq_full(other)) { |
| 1079 | err = -EAGAIN; | 1081 | err = -EAGAIN; |
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 87bbb8bce9bf..bc4114f1ab30 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # (c) 2001, Dave Jones. <davej@redhat.com> (the file handling bit) | 2 | # (c) 2001, Dave Jones. <davej@redhat.com> (the file handling bit) |
| 3 | # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit) | 3 | # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit) |
| 4 | # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite) | 4 | # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite) |
| 5 | # (c) 2008, Andy Whitcroft <apw@canonical.com> | 5 | # (c) 2008,2009, Andy Whitcroft <apw@canonical.com> |
| 6 | # Licensed under the terms of the GNU GPL License version 2 | 6 | # Licensed under the terms of the GNU GPL License version 2 |
| 7 | 7 | ||
| 8 | use strict; | 8 | use strict; |
| @@ -10,7 +10,7 @@ use strict; | |||
| 10 | my $P = $0; | 10 | my $P = $0; |
| 11 | $P =~ s@.*/@@g; | 11 | $P =~ s@.*/@@g; |
| 12 | 12 | ||
| 13 | my $V = '0.29'; | 13 | my $V = '0.30'; |
| 14 | 14 | ||
| 15 | use Getopt::Long qw(:config no_auto_abbrev); | 15 | use Getopt::Long qw(:config no_auto_abbrev); |
| 16 | 16 | ||
| @@ -130,7 +130,10 @@ if ($tree) { | |||
| 130 | 130 | ||
| 131 | my $emitted_corrupt = 0; | 131 | my $emitted_corrupt = 0; |
| 132 | 132 | ||
| 133 | our $Ident = qr{[A-Za-z_][A-Za-z\d_]*}; | 133 | our $Ident = qr{ |
| 134 | [A-Za-z_][A-Za-z\d_]* | ||
| 135 | (?:\s*\#\#\s*[A-Za-z_][A-Za-z\d_]*)* | ||
| 136 | }x; | ||
| 134 | our $Storage = qr{extern|static|asmlinkage}; | 137 | our $Storage = qr{extern|static|asmlinkage}; |
| 135 | our $Sparse = qr{ | 138 | our $Sparse = qr{ |
| 136 | __user| | 139 | __user| |
| @@ -997,23 +1000,25 @@ sub annotate_values { | |||
| 997 | 1000 | ||
| 998 | sub possible { | 1001 | sub possible { |
| 999 | my ($possible, $line) = @_; | 1002 | my ($possible, $line) = @_; |
| 1000 | 1003 | my $notPermitted = qr{(?: | |
| 1001 | print "CHECK<$possible> ($line)\n" if ($dbg_possible > 2); | ||
| 1002 | if ($possible !~ /(?: | ||
| 1003 | ^(?: | 1004 | ^(?: |
| 1004 | $Modifier| | 1005 | $Modifier| |
| 1005 | $Storage| | 1006 | $Storage| |
| 1006 | $Type| | 1007 | $Type| |
| 1007 | DEFINE_\S+| | 1008 | DEFINE_\S+ |
| 1009 | )$| | ||
| 1010 | ^(?: | ||
| 1008 | goto| | 1011 | goto| |
| 1009 | return| | 1012 | return| |
| 1010 | case| | 1013 | case| |
| 1011 | else| | 1014 | else| |
| 1012 | asm|__asm__| | 1015 | asm|__asm__| |
| 1013 | do | 1016 | do |
| 1014 | )$| | 1017 | )(?:\s|$)| |
| 1015 | ^(?:typedef|struct|enum)\b | 1018 | ^(?:typedef|struct|enum)\b |
| 1016 | )/x) { | 1019 | )}x; |
| 1020 | warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2); | ||
| 1021 | if ($possible !~ $notPermitted) { | ||
| 1017 | # Check for modifiers. | 1022 | # Check for modifiers. |
| 1018 | $possible =~ s/\s*$Storage\s*//g; | 1023 | $possible =~ s/\s*$Storage\s*//g; |
| 1019 | $possible =~ s/\s*$Sparse\s*//g; | 1024 | $possible =~ s/\s*$Sparse\s*//g; |
| @@ -1022,8 +1027,10 @@ sub possible { | |||
| 1022 | } elsif ($possible =~ /\s/) { | 1027 | } elsif ($possible =~ /\s/) { |
| 1023 | $possible =~ s/\s*$Type\s*//g; | 1028 | $possible =~ s/\s*$Type\s*//g; |
| 1024 | for my $modifier (split(' ', $possible)) { | 1029 | for my $modifier (split(' ', $possible)) { |
| 1025 | warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible); | 1030 | if ($modifier !~ $notPermitted) { |
| 1026 | push(@modifierList, $modifier); | 1031 | warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible); |
| 1032 | push(@modifierList, $modifier); | ||
| 1033 | } | ||
| 1027 | } | 1034 | } |
| 1028 | 1035 | ||
| 1029 | } else { | 1036 | } else { |
| @@ -1138,6 +1145,7 @@ sub process { | |||
| 1138 | # suppression flags | 1145 | # suppression flags |
| 1139 | my %suppress_ifbraces; | 1146 | my %suppress_ifbraces; |
| 1140 | my %suppress_whiletrailers; | 1147 | my %suppress_whiletrailers; |
| 1148 | my %suppress_export; | ||
| 1141 | 1149 | ||
| 1142 | # Pre-scan the patch sanitizing the lines. | 1150 | # Pre-scan the patch sanitizing the lines. |
| 1143 | # Pre-scan the patch looking for any __setup documentation. | 1151 | # Pre-scan the patch looking for any __setup documentation. |
| @@ -1230,7 +1238,6 @@ sub process { | |||
| 1230 | $linenr++; | 1238 | $linenr++; |
| 1231 | 1239 | ||
| 1232 | my $rawline = $rawlines[$linenr - 1]; | 1240 | my $rawline = $rawlines[$linenr - 1]; |
| 1233 | my $hunk_line = ($realcnt != 0); | ||
| 1234 | 1241 | ||
| 1235 | #extract the line range in the file after the patch is applied | 1242 | #extract the line range in the file after the patch is applied |
| 1236 | if ($line=~/^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@/) { | 1243 | if ($line=~/^\@\@ -\d+(?:,\d+)? \+(\d+)(,(\d+))? \@\@/) { |
| @@ -1247,6 +1254,7 @@ sub process { | |||
| 1247 | 1254 | ||
| 1248 | %suppress_ifbraces = (); | 1255 | %suppress_ifbraces = (); |
| 1249 | %suppress_whiletrailers = (); | 1256 | %suppress_whiletrailers = (); |
| 1257 | %suppress_export = (); | ||
| 1250 | next; | 1258 | next; |
| 1251 | 1259 | ||
| 1252 | # track the line number as we move through the hunk, note that | 1260 | # track the line number as we move through the hunk, note that |
| @@ -1270,6 +1278,8 @@ sub process { | |||
| 1270 | $realcnt--; | 1278 | $realcnt--; |
| 1271 | } | 1279 | } |
| 1272 | 1280 | ||
| 1281 | my $hunk_line = ($realcnt != 0); | ||
| 1282 | |||
| 1273 | #make up the handle for any error we report on this line | 1283 | #make up the handle for any error we report on this line |
| 1274 | $prefix = "$filename:$realline: " if ($emacs && $file); | 1284 | $prefix = "$filename:$realline: " if ($emacs && $file); |
| 1275 | $prefix = "$filename:$linenr: " if ($emacs && !$file); | 1285 | $prefix = "$filename:$linenr: " if ($emacs && !$file); |
| @@ -1420,13 +1430,22 @@ sub process { | |||
| 1420 | } | 1430 | } |
| 1421 | 1431 | ||
| 1422 | # Check for potential 'bare' types | 1432 | # Check for potential 'bare' types |
| 1423 | my ($stat, $cond, $line_nr_next, $remain_next, $off_next); | 1433 | my ($stat, $cond, $line_nr_next, $remain_next, $off_next, |
| 1434 | $realline_next); | ||
| 1424 | if ($realcnt && $line =~ /.\s*\S/) { | 1435 | if ($realcnt && $line =~ /.\s*\S/) { |
| 1425 | ($stat, $cond, $line_nr_next, $remain_next, $off_next) = | 1436 | ($stat, $cond, $line_nr_next, $remain_next, $off_next) = |
| 1426 | ctx_statement_block($linenr, $realcnt, 0); | 1437 | ctx_statement_block($linenr, $realcnt, 0); |
| 1427 | $stat =~ s/\n./\n /g; | 1438 | $stat =~ s/\n./\n /g; |
| 1428 | $cond =~ s/\n./\n /g; | 1439 | $cond =~ s/\n./\n /g; |
| 1429 | 1440 | ||
| 1441 | # Find the real next line. | ||
| 1442 | $realline_next = $line_nr_next; | ||
| 1443 | if (defined $realline_next && | ||
| 1444 | (!defined $lines[$realline_next - 1] || | ||
| 1445 | substr($lines[$realline_next - 1], $off_next) =~ /^\s*$/)) { | ||
| 1446 | $realline_next++; | ||
| 1447 | } | ||
| 1448 | |||
| 1430 | my $s = $stat; | 1449 | my $s = $stat; |
| 1431 | $s =~ s/{.*$//s; | 1450 | $s =~ s/{.*$//s; |
| 1432 | 1451 | ||
| @@ -1661,8 +1680,8 @@ sub process { | |||
| 1661 | } | 1680 | } |
| 1662 | 1681 | ||
| 1663 | # check for initialisation to aggregates open brace on the next line | 1682 | # check for initialisation to aggregates open brace on the next line |
| 1664 | if ($prevline =~ /$Declare\s*$Ident\s*=\s*$/ && | 1683 | if ($line =~ /^.\s*{/ && |
| 1665 | $line =~ /^.\s*{/) { | 1684 | $prevline =~ /(?:^|[^=])=\s*$/) { |
| 1666 | ERROR("that open brace { should be on the previous line\n" . $hereprev); | 1685 | ERROR("that open brace { should be on the previous line\n" . $hereprev); |
| 1667 | } | 1686 | } |
| 1668 | 1687 | ||
| @@ -1687,21 +1706,40 @@ sub process { | |||
| 1687 | $line =~ s@//.*@@; | 1706 | $line =~ s@//.*@@; |
| 1688 | $opline =~ s@//.*@@; | 1707 | $opline =~ s@//.*@@; |
| 1689 | 1708 | ||
| 1690 | #EXPORT_SYMBOL should immediately follow its function closing }. | 1709 | # EXPORT_SYMBOL should immediately follow the thing it is exporting, consider |
| 1691 | if (($line =~ /EXPORT_SYMBOL.*\((.*)\)/) || | 1710 | # the whole statement. |
| 1692 | ($line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) { | 1711 | #print "APW <$lines[$realline_next - 1]>\n"; |
| 1712 | if (defined $realline_next && | ||
| 1713 | exists $lines[$realline_next - 1] && | ||
| 1714 | !defined $suppress_export{$realline_next} && | ||
| 1715 | ($lines[$realline_next - 1] =~ /EXPORT_SYMBOL.*\((.*)\)/ || | ||
| 1716 | $lines[$realline_next - 1] =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) { | ||
| 1693 | my $name = $1; | 1717 | my $name = $1; |
| 1694 | if ($prevline !~ /(?: | 1718 | if ($stat !~ /(?: |
| 1695 | ^.}| | 1719 | \n.}\s*$| |
| 1696 | ^.DEFINE_$Ident\(\Q$name\E\)| | 1720 | ^.DEFINE_$Ident\(\Q$name\E\)| |
| 1697 | ^.DECLARE_$Ident\(\Q$name\E\)| | 1721 | ^.DECLARE_$Ident\(\Q$name\E\)| |
| 1698 | ^.LIST_HEAD\(\Q$name\E\)| | 1722 | ^.LIST_HEAD\(\Q$name\E\)| |
| 1699 | ^.$Type\s*\(\s*\*\s*\Q$name\E\s*\)\s*\(| | 1723 | ^.(?:$Storage\s+)?$Type\s*\(\s*\*\s*\Q$name\E\s*\)\s*\(| |
| 1700 | \b\Q$name\E(?:\s+$Attribute)?\s*(?:;|=|\[) | 1724 | \b\Q$name\E(?:\s+$Attribute)*\s*(?:;|=|\[|\() |
| 1701 | )/x) { | 1725 | )/x) { |
| 1702 | WARN("EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr); | 1726 | #print "FOO A<$lines[$realline_next - 1]> stat<$stat> name<$name>\n"; |
| 1727 | $suppress_export{$realline_next} = 2; | ||
| 1728 | } else { | ||
| 1729 | $suppress_export{$realline_next} = 1; | ||
| 1703 | } | 1730 | } |
| 1704 | } | 1731 | } |
| 1732 | if (!defined $suppress_export{$linenr} && | ||
| 1733 | $prevline =~ /^.\s*$/ && | ||
| 1734 | ($line =~ /EXPORT_SYMBOL.*\((.*)\)/ || | ||
| 1735 | $line =~ /EXPORT_UNUSED_SYMBOL.*\((.*)\)/)) { | ||
| 1736 | #print "FOO B <$lines[$linenr - 1]>\n"; | ||
| 1737 | $suppress_export{$linenr} = 2; | ||
| 1738 | } | ||
| 1739 | if (defined $suppress_export{$linenr} && | ||
| 1740 | $suppress_export{$linenr} == 2) { | ||
| 1741 | WARN("EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr); | ||
| 1742 | } | ||
| 1705 | 1743 | ||
| 1706 | # check for external initialisers. | 1744 | # check for external initialisers. |
| 1707 | if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) { | 1745 | if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) { |
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index cdb44b63342e..102b76608f35 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | use strict; | 13 | use strict; |
| 14 | 14 | ||
| 15 | my $P = $0; | 15 | my $P = $0; |
| 16 | my $V = '0.20'; | 16 | my $V = '0.21'; |
| 17 | 17 | ||
| 18 | use Getopt::Long qw(:config no_auto_abbrev); | 18 | use Getopt::Long qw(:config no_auto_abbrev); |
| 19 | 19 | ||
| @@ -37,6 +37,7 @@ my $scm = 0; | |||
| 37 | my $web = 0; | 37 | my $web = 0; |
| 38 | my $subsystem = 0; | 38 | my $subsystem = 0; |
| 39 | my $status = 0; | 39 | my $status = 0; |
| 40 | my $keywords = 1; | ||
| 40 | my $from_filename = 0; | 41 | my $from_filename = 0; |
| 41 | my $pattern_depth = 0; | 42 | my $pattern_depth = 0; |
| 42 | my $version = 0; | 43 | my $version = 0; |
| @@ -84,6 +85,7 @@ if (!GetOptions( | |||
| 84 | 'scm!' => \$scm, | 85 | 'scm!' => \$scm, |
| 85 | 'web!' => \$web, | 86 | 'web!' => \$web, |
| 86 | 'pattern-depth=i' => \$pattern_depth, | 87 | 'pattern-depth=i' => \$pattern_depth, |
| 88 | 'k|keywords!' => \$keywords, | ||
| 87 | 'f|file' => \$from_filename, | 89 | 'f|file' => \$from_filename, |
| 88 | 'v|version' => \$version, | 90 | 'v|version' => \$version, |
| 89 | 'h|help' => \$help, | 91 | 'h|help' => \$help, |
| @@ -132,6 +134,8 @@ if (!top_of_kernel_tree($lk_path)) { | |||
| 132 | ## Read MAINTAINERS for type/value pairs | 134 | ## Read MAINTAINERS for type/value pairs |
| 133 | 135 | ||
| 134 | my @typevalue = (); | 136 | my @typevalue = (); |
| 137 | my %keyword_hash; | ||
| 138 | |||
| 135 | open(MAINT, "<${lk_path}MAINTAINERS") || die "$P: Can't open MAINTAINERS\n"; | 139 | open(MAINT, "<${lk_path}MAINTAINERS") || die "$P: Can't open MAINTAINERS\n"; |
| 136 | while (<MAINT>) { | 140 | while (<MAINT>) { |
| 137 | my $line = $_; | 141 | my $line = $_; |
| @@ -149,6 +153,8 @@ while (<MAINT>) { | |||
| 149 | if ((-d $value)) { | 153 | if ((-d $value)) { |
| 150 | $value =~ s@([^/])$@$1/@; | 154 | $value =~ s@([^/])$@$1/@; |
| 151 | } | 155 | } |
| 156 | } elsif ($type eq "K") { | ||
| 157 | $keyword_hash{@typevalue} = $value; | ||
| 152 | } | 158 | } |
| 153 | push(@typevalue, "$type:$value"); | 159 | push(@typevalue, "$type:$value"); |
| 154 | } elsif (!/^(\s)*$/) { | 160 | } elsif (!/^(\s)*$/) { |
| @@ -188,6 +194,7 @@ if ($email_remove_duplicates) { | |||
| 188 | 194 | ||
| 189 | my @files = (); | 195 | my @files = (); |
| 190 | my @range = (); | 196 | my @range = (); |
| 197 | my @keyword_tvi = (); | ||
| 191 | 198 | ||
| 192 | foreach my $file (@ARGV) { | 199 | foreach my $file (@ARGV) { |
| 193 | ##if $file is a directory and it lacks a trailing slash, add one | 200 | ##if $file is a directory and it lacks a trailing slash, add one |
| @@ -198,11 +205,24 @@ foreach my $file (@ARGV) { | |||
| 198 | } | 205 | } |
| 199 | if ($from_filename) { | 206 | if ($from_filename) { |
| 200 | push(@files, $file); | 207 | push(@files, $file); |
| 208 | if (-f $file && $keywords) { | ||
| 209 | open(FILE, "<$file") or die "$P: Can't open ${file}\n"; | ||
| 210 | while (<FILE>) { | ||
| 211 | my $patch_line = $_; | ||
| 212 | foreach my $line (keys %keyword_hash) { | ||
| 213 | if ($patch_line =~ m/^.*$keyword_hash{$line}/x) { | ||
| 214 | push(@keyword_tvi, $line); | ||
| 215 | } | ||
| 216 | } | ||
| 217 | } | ||
| 218 | close(FILE); | ||
| 219 | } | ||
| 201 | } else { | 220 | } else { |
| 202 | my $file_cnt = @files; | 221 | my $file_cnt = @files; |
| 203 | my $lastfile; | 222 | my $lastfile; |
| 204 | open(PATCH, "<$file") or die "$P: Can't open ${file}\n"; | 223 | open(PATCH, "<$file") or die "$P: Can't open ${file}\n"; |
| 205 | while (<PATCH>) { | 224 | while (<PATCH>) { |
| 225 | my $patch_line = $_; | ||
| 206 | if (m/^\+\+\+\s+(\S+)/) { | 226 | if (m/^\+\+\+\s+(\S+)/) { |
| 207 | my $filename = $1; | 227 | my $filename = $1; |
| 208 | $filename =~ s@^[^/]*/@@; | 228 | $filename =~ s@^[^/]*/@@; |
| @@ -213,6 +233,12 @@ foreach my $file (@ARGV) { | |||
| 213 | if ($email_git_blame) { | 233 | if ($email_git_blame) { |
| 214 | push(@range, "$lastfile:$1:$2"); | 234 | push(@range, "$lastfile:$1:$2"); |
| 215 | } | 235 | } |
| 236 | } elsif ($keywords) { | ||
| 237 | foreach my $line (keys %keyword_hash) { | ||
| 238 | if ($patch_line =~ m/^[+-].*$keyword_hash{$line}/x) { | ||
| 239 | push(@keyword_tvi, $line); | ||
| 240 | } | ||
| 241 | } | ||
| 216 | } | 242 | } |
| 217 | } | 243 | } |
| 218 | close(PATCH); | 244 | close(PATCH); |
| @@ -286,6 +312,13 @@ foreach my $file (@files) { | |||
| 286 | } | 312 | } |
| 287 | } | 313 | } |
| 288 | 314 | ||
| 315 | if ($keywords) { | ||
| 316 | @keyword_tvi = sort_and_uniq(@keyword_tvi); | ||
| 317 | foreach my $line (@keyword_tvi) { | ||
| 318 | add_categories($line); | ||
| 319 | } | ||
| 320 | } | ||
| 321 | |||
| 289 | if ($email) { | 322 | if ($email) { |
| 290 | foreach my $chief (@penguin_chief) { | 323 | foreach my $chief (@penguin_chief) { |
| 291 | if ($chief =~ m/^(.*):(.*)/) { | 324 | if ($chief =~ m/^(.*):(.*)/) { |
| @@ -384,6 +417,7 @@ Output type options: | |||
| 384 | 417 | ||
| 385 | Other options: | 418 | Other options: |
| 386 | --pattern-depth => Number of pattern directory traversals (default: 0 (all)) | 419 | --pattern-depth => Number of pattern directory traversals (default: 0 (all)) |
| 420 | --keywords => scan patch for keywords (default: 1 (on)) | ||
| 387 | --version => show version | 421 | --version => show version |
| 388 | --help => show this help information | 422 | --help => show this help information |
| 389 | 423 | ||
| @@ -486,7 +520,6 @@ sub format_email { | |||
| 486 | } | 520 | } |
| 487 | 521 | ||
| 488 | sub find_starting_index { | 522 | sub find_starting_index { |
| 489 | |||
| 490 | my ($index) = @_; | 523 | my ($index) = @_; |
| 491 | 524 | ||
| 492 | while ($index > 0) { | 525 | while ($index > 0) { |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index b7c78a403dc2..7495ce347344 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
| @@ -2717,8 +2717,6 @@ int kvm_init(void *opaque, unsigned int vcpu_size, | |||
| 2717 | int r; | 2717 | int r; |
| 2718 | int cpu; | 2718 | int cpu; |
| 2719 | 2719 | ||
| 2720 | kvm_init_debug(); | ||
| 2721 | |||
| 2722 | r = kvm_arch_init(opaque); | 2720 | r = kvm_arch_init(opaque); |
| 2723 | if (r) | 2721 | if (r) |
| 2724 | goto out_fail; | 2722 | goto out_fail; |
| @@ -2785,6 +2783,8 @@ int kvm_init(void *opaque, unsigned int vcpu_size, | |||
| 2785 | kvm_preempt_ops.sched_in = kvm_sched_in; | 2783 | kvm_preempt_ops.sched_in = kvm_sched_in; |
| 2786 | kvm_preempt_ops.sched_out = kvm_sched_out; | 2784 | kvm_preempt_ops.sched_out = kvm_sched_out; |
| 2787 | 2785 | ||
| 2786 | kvm_init_debug(); | ||
| 2787 | |||
| 2788 | return 0; | 2788 | return 0; |
| 2789 | 2789 | ||
| 2790 | out_free: | 2790 | out_free: |
| @@ -2807,7 +2807,6 @@ out_free_0: | |||
| 2807 | out: | 2807 | out: |
| 2808 | kvm_arch_exit(); | 2808 | kvm_arch_exit(); |
| 2809 | out_fail: | 2809 | out_fail: |
| 2810 | kvm_exit_debug(); | ||
| 2811 | return r; | 2810 | return r; |
| 2812 | } | 2811 | } |
| 2813 | EXPORT_SYMBOL_GPL(kvm_init); | 2812 | EXPORT_SYMBOL_GPL(kvm_init); |
| @@ -2815,6 +2814,7 @@ EXPORT_SYMBOL_GPL(kvm_init); | |||
| 2815 | void kvm_exit(void) | 2814 | void kvm_exit(void) |
| 2816 | { | 2815 | { |
| 2817 | tracepoint_synchronize_unregister(); | 2816 | tracepoint_synchronize_unregister(); |
| 2817 | kvm_exit_debug(); | ||
| 2818 | misc_deregister(&kvm_dev); | 2818 | misc_deregister(&kvm_dev); |
| 2819 | kmem_cache_destroy(kvm_vcpu_cache); | 2819 | kmem_cache_destroy(kvm_vcpu_cache); |
| 2820 | sysdev_unregister(&kvm_sysdev); | 2820 | sysdev_unregister(&kvm_sysdev); |
| @@ -2824,7 +2824,6 @@ void kvm_exit(void) | |||
| 2824 | on_each_cpu(hardware_disable, NULL, 1); | 2824 | on_each_cpu(hardware_disable, NULL, 1); |
| 2825 | kvm_arch_hardware_unsetup(); | 2825 | kvm_arch_hardware_unsetup(); |
| 2826 | kvm_arch_exit(); | 2826 | kvm_arch_exit(); |
| 2827 | kvm_exit_debug(); | ||
| 2828 | free_cpumask_var(cpus_hardware_enabled); | 2827 | free_cpumask_var(cpus_hardware_enabled); |
| 2829 | __free_page(bad_page); | 2828 | __free_page(bad_page); |
| 2830 | } | 2829 | } |
