commit fb2e405fc1fc8b20d9c78eaa1c7fd5a297efde43 Author: Adrian Bunk Date: Fri Jul 25 02:55:49 2008 +0300 fix fs/nfs/nfsroot.c compilation This fixes the following compile error caused by commit f9247273cb69ba101877e946d2d83044409cc8c5 ("UFS: add const to parser token table"): CC fs/nfs/nfsroot.o /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/nfs/nfsroot.c:130: error: tokens causes a section type conflict make[3]: *** [fs/nfs/nfsroot.o] Error 1 Signed-off-by: Adrian Bunk Signed-off-by: Linus Torvalds commit 4b9f12a3779c548b68bc9af7d94030868ad3aa1b Author: Linus Torvalds Date: Thu Jul 24 17:29:00 2008 -0700 x86/oprofile/nmi_int: add Nehalem to list of ppro cores ..otherwise oprofile will fall back on that poor timer interrupt. Also replace the unreadable chain of if-statements with a "switch()" statement instead. It generates better code, and is a lot clearer. Signed-off-by: Linus Torvalds commit b30f3ae50cd03ef2ff433a5030fbf88dd8323528 Author: Linus Torvalds Date: Thu Jul 24 15:43:44 2008 -0700 x86-64: Clean up 'save/restore_i387()' usage Suresh Siddha wants to fix a possible FPU leakage in error conditions, but the fact that save/restore_i387() are inlines in a header file makes that harder to do than necessary. So start off with an obvious cleanup. This just moves the x86-64 version of save/restore_i387() out of the header file, and moves it to the only file that it is actually used in: arch/x86/kernel/signal_64.c. So exposing it in a header file was wrong to begin with. [ Side note: I'd like to fix up some of the games we play with the 32-bit version of these functions too, but that's a separate matter. The 32-bit versions are shared - under different names at that! - by both the native x86-32 code and the x86-64 32-bit compatibility code ] Acked-by: Suresh Siddha Signed-off-by: Linus Torvalds commit b5684b83b1e1579bbbc80e703e990c0cccf5892c Merge: 1481b91... 1b8ebad... Author: Linus Torvalds Date: Thu Jul 24 14:55:09 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (76 commits) ide: use proper printk() KERN_* levels in ide-probe.c ide: fix for EATA SCSI HBA in ATA emulating mode ide: remove stale comments from drivers/ide/Makefile ide: enable local IRQs in all handlers for TASKFILE_NO_DATA data phase ide-scsi: remove kmalloced struct request ht6560b: remove old history ht6560b: update email address ide-cd: fix oops when using growisofs gayle: release resources on ide_host_add() failure palm_bk3710: add UltraDMA/100 support ide: trivial sparse annotations ide: ide-tape.c sparse annotations and unaligned access removal ide: drop 'name' parameter from ->init_chipset method ide: prefix messages from IDE PCI host drivers by driver name it821x: remove DECLARE_ITE_DEV() macro it8213: remove DECLARE_ITE_DEV() macro ide: include PCI device name in messages from IDE PCI host drivers ide: remove for some archs ide-generic: remove ide_default_{io_base,irq}() inlines (take 3) ide-generic: is no longer needed on ppc32 ... commit 1481b9109fe771ec8b035d7760f42e36d2bed5d4 Merge: 5042d99... f88133d... Author: Linus Torvalds Date: Thu Jul 24 13:57:37 2008 -0700 Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6 * 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6: acpi: fix crash in core ACPI code, triggered by CONFIG_ACPI_PCI_SLOT=y ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM ACPI: thinkpad-acpi: bump up version to 0.21 ACPI: thinkpad-acpi: add bluetooth and WWAN rfkill support ACPI: thinkpad-acpi: WLSW overrides other rfkill switches ACPI: thinkpad-acpi: prepare for bluetooth and wwan rfkill support ACPI: thinkpad-acpi: consolidate wlsw notification function ACPI: thinkpad-acpi: minor refactor on radio switch init Revert "ACPI: don't walk tables if ACPI was disabled" Revert "dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled." Revert "Fix FADT parsing" ACPI : Set FAN device to correct state in boot phase ACPI: Ignore _BQC object when registering backlight device ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptors commit 5042d99795d3d817bef2f4cc46e953bee9bf7398 Merge: 5c40235... f17a077... Author: Linus Torvalds Date: Thu Jul 24 13:57:13 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: fixup sparse endianness warnings in proc.c PCI PM: make more PCI PM core functionality available to drivers PCI/DMAR: don't assume presence of RMRRs PCI hotplug: fix error path in pci_slot's register_slot commit 1b8ebad87b459e2e1333fbf28005977245ff5402 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:36 2008 +0200 ide: use proper printk() KERN_* levels in ide-probe.c While at it: - fixup printk() messages in save_match() and hwif_init(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 52f3a771feafe3e9c56f8d00c8eb53fd8f578f2d Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:36 2008 +0200 ide: fix for EATA SCSI HBA in ATA emulating mode IDE probing code used to skip devices attached to EATA SCSI HBA in ATA emulating mode but because of warm-plug support port I/O resources are no longer freed if no devices are detected on a port and the decision about the driver to use is left up to the user. Remove no longer valid EATA SCSI HBA quirk from do_identify(). Noticed-by: Alan Cox Signed-off-by: Bartlomiej Zolnierkiewicz commit d0b53f6866fa185da94968e62ae97923db18298c Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:36 2008 +0200 ide: remove stale comments from drivers/ide/Makefile Signed-off-by: Bartlomiej Zolnierkiewicz commit 90d2c6bc68745d67cdbf00bab43818d90aa0dfb6 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:36 2008 +0200 ide: enable local IRQs in all handlers for TASKFILE_NO_DATA data phase It is already done by task_no_data_intr() and there is no reason not to do it in other TASKFILE_NO_DATA data phase handlers. Signed-off-by: Bartlomiej Zolnierkiewicz commit e27420d046600cd3e4139ea1b6cba59a8b4050eb Author: FUJITA Tomonori Date: Thu Jul 24 22:53:35 2008 +0200 ide-scsi: remove kmalloced struct request This converts ide-scsi to use blk_get/put_request instead of kmalloc/kfree. Signed-off-by: FUJITA Tomonori Signed-off-by: Bartlomiej Zolnierkiewicz commit 216f9a88feabf5ed574c3aa78447a6bd872910bc Author: Jan Evert van Grootheest Date: Thu Jul 24 22:53:35 2008 +0200 ht6560b: remove old history Remove the ancient version history. Git does a better job. From: Jan Evert van Grootheest Signed-off-by: Bartlomiej Zolnierkiewicz commit eb34b2d90e71380ad19695188934230b06a3668b Author: Jan Evert van Grootheest Date: Thu Jul 24 22:53:35 2008 +0200 ht6560b: update email address Update email address. From: Jan Evert van Grootheest Signed-off-by: Bartlomiej Zolnierkiewicz commit e8e7b9eb11c34ee18bde8b7011af41938d1ad667 Author: Jens Axboe Date: Thu Jul 24 22:53:35 2008 +0200 ide-cd: fix oops when using growisofs cdrom_read_capacity() will blindly return the capacity from the device without sanity-checking it. This later causes code in fs/buffer.c to oops. Fix this by checking that the device is telling us sensible things. From: Jens Axboe Cc: Michael Buesch Cc: Jan Kara Cc: Arnd Bergmann Cc: Cc: Borislav Petkov Signed-off-by: Andrew Morton [bart: print device name instead of driver name] Signed-off-by: Bartlomiej Zolnierkiewicz [harvey: blocklen is a big-endian value] Signed-off-by: Harvey Harrison Signed-off-by: Bartlomiej Zolnierkiewicz commit 96cc112c09b3c6674da01ef8b377f7a916883ea2 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:34 2008 +0200 gayle: release resources on ide_host_add() failure "gayle: reserve memory resources at once" patch temporary removed freeing of resources on failure (to ease convertion to ide_host_add() interface). This patch fixes it. Thanks to Geert for noticing the issue. Noticed-by: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz commit a0f403bc58dcaa118f02ec70c3ecfec1bc26e445 Author: Sergei Shtylyov Date: Thu Jul 24 22:53:34 2008 +0200 palm_bk3710: add UltraDMA/100 support This controller supports UltraDMA up to mode 5 but it should be clocked with at least twice the data strobe frequency, so enable mode 5 for 100+ MHz IDECLK. While at it, start passing the correct device to clk_get() -- it worked anyway but WTF? :-/ Signed-off-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 7fa897b91a3ea0f16c2873b869d7a0eef05acff4 Author: Harvey Harrison Date: Thu Jul 24 22:53:34 2008 +0200 ide: trivial sparse annotations Signed-off-by: Harvey Harrison Signed-off-by: Bartlomiej Zolnierkiewicz commit cd740ab0f69f6c94d9c7f916758e308f30a439fa Author: Harvey Harrison Date: Thu Jul 24 22:53:33 2008 +0200 ide: ide-tape.c sparse annotations and unaligned access removal If this is actually unaligned the access of speed/max_speed above is already broken and needs a get_unaligned. Otherwise it is aligned and they can be removed. Signed-off-by: Harvey Harrison Cc: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit a326b02b0c576001353dbc489154959b0889c6bf Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:33 2008 +0200 ide: drop 'name' parameter from ->init_chipset method There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit ced3ec8aa7d0fa3300187ee47c144a22ccfc974e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:32 2008 +0200 ide: prefix messages from IDE PCI host drivers by driver name Prefix messages from IDE PCI host drivers by driver name instead of marketed chipset name (it is still possible to exactly identify the particular chipset basing on driver messages). As a bonus this provides nice code savings for some drivers: text data bss dec hex filename 3826 112 8 3946 f6a drivers/ide/pci/amd74xx.o.before 2786 112 8 2906 b5a drivers/ide/pci/amd74xx.o.after 764 108 0 872 368 drivers/ide/pci/cs5520.o.before 680 108 0 788 314 drivers/ide/pci/cs5520.o.after 1680 112 4 1796 704 drivers/ide/pci/generic.o.before 1155 112 4 1271 4f7 drivers/ide/pci/generic.o.after 7128 792 0 7920 1ef0 drivers/ide/pci/hpt366.o.before 6984 792 0 7776 1e60 drivers/ide/pci/hpt366.o.after 2800 148 0 2948 b84 drivers/ide/pci/pdc202xx_new.o.before 2523 148 0 2671 a6f drivers/ide/pci/pdc202xx_new.o.after 2831 148 0 2979 ba3 drivers/ide/pci/pdc202xx_old.o.before 2683 148 0 2831 b0f drivers/ide/pci/pdc202xx_old.o.after 3776 112 4 3892 f34 drivers/ide/pci/piix.o.before 2804 112 4 2920 b68 drivers/ide/pci/piix.o.after 4693 116 0 4809 12c9 drivers/ide/pci/siimage.o.before 4600 116 0 4716 126c drivers/ide/pci/siimage.o.after Signed-off-by: Bartlomiej Zolnierkiewicz commit 04ba6e739e9c0623c25f94b191fd20dfbd1b26e3 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:32 2008 +0200 it821x: remove DECLARE_ITE_DEV() macro While at it: * it821x_chipsets[] -> it821x_chipset. * Fix it821x_chipset's name field (as it is used for IT8211/8212). Signed-off-by: Bartlomiej Zolnierkiewicz commit 29f1ca920cb8d65b979f7edf2fc7d11095461306 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:32 2008 +0200 it8213: remove DECLARE_ITE_DEV() macro While at it: * it8213_chipsets[] -> it8213_chipset. Signed-off-by: Bartlomiej Zolnierkiewicz commit 28cfd8af52a9ed4e5bd1751ea6bc0b8c870f68ec Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:31 2008 +0200 ide: include PCI device name in messages from IDE PCI host drivers While at it: * Apply small fixes to messages (s/dma/DMA/, remove trailing '.', etc). * Fix printk() call in ide_setup_pci_baseregs() to use KERN_INFO. * Move printk() call from ide_pci_clear_simplex() to the caller. * Cleanup do_ide_setup_pci_device() a bit. * amd74xx.c: remove superfluous PCI device revision information. * hpt366.c: fix two printk() calls in ->init_chipset to use KERN_INFO. * pdc202xx_new.c: fix printk() call in ->init_chipset to use KERN_INFO. * pdc202xx_old.c: fix driver message in pdc202xx_init_one(). * via82cxxx.c: fix driver warning message in via_init_one(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 2a8f7450f828eaee49d66f41f99ac2e54f1160a6 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:31 2008 +0200 ide: remove for some archs * Remove include from ( includes which is enough). * Remove for alpha/blackfin/h8300/ia64/m32r/sh/x86/xtensa (this leaves us with arm/frv/m68k/mips/mn10300/parisc/powerpc/sparc[64]). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit f01d35d87f39ab794ddcdefadb79c11054bcbfbc Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:31 2008 +0200 ide-generic: remove ide_default_{io_base,irq}() inlines (take 3) Replace ide_default_{io_base,irq}() inlines by legacy_{bases,irqs}[]. v2: Add missing zero-ing of hws[] (caught during testing by Borislav Petkov). v3: Fix zero-oing of hws[] for _real_ this time. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 35bbac9a2f73a7e0967d0a1d3e3673e2590ef716 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:30 2008 +0200 ide-generic: is no longer needed on ppc32 Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz commit ffed0b6e1a6f5132681d4b521531d992f893190b Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:30 2008 +0200 ide-generic: remove broken PPC_PREP support PPC_PREP has been depending on BROKEN for some time now. Cc: Benjamin Herrenschmidt Signed-off-by: Bartlomiej Zolnierkiewicz commit d83b8b85cd56a083d30df73f3fd5e4714591b910 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:30 2008 +0200 ide: define MAX_HWIFS in * Now that ide_hwif_t instances are allocated dynamically the difference between MAX_HWIFS == 2 and MAX_HWIFS == 10 is ~100 bytes (x86-32) so use MAX_HWIFS == 10 on all archs except these ones that use MAX_HWIFS == 1. * Define MAX_HWIFS in instead of . [ Please note that avr32/cris/v850 have no and alpha/ia64/sh always define CONFIG_IDE_MAX_HWIFS. ] Signed-off-by: Bartlomiej Zolnierkiewicz commit 2c9d86438a0104800da2a8ecdc1e27baf38ba6a4 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:29 2008 +0200 ide: remove Remove and . This has been a broken code for some time now and needs rewrite to match IDE core code / host driver model anyway. Cc: Jesper Nilsson Cc: Mikael Starvik Signed-off-by: Bartlomiej Zolnierkiewicz commit b6cd7da5be2522b62bbc48d41b36c828b88e02fe Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:28 2008 +0200 ide-generic: remove "no_pci_devices()" quirk from ide_default_io_base() Since the decision to probe for ISA ide2-6 is now left to the user "no_pci_devices()" quirk is no longer needed and may be removed. Signed-off-by: Bartlomiej Zolnierkiewicz commit dbdec839c4c2bfc8f2da8e50c06b9947e5ad0394 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:28 2008 +0200 ide-generic: minor fix for mips Move ide_probe_legacy() call to ide_generic_init() so it fails early if necessary and returns the proper error value (nowadays ide_default_io_base() is used only by ide-generic). Cc: Ralf Baechle Signed-off-by: Bartlomiej Zolnierkiewicz commit ac32f3238c1d95a6ebea2c312160dbdbd61bf91c Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:27 2008 +0200 ide-generic: fix ide_default_io_base() for m32r Fix ide_default_io_base() to match ide_default_irq(). Cc: Hirokazu Takata Signed-off-by: Bartlomiej Zolnierkiewicz commit b0a62817961796f6dcef5f316134d8bc7279bf6e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:27 2008 +0200 ide: fix * Add missing include. While at it: * Remove needless ide_default_{irq,io_base}() inlines. Cc: Chris Zankel Signed-off-by: Bartlomiej Zolnierkiewicz commit 37c5ef56989717d871d048f98fb6411e7a17c43d Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:27 2008 +0200 rapide: add module_exit() Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz commit 8e27cb1135de4cc69bf358209f91e1f7ba81eca1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:27 2008 +0200 icside: add module_exit() Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz commit 585f67e736eece4cdf96b628042170273221e770 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:26 2008 +0200 via82cxxx: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit fc2c32b737fa370683f8c44d74f41febe33b9c23 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:26 2008 +0200 trm290: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 29d72f2df933ea5ecf294b170b2f02af2af88120 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:26 2008 +0200 triflex: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit ea881d6d6c58aa6d56105d1faba7432243ea7118 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:26 2008 +0200 tc86c001: add ->remove method and module_exit() Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 64b0fed31d6704e4e2e42e9a1ac5995b0a1b54e4 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 slc90e66: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 6ce7199897bcbad05ecd06a4df22795fb37f4d0a Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 sl82c105: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 1ceb906b4062954e92295191402e9214345ee0e9 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 sis5513: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit fe3825808ad67af02bd826a0d2ca6831e947e80e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 siimage: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit bc2c9a8025921972f0774859b8f19b324734e824 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:25 2008 +0200 serverworks: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 991f5e69c512b284aaec81432dff0440b2a2f418 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:24 2008 +0200 sc1200: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 0fd188047ca75df85191cc55f929cb2889631430 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:24 2008 +0200 rz1000: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit da8c3e0d21c5dbb2815d7c8f1f09e0c68f626ed1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:24 2008 +0200 piix: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 574a1c24b63fdb584935b4924a38b451eeb0880e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:24 2008 +0200 pdc202xx_old: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit d69c8f8c0068b9fc7f5a5082d8a891618b732e2d Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:23 2008 +0200 pdc202xx_new: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit adc7f85ae68bd2e8db2e0136dcd4679891e5c321 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:23 2008 +0200 opti621: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit aa6e518d75742fd3ac3d2cb4c2bcbae850319fc1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:23 2008 +0200 ns87415: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 1bcaaba7749dce7c0506cff0e811c9bed8121f38 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:22 2008 +0200 jmicron: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 87d8b61356108835f5e91c0fb32b830ec585978c Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:22 2008 +0200 it821x: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 5102f768570b3486979afb68c595b71cfb7f026f Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:22 2008 +0200 it8213: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit a6c43a2be9721d00ef9d6ef5b7b0e8113444577b Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:21 2008 +0200 hpt366: add ->remove method and module_exit() Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 741ac62f6fca55ddbef52513fbc687ba6b04f99e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:21 2008 +0200 hpt34x: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit f566bcae9fb39b108e39a2f31594c028d6ee2e77 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:21 2008 +0200 ide/pci/generic: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit cd68841b854e24076d41c32eae3ccfce6ae60a59 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:21 2008 +0200 cy82c693: add ->remove method and module_exit() Fix the refcounting for dev2 while at it. Signed-off-by: Bartlomiej Zolnierkiewicz commit 40c8a7f67d38de87f97a548b81b6cd0621a3ff9a Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:20 2008 +0200 cs5535: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit d16492a9789982955e627a7ffdcd1c3b945f7e85 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:20 2008 +0200 cs5530: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit e2b15b4765ca032d0837dfc8c195ecd3bc56a433 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:20 2008 +0200 cmd64x: add ->remove method and module_exit() Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit f354fbc4b45a730aa0f876322ea4f096b47d1013 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:20 2008 +0200 atiixp: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit b2509ac1d9dbe7a9d3a9915afbe108978002c95b Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:19 2008 +0200 amd74xx: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit 8ee3f3b69d9c37f86a45862f53451699ec77fe12 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:19 2008 +0200 alim15x3: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit eb7cb98b1cc8be1d4395d9accf49ae3924cd68f1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:19 2008 +0200 aec62xx: add ->remove method and module_exit() Signed-off-by: Bartlomiej Zolnierkiewicz commit ef0b04276d8f719d754c092434fbd62c2aeb5307 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:19 2008 +0200 ide: add ide_pci_remove() helper * Add 'unsigned long host_flags' field to struct ide_host. * Set ->host_flags in ide_host_alloc_all(). * Always set PCI dev's ->driver_data in ide_pci_init_{one,two}(). * Add ide_pci_remove() helper (the default implementation for struct pci_driver's ->remove method). Signed-off-by: Bartlomiej Zolnierkiewicz commit 37525bebcfc15a1fe5a9cb50bf49b21bf43559c1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:18 2008 +0200 via82cxxx: cleanup ->init_chipset method * Move the boot message and via_clock setup from init_chipset_via82cxxx() to via_init_one(). * Set vdev->via_config in via_init_one() and cleanup init_chipset_via82cxxx() accordingly. Signed-off-by: Bartlomiej Zolnierkiewicz commit 0794230fd4b1bf61af8aabd7e987a595d6dbc430 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:17 2008 +0200 cmd64x: cleanup ->init_chipset method Remove verbose reporting for CMD646 (PCI device revision is always logged by IDE PCI layer). Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit d51f19c86583ca70468883d8137a92689f1a80c1 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:17 2008 +0200 amd74xx: cleanup ->init_chipset method Move amd_clock setup from init_chipset_amd74xx() to amd74xx_probe(). Signed-off-by: Bartlomiej Zolnierkiewicz commit b16040b14e766d390138b04c8829c816f4c1d95b Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:17 2008 +0200 tc86c001: remove ->init_chipset method * Reserve PCI BAR 5 in tc86c001_init_one() and remove no longer needed init_chipset_tc86c001(). While at it: * Add & use DRV_NAME define. Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ee77325b074a73694b66ec9eca4f7e55dad58b84 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:17 2008 +0200 via82cxxx: convert to use ->host_priv Signed-off-by: Bartlomiej Zolnierkiewicz commit 4c674235d667d7ddc6b0c95a228a507eb94da2d6 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:16 2008 +0200 siimage: convert to use ->host_priv While at it: * Reserve PCI BAR 5 in siimage_init_one() and remove no longer needed setup_mmio_siimage(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 96776f3b57eb7beb889a4368937cc9d74082a47e Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:16 2008 +0200 sc1200: convert to use ->host_priv Signed-off-by: Bartlomiej Zolnierkiewicz commit 1d76d9dc448d5a6fc7b49ba06c634aa6927bcc3d Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:16 2008 +0200 it821x: convert to use ->host_priv While at it: * Allocate both struct it821x_dev instances at once. * Don't leak itdevs on ide_pci_init_one() failure. Signed-off-by: Bartlomiej Zolnierkiewicz commit 74811f355f4f69a187fa74892dcf2a684b84ce99 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:15 2008 +0200 hpt366: convert to use ->host_priv While at it: * Allocate both struct hpt_info instances at once. Cc: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit 60e57ed7c12917932a01d1679d92a7a8735afbce Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:15 2008 +0200 aec62xx: convert to use ->host_priv Signed-off-by: Bartlomiej Zolnierkiewicz commit 08da591e14cf87247ec09b17c350235157a92fc3 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:15 2008 +0200 ide: add ide_device_{get,put}() helpers * Add 'struct ide_host *host' field to ide_hwif_t and set it in ide_host_alloc_all(). * Add ide_device_{get,put}() helpers loosely based on SCSI's scsi_device_{get,put}() ones. * Convert IDE device drivers to use ide_device_{get,put}(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 6cdf6eb357c2681596b7b1672b92396ba82333d4 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:14 2008 +0200 ide: add ->dev and ->host_priv fields to struct ide_host * Add 'struct device *dev[2]' and 'void *host_priv' fields to struct ide_host. * Set ->dev[] in ide_host_alloc_all()/ide_setup_pci_device[s](). * Pass 'void *priv' argument to ide_setup_pci_device[s]() and use it to set ->host_priv. * Set PCI dev's ->driver_data to point to the struct ide_host instance if PCI host driver wants to use ->host_priv. * Rename ide_setup_pci_device[s]() to ide_pci_init_{one,two}(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 8c2eece50a368c7986bae0b3e52739558dd71b51 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:12 2008 +0200 ide: call ide_pci_setup_ports() before do_ide_setup_pci_device() * Call ide_pci_setup_ports() before do_ide_setup_pci_device() in ide_setup_pci_device[s](). While at it: * Remove stale FIXMEs. Signed-off-by: Bartlomiej Zolnierkiewicz commit a742d6cf0b37b1a96a1549b1fda0d6b19e0185c2 Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:12 2008 +0200 ide: move ide_setup_pci_controller() call to ide_setup_pci_device[s]() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit a95925a309cd9a2e7f5a5713fd70e0dadb09890c Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:11 2008 +0200 ide: respect dev->irq in do_ide_setup_pci_device() also if 'tried_config' * If device is in the PCI native mode respect dev->irq regardless of 'tried_config' in do_ide_setup_pci_device(). * Drop no longer needed 'config' argument from ide_setup_pci_controller(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 708e5f9eb68589b87724af3f0fb4e681dfdfd69f Author: Bartlomiej Zolnierkiewicz Date: Thu Jul 24 22:53:11 2008 +0200 ide: always call ->init_chipset method in do_ide_setup_pci_device() Call ->init_chipset method also for 'tried_config' / '!pciirq' conditions. Signed-off-by: Bartlomiej Zolnierkiewicz commit 5c402355adf8f920531f02099f4ec0d2bccd4c64 Merge: ecc8b65... 2cc1773... Author: Linus Torvalds Date: Thu Jul 24 12:56:07 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: MAINTAINERS: Remove Glenn Streiff from NetEffect entry mlx4_core: Improve error message when not enough UAR pages are available IB/mlx4: Add support for memory management extensions and local DMA L_Key IB/mthca: Keep free count for MTT buddy allocator mlx4_core: Keep free count for MTT buddy allocator mlx4_code: Add missing FW status return code IB/mlx4: Rename struct mlx4_lso_seg to mlx4_wqe_lso_seg mlx4_core: Add module parameter to enable QoS support RDMA/iwcm: Remove IB_ACCESS_LOCAL_WRITE from remote QP attributes IPoIB: Include err code in trace message for ib_sa_path_rec_get() failures IB/sa_query: Check if sm_ah is NULL in ib_sa_remove_one() IB/ehca: Release mutex in error path of alloc_small_queue_page() IB/ehca: Use default value for Local CA ACK Delay if FW returns 0 IB/ehca: Filter PATH_MIG events if QP was never armed IB/iser: Add support for RDMA_CM_EVENT_ADDR_CHANGE event RDMA/cma: Add RDMA_CM_EVENT_TIMEWAIT_EXIT event RDMA/cma: Add RDMA_CM_EVENT_ADDR_CHANGE event commit ecc8b655b38a880b578146895e0e1e2d477ca2c0 Merge: 2528ce3... e338125... Author: Linus Torvalds Date: Thu Jul 24 12:55:01 2008 -0700 Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: nohz: adjust tick_nohz_stop_sched_tick() call of s390 as well nohz: prevent tick stop outside of the idle loop commit 2528ce3237be4e900f5eaa455490146e1422e424 Merge: 8ffa5b6... 36bd53d... Author: Linus Torvalds Date: Thu Jul 24 12:54:26 2008 -0700 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: arch/mips/kernel/stacktrace.c: Heiko can't type kthread: reduce stack pressure in create_kthread and kthreadd fix core/stacktrace changes on avr32, mips, sh commit 8ffa5b65968262ba6bb046329972791c0d960745 Merge: 6209ed9... 58838cf... Author: Linus Torvalds Date: Thu Jul 24 12:53:51 2008 -0700 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: clean up compiler warning sched: fix hrtick & generic-ipi dependency commit 6209ed9d8443b63c36d340908530fa470c4d4fff Author: Linus Torvalds Date: Thu Jul 24 12:49:26 2008 -0700 x86-64: make BUILD_IRQ() also reset section back Commit 9d25d4db81833029d30b7b03cc1000cbbe09e192 ("x86: BUILD_IRQ say .text to avoid .data.percpu") added a ".text" specifier to make sure that BUILD_IRQ() builds the irq trampoline in the text segment rather than in some random left-over segment that the compiler happened to leave the asm in. However, we should also make sure that we switch back by adding a ".previous" at the end, so that there are no subtle issues with subsequent compiler-generated code. Signed-off-by: Linus Torvalds commit 6044110742bc2ae0577b962985e7c63e0634b2e9 Merge: 7540081... 04bbe43... Author: Linus Torvalds Date: Thu Jul 24 12:33:51 2008 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: fix header export, asm-x86/processor-flags.h, CONFIG_* leaks x86: BUILD_IRQ say .text to avoid .data.percpu xen: don't use sysret for sysexit32 x86: call early_cpu_init at the same point commit 7540081c6b16dc941895bca840749cabfd0d3b48 Merge: 3fde80e... b552068... Author: Linus Torvalds Date: Thu Jul 24 12:24:40 2008 -0700 Merge branch 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc * 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc: Remove __DECLARE_SEMAPHORE_GENERIC Remove asm/semaphore.h Remove use of asm/semaphore.h Add missing semaphore.h includes Remove mention of semaphores from kernel-locking commit 3fde80e94c2bbffbb13f5faa3340cf438440ebea Merge: ac9f80a... 9b0e741... Author: Linus Torvalds Date: Thu Jul 24 12:17:19 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: put ColdFire head code into .text.head section m68knommu: remove last use of CONFIG_FADS and CONFIG_RPXCLASSIC m68knommu: remove RPXCLASSIC from the m68k tree m68knommu: fec: remove FADS m68knommu: MCF5307 PIT GENERIC_CLOCKEVENTS support m68knommu: add read_barrier_depends() and irqs_disabled_flags() m68knommu: add byteswap assembly opcode for ISA A+ m68knommu: add ffs and __ffs plattform which support ISA A+ or ISA C m68knommu: add sched_clock() for the DMA timer m68knommu: complete generic time m68knommu: move code within time.c m68knommu: m68knommu: add old stack trace method m68knommu: Add Coldfire DMA Timer support m68knommu: defconfig for M5407C3 board m68knommu: defconfig for M5307C3 board m68knommu: defconfig for M5275EVB board m68knommu: defconfig for M5249EVB board m68knommu: change to a configs directory for board configurations commit ac9f80ad16e6e934b6c1f12f82d27889c0f9abcc Merge: c54554d... f6ec2d9... Author: Linus Torvalds Date: Thu Jul 24 12:16:40 2008 -0700 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight * 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: backlight: Fix missing kernel doc entry backlight: Add Nvidia-based Apple Macbook Pro backlight driver commit c54554d388369f7f88ddcbe285ca96f7fb8a2d4b Merge: 4378dcc... fe3025b... Author: Linus Torvalds Date: Thu Jul 24 12:16:02 2008 -0700 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds * 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds: leds: Ensure led->trigger is set earlier leds: Add support for Philips PCA955x I2C LED drivers leds: Fix sparse warnings in leds-h1940 driver leds: mark led_classdev.default_trigger as const leds: fix unsigned value overflow in atmel pwm driver leds: Add pca9532 platform data for Thecus N2100 leds: Add pca9532 led driver commit 4378dcca8578b0fd0fba883a3354ad4820d4f85f Merge: c3c2233... 7ae93f5... Author: Linus Torvalds Date: Thu Jul 24 12:15:16 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: Fix cpufreq notifier registry. sparc64: Fix lockdep issues in LDC protocol layer. commit c3c2233d84bee397b8271923c007264eb3efa67b Merge: f924727... f867e6a... Author: Linus Torvalds Date: Thu Jul 24 12:14:58 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: pkt_sched: sch_sfq: dump a real number of flows atm: [fore200e] use MODULE_FIRMWARE() and other suggested cleanups netfilter: make security table depend on NETFILTER_ADVANCED tcp: Clear probes_out more aggressively in tcp_ack(). e1000e: fix e1000_netpoll(), remove extraneous e1000_clean_tx_irq() call net: Update entry in af_family_clock_key_strings netdev: Remove warning from __netif_schedule(). sky2: don't stop queue on shutdown commit f9247273cb69ba101877e946d2d83044409cc8c5 Author: Steven Whitehouse Date: Thu Jul 24 17:22:13 2008 +0100 UFS: add const to parser token table This patch adds a "const" to the parser token table. I've done an allmodconfig build to see if this produces any warnings/failures and the patch includes a fix for the only warning that was produced. Signed-off-by: Steven Whitehouse Acked-by: Alexander Viro Acked-by: Evgeniy Dushistov Signed-off-by: Linus Torvalds commit b340e8a57ef381e69c99a7a8ede61a6bf71a8014 Author: Akinobu Mita Date: Wed Jul 23 21:31:51 2008 -0700 auxdisplay: small cleanups - Use BUILD_BUG_ON for CFAG12864B_SIZE instead of runtime-check - Use get_zeroed_page() Signed-off-by: Akinobu Mita Cc: Miguel Ojeda Sandonis Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5bb49fcd501aa9fd3d321a22b7c01d9b0db7ab36 Author: Philippe De Muyter Date: Wed Jul 23 21:31:50 2008 -0700 video/fb: cleanup FB_MAJOR usage Currently, linux/major.h defines a GRAPHDEV_MAJOR (29) that nobody uses, and linux/fb.h defines the real FB_MAJOR (also 29), that only fbmem.c needs. Drop GRAPHDEV_MAJOR from major.h, move FB_MAJOR definition from fb.h to major.h, and fix fbmem.c to use major.h's definition. Signed-off-by: Philippe De Muyter Cc: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cba603bf514c101bf48f6adf393c3d00ed457a57 Author: Jan Beulich Date: Wed Jul 23 21:31:49 2008 -0700 fbcon: remove stray semicolons [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jan Beulich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3e074058d72486676f6fdf6fe803200c62dcb403 Author: Hans-Christian Egtvedt Date: Wed Jul 23 21:31:48 2008 -0700 fbdev: LCD backlight driver using Atmel PWM driver This patch adds a platform driver using the ATMEL PWM driver to control a backlight which requires a PWM signal and optional GPIO signal for discrete on/off signal. It has been tested on Favr-32 board from EarthLCD. The driver is configurable by supplying a struct with the platform data. See the include/linux/atmel-pwm-bl.h for details. The board code for Favr-32 will be submitted to the AVR32 kernel list. Signed-off-by: Hans-Christian Egtvedt Cc: Krzysztof Helt Cc: Haavard Skinnemoen Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d04a4a72d7e1519b4838f24bdd4b5d0f3f426dc Author: Stefano Stabellini Date: Wed Jul 23 21:31:48 2008 -0700 fbcon: bgcolor fix The fourth bit of the background color is the blink property bit, not the intensity bit, as for the foreground color. Therefore it shouldn't be included in the background color. Signed-off-by: Stefano Stabellini Cc: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a25e41831ee851c1365d8b41decc22493b18e6d Author: Nobuhiro Iwamatsu Date: Wed Jul 23 21:31:46 2008 -0700 video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver Framebuffer driver for the SH7760/SH7763 integrated LCD controller. Signed-off-by: Manuel Lauss Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Paul Mundt Cc: Krzysztof Helt Cc: "Antonino A. Daplas" Cc: Siegfried Schaefer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c6b044d6bab5e2878d408666469362fc200a889a Author: Krzysztof Helt Date: Wed Jul 23 21:31:45 2008 -0700 neofb: drop the xtimings structure Remove the xtimings structure which only stored some values to be used later (mostly once). Calculate and use these values in places they are needed. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1ca6b62f8ca668ccfab0da9112c0125ef82343bd Author: Krzysztof Helt Date: Wed Jul 23 21:31:45 2008 -0700 neofb: drop redundant code Drop structure which is only set but never read. Drop variables which are only set and never read. Convert one long switch into two shorter ones. Add cpu_relax() in busy waiting loop. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7fc80b7bd682b47825e806018cca8ff7dc6bb55a Author: Krzysztof Helt Date: Wed Jul 23 21:31:44 2008 -0700 neofb: simplify clock calculation There is nothing to gain by converting value in kHz to fixed point MHz. Just calculate everything in kHz. A reorder of the loop allows reducing number of iterations (check if frequency is not too high already). Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5798712d608f5ebad994487748a2ccf3cc613d78 Author: Adrian Bunk Date: Wed Jul 23 21:31:43 2008 -0700 drivers/video/amifb.c cleanups This patch contains the following cleanups: - make the needlessly global amifb_init() static - rename cleanup_module() to amifb_exit(), make it static __exit, use module_exit(), there's no need to #ifdef MODULE it Signed-off-by: Adrian Bunk Acked-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 104b198dd0b3b62a4fc4e9146f01f2abc718e926 Author: Jordan Crouse Date: Wed Jul 23 21:31:43 2008 -0700 lxfb: fix console blanking Simply enabling DAC blanking without turning off the CRT seems to be resulting in characters remaining on the screen when the monitor blanks. This patch turns off the CRT for all modes, and also powers down the DACs when vsync and/or hsync are disabled. Signed-off-by: Jordan Crouse Acked-by: Andres Salomon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be935d5b6301865b4e9ec35d79d398cedb3c82b7 Author: Andres Salomon Date: Wed Jul 23 21:31:41 2008 -0700 lxfb: drop dead declarations from header We never sent the gamma stuff upstream, and don't really care about it. However, lx_[gs]_et_gamma prototypes snuck into lxfb.h anyways; there are no definitions for them. Drop the dead code. Signed-off-by: Andres Salomon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 18b095d4b847bb08bf8a1bace7711a93d27732c0 Author: Yoichi Yuasa Date: Wed Jul 23 21:31:41 2008 -0700 drivers/char: remove old broken Cobalt LCD driver Remove old broken Cobalt LCD driver. Signed-off-by: Yoichi Yuasa Acked-by: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5abe3b4063f16245b8fafbff37bd93814eb8e363 Author: Yoichi Yuasa Date: Wed Jul 23 21:31:40 2008 -0700 fbdev: add new Cobalt LCD framebuffer driver Add new Cobalt LCD framebuffer driver. [akpm@linux-foundation.org: fix build] Signed-off-by: Yoichi Yuasa Cc: Krzysztof Helt Cc: "Antonino A. Daplas" Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b51d51a9d24719f905ba9657b29e04efd82a7ea Author: Timur Tabi Date: Wed Jul 23 21:31:39 2008 -0700 fsl-diu-fb: update Freescale DIU driver to use page_alloc_exact() Update the Freescale DIU driver to use page_alloc_exact() to allocate a DMA buffer. This also eliminates the rheap-based memory allocator. We can do this now because commit 6ccf61f9 allows us to allocate 8MB physically- contiguous memory blocks. [akpm@linux-foundation.org: fix printk warnings] Signed-off-by: Timur Tabi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c25826a7cf1c61b5c6e6db8365172eb97ef39ef3 Author: Ben Dooks Date: Wed Jul 23 21:31:38 2008 -0700 lcd: add platform_lcd driver Add a platform_lcd driver to allow boards with simple lcd power controls to register themselves easily. [akpm@linux-foundation.org: build fix] Signed-off-by: Ben Dooks Cc: Richard Purdie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c531360ed504aa0ce995fcb8ef08e82b6534d0b Author: Ben Dooks Date: Wed Jul 23 21:31:38 2008 -0700 lcd: add lcd_device to check_fb() entry in lcd_ops Add the lcd_device being checked to the check_fb entry of lcd_ops. This ensures that any driver using this to check against it's own state can do so, and also makes all the calls in lcd_ops more orthogonal in their arguments. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cccb6d3c149603b9c15d3c460dff317455df1766 Author: Ben Dooks Date: Wed Jul 23 21:31:37 2008 -0700 fb: add support for the ILI9320 video display controller Provide support for the ILI9320 display controller chip which is found in many LCD displays. Included with this is support for an example LCD using this chip, the VGG2432A4. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d05254190dd1a4751284f4a51efb70fcc16c45a4 Author: Ben Dooks Date: Wed Jul 23 21:31:37 2008 -0700 sm501: fixup allocation code to be 64bit resource compliant As pointed out by Andrew Morton, we have a problem when setting the 64bit resources option. Alter the allocation routines to remove the need to use the start and end fields, use the proper HEAD_PANEL/HEAD_CRT and update the comments. Note, we also fix the bug where we failed to check the size of the CRT memory allocation. [akpm@linux-foundation.org: cleanup] Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b599fb2fc23386dfd2965bf7d10b2b0f628b208 Author: Ben Dooks Date: Wed Jul 23 21:31:36 2008 -0700 sm501: restructure init to allow only 1 fb on an SM501 Add the ability to register only one of the two possible main framebuffer devices on the SM501 by passing platform data for only the framebuffer that you are interested in having. As a side note, we update the init sequence to commonise the code that is executed twice, and fix a pair of missing frees that we didn't do on framebuffer exit, such as freeing the fb's cmap. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 206c5d69d0540024faffd423fc703f1e457332d7 Author: Ben Dooks Date: Wed Jul 23 21:31:35 2008 -0700 sm501: add inversion controls for VBIASEN and FPEN Add flags to allow the driver to invert the sense of both VBIASEN and FPEN signals comming from the SM501. Signed-off-by: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 968910bd03b226ed410d092c2da59dffe5bfe8de Author: Nicolas Ferre Date: Wed Jul 23 21:31:34 2008 -0700 atmel_lcdfb: avoid division by zero Avoid division by zero in atmel_lcdfb_check_var() function. If pixclock is not specified while passing a var structure in the check_var() funtion, a division by zero occurs (when translating pixclock to KHz). This patch adds a checking of this value and try to choose a video mode in the modelist. The mode found in the probe function in added to the modelist. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Nicolas Ferre Cc: Haavard Skinnemoen Cc: Andrew Victor Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84c41ce83e9b2987ccef352f28ba0055b26c8f8e Author: Krzysztof Helt Date: Wed Jul 23 21:31:34 2008 -0700 skeletonfb: update to correct platform driver usage It updates skeletonfb to new platform driver API. The skeletonfb is templates for creating new drivers. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a882ef47c7156e8cc47e72f2aa396f2514569c48 Author: Akinobu Mita Date: Wed Jul 23 21:31:33 2008 -0700 aty: use memory_read_from_buffer() Signed-off-by: Akinobu Mita Cc: Benjamin Herrenschmidt Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c554ff9554d67b4db0fb5e2f78c7cb4b2e0d627 Author: Ville Syrjala Date: Wed Jul 23 21:31:32 2008 -0700 atyfb: fix a cast The argument to iounmap() is void __iomem *. Fix the cast. Signed-off-by: Ville Syrjala Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89c69d2b8eb3ee2338fded9d70a0795b4712f112 Author: Ville Syrjala Date: Wed Jul 23 21:31:32 2008 -0700 atyfb: report probe errors Properly propagate errors to the probe function. Signed-off-by: Ville Syrjala Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6cfafc15994ac2a2377b32b5a65cf62a90a80d49 Author: Ville Syrjala Date: Wed Jul 23 21:31:31 2008 -0700 atyfb: use a PCI device ID table Convert atyfb to use a PCI device ID table. Signed-off-by: Ville Syrjala Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3880b0b5297ae9bf58a7662d13a46b5d5f0b2af6 Author: Ville Syrjala Date: Wed Jul 23 21:31:30 2008 -0700 atyfb: correct_chipset() can fail Atari probe code relies on correct_chipset() failing if the device is not a mach64 GX/CX. aty_chips[] array would be indexed with -1 in that case. Signed-off-by: Ville Syrjala Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 50cd0221c9062ec5dac8a3620f36f568df052ac1 Author: Olaf Hering Date: Wed Jul 23 21:31:29 2008 -0700 atyfb: remove dead code Remove dead code. This will slightly change the behaviour of the driver on systems that support backlight control. Previously they would just turn the backlight off using the backlight control but now the generic LCD code will also turn off the LCD using the POWER_MANAGEMENT register. Signed-off-by: Olaf Hering Signed-off-by: Ville Syrjala Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7572a1ea034a8fc45e57de28cc7573264975532a Author: Ville Syrjala Date: Wed Jul 23 21:31:28 2008 -0700 fbdev: xoffset, yoffset and yres are unsigned The xoffset, yoffset and yres members of fb_var_screeninfo are __u32. Make them unsigned in the code as well. Signed-off-by: Ville Syrjala Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 43a3abc6aca8505e708508e2c7c2f99a7f8f820b Author: Ville Syrjala Date: Wed Jul 23 21:31:27 2008 -0700 fbdev: width and height are unsigned The width and height members of fb_var_screeninfo are __u32. The code initializes them to -1 which seems wrong, and 0 seems like an equally good default value. Signed-off-by: Ville Syrjala Cc: "Antonino A. Daplas" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2870086e9f2032bdd95b8da9bd187e3c16fc6d49 Author: Krzysztof Helt Date: Wed Jul 23 21:31:26 2008 -0700 hgafb: convert to new platform driver API Convert the hgafb driver to use new platform driver API. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9689 Signed-off-by: Krzysztof Helt Cc: Anton Vorontsov Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b604838ac6d233fd6bffc0e758a818133a01ff22 Author: Frans Pop Date: Wed Jul 23 21:31:26 2008 -0700 vfb: only enable if explicitly requested when compiled in The Kconfig help for the vfb driver says: Do NOT enable it for normal systems! To protect the innocent, it has to be enabled explicitly at boot time using the kernel option `video=vfb:'. This change lets the code match the description. Support for vfb:disable is kept for backwards compatibility; vfb:off works because it is tested at a higher level. Note: any undefined option (e.g. vfb:enable) will also enable this driver. The relevant code has been unchanged since before the migration to git (2.6.12). This patch fixes bugzilla #9310 and was the root cause behind http://lkml.org/lkml/2008/5/31/220. Signed-off-by: Frans Pop Cc: Antonino A. Daplas Acked-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cfb4f5d1750e05f43902197713c50c29e7dfbc99 Author: Magnus Damm Date: Wed Jul 23 21:31:24 2008 -0700 fbdev: SuperH Mobile LCDC Driver This is the SuperH Mobile LCDC frame buffer driver V2, adding support for the LCDC block found in SuperH Mobile processors. The hardware supports up to two LCD panels per LCDC block, and both RGB and SYS interfaces can be used to hook up LCD panels/modules. The device driver is a regular platform driver, so LCD configuration and board specific hooks are passed to the driver using platform data. LCD modules using SYS interface often require special configuration using the SYS bus, and to solve this cleanly the driver provides SYS interface operations to the board code. Tested on sh7723 and sh7722 processors with a SYS16A QVGA panel and WVGA panels using RGB16 and RGB18 interfaces. Signed-off-by: Magnus Damm Acked-by: Paul Mundt Reviewed-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c2c12155cf05bf3e25eeae5711beffc634505400 Author: Krzysztof Helt Date: Wed Jul 23 21:31:24 2008 -0700 tdfxfb: remove ypan checks done by a higher layer These checks and assignments are done by a higher layer so remove them from the driver. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 98219374d9ed2d257e56e8e1fcd9d16a083397bb Author: Krzysztof Helt Date: Wed Jul 23 21:31:23 2008 -0700 vga16fb: source code improvement Use constants and functions from the vga.h file. Also add module description. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ea9014bcacf236124d5e0ff971838049a98456cb Author: Krzysztof Helt Date: Wed Jul 23 21:31:22 2008 -0700 tdfxfb: add mode_option module parameter Small step toward unification of mode setting parameter. This is required to fix the Bugzilla's bug 9847 Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a90ed92ed852a3d4b8a6f20b10bba771997f5ede Author: Krzysztof Helt Date: Wed Jul 23 21:31:22 2008 -0700 tridentfb: documentation update Make the tridentfb documentation closer to current state of the tridentfb driver. Fix also some formatting. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 012e26096b36bfeacaba2c9e31eaf32d6faa6567 Author: Krzysztof Helt Date: Wed Jul 23 21:31:21 2008 -0700 uvesafb: change mode parameter to mode_option Make more drivers use the "mode_option" parameter. This one is quite new so drop the old "mode" parameter before someone starts using it seriously. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 49a1d28f57adc9cb064572f0373e26363b0a412f Author: Krzysztof Helt Date: Wed Jul 23 21:31:21 2008 -0700 fbcon: make logo_height a local variable Make logo_height variable local in the only function it is used. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d22579b837358cbef12ccca5adaf7e93ae09ab7a Author: Nicolas Ferre Date: Wed Jul 23 21:31:20 2008 -0700 atmel_lcdfb: FIFO underflow management Manage atmel_lcdfb FIFO underflow Resetting the LCD and DMA allows to fix screen shifting after a FIFO underflow. It follows reset sequence from errata "LCD Screen Shifting After a Reset". Signed-off-by: Nicolas Ferre Cc: Haavard Skinnemoen Cc: Andrew Victor Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77a6e7abb09de0e85a15e2fe42c21ffc59847759 Author: Roel Kluin <12o3l@tiscali.nl> Date: Wed Jul 23 21:31:19 2008 -0700 vga16fb: test virtual screen range before subtraction on unsigned dx and dy are u32's, so the test should occur before the subtraction Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Cc: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c0face9d4024bf942096297937759bdf0e1aeac Author: Roel Kluin <12o3l@tiscali.nl> Date: Wed Jul 23 21:31:18 2008 -0700 atafb: test virtual screen range before subtraction on unsigned dx and dy are u32's, so the test should occur before the subtraction Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Cc: Tim Schmielau Cc: Krzysztof Helt Cc: Antonino Daplas Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 091c82c01295719d47b89b38d24e41ad2066ead8 Author: Roel Kluin <12o3l@tiscali.nl> Date: Wed Jul 23 21:31:18 2008 -0700 amifb: test virtual screen range before subtraction on unsigned dx and dy are u32's, so the test should occur before the subtraction Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Cc: Antonino Daplas Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 816664f88707b03fde24fb09759d569ed42406cb Author: Roel Kluin <12o3l@tiscali.nl> Date: Wed Jul 23 21:31:17 2008 -0700 aty128fb: test below 0 on unsigned pll->post_divider pll->post_divider is unsigned, so the test fails Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Cc: Benjamin Herrenschmidt Cc: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fcea8030b3c2e71ad89f080901c63a04f07881c8 Author: Tony Breeds Date: Wed Jul 23 21:31:16 2008 -0700 drivers/video/aty/radeon_base.c: notify user if sysfs_create_bin_file() failed Current kernel builds warn about: drivers/video/aty/radeon_base.c: In function 'radeonfb_pci_register': drivers/video/aty/radeon_base.c:2334: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result drivers/video/aty/radeon_base.c:2336: warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result Do minimal checking of these functions and issue a warning if either fails. They don't seem to be critical.. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Tony Breeds Cc: "Antonino A. Daplas" Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7951ac91c7d45b61f54f1cdabc24b52b40785de6 Author: Matthias Kaehlcke Date: Wed Jul 23 21:31:16 2008 -0700 sa1100fb: convert ctrlr_sem in a mutex The semaphore ctrlr_sem is used as a mutex. Convert it to the mutex API Signed-off-by: Matthias Kaehlcke Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b91dbce56a8dbf312f6255d5121b295553d2b4db Author: Matthias Kaehlcke Date: Wed Jul 23 21:31:14 2008 -0700 pxafb: convert ctrlr_sem in a mutex The semaphore ctrlr_sem is used as a mutex. Convert it to the mutex API. Signed-off-by: Matthias Kaehlcke Cc: Daniel Mack Cc: Eric Miao Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 14aefd1b49ff3bd13caa37fb06bd53488d5d1486 Author: Adrian Bunk Date: Wed Jul 23 21:31:12 2008 -0700 video/sis/: remove compat code This patch removes compat code for older kernel versions. Signed-off-by: Adrian Bunk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b9cf3aa6b1e934807b40b4d478d7e11f7c43f55 Author: Roland Kletzing Date: Wed Jul 23 21:31:10 2008 -0700 mdacon messing up default vc's - set default to vc13-16 again mdacon incorrectly detects MDA hardware on systems without such graphics card. One may load this module by chance, for example when doing some systematical module-testing, and if there is no Monochrome Display Adapter attached , module init renders vc1-16 completely unusable. I and others have run into this more than once. see [Bug 224522 - modprobe mdacon freezes machine -> https://bugzilla.novell.com/show_bug.cgi?id=224522 ] for example Apparently proper MDA detection seems to be broken for a long time - seems to be related to those #ifdef TEST_MDA_B statements added by Edward Betts. this commit back in 2002 made things even worse : http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commit;h=c72757b49c88914433244757fb4967fc63546685 It changed default vc allocation from 13-16 to 1-16 for no apparent reason (!?) , and with that (and without X), mdacon grabs the vc you`re currently sitting on and locks you out. this is from Kconfig : >config MDA_CONSOLE > depends on !M68K && !PARISC && ISA > tristate "MDA text console (dual-headed) (EXPERIMENTAL)" > ---help--- > Say Y here if you have an old MDA or monochrome Hercules graphics > adapter in your system acting as a second head ( = video card). You > will then be able to use two monitors with your Linux system. Do not > say Y here if your MDA card is the primary card in your system; the > normal VGA driver will handle it. As we can see mdacon is just meant as an additional driver for dual-head setup, and since kernel 2.4.36 still defaults to vc13-16 , setting the default back to that value again shouldn`t do any harm. Hereby i'm reverting that change, setting default back to to vc13-16 again. Besides the fact that mdacon may be rarely or never be used these days and could perhaps put to trash anyway (pre-dinosaur hardware!), indeed this is not a real solution, but at least it removes the unfortunate side-effect of messing up the vc you`re working on. Signed-off-by: Roland Kletzing Cc: James Simmons Cc: "Antonino A. Daplas" Cc: Tim Schmielau Cc: Jan Engelhardt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 663b0e15877293451bdfea619db45eafae9dec54 Author: Krzysztof Helt Date: Wed Jul 23 21:31:09 2008 -0700 tridentfb: remove warning message that cyblafb driver should be used The tridentfb driver should handle now all chipsets handled by the cyblafb driver. Remove the message which claims that support will be removed. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0292be4a382957016e8b574dc292779cfb49e029 Author: Krzysztof Helt Date: Wed Jul 23 21:31:08 2008 -0700 tridentfb: add imageblit acceleration for Blade3D family Add imageblit acceleration for the Blade3D family of cores. The code is based on code from the cyblafb driver. It is a step toward assimilating back the cyblafb driver into the tridentfb driver. The cyblafb driver handles a subfamily of the Trident Blade3d cores. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6280fd4f9c2683a4d2f096320dd74ded4e5106ad Author: Krzysztof Helt Date: Wed Jul 23 21:31:08 2008 -0700 tridentfb: Blade3D clock fixes This patch fixes following problems: - does not allow the m parameter to reach 0 as it locks the graphics core (power cycle needed) - for the newer chips (with new clock registers) does not allow of n / m ratio below 4 as it gives unstable image on the Blade3D core - extend shift parameter (k) range to 2 for the newer chips to cope with the n /m >= 4 limit at low resolution (bandwidth) modes - prefer modes with higher n / m ratio (higher k values) Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f330c4b1961d730ef15ac184e4b7f1c25847d0ae Author: Krzysztof Helt Date: Wed Jul 23 21:31:07 2008 -0700 tridentfb: y-panning fixes The Trident cards uses only 20-bit address of screen start in double words. This allows addressing for only 4MB of video memory so check this. Also remove some redundant checks and assignments. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4af1798d768ab2f12ab623e21ad68dc8c248005 Author: Krzysztof Helt Date: Wed Jul 23 21:31:06 2008 -0700 tridentfb: fix 224 color logo at 8 bpp Fix depth setting for 8 bpp mode. The nice 224 color logo is not displayed in 8 bpp depth without this fix. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 13b0de49f52ec8638b3e3e59192a959b35214d9e Author: Krzysztof Helt Date: Wed Jul 23 21:31:06 2008 -0700 tridentfb: fix console freeze when switching from X11 This patch fixes two problems when acceleration is enabled: - console switch from the Xorg locks up the computer because the Xorg code locks some registers and disables the mmio mode, so reenable these in the tridentfb_set_par() and enable_mmio() - blacklist the Image975 chipset from setting PCI burst mode. This helps with random lock ups of the framebuffer on this chip. The same fix is probably needed for the Xorg as well. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5cf138457af20b0ef79d8c249381927718ca1417 Author: Krzysztof Helt Date: Wed Jul 23 21:31:05 2008 -0700 tridentfb: source code improvements This patch contains general source code improvments: - more simple functions are inline - removes some meaningless output and the VERSION string as it is no use - eng_par is moved into the tridentfb_par - removed small section of code for CyberBladeXPAi1 which is maybe right for only one resolution and refresh rate and is probably redundant now - other minor improvements Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 01a2d9ed85c945fc8a672622780533a1a0b7caf5 Author: Krzysztof Helt Date: Wed Jul 23 21:31:04 2008 -0700 tridentfb: acceleration constants change This patch replaces deprecated constant FB_ACCELF_TEXT with FBINFO_HWACCEL_DISABLED and adds constants for Trident families of accelerators. The FBINFO_HWACCEL_DISABLED is correctly used so noaccel parameter works now. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34dec24317d6824b7db172bb0072b909a9c376f2 Author: Krzysztof Helt Date: Wed Jul 23 21:31:04 2008 -0700 tridentfb: various pixclock and timing improvements This patch fixes few issues related to timings and pixclock generation: - disallow the pixclocks with numerator lower than double denominator. This fixes display instability for some modes. - choose the pixelclock with the highest numerator and denominator values. This improve image quality and fixes display instability for some modes. - make interlaced modes work. - set synchronization pulses polarization correctly. - horizontal synchronization timing are now the same as generated by X. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c86a0c26fbe8ea218f7a267645679fb78aba8a3 Author: Krzysztof Helt Date: Wed Jul 23 21:31:03 2008 -0700 tridentfb: acceleration bug fixes This patch fixes two problems when acceleration is enabled: - bit for bitblt direction is corrected so scrolling down works as expected on 3DImage chips - initialization of acceleration is done later this helps with initial console malfuntion (on Blade3D chips) well documented here: http://marc.info/?l=linux-fbdev-users&m=111386953124478&w=2 Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 49b1f4b44bcdc47a10d2b354b269305043ef2a32 Author: Krzysztof Helt Date: Wed Jul 23 21:31:02 2008 -0700 tridentfb: acceleration code improvements This patch brings various acceleration improvements: - set copyarea/fillrect for non-accelerated framebuffer (fix) - remove 15 bpp depth handling to simplify code as it hardly works (15 bpp handling was obviously missing in some switches) - add fb_sync call and move waiting before accelerated function to make acceleration more asynchronous to cpu (few % of speed improvement) - add cpu_relax() call in waiting loops - make longer register names and name more registers - move registers' definition to header - general code improvements (shortening, simplifying) Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bcac2d5fe36238dcfc955b49f9db10ad3ae3e53c Author: Krzysztof Helt Date: Wed Jul 23 21:31:01 2008 -0700 tridentfb: add acceleration for TGUI families This patch adds acceleration for TGUI 9440 and 96xx chips. These chips requires line length to be power of 2, so this is also changed. It also moves the troubling enable_mmio() function to its final destination. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 54f019e54244fef0ad927ce5501927d9033492de Author: Krzysztof Helt Date: Wed Jul 23 21:31:01 2008 -0700 tridentfb: fix hi-color modes for TGUI 9440 The TGUI 9440 requires doubling clock for 16bpp (hi-color) modes. The patch also moves back enable_mmio() call to the right position. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 65e93e038c8a6eb65b6907d6aed22a8ff1029d3a Author: Krzysztof Helt Date: Wed Jul 23 21:31:00 2008 -0700 tridentfb: preserve memory type settings Do not overwrite bits which contain memory type settings. It removes noise pixels ("snow") on Blade3D and 3DImage chips. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74a933feaf13f705e6c798d87efe6a9d758b3ca0 Author: Krzysztof Helt Date: Wed Jul 23 21:31:00 2008 -0700 tridentfb: improve check_var function Do some additional checks (like pixelclock versus ramdac speed) to eliminate modes which do not work. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa0aa8ab2f28d8985daa79ecab51970376e17157 Author: Krzysztof Helt Date: Wed Jul 23 21:30:59 2008 -0700 tridentfb: fix unitialized pseudo_palette Initialize the pseudo_palette pointer properly. This fixes crash when 16bpp or 32bpp mode is selected. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a0d922562d56073f147a4de2983bee499dd2a10e Author: Krzysztof Helt Date: Wed Jul 23 21:30:58 2008 -0700 tridentfb: add TGUI 9440 support Add support for TGUI 9440 chip. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0e73a47f094a919e2edeaa88e840cd0400adc423 Author: Krzysztof Helt Date: Wed Jul 23 21:30:58 2008 -0700 tridentfb: improved register values on TGUI 9680 Improved values for some registers after Xorg Trident driver. The main problem was that values set by BIOS have been ignored. This patch completely remove random pixels ("snow") on the TGUI 9680 and 9440 (not supported yet by the driver). It does not help with the "snow" on 3DImage and Blade3D cards. There is also small improvement in timing calculations (hblank start and vblank start) Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3876ae8beb2c7c19e21279b9603b1244fcd744dd Author: Krzysztof Helt Date: Wed Jul 23 21:30:57 2008 -0700 tridentfb: improve probe function Add missing release of allocated fb_info structure and move enable_mmio() to fix error path. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6bdf1035602abf0564d24a7447eea1c149c4bcb1 Author: Krzysztof Helt Date: Wed Jul 23 21:30:56 2008 -0700 tridentfb: fix clock settings for older Trident 96XX chips The Xorg code shows that Trident models 9660, 9680 and 9682 require a different clock setting method. Add the second clock setting method for older models. Signed-off-by: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1724fecabfed504a4cfb87319ad3b9d3a8baa92 Author: Krzysztof Helt Date: Wed Jul 23 21:30:56 2008 -0700 tridentfb: use mmio access for clock setting Use the mmio outb function instead of direct one. The mmio registers are already mapped (in the probe function). Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f762d23e607af786bba8ff4a18059f43950c0e8 Author: Krzysztof Helt Date: Wed Jul 23 21:30:55 2008 -0700 tridentfb: fix timing calculations Fix broken timings calculations. This patch helps with following problems: - no left part of screen visible (up to half of the screen) - monitor's frequencies are not the ones intended for selected modes - if mode with resoultion y > 1024 is selected at least once then all modes with y < 1024 are "out of sync" (no display) Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 10172ed6dc4d40ff42bf5ce2dd2f65f401a93696 Author: Krzysztof Helt Date: Wed Jul 23 21:30:54 2008 -0700 tridentfb: make use of functions and constants from the vga.h Make use of functions and constants from the vga.h header to compact the code and make it more readable. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d9cad04bcde00411976402eda726199ac13b29ca Author: Krzysztof Helt Date: Wed Jul 23 21:30:54 2008 -0700 tridentfb: move global acceleration hooks into structure This patch moves acceleration hooks into the tridentfb_par structure and removes global hooks. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0759a5fbba12e0f2c9149d85bea1ec7df0178fd Author: Krzysztof Helt Date: Wed Jul 23 21:30:53 2008 -0700 tridentfb: convert is_blade and is_xp macros into functions This patch converts the is_blade() and is_xp() macros into local functions. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6eed8e1ec8532a6cd10c8b27236bde023c52c56a Author: Krzysztof Helt Date: Wed Jul 23 21:30:53 2008 -0700 tridentfb: move global flat panel variable into structure This patch moves flat panel indicator into tridentfb_par structure and removes related global variables and macros. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 122e8ad3cbf172043ea93f2db8e107fa9f9b0192 Author: Krzysztof Helt Date: Wed Jul 23 21:30:52 2008 -0700 tridentfb: move global chip_id into structure This patch moves the chip_id into tridentfb_par structure and removes global chip_id related constants. It also bumps version of the driver to 0.7.9 Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ea8ee55c12f77cbbb6e067f91e0cd794baa692ab Author: Krzysztof Helt Date: Wed Jul 23 21:30:51 2008 -0700 tridentfb: move global pseudo palette into structure This patch moves pseudo palette int tridentfb_par structure and removes global default_var. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e09ed099d0169ac3a22b17cfeece0fa54a9e43eb Author: Krzysztof Helt Date: Wed Jul 23 21:30:51 2008 -0700 tridentfb: convert fb_info into allocated one This patch converts fb_info structure from global variable to allocatable one. The global default_par is moved into function variable. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 306fa6f60a2870b7a9827a64e1b45cd35a9549aa Author: Krzysztof Helt Date: Wed Jul 23 21:30:50 2008 -0700 tridentfb: replace macros with functions This patch replaces macros with static functions and puts tridentfb_par pointer as the first argument of these functions. These is a step toward multihead support. Additionally, bogus TRIDENT_MMIO define is removed as the driver supports graphics cards only through the mmio mode. Signed-off-by: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ece5f43b041b96fa2a05107a10a6b0ea0c03a3b Author: Sebastian Siewior Date: Wed Jul 23 21:30:49 2008 -0700 fbdev: add the carmine FB driver Basic FB driver for the carmine chip. The driver registers two FB devices for the two possible screens. The DRAM settings can be be switched via Kconfig (between eval board and custom). Signed-off-by: Sebastian Siewior Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4cad4431fcd872a1b2efc093b0db6df943f5a898 Author: Yoichi Yuasa Date: Wed Jul 23 21:30:48 2008 -0700 rtc-vr41xx: add irq_set_freq() and irq_set_state() Implement the ioctls RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET and RTC_IRQP_READ in the standard RTC way. Thanks Dave for noticing it. Signed-off-by: Yoichi Yuasa Cc: David Brownell Cc: Ralf Baechle Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e2a31da854dcf8324012a83a31b40bc11e52589 Author: David Brownell Date: Wed Jul 23 21:30:47 2008 -0700 rtc-cmos: avoid spurious irqs This fixes kernel http://bugzilla.kernel.org/show_bug.cgi?id=11112 (bogus RTC update IRQs reported) for rtc-cmos, in two ways: - When HPET is stealing the IRQs, use the first IRQ to grab the seconds counter which will be monitored (instead of using whatever was previously in that memory); - In sane IRQ handling modes, scrub out old IRQ status before enabling IRQs. That latter is done by tightening up IRQ handling for rtc-cmos everywhere, also ensuring that when HPET is used it's the only thing triggering IRQ reports to userspace; net object shrink. Also fix a bogus HPET message related to its RTC emulation. Signed-off-by: David Brownell Report-by: W Unruh Cc: Andrew Victor Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 449321b39f6c6ebfa15d6da24f134240bd51db29 Author: David Brownell Date: Wed Jul 23 21:30:46 2008 -0700 rtc-at91rm9200: avoid spurious irqs This fixes kernel http://bugzilla.kernel.org/show_bug.cgi?id=11112 (bogus RTC update IRQs reported) for rtc-at91rm9200 by scrubbing old IRQ status before enabling IRQs. It also removes nonfunctional periodic IRQ support from this driver; only update IRQs are reported, or provided by the hardware. I suspect some other RTCs probably have versions of #11112; it's easy to overlook, since most non-RTC drivers don't care about spurious IRQs: they're not reported to userspace. Signed-off-by: David Brownell Report-by: W Unruh Cc: Andrew Victor Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 773be7ee97c11fbb6b8a912a58b268dbe8a6a3fe Author: Ben Dooks Date: Wed Jul 23 21:30:45 2008 -0700 rtc: rtc-s3c: update IRQ handling The rtc-s3c.c driver has been using its own ioctl() handling to deal with alarm and periodic interrupts to handle what should now be done with the rtc core code. Change to using the .irq_set_freq and .irq_set_state driver entries and remove the .ioctl handling. Signed-off-by: Ben Dooks Acked-by: Alessandro Zummo Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4cd0c5c40b64ef9fd94fb8382dade2fd28f2b935 Author: Ben Dooks Date: Wed Jul 23 21:30:44 2008 -0700 rtc: rtc-s3c: add __devexit and __devinit markers Add the relevant __devinit and __devexit attributes to the rtc-s3c driver. Signed-off-by: Ben Dooks Acked-by: Alessandro Zummo Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 35d3fdd5f304c06654c940921fc045c60df34693 Author: David Brownell Date: Wed Jul 23 21:30:43 2008 -0700 rtc-cmos: improve HPET IRQ glue Resolve http://bugzilla.kernel.org/show_bug.cgi?id=11051 and other bugs related to the way the HPET glue code in rtc-cmos was incomplete and inconsistent: * Switch the approach so that the basic driver code flow isn't changed by having HPET ... instead, just have HPET shadow the RTC_CONTROL irq enables and RTC_FREQ_SELECT data. It's only coping with IRQ thievery, after all. * Do that consistently (!!) to avoid problems when the HPET code is out of sync with the real RTC intent. Examples include: - cmos_procfs(), which now reports correct data - cmos_irq_set_state() ... also removing the previous PIE_{ON,OFF} ioctl support so only one code path manages "periodic" IRQs - cmos_do_shutdown() ... currently a "just in case" change. - cmos_suspend() and cmos_resume() ... also handling a bug that was specific to HPET's IRQ thievery, where the alarm wasn't disabled after waking the system * Always call that HPET code under the RTC spinlock (it doesn't do its own locking) Also clean up the HPET glue: * Add some comments explaining what's going on. * Switch to having just one #ifdef for the HPET glue, and inline functions (not #defines) to avoid some compiler warnings. * Have the probe message also report when HPET IRQs are involved This still leaves various holes in the HPET glue, like the emulated update IRQs being out of sync with the RTC, alarms never using day or month matches, and many extra IRQs (at 64 Hz). [akpm@linux-foundation.org: fix build] Signed-off-by: David Brownell Cc: Tomas Janousek Cc: Bernhard Walle Cc: Carlos R. Mafra Acked-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c68d07b2da54c941bb36c9d6d35fe8f263ee10ef Author: Carlos R. Mafra Date: Wed Jul 23 21:30:40 2008 -0700 rtc: remove and clarify unneeded externs When CONFIG_HPET_EMULATE_RTC is defined the external declaration of hpet_rtc_interrupt is redundant due to the inclusion of hpet.h. When !CONFIG_HPET_EMULATE_RTC we make it clear that hpet_rtc_interrupt is not used by defining it to return zero. Signed-off-by: Carlos R. Mafra Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 02bb584f3b1cfc8188522a4d2c8881b65073a4f1 Author: Wolfram Sang Date: Wed Jul 23 21:30:39 2008 -0700 rtc: convert the PCF8583 driver to the new I2C style framework with device_ids Convert the PCF8583 driver to the new I2C style framework with device_ids Signed-off-by: Juergen Beisert Signed-off-by: Wolfram Sang Signed-off-by: Alessandro Zummo Cc: David Brownell Acked-by: Jean Delvare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 71fc822455ccb63a66be0b6e97a415aceb0062c6 Author: David Brownell Date: Wed Jul 23 21:30:38 2008 -0700 rtc: rtc-omap footprint shrinkage Shrink the runtime footprint of the OMAP1 RTC driver a bunch by removing some old hacks and switching to platform_driver_probe(). Signed-off-by: David Brownell Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3de851a445123f24ad8ece18662014b5e8a8b4e Author: David Brownell Date: Wed Jul 23 21:30:37 2008 -0700 rtc: BCD codeshrink This updates to define the key routines as constant functions, which the macros will then call. Newer code can now call bcd2bin() instead of SCREAMING BCD2BIN() TO THE FOUR WINDS. This lets each driver shrink their codespace by using N function calls to a single (global) copy of those routines, instead of N inlined copies of these functions per driver. These routines aren't used in speed-critical code. Almost all callers are in the RTC framework. Typical per-driver savings is near 300 bytes. Signed-off-by: David Brownell Acked-by: Adrian Bunk Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53e84b672c1a8190af2b376c35c7a39cf1214f59 Author: David Brownell Date: Wed Jul 23 21:30:36 2008 -0700 rtc: ds1305/ds1306 driver Support the Dallas/Maxim DS1305 and DS1306 RTC chips. These use SPI, and support alarms, NVRAM, and a trickle charger for use when their backup power supply is a supercap or rechargeable cell. This basic driver doesn't yet support suspend/resume or wakealarms. Signed-off-by: David Brownell Cc: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8fc2c767b06067b417c565c4e75731e68ed41fd8 Author: Kim B. Heino Date: Wed Jul 23 21:30:34 2008 -0700 rtc: add support for ST M41T94 SPI RTC This patch adds kernel driver for M41T94 RTC chip connected via SPI. I've tested it on two different AT91-based hardwares. This is third revision of the patch: some comments made by Alessandro Zummo fixed. Revision two added support for century bit and fixes. Signed-off-by: Kim B. Heino Signed-off-by: Alessandro Zummo Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5ad31a575157147b43fa84ef1e21471661653878 Author: David Brownell Date: Wed Jul 23 21:30:33 2008 -0700 rtc: remove BKL for ioctl() Remove implicit use of BKL in ioctl() from the RTC framework. Instead, the rtc->ops_lock is used. That's the same lock that already protects the RTC operations when they're issued through the exported rtc_*() calls in drivers/rtc/interface.c ... making this a bugfix, not just a cleanup, since both ioctl calls and set_alarm() need to update IRQ enable flags and that implies a common lock (which RTC drivers as a rule do not provide on their own). A new comment at the declaration of "struct rtc_class_ops" summarizes current locking rules. It's not clear to me that the exceptions listed there should exist ... if not, those are pre-existing problems which can be fixed in a patch that doesn't relate to BKL removal. Signed-off-by: David Brownell Cc: Alan Cox Cc: Jonathan Corbet Acked-by: Alessandro Zummo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53f1b1433da7eac2607a4a0898a221a4485fd732 Author: Alan Cox Date: Wed Jul 23 21:30:32 2008 -0700 rtc: push the BKL down into the driver ioctl method For now just wrap the main logic, but this driver is a prime candidate for someone wanting to eliminate the lock entirely [lizf@cn.fujitsu.com: fix build failure] Signed-off-by: Alan Cox Signed-off-by: Li Zefan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c228db0b30fa12d65ae7461ce29ed1f4da12c5b Author: Maciej W. Rozycki Date: Wed Jul 23 21:30:32 2008 -0700 rtc: m41t80: use pr_info() as appropriate Replace printk(KERN_INFO ...) calls with appropriate pr_info(...) equivalents. Signed-off-by: Maciej W. Rozycki Cc: Alessandro Zummo Cc: Alexander Bigga Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 35aa64f3a117a16c466f688f52ac3847b3b572e8 Author: Maciej W. Rozycki Date: Wed Jul 23 21:30:29 2008 -0700 rtc: m41t80: sort header inclusions for readability Sort the header inclusions for readability. No functional changes. Signed-off-by: Maciej W. Rozycki Cc: Alessandro Zummo Cc: Alexander Bigga Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa55ddf340c9fa3f303ee16bbf35887e42c50304 Author: Ian Kent Date: Wed Jul 23 21:30:29 2008 -0700 autofs4: remove unused ioctls The ioctls AUTOFS_IOC_TOGGLEREGHOST and AUTOFS_IOC_ASKREGHOST were added several years ago but what they were intended for has never been implemented (as far as I'm aware noone uses them) so remove them. Signed-off-by: Ian Kent Reviewed-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06a3598552dc3b2b30eb18bd53bbac2a901489d7 Author: Ian Kent Date: Wed Jul 23 21:30:28 2008 -0700 autofs4: reorganize expire pending wait function calls This patch re-orgnirzes the checking for and waiting on active expires and elininates redundant checks. Signed-off-by: Ian Kent Cc: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec6e8c7d3f9073336ec7b2eed3fcda6f922087c3 Author: Ian Kent Date: Wed Jul 23 21:30:28 2008 -0700 autofs4: fix direct mount pending expire race - correction Appologies, somehow I seem to have sent an out dated version of this patch. Here is an additional patch that brings the patch up to date. Signed-off-by: Ian Kent Cc: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e60a9ab5f5d314735467752f623072f5b75157a Author: Ian Kent Date: Wed Jul 23 21:30:27 2008 -0700 autofs4: fix direct mount pending expire race For direct and offset type mounts that are covered by another mount we cannot check the AUTOFS_INF_EXPIRING flag during a path walk which leads to lookups walking into an expiring mount while it is being expired. For example, for the direct multi-mount map entry with a couple of offsets: /race/mm1 / :/ /om1 :/ /om2 :/ an autofs trigger mount is mounted on /race/mm1 and when accessed it is over mounted and trigger mounts made for /race/mm1/om1 and /race/mm1/om2. So it isn't possible for path walks to see the expiring flag at all and they happily walk into the file system while it is expiring. When expiring these mounts follow_down() must stop at the autofs mount and all processes must block in the ->follow_link() method (except the daemon) until the expire is complete. This is done by decrementing the d_mounted field of the autofs trigger mount root dentry until the expire is completed. In ->follow_link() all processes wait on the expire and the mount following is completed for the daemon until the expire is complete. Signed-off-by: Ian Kent Cc: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97e7449a7ad883bf9f516fc970778d75999c7843 Author: Ian Kent Date: Wed Jul 23 21:30:26 2008 -0700 autofs4: fix indirect mount pending expire race The selection of a dentry for expiration and the setting of the AUTOFS_INF_EXPIRING flag isn't done atomically which can lead to lookups walking into an expiring mount. What happens is that an expire is initiated by the daemon and a dentry is selected for expire but, since there is no lock held between the selection and setting of the expiring flag, a process may find the flag clear and continue walking into the mount tree at the same time the daemon attempts the expire it. Signed-off-by: Ian Kent Reviewed-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 26e81b3142f1ba497d4cd0365c13661684b784ce Author: Ian Kent Date: Wed Jul 23 21:30:25 2008 -0700 autofs4: fix pending checks There are two cases for which a dentry that has a pending mount request does not wait for completion. One is via autofs4_revalidate() and the other via autofs4_follow_link(). In revalidate, after the mount point directory is created, but before the mount is done, the check in try_to_fill_dentry() can can fail to send the dentry to the wait queue since the dentry is positive and the lookup flags may contain only LOOKUP_FOLLOW. Although we don't trigger a mount for the LOOKUP_FOLLOW flag, if ther's one pending we might as well wait and use the mounted dentry for the lookup. In autofs4_follow_link() the dentry is not checked to see if it is pending so it may fail to call try_to_fill_dentry() and not wait for mount completion. A dentry that is pending must always be sent to the wait queue. Signed-off-by: Ian Kent Reviewed-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff9cd499d6258952385cb2f12e9a3c0908fd5786 Author: Ian Kent Date: Wed Jul 23 21:30:24 2008 -0700 autofs4: cleanup redundant readir code The mount triggering functionality of readdir and related functions is no longer used (and is quite broken as well). The unused portions have been removed. Signed-off-by: Ian Kent Reviewed-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c72305b5472522299bb6f45b736080128eb1c822 Author: Ian Kent Date: Wed Jul 23 21:30:23 2008 -0700 autofs4: indirect dentry must almost always be positive We have been seeing mount requests comming to the automount daemon for keys of the form "/" which are lookups for invalid map keys. But we can check for this in the kernel module and return a fail immediately, without having to send a request to the daemon. It is possible to recognise these requests are invalid based on whether the request dentry is negative and its relation to the autofs file system root. For example, given the indirect multi-mount map entry: idm1 \ /mm1 :/ /mm2 :/ For a request to mount idm1, IS_ROOT((idm1)->d_parent) will be always be true and the dentry may be negative. But directories idm1/mm1 and idm1/mm2 will always be created as part of the mount request for idm1. So any mount request within idm1 itself must have a positive dentry otherwise the map key is invalid. In version 4 these multi-mount entries are all mounted and umounted as a single request and in version 5 the directories idm1/mm1 and idm1/mm2 are created and an autofs fs mounted on them to act as a mount trigger so the above is also true. This also holds true for the autofs version 4 pseudo direct mount feature. When this feature is used without the "--ghost" option automount(8) will create internal submounts as we go down the map key paths which are essentially normal indirect mounts for which the above holds. If the "--ghost" option is given the directories for map keys are created at daemon startup so valid map entries correspond to postive dentries in the autofs fs. autofs version 5 direct mount maps are similar except that the IS_ROOT check is not needed. This has been addressed in a previous patch tittled "autofs4 - detect invalid direct mount requests". For example, given the direct multi-mount map entry: /test/dm1 \ /mm1 :/ /mm2 :/ An autofs fs is mounted on /test/dm1 as a trigger mount and when a mount is triggered for /test/dm1, the multi-mount offset directories /test/dm1/mm1 and /test/dm1/mm2 are created and an autofs fs is mounted on them to act as mount triggers. So valid direct mount requests must always have a positive dentry if they correspond to a valid map entry. Signed-off-by: Ian Kent Acked-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb3b176796b0e53fd26fce86847231542eb0d198 Author: Ian Kent Date: Wed Jul 23 21:30:22 2008 -0700 autofs4: detect invalid direct mount requests autofs v5 direct and offset mounts within an autofs filesystem are triggered by existing autofs triger mounts so the mount point dentry must be positive. If the mount point dentry is negative then the trigger doesn't exist so we can return fail immediately. Signed-off-by: Ian Kent Cc: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 296f7bf78bc5c7a4d772aea580ce800d14040d1a Author: Ian Kent Date: Wed Jul 23 21:30:21 2008 -0700 autofs4: fix waitq memory leak If an autofs mount becomes catatonic before autofs4_wait_release() is called the wait queue counter will not be decremented down to zero and the entry will never be freed. There are also races decrementing the wait counter in the wait release function. To deal with this the counter needs to be updated while holding the wait queue mutex and waiters need to be woken up unconditionally when the wait is removed from the queue to ensure we eventually free the wait. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e64be33ccaceaca67c84237dff8805b861398eab Author: Ian Kent Date: Wed Jul 23 21:30:20 2008 -0700 autofs4: check kernel communication pipe is valid for write It is possible for an autofs mount to become catatonic (and for the daemon communication pipe to become NULL) after a wait has been initiallized but before the request has been sent to the daemon. We need to check for this before sending the request packet. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4c7da02615bebcaf89f15a8d055922f515160b8 Author: Ian Kent Date: Wed Jul 23 21:30:19 2008 -0700 autofs4: add missing kfree It see that the patch tittled "autofs4 - fix pending mount race" is missing a change that I had recently made. It's missing a kfree for the case mutex_lock_interruptible() fails to aquire the wait queue mutex. Signed-off-by: Ian Kent Cc: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a1362fe92f1bde687b3a9e93d6b8d105d0a84f74 Author: Ian Kent Date: Wed Jul 23 21:30:19 2008 -0700 autofs4: fix pending mount race Close a race between a pending mount that is about to finish and a new lookup for the same directory. Process P1 triggers a mount of directory foo. It sets DCACHE_AUTOFS_PENDING in the ->lookup routine, creates a waitq entry for 'foo', and calls out to the daemon to perform the mount. The autofs daemon will then create the directory 'foo', using a new dentry that will be hashed in the dcache. Before the mount completes, another process, P2, tries to walk into the 'foo' directory. The vfs path walking code finds an entry for 'foo' and calls the revalidate method. Revalidate finds that the entry is not PENDING (because PENDING was never set on the dentry created by the mkdir), but it does find the directory is empty. Revalidate calls try_to_fill_dentry, which sets the PENDING flag and then calls into the autofs4 wait code to trigger or wait for a mount of 'foo'. The wait code finds the entry for 'foo' and goes to sleep waiting for the completion of the mount. Yet another process, P3, tries to walk into the 'foo' directory. This process again finds a dentry in the dcache for 'foo', and calls into the autofs revalidate code. The revalidate code finds that the PENDING flag is set, and so calls try_to_fill_dentry. a) try_to_fill_dentry sets the PENDING flag redundantly for this dentry, then calls into the autofs4 wait code. b) the autofs4 wait code takes the waitq mutex and searches for an entry for 'foo' Between a and b, P1 is woken up because the mount completed. P1 takes the wait queue mutex, clears the PENDING flag from the dentry, and removes the waitqueue entry for 'foo' from the list. When it releases the waitq mutex, P3 (eventually) acquires it. At this time, it looks for an existing waitq for 'foo', finds none, and so creates a new one and calls out to the daemon to mount the 'foo' directory. Now, the reason that three processes are required to trigger this race is that, because the PENDING flag is not set on the dentry created by mkdir, the window for the race would be way to slim for it to ever occur. Basically, between the testing of d_mountpoint(dentry) and the taking of the waitq mutex, the mount would have to complete and the daemon would have to be woken up, and that in turn would have to wake up P1. This is simply impossible. Add the third process, though, and it becomes slightly more likely. Signed-off-by: Jeff Moyer Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5a11d4d0ee1ff284271f7265929d07ea4a1168a6 Author: Ian Kent Date: Wed Jul 23 21:30:17 2008 -0700 autofs4: fix waitq locking The autofs4_catatonic_mode() function accesses the wait queue without any locking but can be called at any time. This could lead to a possible double free of the name field of the wait and a double fput of the daemon communication pipe or an fput of a NULL file pointer. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 70b52a0a5005ce6a0ceec56e97222437a0ba7506 Author: Jeff Moyer Date: Wed Jul 23 21:30:16 2008 -0700 autofs4: use struct qstr in waitq.c The autofs_wait_queue already contains all of the fields of the struct qstr, so change it into a qstr. This patch, from Jeff Moyer, has been modified a liitle by myself. Signed-off-by: Jeff Moyer Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d5cb926fa0162b1e62f37c117cc7ce763cfcbb9 Author: Ian Kent Date: Wed Jul 23 21:30:15 2008 -0700 autofs4: use lookup intent flags to trigger mounts When an open(2) call is made on an autofs mount point directory that already exists and the O_DIRECTORY flag is not used the needed mount callback to the daemon is not done. This leads to the path walk continuing resulting in a callback to the daemon with an incorrect key. open(2) is called without O_DIRECTORY by the "find" utility but this should be handled properly anyway. This happens because autofs needs to use the lookup flags to decide when to callback to the daemon to perform a mount to prevent mount storms. For example, an autofs indirect mount map that has the "browse" option will have the mount point directories are pre-created and the stat(2) call made by a color ls against each directory will cause all these directories to be mounted. It is unfortunate we need to resort to this but mount maps can be quite large. Additionally, if a user manually umounts an autofs indirect mount the directory isn't removed which also leads to this situation. To resolve this autofs needs to use the lookup intent flags to enable it to make this decision. This patch adds this check and triggers a call back if any of the lookup intent flags are set as all these calls warrant a mount attempt be requested. I know that external VFS code which uses the lookup flags is something that the VFS would like to eliminate but I have no choice as I can't see any other way to do this. A VFS dentry or inode operation callback which returns the lookup "type" (requires a definition) would be sufficient. But this change is needed now and I'm not aware of the form that coming VFS changes will take so I'm not willing to propose anything along these lines. If anyone can provide an alternate method I would be happy to use it. [akpm@linux-foundation.org: fix build for concurrent VFS changes] Signed-off-by: Ian Kent Cc: Al Viro Cc: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c432c2586a0811c7d0030d78f0993568bc889a6f Author: Ian Kent Date: Wed Jul 23 21:30:14 2008 -0700 autofs4: don't release directory mutex if called in oz_mode Since we now delay hashing of dentrys until the ->mkdir() call, droping and re-taking the directory mutex within the ->lookup() function when we are being called by user space is not needed. This can lead to a race when other processes are attempting to access the same directory during mount point directory creation. In this case we need to hang onto the mutex to ensure we don't get user processes trying to create a mount request for a newly created dentry after the mount point entry has already been created. This ensures that when we need to check a dentry passed to autofs4_wait(), if it is hashed, it is always the mount point dentry and not a new dentry created by another lookup during directory creation. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef581a742874ebc4c28d24b374c78b762144ebdc Author: Ian Kent Date: Wed Jul 23 21:30:13 2008 -0700 autofs4: fix symlink name allocation The length of the symlink name has been moved but it needs to be set before allocating space for it in the dentry info struct. This corrects a mistake in a recent patch. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2576737873dc1d9ea461a5955a5f6779b569a350 Author: Ian Kent Date: Wed Jul 23 21:30:12 2008 -0700 autofs4: use look aside list for lookups A while ago a patch to resolve a deadlock during directory creation was merged. This delayed the hashing of lookup dentrys until the ->mkdir() (or ->symlink()) operation completed to ensure we always went through ->lookup() instead of also having processes go through ->revalidate() so our VFS locking remained consistent. Now we are seeing a couple of side affects of that change in situations with heavy mount activity. Two cases have been identified: 1) When a mount request is triggered, due to the delayed hashing, the directory created by user space for the mount point doesn't have the DCACHE_AUTOFS_PENDING flag set. In the case of an autofs multi-mount where a tree of mount point directories are created this can lead to the path walk continuing rather than the dentry being sent to the wait queue to wait for request completion. This is because, if the pending flag isn't set, the criteria for deciding this is a mount in progress fails to hold, namely that the dentry is not a mount point and has no subdirectories. 2) A mount request dentry is initially created negative and unhashed. It remains this way until the ->mkdir() callback completes. Since it is unhashed a fresh dentry is used when the user space mount request creates the mount point directory. This leaves the original dentry negative and unhashed. But revalidate has no way to tell the VFS that the dentry has changed, other than to force another ->lookup() by returning false, which is at best wastefull and at worst not possible. This results in an -ENOENT return from the original path walk when in fact the mount succeeded. To resolve this we need to ensure that the same dentry is used in all calls to ->lookup() during the course of a mount request. This patch achieves that by adding the initial dentry to a look aside list and removes it at ->mkdir() or ->symlink() completion (or when the dentry is released), since these are the only create operations autofs4 supports. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit caf7da3d5d4d9dd873eb52d025d8cc63b89f1fdb Author: Ian Kent Date: Wed Jul 23 21:30:11 2008 -0700 autofs4: revert - redo lookup in ttfd This patch series enables the use of a single dentry for lookups prior to the dentry being hashed and so we no longer need to redo the lookup. This patch reverts the patch of commit 033790449ba9c4dcf8478a87693d33df625c23b5. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f6f4f28b6ba543beef8bad91aa6f69c7ffeee51 Author: Ian Kent Date: Wed Jul 23 21:30:09 2008 -0700 autofs4: don't make expiring dentry negative Correct the error of making a positive dentry negative after it has been instantiated. The code that makes this error attempts to re-use the dentry from a concurrent expire and mount to resolve a race and the dentry used for the lookup must be negative for mounts to trigger in the required cases. The fact is that the dentry doesn't need to be re-used because all that is needed is to preserve the flag that indicates an expire is still incomplete at the time of the mount request. This change uses the the dentry to check the flag and wait for the expire to complete then discards it instead of attempting to re-use it. Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 391b52f98cf2e9bff227dad8bf9ea206fec43fa4 Author: Michael Halcrow Date: Wed Jul 23 21:30:08 2008 -0700 eCryptfs: Make all persistent file opens delayed There is no good reason to immediately open the lower file, and that can cause problems with files that the user does not intend to immediately open, such as device nodes. This patch removes the persistent file open from the interpose step and pushes that to the locations where eCryptfs really does need the lower persistent file, such as just before reading or writing the metadata stored in the lower file header. Two functions are jumping to out_dput when they should just be jumping to out on error paths. This patch also fixes these. Signed-off-by: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 72b55fffd631a89e5be6fe1b4f2565bc4cd90deb Author: Michael Halcrow Date: Wed Jul 23 21:30:07 2008 -0700 eCryptfs: do not try to open device files on mknod When creating device nodes, eCryptfs needs to delay actually opening the lower persistent file until an application tries to open. Device handles may not be backed by anything when they first come into existence. [Valdis.Kletnieks@vt.edu: build fix] Signed-off-by: Michael Halcrow Cc: Signed-off-by: Linus Torvalds commit 0a688ad713949643e201431d3f4a4ceddfeb70ca Author: Harvey Harrison Date: Wed Jul 23 21:30:07 2008 -0700 ecryptfs: inode.c mmap.c use unaligned byteorder helpers Fixe sparse warnings: fs/ecryptfs/inode.c:368:15: warning: cast to restricted __be64 fs/ecryptfs/mmap.c:385:12: warning: incorrect type in assignment (different base types) fs/ecryptfs/mmap.c:385:12: expected unsigned long long [unsigned] [assigned] [usertype] file_size fs/ecryptfs/mmap.c:385:12: got restricted __be64 [usertype] fs/ecryptfs/mmap.c:428:12: warning: incorrect type in assignment (different base types) fs/ecryptfs/mmap.c:428:12: expected unsigned long long [unsigned] [assigned] [usertype] file_size fs/ecryptfs/mmap.c:428:12: got restricted __be64 [usertype] Signed-off-by: Harvey Harrison Cc: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 29335c6a41568d4708d4ec3b9187f9b6d302e5ea Author: Harvey Harrison Date: Wed Jul 23 21:30:06 2008 -0700 ecryptfs: crypto.c use unaligned byteorder helpers Fixes the following sparse warnings: fs/ecryptfs/crypto.c:1036:8: warning: cast to restricted __be32 fs/ecryptfs/crypto.c:1038:8: warning: cast to restricted __be32 fs/ecryptfs/crypto.c:1077:10: warning: cast to restricted __be32 fs/ecryptfs/crypto.c:1103:6: warning: incorrect type in assignment (different base types) fs/ecryptfs/crypto.c:1105:6: warning: incorrect type in assignment (different base types) fs/ecryptfs/crypto.c:1124:8: warning: incorrect type in assignment (different base types) fs/ecryptfs/crypto.c:1241:21: warning: incorrect type in assignment (different base types) fs/ecryptfs/crypto.c:1244:30: warning: incorrect type in assignment (different base types) fs/ecryptfs/crypto.c:1414:23: warning: cast to restricted __be32 fs/ecryptfs/crypto.c:1417:32: warning: cast to restricted __be16 Signed-off-by: Harvey Harrison Cc: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f2368095e25018838e1bf145041f58270ccd32e Author: Miklos Szeredi Date: Wed Jul 23 21:30:05 2008 -0700 ecryptfs: string copy cleanup Clean up overcomplicated string copy, which also gets rid of this bogus warning: fs/ecryptfs/main.c: In function 'ecryptfs_parse_options': include/asm/arch/string_32.h:75: warning: array subscript is above array bounds Signed-off-by: Miklos Szeredi Cc: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 982363c97f8cad7aea4c3d2cfebffc1cc2d2f166 Author: Eric Sandeen Date: Wed Jul 23 21:30:04 2008 -0700 ecryptfs: propagate key errors up at mount time Mounting with invalid key signatures should probably fail, if they were specifically requested but not available. Also fix case checks in process_request_key_err() for the right sign of the errnos, as spotted by Jan Tluka. Signed-off-by: Eric Sandeen Reviewed-by: Jan Tluka Acked-by: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c4c17b073cd4a5a61bc04329561632870bb21fc Author: Tyler Hicks Date: Wed Jul 23 21:30:04 2008 -0700 ecryptfs: discard ecryptfsd registration messages in miscdev The userspace eCryptfs daemon sends HELO and QUIT messages to the kernel for per-user daemon (un)registration. These messages are required when netlink is used as the transport, but (un)registration is handled by opening and closing the device file when miscdev is the transport. These messages should be discarded in the miscdev transport so that a daemon isn't registered twice. Signed-off-by: Tyler Hicks Cc: Michael Halcrow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 746f1e558bc52b9693c1a1ecdab60f8392e5ff18 Author: Michael Halcrow Date: Wed Jul 23 21:30:02 2008 -0700 eCryptfs: Privileged kthread for lower file opens eCryptfs would really like to have read-write access to all files in the lower filesystem. Right now, the persistent lower file may be opened read-only if the attempt to open it read-write fails. One way to keep from having to do that is to have a privileged kthread that can open the lower persistent file on behalf of the user opening the eCryptfs file; this patch implements this functionality. This patch will properly allow a less-privileged user to open the eCryptfs file, followed by a more-privileged user opening the eCryptfs file, with the first user only being able to read and the second user being able to both read and write. eCryptfs currently does this wrong; it will wind up calling vfs_write() on a file that was opened read-only. This is fixed in this patch. Signed-off-by: Michael Halcrow Cc: Dave Kleikamp Cc: Serge Hallyn Cc: Eric Sandeen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0293902a4d66fab27d0ddcc0766e05dae68f004e Author: Wang Chen Date: Wed Jul 23 21:30:01 2008 -0700 I2O: handle sysfs_create_link() failures Compile warning: ignoring return value of `sysfs_create_link', declared with attribute warn_unused_result. If sysfs_create_link failed, take care of the return value and do some error handle after the failure. Since sysfs_remove_link() will check whether a link exists, when removing the link in error path, we don't need to care whether a link was created. Signed-off-by: Wang Chen Cc: Markus Lidel Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f700d6e5e5549cb9349d22043f4bd153792c621f Author: Stefano Stabellini Date: Wed Jul 23 21:29:59 2008 -0700 vt: do not update when the console is blanked vt.c DO_UPDATE macro checks if the console is visible but doesn't check if the console is blanked. In fact updating fbcon while the console is blanked is not only unnecessary but can even cause screen corruption. Therefore I am adding a simple check on console_blanked in DO_UPDATE. Signed-off-by: Stefano Stabellini Cc: Krzysztof Helt Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e0426e6a09954d205da2d674a3d368d2715e3afd Author: Jiri Slaby Date: Wed Jul 23 21:29:58 2008 -0700 vt: hold console_sem across sysfs operations Hold console sem while creating/destroying sysfs files. Serialisation is so far done by BKL held in tty release_dev and chrdev_open, but no other locks are held in open path. Signed-off-by: Jiri Slaby Cc: Alan Cox Cc: Aristeu Rozanski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbe48ecc7f6559318cfc6c023da225a0b0e14ab3 Author: Jan Nikitenko Date: Wed Jul 23 21:29:57 2008 -0700 spi: au1550_spi: improve pio transfer mode Improve PIO transfer mode of au1550 spi controller by continuing of spi transfer, instead of aborting transfer when transmit underflow interrupt occurrs. Verified by oscilloscope that the spi clock pauses on trasmit underflow, so transfer continuation is perfectly valid even though au1550 datasheet says that on tx underflow zeroes will be transfered. Also make some error messages more specific. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jan Nikitenko Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3a93a159c61e38a12f7ecbb3a25cf3f012abcf7a Author: Manuel Lauss Date: Wed Jul 23 21:29:56 2008 -0700 spi: au1550_spi: proper platform device Remove the Au1550 resource table and instead extract MMIO/IRQ/DMA resources from platform resource information like any well-behaved platform driver. Signed-off-by: Manuel Lauss Signed-off-by: Jan Nikitenko Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ef754b7d7971a704d5b1b4608839da1bae37e5e Author: Alan Cox Date: Wed Jul 23 21:29:55 2008 -0700 spidev: BKL removal Another step to removing ->ioctl and to removing the BKL [dbrownell@users.sourceforge.net: take final step; BKL not needed] Signed-off-by: Alan Cox Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 102eb97564c73ea73645b38599c5cbe6f54b030c Author: Grant Likely Date: Wed Jul 23 21:29:55 2008 -0700 spi: make spi_board_info.modalias a char array Currently, 'modalias' in the spi_device structure is a 'const char *'. The spi_new_device() function fills in the modalias value from a passed in spi_board_info data block. Since it is a pointer copy, the new spi_device remains dependent on the spi_board_info structure after the new spi_device is registered (no other fields in spi_device directly depend on the spi_board_info structure; all of the other data is copied). This causes a problem when dynamically propulating the list of attached SPI devices. For example, in arch/powerpc, the list of SPI devices can be populated from data in the device tree. With the current code, the device tree adapter must kmalloc() a new spi_board_info structure for each new SPI device it finds in the device tree, and there is no simple mechanism in place for keeping track of these allocations. This patch changes modalias from a 'const char *' to a fixed char array. By copying the modalias string instead of referencing it, the dependency on the spi_board_info structure is eliminated and an outside caller does not need to maintain a separate spi_board_info allocation for each device. If searched through the code to the best of my ability for any references to modalias which may be affected by this change and haven't found anything. It has been tested with the lite5200b platform in arch/powerpc. [dbrownell@users.sourceforge.net: cope with linux-next changes: KOBJ_NAME_LEN obliterated, etc] Signed-off-by: Grant Likely Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6291fe2abce4689d6ee7cbaea16692c79bf0d01b Author: Robert P. J. Day Date: Wed Jul 23 21:29:53 2008 -0700 SPI Kconfig simplifications Use "if SPI_MASTER" to remove numerous dependencies. [dbrownell@users.sourceforge.net: remove a couple now-needless EXPERIMENTAL dependencies too] Signed-off-by: Robert P. J. Day Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 166a375b657b7af494f4ce3f72c4d2002180da44 Author: Roel Kluin <12o3l@tiscali.nl> Date: Wed Jul 23 21:29:53 2008 -0700 xilinx_spi: test below 0 on unsigned irq in xilinx_spi_probe() xilinx_spi->irq is unsigned, so the test fails Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Cc: David Brownell Cc: Andrei Konovalov Cc: Yuri Frolov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a61f5345eba34772a71523227de890a28410f320 Author: Chen Gong Date: Wed Jul 23 21:29:52 2008 -0700 spi: spi_mpc83xx clockrate fixes This updates the SPI clock rate calculations for the spi_mpc83xx driver. Some boundary conditions were wrong, and in several cases divide-by-16 wasn't always needed Signed-off-by: Chen Gong Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 708d8cefd0f6d8dc13027f899e865ccfa5f63871 Author: Andre Haupt Date: Wed Jul 23 21:29:51 2008 -0700 stallion: removed unused variable Signed-off-by: Andre Haupt Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae2d4c396e19f45918ed6e0900b031538d009823 Author: Nye Liu Date: Wed Jul 23 21:29:50 2008 -0700 cpm1: don't send break on TX_STOP, don't interrupt RX/TX when adjusting termios parameters Before setting STOP_TX, set _brkcr to 0 so the SMC does not send a break character. The driver appears to properly re-initialize _brkcr when the SMC is restarted. Do not interrupt RX/TX when the termios is being adjusted; it results in corrupted characters appearing on the line. Cc: Vitaly Bordug Cc: Scott Wood Cc: Paul Mackerras Cc: Kumar Gala Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e9a8f4d1de12633bfb71b5fee47745b32877b7b5 Author: Maciej W. Rozycki Date: Wed Jul 23 21:29:49 2008 -0700 serial: DZ11: avoid a hang at console switch-over Changes to the generic console support code that happened a while ago introduced a scenario where the initial console is used in parallel with the final console during a brief period when switching between the two is in progress. During that time a message about the switch-over is printed. With some combinations of chips, firmware and drivers, such as the DEC DZ11 clone used with the DECstation, a hang may happen because the firmware used for the initial console may not expect the state of the chip after it has been initialised by the driver. This is a workaround for the DZ11 which reuses the power-management callback to keep the transmitter of the line associated with the console enabled. It reflects the consensus reached in a discussion a while ago. Signed-off-by: Maciej W. Rozycki Cc: Jiri Slaby Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 377135912806ddc87d56d64fafa685f4063c45f1 Author: Maciej W. Rozycki Date: Wed Jul 23 21:29:48 2008 -0700 serial: Z85C30: avoid a hang at console switch-over Changes to the generic console support code that happened a while ago introduced a scenario where the initial console is used in parallel with the final console during a brief period when switching between the two is in progress. During that time a message about the switch-over is printed. With some combinations of chips, firmware and drivers, such as the Zilog Z85C30 SCC used with the DECstation, a hang may happen because the firmware used for the initial console may not expect the state of the chip after it has been initialised by the driver. This is not a bug in the firmware, as some registers it would have to examine are write-only. This is a workaround for the Z85C30 which reuses the power-management callback to keep the transmitter of the line associated with the console enabled. It reflects the consensus reached in a discussion a while ago. Signed-off-by: Maciej W. Rozycki Cc: Jiri Slaby Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b76c5a0717094f0a900d9afd8e36f7ad8dbba587 Author: Catalin(ux) M BOIE Date: Wed Jul 23 21:29:46 2008 -0700 serial: add support for a no-name 4 ports multiserial card It is a no-name PCI card. I found no reference to a producer so I used "UNKNOWN_0x1584" as the name. Full lspci: 01:07.0 0780: 10b5:9050 (rev 01) Subsystem: 10b5:1584 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- \ ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- \ DEVSEL=medium >TAbort- SERR- Acked-by: Alan Cox Acked-by: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7500b1f602aad75901774a67a687ee985d85893f Author: Aristeu Rozanski Date: Wed Jul 23 21:29:45 2008 -0700 8250: fix break handling for Intel 82571 Intel 82571 has a "Serial Over LAN" feature that doesn't properly implements the receiving of break characters. When a break is received, it doesn't set UART_LSR_DR and unless another character is received, the break won't be received by the application. Signed-off-by: Aristeu Rozanski Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 920519c1c31ca46ef6caab1a4be102ed0dfb5fbc Author: Adrian Bunk Date: Wed Jul 23 21:29:44 2008 -0700 serial/8250_gsc.c: add MODULE_LICENSE This patch adds the missing MODULE_LICENSE("GPL"). Signed-off-by: Adrian Bunk Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9fe5ad9c8cef9ad5873d8ee55d1cf00d9b607df0 Author: Ulrich Drepper Date: Wed Jul 23 21:29:43 2008 -0700 flag parameters add-on: remove epoll_create size param Remove the size parameter from the new epoll_create syscall and renames the syscall itself. The updated test program follows. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #ifndef __NR_epoll_create2 # ifdef __x86_64__ # define __NR_epoll_create2 291 # elif defined __i386__ # define __NR_epoll_create2 329 # else # error "need __NR_epoll_create2" # endif #endif #define EPOLL_CLOEXEC O_CLOEXEC int main (void) { int fd = syscall (__NR_epoll_create2, 0); if (fd == -1) { puts ("epoll_create2(0) failed"); return 1; } int coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { puts ("epoll_create2(0) set close-on-exec flag"); return 1; } close (fd); fd = syscall (__NR_epoll_create2, EPOLL_CLOEXEC); if (fd == -1) { puts ("epoll_create2(EPOLL_CLOEXEC) failed"); return 1; } coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { puts ("epoll_create2(EPOLL_CLOEXEC) set close-on-exec flag"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e38b36f325153eaadd1c2a7abc5762079233e540 Author: Ulrich Drepper Date: Wed Jul 23 21:29:42 2008 -0700 flag parameters: check magic constants This patch adds test that ensure the boundary conditions for the various constants introduced in the previous patches is met. No code is generated. [akpm@linux-foundation.org: fix alpha] Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 510df2dd482496083e1c3b1a8c9b6afd5fa4c7d7 Author: Ulrich Drepper Date: Wed Jul 23 21:29:41 2008 -0700 flag parameters: NONBLOCK in inotify_init This patch adds non-blocking support for inotify_init1. The additional changes needed are minimal. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #ifndef __NR_inotify_init1 # ifdef __x86_64__ # define __NR_inotify_init1 294 # elif defined __i386__ # define __NR_inotify_init1 332 # else # error "need __NR_inotify_init1" # endif #endif #define IN_NONBLOCK O_NONBLOCK int main (void) { int fd = syscall (__NR_inotify_init1, 0); if (fd == -1) { puts ("inotify_init1(0) failed"); return 1; } int fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if (fl & O_NONBLOCK) { puts ("inotify_init1(0) set non-blocking mode"); return 1; } close (fd); fd = syscall (__NR_inotify_init1, IN_NONBLOCK); if (fd == -1) { puts ("inotify_init1(IN_NONBLOCK) failed"); return 1; } fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if ((fl & O_NONBLOCK) == 0) { puts ("inotify_init1(IN_NONBLOCK) set non-blocking mode"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be61a86d7237dd80510615f38ae21d6e1e98660c Author: Ulrich Drepper Date: Wed Jul 23 21:29:40 2008 -0700 flag parameters: NONBLOCK in pipe This patch adds O_NONBLOCK support to pipe2. It is minimally more involved than the patches for eventfd et.al but still trivial. The interfaces of the create_write_pipe and create_read_pipe helper functions were changed and the one other caller as well. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #ifndef __NR_pipe2 # ifdef __x86_64__ # define __NR_pipe2 293 # elif defined __i386__ # define __NR_pipe2 331 # else # error "need __NR_pipe2" # endif #endif int main (void) { int fds[2]; if (syscall (__NR_pipe2, fds, 0) == -1) { puts ("pipe2(0) failed"); return 1; } for (int i = 0; i < 2; ++i) { int fl = fcntl (fds[i], F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if (fl & O_NONBLOCK) { printf ("pipe2(0) set non-blocking mode for fds[%d]\n", i); return 1; } close (fds[i]); } if (syscall (__NR_pipe2, fds, O_NONBLOCK) == -1) { puts ("pipe2(O_NONBLOCK) failed"); return 1; } for (int i = 0; i < 2; ++i) { int fl = fcntl (fds[i], F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if ((fl & O_NONBLOCK) == 0) { printf ("pipe2(O_NONBLOCK) does not set non-blocking mode for fds[%d]\n", i); return 1; } close (fds[i]); } puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b1ef0e60d42f2fdaec26baee8327eb156347b4f Author: Ulrich Drepper Date: Wed Jul 23 21:29:39 2008 -0700 flag parameters: NONBLOCK in timerfd_create This patch adds support for the TFD_NONBLOCK flag to timerfd_create. The additional changes needed are minimal. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #ifndef __NR_timerfd_create # ifdef __x86_64__ # define __NR_timerfd_create 283 # elif defined __i386__ # define __NR_timerfd_create 322 # else # error "need __NR_timerfd_create" # endif #endif #define TFD_NONBLOCK O_NONBLOCK int main (void) { int fd = syscall (__NR_timerfd_create, CLOCK_REALTIME, 0); if (fd == -1) { puts ("timerfd_create(0) failed"); return 1; } int fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if (fl & O_NONBLOCK) { puts ("timerfd_create(0) set non-blocking mode"); return 1; } close (fd); fd = syscall (__NR_timerfd_create, CLOCK_REALTIME, TFD_NONBLOCK); if (fd == -1) { puts ("timerfd_create(TFD_NONBLOCK) failed"); return 1; } fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if ((fl & O_NONBLOCK) == 0) { puts ("timerfd_create(TFD_NONBLOCK) set non-blocking mode"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7d476dfdf0bcfed478a207aecfdc84f81efecaf Author: Ulrich Drepper Date: Wed Jul 23 21:29:38 2008 -0700 flag parameters: NONBLOCK in eventfd This patch adds support for the EFD_NONBLOCK flag to eventfd2. The additional changes needed are minimal. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #ifndef __NR_eventfd2 # ifdef __x86_64__ # define __NR_eventfd2 290 # elif defined __i386__ # define __NR_eventfd2 328 # else # error "need __NR_eventfd2" # endif #endif #define EFD_NONBLOCK O_NONBLOCK int main (void) { int fd = syscall (__NR_eventfd2, 1, 0); if (fd == -1) { puts ("eventfd2(0) failed"); return 1; } int fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if (fl & O_NONBLOCK) { puts ("eventfd2(0) sets non-blocking mode"); return 1; } close (fd); fd = syscall (__NR_eventfd2, 1, EFD_NONBLOCK); if (fd == -1) { puts ("eventfd2(EFD_NONBLOCK) failed"); return 1; } fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if ((fl & O_NONBLOCK) == 0) { puts ("eventfd2(EFD_NONBLOCK) does not set non-blocking mode"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5fb5e04926a54bc1c22bba7ca166840f4476196f Author: Ulrich Drepper Date: Wed Jul 23 21:29:37 2008 -0700 flag parameters: NONBLOCK in signalfd This patch adds support for the SFD_NONBLOCK flag to signalfd4. The additional changes needed are minimal. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #ifndef __NR_signalfd4 # ifdef __x86_64__ # define __NR_signalfd4 289 # elif defined __i386__ # define __NR_signalfd4 327 # else # error "need __NR_signalfd4" # endif #endif #define SFD_NONBLOCK O_NONBLOCK int main (void) { sigset_t ss; sigemptyset (&ss); sigaddset (&ss, SIGUSR1); int fd = syscall (__NR_signalfd4, -1, &ss, 8, 0); if (fd == -1) { puts ("signalfd4(0) failed"); return 1; } int fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if (fl & O_NONBLOCK) { puts ("signalfd4(0) set non-blocking mode"); return 1; } close (fd); fd = syscall (__NR_signalfd4, -1, &ss, 8, SFD_NONBLOCK); if (fd == -1) { puts ("signalfd4(SFD_NONBLOCK) failed"); return 1; } fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if ((fl & O_NONBLOCK) == 0) { puts ("signalfd4(SFD_NONBLOCK) does not set non-blocking mode"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77d2720059618b9b6e827a8b73831eb6c6fad63c Author: Ulrich Drepper Date: Wed Jul 23 21:29:35 2008 -0700 flag parameters: NONBLOCK in socket and socketpair This patch introduces support for the SOCK_NONBLOCK flag in socket, socketpair, and paccept. To do this the internal function sock_attach_fd gets an additional parameter which it uses to set the appropriate flag for the file descriptor. Given that in modern, scalable programs almost all socket connections are non-blocking and the minimal additional cost for the new functionality I see no reason not to add this code. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #include #include #ifndef __NR_paccept # ifdef __x86_64__ # define __NR_paccept 288 # elif defined __i386__ # define SYS_PACCEPT 18 # define USE_SOCKETCALL 1 # else # error "need __NR_paccept" # endif #endif #ifdef USE_SOCKETCALL # define paccept(fd, addr, addrlen, mask, flags) \ ({ long args[6] = { \ (long) fd, (long) addr, (long) addrlen, (long) mask, 8, (long) flags }; \ syscall (__NR_socketcall, SYS_PACCEPT, args); }) #else # define paccept(fd, addr, addrlen, mask, flags) \ syscall (__NR_paccept, fd, addr, addrlen, mask, 8, flags) #endif #define PORT 57392 #define SOCK_NONBLOCK O_NONBLOCK static pthread_barrier_t b; static void * tf (void *arg) { pthread_barrier_wait (&b); int s = socket (AF_INET, SOCK_STREAM, 0); struct sockaddr_in sin; sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK); sin.sin_port = htons (PORT); connect (s, (const struct sockaddr *) &sin, sizeof (sin)); close (s); pthread_barrier_wait (&b); pthread_barrier_wait (&b); s = socket (AF_INET, SOCK_STREAM, 0); sin.sin_port = htons (PORT); connect (s, (const struct sockaddr *) &sin, sizeof (sin)); close (s); pthread_barrier_wait (&b); return NULL; } int main (void) { int fd; fd = socket (PF_INET, SOCK_STREAM, 0); if (fd == -1) { puts ("socket(0) failed"); return 1; } int fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if (fl & O_NONBLOCK) { puts ("socket(0) set non-blocking mode"); return 1; } close (fd); fd = socket (PF_INET, SOCK_STREAM|SOCK_NONBLOCK, 0); if (fd == -1) { puts ("socket(SOCK_NONBLOCK) failed"); return 1; } fl = fcntl (fd, F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if ((fl & O_NONBLOCK) == 0) { puts ("socket(SOCK_NONBLOCK) does not set non-blocking mode"); return 1; } close (fd); int fds[2]; if (socketpair (PF_UNIX, SOCK_STREAM, 0, fds) == -1) { puts ("socketpair(0) failed"); return 1; } for (int i = 0; i < 2; ++i) { fl = fcntl (fds[i], F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if (fl & O_NONBLOCK) { printf ("socketpair(0) set non-blocking mode for fds[%d]\n", i); return 1; } close (fds[i]); } if (socketpair (PF_UNIX, SOCK_STREAM|SOCK_NONBLOCK, 0, fds) == -1) { puts ("socketpair(SOCK_NONBLOCK) failed"); return 1; } for (int i = 0; i < 2; ++i) { fl = fcntl (fds[i], F_GETFL); if (fl == -1) { puts ("fcntl failed"); return 1; } if ((fl & O_NONBLOCK) == 0) { printf ("socketpair(SOCK_NONBLOCK) does not set non-blocking mode for fds[%d]\n", i); return 1; } close (fds[i]); } pthread_barrier_init (&b, NULL, 2); struct sockaddr_in sin; pthread_t th; if (pthread_create (&th, NULL, tf, NULL) != 0) { puts ("pthread_create failed"); return 1; } int s = socket (AF_INET, SOCK_STREAM, 0); int reuse = 1; setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof (reuse)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK); sin.sin_port = htons (PORT); bind (s, (struct sockaddr *) &sin, sizeof (sin)); listen (s, SOMAXCONN); pthread_barrier_wait (&b); int s2 = paccept (s, NULL, 0, NULL, 0); if (s2 < 0) { puts ("paccept(0) failed"); return 1; } fl = fcntl (s2, F_GETFL); if (fl & O_NONBLOCK) { puts ("paccept(0) set non-blocking mode"); return 1; } close (s2); close (s); pthread_barrier_wait (&b); s = socket (AF_INET, SOCK_STREAM, 0); sin.sin_port = htons (PORT); setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof (reuse)); bind (s, (struct sockaddr *) &sin, sizeof (sin)); listen (s, SOMAXCONN); pthread_barrier_wait (&b); s2 = paccept (s, NULL, 0, NULL, SOCK_NONBLOCK); if (s2 < 0) { puts ("paccept(SOCK_NONBLOCK) failed"); return 1; } fl = fcntl (s2, F_GETFL); if ((fl & O_NONBLOCK) == 0) { puts ("paccept(SOCK_NONBLOCK) does not set non-blocking mode"); return 1; } close (s2); close (s); pthread_barrier_wait (&b); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: "David S. Miller" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99829b832997d907c30669bfd17da32151e18f04 Author: Ulrich Drepper Date: Wed Jul 23 21:29:33 2008 -0700 flag parameters: NONBLOCK in anon_inode_getfd Building on the previous change to anon_inode_getfd, this patch introduces support for handling of O_NONBLOCK in addition to the already supported O_CLOEXEC. Following patches will take advantage of this support. As can be seen, the additional support for supporting this functionality is minimal. Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4006553b06306b34054529477b06b68a1c66249b Author: Ulrich Drepper Date: Wed Jul 23 21:29:32 2008 -0700 flag parameters: inotify_init This patch introduces the new syscall inotify_init1 (note: the 1 stands for the one parameter the syscall takes, as opposed to no parameter before). The values accepted for this parameter are function-specific and defined in the inotify.h header. Here the values must match the O_* flags, though. In this patch CLOEXEC support is introduced. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #ifndef __NR_inotify_init1 # ifdef __x86_64__ # define __NR_inotify_init1 294 # elif defined __i386__ # define __NR_inotify_init1 332 # else # error "need __NR_inotify_init1" # endif #endif #define IN_CLOEXEC O_CLOEXEC int main (void) { int fd; fd = syscall (__NR_inotify_init1, 0); if (fd == -1) { puts ("inotify_init1(0) failed"); return 1; } int coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { puts ("inotify_init1(0) set close-on-exit"); return 1; } close (fd); fd = syscall (__NR_inotify_init1, IN_CLOEXEC); if (fd == -1) { puts ("inotify_init1(IN_CLOEXEC) failed"); return 1; } coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { puts ("inotify_init1(O_CLOEXEC) does not set close-on-exit"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [akpm@linux-foundation.org: add sys_ni stub] Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ed8cae8ba01348bfd83333f4648dd807b04d7f08 Author: Ulrich Drepper Date: Wed Jul 23 21:29:30 2008 -0700 flag parameters: pipe This patch introduces the new syscall pipe2 which is like pipe but it also takes an additional parameter which takes a flag value. This patch implements the handling of O_CLOEXEC for the flag. I did not add support for the new syscall for the architectures which have a special sys_pipe implementation. I think the maintainers of those archs have the chance to go with the unified implementation but that's up to them. The implementation introduces do_pipe_flags. I did that instead of changing all callers of do_pipe because some of the callers are written in assembler. I would probably screw up changing the assembly code. To avoid breaking code do_pipe is now a small wrapper around do_pipe_flags. Once all callers are changed over to do_pipe_flags the old do_pipe function can be removed. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #ifndef __NR_pipe2 # ifdef __x86_64__ # define __NR_pipe2 293 # elif defined __i386__ # define __NR_pipe2 331 # else # error "need __NR_pipe2" # endif #endif int main (void) { int fd[2]; if (syscall (__NR_pipe2, fd, 0) != 0) { puts ("pipe2(0) failed"); return 1; } for (int i = 0; i < 2; ++i) { int coe = fcntl (fd[i], F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { printf ("pipe2(0) set close-on-exit for fd[%d]\n", i); return 1; } } close (fd[0]); close (fd[1]); if (syscall (__NR_pipe2, fd, O_CLOEXEC) != 0) { puts ("pipe2(O_CLOEXEC) failed"); return 1; } for (int i = 0; i < 2; ++i) { int coe = fcntl (fd[i], F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { printf ("pipe2(O_CLOEXEC) does not set close-on-exit for fd[%d]\n", i); return 1; } } close (fd[0]); close (fd[1]); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 336dd1f70ff62d7dd8655228caed4c5bfc818c56 Author: Ulrich Drepper Date: Wed Jul 23 21:29:29 2008 -0700 flag parameters: dup2 This patch adds the new dup3 syscall. It extends the old dup2 syscall by one parameter which is meant to hold a flag value. Support for the O_CLOEXEC flag is added in this patch. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #ifndef __NR_dup3 # ifdef __x86_64__ # define __NR_dup3 292 # elif defined __i386__ # define __NR_dup3 330 # else # error "need __NR_dup3" # endif #endif int main (void) { int fd = syscall (__NR_dup3, 1, 4, 0); if (fd == -1) { puts ("dup3(0) failed"); return 1; } int coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { puts ("dup3(0) set close-on-exec flag"); return 1; } close (fd); fd = syscall (__NR_dup3, 1, 4, O_CLOEXEC); if (fd == -1) { puts ("dup3(O_CLOEXEC) failed"); return 1; } coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { puts ("dup3(O_CLOEXEC) set close-on-exec flag"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a0998b50c3f0b8fdd265c63e0032f86ebe377dbf Author: Ulrich Drepper Date: Wed Jul 23 21:29:27 2008 -0700 flag parameters: epoll_create This patch adds the new epoll_create2 syscall. It extends the old epoll_create syscall by one parameter which is meant to hold a flag value. In this patch the only flag support is EPOLL_CLOEXEC which causes the close-on-exec flag for the returned file descriptor to be set. A new name EPOLL_CLOEXEC is introduced which in this implementation must have the same value as O_CLOEXEC. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #ifndef __NR_epoll_create2 # ifdef __x86_64__ # define __NR_epoll_create2 291 # elif defined __i386__ # define __NR_epoll_create2 329 # else # error "need __NR_epoll_create2" # endif #endif #define EPOLL_CLOEXEC O_CLOEXEC int main (void) { int fd = syscall (__NR_epoll_create2, 1, 0); if (fd == -1) { puts ("epoll_create2(0) failed"); return 1; } int coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { puts ("epoll_create2(0) set close-on-exec flag"); return 1; } close (fd); fd = syscall (__NR_epoll_create2, 1, EPOLL_CLOEXEC); if (fd == -1) { puts ("epoll_create2(EPOLL_CLOEXEC) failed"); return 1; } coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { puts ("epoll_create2(EPOLL_CLOEXEC) set close-on-exec flag"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 11fcb6c14676023d0bd437841f5dcd670e7990a0 Author: Ulrich Drepper Date: Wed Jul 23 21:29:26 2008 -0700 flag parameters: timerfd_create The timerfd_create syscall already has a flags parameter. It just is unused so far. This patch changes this by introducing the TFD_CLOEXEC flag to set the close-on-exec flag for the returned file descriptor. A new name TFD_CLOEXEC is introduced which in this implementation must have the same value as O_CLOEXEC. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #ifndef __NR_timerfd_create # ifdef __x86_64__ # define __NR_timerfd_create 283 # elif defined __i386__ # define __NR_timerfd_create 322 # else # error "need __NR_timerfd_create" # endif #endif #define TFD_CLOEXEC O_CLOEXEC int main (void) { int fd = syscall (__NR_timerfd_create, CLOCK_REALTIME, 0); if (fd == -1) { puts ("timerfd_create(0) failed"); return 1; } int coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { puts ("timerfd_create(0) set close-on-exec flag"); return 1; } close (fd); fd = syscall (__NR_timerfd_create, CLOCK_REALTIME, TFD_CLOEXEC); if (fd == -1) { puts ("timerfd_create(TFD_CLOEXEC) failed"); return 1; } coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { puts ("timerfd_create(TFD_CLOEXEC) set close-on-exec flag"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b087498eb5605673b0f260a7620d91818cd72304 Author: Ulrich Drepper Date: Wed Jul 23 21:29:25 2008 -0700 flag parameters: eventfd This patch adds the new eventfd2 syscall. It extends the old eventfd syscall by one parameter which is meant to hold a flag value. In this patch the only flag support is EFD_CLOEXEC which causes the close-on-exec flag for the returned file descriptor to be set. A new name EFD_CLOEXEC is introduced which in this implementation must have the same value as O_CLOEXEC. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #ifndef __NR_eventfd2 # ifdef __x86_64__ # define __NR_eventfd2 290 # elif defined __i386__ # define __NR_eventfd2 328 # else # error "need __NR_eventfd2" # endif #endif #define EFD_CLOEXEC O_CLOEXEC int main (void) { int fd = syscall (__NR_eventfd2, 1, 0); if (fd == -1) { puts ("eventfd2(0) failed"); return 1; } int coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { puts ("eventfd2(0) sets close-on-exec flag"); return 1; } close (fd); fd = syscall (__NR_eventfd2, 1, EFD_CLOEXEC); if (fd == -1) { puts ("eventfd2(EFD_CLOEXEC) failed"); return 1; } coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { puts ("eventfd2(EFD_CLOEXEC) does not set close-on-exec flag"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [akpm@linux-foundation.org: add sys_ni stub] Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9deb27baedb79759c3ab9435a7d8b841842d56e9 Author: Ulrich Drepper Date: Wed Jul 23 21:29:24 2008 -0700 flag parameters: signalfd This patch adds the new signalfd4 syscall. It extends the old signalfd syscall by one parameter which is meant to hold a flag value. In this patch the only flag support is SFD_CLOEXEC which causes the close-on-exec flag for the returned file descriptor to be set. A new name SFD_CLOEXEC is introduced which in this implementation must have the same value as O_CLOEXEC. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #ifndef __NR_signalfd4 # ifdef __x86_64__ # define __NR_signalfd4 289 # elif defined __i386__ # define __NR_signalfd4 327 # else # error "need __NR_signalfd4" # endif #endif #define SFD_CLOEXEC O_CLOEXEC int main (void) { sigset_t ss; sigemptyset (&ss); sigaddset (&ss, SIGUSR1); int fd = syscall (__NR_signalfd4, -1, &ss, 8, 0); if (fd == -1) { puts ("signalfd4(0) failed"); return 1; } int coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { puts ("signalfd4(0) set close-on-exec flag"); return 1; } close (fd); fd = syscall (__NR_signalfd4, -1, &ss, 8, SFD_CLOEXEC); if (fd == -1) { puts ("signalfd4(SFD_CLOEXEC) failed"); return 1; } coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { puts ("signalfd4(SFD_CLOEXEC) does not set close-on-exec flag"); return 1; } close (fd); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [akpm@linux-foundation.org: add sys_ni stub] Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7d9dbca34240ebb6ff88d8a29c6c7bffd098f0c1 Author: Ulrich Drepper Date: Wed Jul 23 21:29:22 2008 -0700 flag parameters: anon_inode_getfd extension This patch just extends the anon_inode_getfd interface to take an additional parameter with a flag value. The flag value is passed on to get_unused_fd_flags in anticipation for a use with the O_CLOEXEC flag. No actual semantic changes here, the changed callers all pass 0 for now. [akpm@linux-foundation.org: KVM fix] Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c019bbc612f6633ede7ed67725cbf68de45ae8a4 Author: Ulrich Drepper Date: Wed Jul 23 21:29:21 2008 -0700 flag parameters: paccept w/out set_restore_sigmask Some platforms do not have support to restore the signal mask in the return path from a syscall. For those platforms syscalls like pselect are not defined at all. This is, I think, not a good choice for paccept() since paccept() adds more value on top of accept() than just the signal mask handling. Therefore this patch defines a scaled down version of the sys_paccept function for those platforms. It returns -EINVAL in case the signal mask is non-NULL but behaves the same otherwise. Note that I explicitly included . I saw that it is currently included but indirectly two levels down. There is too much risk in relying on this. The header might change and then suddenly the function definition would change without anyone immediately noticing. Signed-off-by: Ulrich Drepper Cc: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aaca0bdca573f3f51ea03139f9c7289541e7bca3 Author: Ulrich Drepper Date: Wed Jul 23 21:29:20 2008 -0700 flag parameters: paccept This patch is by far the most complex in the series. It adds a new syscall paccept. This syscall differs from accept in that it adds (at the userlevel) two additional parameters: - a signal mask - a flags value The flags parameter can be used to set flag like SOCK_CLOEXEC. This is imlpemented here as well. Some people argued that this is a property which should be inherited from the file desriptor for the server but this is against POSIX. Additionally, we really want the signal mask parameter as well (similar to pselect, ppoll, etc). So an interface change in inevitable. The flag value is the same as for socket and socketpair. I think diverging here will only create confusion. Similar to the filesystem interfaces where the use of the O_* constants differs, it is acceptable here. The signal mask is handled as for pselect etc. The mask is temporarily installed for the thread and removed before the call returns. I modeled the code after pselect. If there is a problem it's likely also in pselect. For architectures which use socketcall I maintained this interface instead of adding a system call. The symmetry shouldn't be broken. The following test must be adjusted for architectures other than x86 and x86-64 and in case the syscall numbers changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #include #include #include #include #ifndef __NR_paccept # ifdef __x86_64__ # define __NR_paccept 288 # elif defined __i386__ # define SYS_PACCEPT 18 # define USE_SOCKETCALL 1 # else # error "need __NR_paccept" # endif #endif #ifdef USE_SOCKETCALL # define paccept(fd, addr, addrlen, mask, flags) \ ({ long args[6] = { \ (long) fd, (long) addr, (long) addrlen, (long) mask, 8, (long) flags }; \ syscall (__NR_socketcall, SYS_PACCEPT, args); }) #else # define paccept(fd, addr, addrlen, mask, flags) \ syscall (__NR_paccept, fd, addr, addrlen, mask, 8, flags) #endif #define PORT 57392 #define SOCK_CLOEXEC O_CLOEXEC static pthread_barrier_t b; static void * tf (void *arg) { pthread_barrier_wait (&b); int s = socket (AF_INET, SOCK_STREAM, 0); struct sockaddr_in sin; sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK); sin.sin_port = htons (PORT); connect (s, (const struct sockaddr *) &sin, sizeof (sin)); close (s); pthread_barrier_wait (&b); s = socket (AF_INET, SOCK_STREAM, 0); sin.sin_port = htons (PORT); connect (s, (const struct sockaddr *) &sin, sizeof (sin)); close (s); pthread_barrier_wait (&b); pthread_barrier_wait (&b); sleep (2); pthread_kill ((pthread_t) arg, SIGUSR1); return NULL; } static void handler (int s) { } int main (void) { pthread_barrier_init (&b, NULL, 2); struct sockaddr_in sin; pthread_t th; if (pthread_create (&th, NULL, tf, (void *) pthread_self ()) != 0) { puts ("pthread_create failed"); return 1; } int s = socket (AF_INET, SOCK_STREAM, 0); int reuse = 1; setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof (reuse)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl (INADDR_LOOPBACK); sin.sin_port = htons (PORT); bind (s, (struct sockaddr *) &sin, sizeof (sin)); listen (s, SOMAXCONN); pthread_barrier_wait (&b); int s2 = paccept (s, NULL, 0, NULL, 0); if (s2 < 0) { puts ("paccept(0) failed"); return 1; } int coe = fcntl (s2, F_GETFD); if (coe & FD_CLOEXEC) { puts ("paccept(0) set close-on-exec-flag"); return 1; } close (s2); pthread_barrier_wait (&b); s2 = paccept (s, NULL, 0, NULL, SOCK_CLOEXEC); if (s2 < 0) { puts ("paccept(SOCK_CLOEXEC) failed"); return 1; } coe = fcntl (s2, F_GETFD); if ((coe & FD_CLOEXEC) == 0) { puts ("paccept(SOCK_CLOEXEC) does not set close-on-exec flag"); return 1; } close (s2); pthread_barrier_wait (&b); struct sigaction sa; sa.sa_handler = handler; sa.sa_flags = 0; sigemptyset (&sa.sa_mask); sigaction (SIGUSR1, &sa, NULL); sigset_t ss; pthread_sigmask (SIG_SETMASK, NULL, &ss); sigaddset (&ss, SIGUSR1); pthread_sigmask (SIG_SETMASK, &ss, NULL); sigdelset (&ss, SIGUSR1); alarm (4); pthread_barrier_wait (&b); errno = 0 ; s2 = paccept (s, NULL, 0, &ss, 0); if (s2 != -1 || errno != EINTR) { puts ("paccept did not fail with EINTR"); return 1; } close (s); puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [akpm@linux-foundation.org: make it compile] [akpm@linux-foundation.org: add sys_ni stub] Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: Cc: "David S. Miller" Cc: Roland McGrath Cc: Kyle McMartin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a677a039be7243357d93502bff2b40850c942e2d Author: Ulrich Drepper Date: Wed Jul 23 21:29:17 2008 -0700 flag parameters: socket and socketpair This patch adds support for flag values which are ORed to the type passwd to socket and socketpair. The additional code is minimal. The flag values in this implementation can and must match the O_* flags. This avoids overhead in the conversion. The internal functions sock_alloc_fd and sock_map_fd get a new parameters and all callers are changed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include #include #include #include #include #define PORT 57392 /* For Linux these must be the same. */ #define SOCK_CLOEXEC O_CLOEXEC int main (void) { int fd; fd = socket (PF_INET, SOCK_STREAM, 0); if (fd == -1) { puts ("socket(0) failed"); return 1; } int coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { puts ("socket(0) set close-on-exec flag"); return 1; } close (fd); fd = socket (PF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0); if (fd == -1) { puts ("socket(SOCK_CLOEXEC) failed"); return 1; } coe = fcntl (fd, F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { puts ("socket(SOCK_CLOEXEC) does not set close-on-exec flag"); return 1; } close (fd); int fds[2]; if (socketpair (PF_UNIX, SOCK_STREAM, 0, fds) == -1) { puts ("socketpair(0) failed"); return 1; } for (int i = 0; i < 2; ++i) { coe = fcntl (fds[i], F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if (coe & FD_CLOEXEC) { printf ("socketpair(0) set close-on-exec flag for fds[%d]\n", i); return 1; } close (fds[i]); } if (socketpair (PF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds) == -1) { puts ("socketpair(SOCK_CLOEXEC) failed"); return 1; } for (int i = 0; i < 2; ++i) { coe = fcntl (fds[i], F_GETFD); if (coe == -1) { puts ("fcntl failed"); return 1; } if ((coe & FD_CLOEXEC) == 0) { printf ("socketpair(SOCK_CLOEXEC) does not set close-on-exec flag for fds[%d]\n", i); return 1; } close (fds[i]); } puts ("OK"); return 0; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Cc: "David S. Miller" Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e2c10a12a2170856f5582d62d583cbcd1cb5eaf Author: Akinobu Mita Date: Wed Jul 23 21:29:15 2008 -0700 binfmt_misc: use simple_read_from_buffer() Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76a6f3dc9a7108785c145a298f82c72f9208fe17 Author: Adrian Bunk Date: Wed Jul 23 21:29:15 2008 -0700 CONFIG_SOUND_WM97XX: remove stale makefile line The driver is gone for a long time. Reported-by: Robert P. J. Day Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7102ed519a08b70eadc8fea9d8765d2d990241d1 Author: Adrian Bunk Date: Wed Jul 23 21:29:13 2008 -0700 remove the OSS trident driver SOUND_TRIDENT was the last PCI OSS driver, and since there's already an ALSA driver for the same hardware we can remove it. [muli@il.ibm.com: update CREDITS] Signed-off-by: Adrian Bunk Signed-off-by: Muli Ben-Yehuda Signed-off-by: Muli Ben-Yehuda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 33cba0657393a75e18e1781e3e13613303f18124 Author: Andy Whitcroft Date: Wed Jul 23 21:29:12 2008 -0700 checkpatch: version 0.21 Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 234fff6515a11cf3e67c793146689da426787fea Author: Andy Whitcroft Date: Wed Jul 23 21:29:12 2008 -0700 checkpatch: types cannot start mid word for pointer tests When checking spacing for pointer checks the type cannot start in the middle of a word, ie. this is not 'int * bar': x = fooint * bar; Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 292f1a9b342d763f94ea3915726a48905be4acd1 Author: Andy Whitcroft Date: Wed Jul 23 21:29:11 2008 -0700 checkpatch: complex macros need to ignore comments Ensure we ignore comments in complex macro detection else we incorrectly report this: #define PFM_GROUP_PERM_ANY -1 /* any user/group */ Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74048ed811152a995a88945ba9e0dded34adfff4 Author: Andy Whitcroft Date: Wed Jul 23 21:29:10 2008 -0700 checkpatch: variants -- move the main unary/binary operators to use variants Now that we have a variants system, move to using that to carry the unary/binary designation for +, -, &, and *. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f65f947a6a875e1fe7867dc08e981c4101d435d Author: Andy Whitcroft Date: Wed Jul 23 21:29:10 2008 -0700 checkpatch: add checks for question mark and colon spacing Add checks for the question mark colon operator spacing, and also check the other uses of colon. Colon means a number of things: - it introduces the else part of the ?: operator, - it terminates a goto label, - it terminates the case value, - it separates the identifier from the bit size on bit fields, and - it is used to introduce option types in asm(). Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2506586586c59f5db0e2ce00d5d31ccec6260b8 Author: Andy Whitcroft Date: Wed Jul 23 21:29:09 2008 -0700 checkpatch: possible modifiers -- handle multiple modifiers and trailing Add support for multiple modifiers such as: int __one __two foo; Also handle trailing known modifiers when defecting modifiers: int __one foo __read_mostly; Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0221f55c142b0ac8baf6f0b6c4e1ec89f0c98e96 Author: Andy Whitcroft Date: Wed Jul 23 21:29:08 2008 -0700 checkpatch: possible types -- known modifiers cannot be types Ensure we do not inadvertantly load known modifiers up as possible types. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ea3eb9a20f39d5afa52900a34092b4b5f6b55cb Author: Andy Whitcroft Date: Wed Jul 23 21:29:08 2008 -0700 checkpatch: handle return types of pointers to functions Make sure we correctly mark the return type of the pointer to a function declaration. const void *(*sb_tag)(struct sysfs_tag_info *info); Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b8f96a31f38c8e9fc75f0a89c6815e7cbc402858 Author: Andy Whitcroft Date: Wed Jul 23 21:29:07 2008 -0700 checkpatch: macro complexity checks are meaningless in linker scripts Exclude vmlinux.lds.h from the macro complexity checks. They will never apply sanely here. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d2172eb5bd4b7d06577113ec40635083619ca54a Author: Andy Whitcroft Date: Wed Jul 23 21:29:07 2008 -0700 checkpatch: possible modifiers are not being correctly matched Although we are finding the added modifier in the declaration below we are not correctly matching it as a type. Fix the declaration. static void __ref *vmem_alloc_pages(unsigned int order) { } Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7429c6903e3628fc2cfea65ec7e13bac030c7bfe Author: Andy Whitcroft Date: Wed Jul 23 21:29:06 2008 -0700 checkpatch: improve type matcher debug Improve type matcher debug so we can see what it does match. As part of this move us to to using the common debug framework. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 389a2fe57ffc59a649bea39db4d7e6d2eff2b562 Author: Andy Whitcroft Date: Wed Jul 23 21:29:05 2008 -0700 checkpatch: allow for type modifiers on multiple declarations Allow for type modifiers mid declaration on multiple declarations: struct mxser_mstatus ms, __user *msu = argp; Reported by Jiri Slaby. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c232147a7d5b0418b0a0bae0e5b9a62fb81f4f2 Author: Wolfram Sang Date: Wed Jul 23 21:29:05 2008 -0700 checkpatch: correct spelling in kfree checks Correct spelling in the kfree reports. Signed-off-by: Wolfram Sang Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c432a8f0134504814aa8dcce6cc57c89d175604 Author: Greg Kroah-Hartman Date: Wed Jul 23 21:29:04 2008 -0700 checkpatch: usb_free_urb() can take NULL usb_free_urb() can take a NULL, so let's check and warn about that. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f5fe35dd95549b1b419cdeb2ec3fe61fda94fa93 Author: Andy Whitcroft Date: Wed Jul 23 21:29:03 2008 -0700 checkpatch: condition/loop indent checks Check to see if the block/statement which a condition or loop introduces is indented correctly. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53210168feeff9a3c780bd42f69936d4c12381d5 Author: Andy Whitcroft Date: Wed Jul 23 21:29:03 2008 -0700 checkpatch: toughen trailing if statement checks and extend them to while and for Extend the trailing statement checks to report a trailing semi-colon ';' as we really want it on the next line and indented so it is really really obvious. Also extend the tests to include while and for. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d31cfcecf67563d70cd68616cb8fb4384f24b51 Author: Andy Whitcroft Date: Wed Jul 23 21:29:02 2008 -0700 checkpatch: check spacing for square brackets Check on the spacing before square brackets. We should only allow spaces there if this is part of a type definition or an initialialiser. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e2a763c20b89890d2153551b1af6962b135de4c0 Author: Andy Whitcroft Date: Wed Jul 23 21:29:02 2008 -0700 checkpatch: switch -- report trailing statements on case and default Report trailing statements on case and default lines. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4c014c0dede10cc0a8463e748892e738e190699 Author: Andy Whitcroft Date: Wed Jul 23 21:29:01 2008 -0700 checkpatch: allow printk strings to exceed 80 characters to maintain their searchability Allow printk strings to break the 80 character width limits, thus keeping them complete and searchable. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 548596d523d83dff5a670beb84be0daf4c3bcd16 Author: Andy Whitcroft Date: Wed Jul 23 21:29:01 2008 -0700 checkpatch: trailing statement indent: fix end of statement location Fix end of statement location. Where the last line of the statement is replaced we are miss reporting the newly added replacement an incorrectly indented trailing statement for the negative context. We are also incorrectly reporting negative statements generally. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3bb97a7aba36055d476896ed6393ab35a119d5b Author: Andy Whitcroft Date: Wed Jul 23 21:29:00 2008 -0700 checkpatch: macros: fix statement counting block end detection We are incorrectly counting the lines in a block while accumulating the trailing lines in a macro statement, leading to false positives. Fix end of block handling and general counting for negative context lines. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6ef9b297f6e8850da3be9c9ff5f00385c0977004 Author: Andy Whitcroft Date: Wed Jul 23 21:28:59 2008 -0700 checkpatch: types: unary -- goto introduces unary context When we see a goto we enter unary context. For example: goto *h; Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit beae6332493a40116dba24928154621f2e88b9a9 Author: Andy Whitcroft Date: Wed Jul 23 21:28:59 2008 -0700 checkpatch: comment detection: ignore macro continuation when detecting associated comments When looking for an associated comment they may be suffixed by a macro continuation. Ignore this. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3ddcf471ea90d7ff711dbaa371ef379ed625ec0 Author: Andy Whitcroft Date: Wed Jul 23 21:28:58 2008 -0700 checkpatch: possible types: __asm__ is never a type We are false matching __asm__ as a type, and then tripping the external function checks. Squash. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f3db6639fee577f6ed92c0a1fc881e748c47ec48 Author: Michael Ellerman Date: Wed Jul 23 21:28:57 2008 -0700 checkpatch: add a checkpatch warning for new uses of __initcall(). [apw@shadowen.org: generalise pattern and add tests] Signed-off-by: Michael Ellerman Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c8cb2ca37ed51aa1f3b20e3eff1e72df1c400f70 Author: Andy Whitcroft Date: Wed Jul 23 21:28:57 2008 -0700 checkpatch: types: some types may also be identifiers Some types such as typedefs may overlap real identifiers. Be more targetted about when a type can really exist. Where it cannot let it be an identifier. This prevents false reporting of the minus '-' in unary context in the following: foo[bar->bool - 1]; Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fee61c47d15270bdea699a8a3dd867f0825c3541 Author: Andy Whitcroft Date: Wed Jul 23 21:28:56 2008 -0700 checkpatch: return is not a function -- parentheses for casts are ok too Casts require parentheses so it is possible to have something like this: return (int)(*a); This miss trips the complexity function. Ensure that the two separate parenthesised sections are not coelesced. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6cbb2e711128b505209f7c910018aac77335c887 Author: Andy Whitcroft Date: Wed Jul 23 21:28:55 2008 -0700 checkpatch: Version: 0.20 Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5aa0769d089125e63f8dc23e0283e559e1790493 Author: Hans-Christian Egtvedt Date: Wed Jul 23 21:28:55 2008 -0700 atmel_pwm: set up only one PWM clock when allocating a clock This patch will only setup one clock, if free, and return this clock to the caller. The previous solution would setup both clocks with the same prescaler and divider and return PWM_CPR_CLKB, thus taking both clocks in the same call without the caller knowing. Signed-off-by: Hans-Christian Egtvedt Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 82736f4d1d2b7063b829cc93171a6e5aea8a9c49 Author: Uwe Kleine-König Date: Wed Jul 23 21:28:54 2008 -0700 generic irqs: handle failure of irqchip->set_type in setup_irq set_type returns an int indicating success or failure, but up to now setup_irq ignores that. In my case this resulted in a machine hang: gpio-keys requested IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, but arm/ns9xxx can only trigger on one direction so set_type didn't touch the configuration which happens do default to a level sensitiveness and returned -EINVAL. setup_irq ignored that and unmasked the irq. This resulted in an endless triggering of the gpio-key interrupt service routine which effectively killed the machine. With this patch applied setup_irq propagates the error to the caller. Note that before in the case chip && !chip->set_type && !chip->name a NULL pointer was feed to printk. This is fixed, too. Signed-off-by: Uwe Kleine-König Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f606ddf42fd4edc558eeb48bfee66d2c591571d2 Author: Adrian Bunk Date: Wed Jul 23 21:28:50 2008 -0700 remove the v850 port Trying to compile the v850 port brings many compile errors, one of them exists since at least kernel 2.6.19. There also seems to be noone willing to bring this port back into a usable state. This patch therefore removes the v850 port. If anyone ever decides to revive the v850 port the code will still be available from older kernels, and it wouldn't be impossible for the port to reenter the kernel if it would become actively maintained again. Signed-off-by: Adrian Bunk Acked-by: Greg Ungerer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99764fa4ceeecba8b9e0a8a5565b418a2e94f83b Author: WANG Cong Date: Wed Jul 23 21:28:49 2008 -0700 UML: make several more things static - Make some variables and functions static, since they don't need to be global. - Remove an unused function - arch/um/kernel/time.c::sched_clock(). - Clean the style a bit as complained by checkpatch.pl. Cc: Jeff Dike Signed-off-by: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a5675820436e4ad738dd442c1cc8a165101509b Author: WANG Cong Date: Wed Jul 23 21:28:49 2008 -0700 arch/um/kernel/mem.c: remove arch_validate() - Remove arch_validate(), because no one uses it. - Remove useless macro HAVE_ARCH_VALIDATE. - Make the variable 'empty_bad_page' static. Cc: Jeff Dike Signed-off-by: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c182ae7810f3fe444e666f3f78c209a7c116fdf Author: WANG Cong Date: Wed Jul 23 21:28:47 2008 -0700 arch/um/kernel/irq.c: clean up some functions Make activate_fd() and free_irq_by_irq_and_dev() static. Remove init_aio_irq() since it has no users. Cc: Jeff Dike Signed-off-by: WANG Cong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ed62f77bb631bc4a2d8acb0521b720cb55e58183 Author: Akinobu Mita Date: Wed Jul 23 21:28:46 2008 -0700 cris: use simple_read_from_buffer() Signed-off-by: Akinobu Mita Cc: Mikael Starvik Cc: Jesper Nilsson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d50004b0867a59f8a81116f000edb352595343d9 Author: Fernando Luis Vazquez Cao Date: Wed Jul 23 21:28:45 2008 -0700 cris: remove unused global_flush_tlb global_flush_tlb is declared but never used. Signed-off-by: Fernando Luis Vazquez Cao Cc: Mikael Starvik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 912019572180f287e85b5534fbb1c1e3ca6df6c9 Author: Adrian Bunk Date: Wed Jul 23 21:28:45 2008 -0700 mn10300: move sg_dma_{address,len}() to asm/scatterlist.h mn10300 was the only architecture where sg_dma_{address,len}() were not in asm/scatterlist.h, and it's not a big surprise that this caused a compile error somewhere: /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/media/video/videobuf-dma-sg.c: In function `videobuf_dma_map': /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/media/video/videobuf-dma-sg.c:238: error: implicit declaration of function 'sg_dma_address' Acked-by: David Howells Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0af566da6e9a4a2f5a83c5a70f3d0a772050e21 Author: David Howells Date: Wed Jul 23 21:28:44 2008 -0700 pm: fix try_to_freeze_tasks()'s use of do_div() Fix try_to_freeze_tasks()'s use of do_div() on an s64 by making elapsed_csecs64 a u64 instead and dividing that. Possibly this should be guarded lest the interval calculation turn up negative, but the possible negativity of the result of the division is cast away anyway. This was introduced by patch 438e2ce68dfd4af4cfcec2f873564fb921db4bb5. Signed-off-by: David Howells Acked-by: "Rafael J. Wysocki" Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e41fb7c58e3ca18ec5c9c9bb7bb68e8e653c9e8e Author: Carlos Corbacho Date: Wed Jul 23 21:28:43 2008 -0700 pm: acpi pm: add DMI quirk list for ACPI 1.0 suspend ordering There are a few BIOSes that we know of already that need to use the ACPI 1.0 suspend order. This appears to be only be a small minority of mostly nVidia based systems. Based on observation of Windows behaviour, it's clear that Windows is also doing maintaining its own list of broken hardware that needs this workaround. Signed-off-by: Carlos Corbacho Signed-off-by: Rafael J. Wysocki Cc: Andi Kleen Cc: Len Brown Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bdfe6b7c681669148dae4db27eb24ee5408ba371 Author: Shaohua Li Date: Wed Jul 23 21:28:41 2008 -0700 pm: acpi hibernation: utilize hardware signature ACPI defines a hardware signature. BIOS calculates the signature according to hardware configure and if hardware changes while hibernated, the signature will change. In that case, S4 resume should fail. Still, there may be systems on which this mechanism does not work correctly, so it is better to provide a workaround for them. For this reason, add a new switch to the acpi_sleep= command line argument allowing one to disable hardware signature checking. [shaohua.li@intel.com: build fix] Signed-off-by: Shaohua Li Signed-off-by: Rafael J. Wysocki Cc: Andi Kleen Cc: Len Brown Acked-by: Pavel Machek Cc: Cc: Shaohua Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f15fc4bdf91eb399da3f47a09c55831d9f22826 Author: Zhang Rui Date: Wed Jul 23 21:28:40 2008 -0700 pm: schedule sysrq poweroff on boot cpu schedule sysrq poweroff on boot cpu. sysrq poweroff needs to disable nonboot cpus, and we need to run this on boot cpu to avoid any recursion. http://bugzilla.kernel.org/show_bug.cgi?id=10897 [kosaki.motohiro@jp.fujitsu.com: build fix] Signed-off-by: Zhang Rui Tested-by: Rus Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1a220e7acf8ad2c03504891f4a70cd9c32c904b Author: Zhang Rui Date: Wed Jul 23 21:28:39 2008 -0700 pm: introduce new interfaces schedule_work_on() and queue_work_on() This interface allows adding a job on a specific cpu. Although a work struct on a cpu will be scheduled to other cpu if the cpu dies, there is a recursion if a work task tries to offline the cpu it's running on. we need to schedule the task to a specific cpu in this case. http://bugzilla.kernel.org/show_bug.cgi?id=10897 [oleg@tv-sign.ru: cleanups] Signed-off-by: Zhang Rui Tested-by: Rus Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d83304c7e7bd3b05be90281b3a47841bc8f057a Author: Akinobu Mita Date: Wed Jul 23 21:28:38 2008 -0700 pm: hibernation: simplify memory bitmap This patch simplifies the memory bitmap manipulations. - remove the member size in struct bm_block It is not necessary for struct bm_block to have the number of bit chunks that can be calculated by using end_pfn and start_pfn. - use find_next_bit() for memory_bm_next_pfn No need to invent the bitmap library only for the memory bitmap. Signed-off-by: Akinobu Mita Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8111d1b552349921aae1acf73e4e8cea98e80970 Author: Alan Stern Date: Wed Jul 23 21:28:37 2008 -0700 pm: add new PM_EVENT codes for runtime power transitions This patch (as1112) adds some new PM_EVENT_* codes for use by kernel subsystems. They describe runtime power-state transitions of the sort already implemented by the USB subsystem. Signed-off-by: Alan Stern Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8c363265d57d755e62053e9f69a1f2164e83f7ea Author: Rafael J. Wysocki Date: Wed Jul 23 21:28:37 2008 -0700 pm: drop unnecessary includes from pm.h Drop unnecessary includes from include/linux/pm.h . Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 40b4ac33b4d1bdd5cbeb2241be2399c550fa3696 Author: Rafael J. Wysocki Date: Wed Jul 23 21:28:36 2008 -0700 pm: remove obsolete piece of PM documentation Remove some obsolete PM documentation. The majority of contents of Documentation/power/pm.txt are outdated. Remove the outdated parts of this file and move the rest to Documentation/power/apm-acpi.txt . Update the index in Documentation/power/ as appropriate. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7ecb331e11d1f7aa66aeef9170fc20781c9bb55 Author: Rafael J. Wysocki Date: Wed Jul 23 21:28:35 2008 -0700 pm: remove remaining obsolete definitions from pm.h Remove the remaining obsolete definitions from include/linux/pm.h and move the definitions of PM_SUSPEND and PM_RESUME to the header of h3600 which is the only user of them. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 558481f038e587b22d02167af58914c814ce9de5 Author: Rafael J. Wysocki Date: Wed Jul 23 21:28:35 2008 -0700 pm: remove definition of struct pm_dev Remove the definition of 'struct pm_dev', which is not used any more, along with some related stuff from include/linux/pm.h . Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d75f65fd247fe85d90a3880d143b1bb22fe13a48 Author: Adrian Bunk Date: Wed Jul 23 21:28:34 2008 -0700 remove include/linux/pm_legacy.h Remove the obsolete and no longer used include/linux/pm_legacy.h Reviewed-by: Robert P. J. Day Signed-off-by: Adrian Bunk Cc: Pavel Machek Acked-by: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77437fd4e61f87cc94d9314baa5cbf50e3ccdf54 Author: David Brownell Date: Wed Jul 23 21:28:33 2008 -0700 pm: boot time suspend selftest Boot-time test for system suspend states (STR or standby). The generic RTC framework triggers wakeup alarms, which are used to exit those states. - Measures some aspects of suspend time ... this uses "jiffies" until someone converts it to use a timebase that works properly even while timer IRQs are disabled. - Triggered by a command line parameter. By default nothing even vaguely troublesome will happen, but "test_suspend=mem" will give you a brief STR test during system boot. (Or you may need to use "test_suspend=standby" instead, if your hardware needs that.) This isn't without problems. It fires early enough during boot that for example both PCMCIA and MMC stacks have misbehaved. The workaround in those cases was to boot without such media cards inserted. [matthltc@us.ibm.com: fix compile failure in boot time suspend selftest] Signed-off-by: David Brownell Cc: Ingo Molnar Cc: Pavel Machek Cc: "Rafael J. Wysocki" Signed-off-by: Matt Helsley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d63081d418c73cc187c893069e0f24c4c6eecd3 Author: Pavel Machek Date: Wed Jul 23 21:28:32 2008 -0700 swsusp: provide users with a hint about the no_console_suspend option Tell the user about the no_console_suspend option, so that we don't have to tell each bug reporter personally. [akpm@linux-foundation.org: clarify the text a little] Signed-off-by: Pavel Machek Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb9ba4e95921f71d874beee2d0964fc2322b47a2 Author: Adrian Bunk Date: Wed Jul 23 21:28:29 2008 -0700 alpha: remove the unused ALPHA_CORE_AGP option The real option is named AGP_ALPHA_CORE. Reviewed-by: Robert P. J. Day Signed-off-by: Adrian Bunk Cc: Richard Henderson Cc: Ivan Kokshaysky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e53f12cc6c43b69f54937f15c5706d83f67c2fdd Author: Adrian Bunk Date: Wed Jul 23 21:28:28 2008 -0700 remove include/asm-h8300/keyboard.h This patch removes the unused include/asm-h8300/keyboard.h Signed-off-by: Adrian Bunk Acked-by: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f09c4c797d00bef5700e1ca085b4efcedaf34b8 Author: Tilman Schmidt Date: Wed Jul 23 21:28:27 2008 -0700 gigaset: gigaset_isowbuf_getbytes() may return signed unnoticed ifd->offset is unsigned. gigaset_isowbuf_getbytes() may return signed unnoticed. Revised version of patch originally submitted by Roel Kluin <12o3l@tiscali.nl>. Signed-off-by: Tilman Schmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5002779d37b261271da9883e06c14b097d4781c4 Author: Tilman Schmidt Date: Wed Jul 23 21:28:27 2008 -0700 gigaset: use dev_ macros for messages The info() / warn() / err() macros from usb.h for generating kernel messages are considered inferior to dev_info() / dev_warn() / dev_err() from device.h. Replace them where possible. Also correct the severity level and improve the text of one message. Signed-off-by: Tilman Schmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b3e43a747c74029b0acf6acf4666601f132f471 Author: Hugh Dickins Date: Wed Jul 23 21:28:26 2008 -0700 security: remove unused forwards Why would linux/security.h need forward declarations for nfsctl_arg and swap_info_struct? It's hard to imagine: remove them. Signed-off-by: Hugh Dickins Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84aaa7ab4c40b66d6dd9aa393901551ad50ec640 Author: Andrew G. Morgan Date: Wed Jul 23 21:28:25 2008 -0700 security: filesystem capabilities no longer experimental Filesystem capabilities have come of age. Remove the experimental tag for configuring filesystem capabilities. Signed-off-by: Andrew G. Morgan Acked-by: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab763c7112ce0e2559c73f921617c81dc7287ca6 Author: Andrew G. Morgan Date: Wed Jul 23 21:28:25 2008 -0700 security: filesystem capabilities refactor kernel code To date, we've tried hard to confine filesystem support for capabilities to the security modules. This has left a lot of the code in kernel/capability.c in a state where it looks like it supports something that filesystem support for capabilities actually suppresses when the LSM security/commmoncap.c code runs. What is left is a lot of code that uses sub-optimal locking in the main kernel With this change we refactor the main kernel code and make it explicit which locks are needed and that the only remaining kernel races in this area are associated with non-filesystem capability code. Signed-off-by: Andrew G. Morgan Acked-by: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5459c164f0591ee75ed0203bb8f3817f25948e2f Author: Andrew G. Morgan Date: Wed Jul 23 21:28:24 2008 -0700 security: protect legacy applications from executing with insufficient privilege When cap_bset suppresses some of the forced (fP) capabilities of a file, it is generally only safe to execute the program if it understands how to recognize it doesn't have enough privilege to work correctly. For legacy applications (fE!=0), which have no non-destructive way to determine that they are missing privilege, we fail to execute (EPERM) any executable that requires fP capabilities, but would otherwise get pP' < fP. This is a fail-safe permission check. For some discussion of why it is problematic for (legacy) privileged applications to run with less than the set of capabilities requested for them, see: http://userweb.kernel.org/~morgan/sendmail-capabilities-war-story.html With this iteration of this support, we do not include setuid-0 based privilege protection from the bounding set. That is, the admin can still (ab)use the bounding set to suppress the privileges of a setuid-0 program. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: cleanup] Signed-off-by: Andrew G. Morgan Acked-by: Serge Hallyn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 78ecba081224a2db5876b6b81cfed0b78f58adc7 Author: Hugh Dickins Date: Wed Jul 23 21:28:23 2008 -0700 mm: fix ever-decreasing swap priority Vegard Nossum has noticed the ever-decreasing negative priority in a swapon /swapoff loop, which eventually would misprioritize when int wraps positive. Not worth spending much code on, but probably better fixed. It's easy to handle the swapping on and off of just one area, but there's not much point if a pair or more still misbehave. To handle the general case, swapoff should compact negative priorities, keeping them always from -1 to -MAX_SWAPFILES. That's a change, but should cause no regression, since these negative (unspecified) priorities are disjoint from the the positive specified priorities 0 to 32767. One small functional difference, which seems appropriate: when swapoff fails to free all swap from a negative priority area, that area is now reinserted at lowest priority, rather than at its original priority. In moving down swapon's setting of priority, I notice that an area is visible to /proc/swaps when it has swap_map set, yet that was being set before all the visible fields were properly filled in: corrected. Signed-off-by: Hugh Dickins Reviewed-by: KOSAKI Motohiro Reported-by: Vegard Nossum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83d1674a946141c3c59d430e96c224f7937e6158 Author: Gerald Schaefer Date: Wed Jul 23 21:28:22 2008 -0700 mm: make CONFIG_MIGRATION available w/o CONFIG_NUMA We'd like to support CONFIG_MEMORY_HOTREMOVE on s390, which depends on CONFIG_MIGRATION. So far, CONFIG_MIGRATION is only available with NUMA support. This patch makes CONFIG_MIGRATION selectable for architectures that define ARCH_ENABLE_MEMORY_HOTREMOVE. When MIGRATION is enabled w/o NUMA, the kernel won't compile because migrate_vmas() does not know about vm_ops->migrate() and vma_migratable() does not know about policy_zone. To fix this, those two functions can be restricted to '#ifdef CONFIG_NUMA' because they are not being used w/o NUMA. vma_migratable() is moved over from migrate.h to mempolicy.h. [kosaki.motohiro@jp.fujitsu.com: build fix] Acked-by: Christoph Lameter Signed-off-by: Gerald Schaefer Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: KOSAKI Motorhiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ca908f47bc784c90e17a553ce33e756c73feac4 Author: Milton Miller Date: Wed Jul 23 21:28:20 2008 -0700 kcalloc: remove runtime division While in all cases in the kernel we know the size of the elements to be created, we don't always know the count of elements. By commuting the size and count in the overflow check, the compiler can reduce the runtime division of size_t with a compare to a (unique) constant in these cases. Signed-off-by: Milton Miller Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c755e9fd813810680abd56ec09a5f90143e815b Author: Badari Pulavarty Date: Wed Jul 23 21:28:19 2008 -0700 memory-hotplug: add sysfs removable attribute for hotplug memory remove Memory may be hot-removed on a per-memory-block basis, particularly on POWER where the SPARSEMEM section size often matches the memory-block size. A user-level agent must be able to identify which sections of memory are likely to be removable before attempting the potentially expensive operation. This patch adds a file called "removable" to the memory directory in sysfs to help such an agent. In this patch, a memory block is considered removable if; o It contains only MOVABLE pageblocks o It contains only pageblocks with free pages regardless of pageblock type On the other hand, a memory block starting with a PageReserved() page will never be considered removable. Without this patch, the user-agent is forced to choose a memory block to remove randomly. Sample output of the sysfs files: ./memory/memory0/removable: 0 ./memory/memory1/removable: 0 ./memory/memory2/removable: 0 ./memory/memory3/removable: 0 ./memory/memory4/removable: 0 ./memory/memory5/removable: 0 ./memory/memory6/removable: 0 ./memory/memory7/removable: 1 ./memory/memory8/removable: 0 ./memory/memory9/removable: 0 ./memory/memory10/removable: 0 ./memory/memory11/removable: 0 ./memory/memory12/removable: 0 ./memory/memory13/removable: 0 ./memory/memory14/removable: 0 ./memory/memory15/removable: 0 ./memory/memory16/removable: 0 ./memory/memory17/removable: 1 ./memory/memory18/removable: 1 ./memory/memory19/removable: 1 ./memory/memory20/removable: 1 ./memory/memory21/removable: 1 ./memory/memory22/removable: 1 Signed-off-by: Badari Pulavarty Signed-off-by: Mel Gorman Acked-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2f7f24eca31c4fc2fdb134b2ef743ccd67cfb9a9 Author: Kent Liu Date: Wed Jul 23 21:28:18 2008 -0700 memory-hotplug: don't calculate vm_total_pages twice when rebuilding zonelists in online_pages() If zonelist is required to be rebuilt in online_pages(), there is no need to recalculate vm_total_pages in that function, as it has been updated in the call build_all_zonelists(). Signed-off-by: Kent Liu Acked-by: KAMEZAWA Hiroyuki Cc: Yasunori Goto Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af370fb8cb3031f20438f246798d5f0d98089f29 Author: Yasunori Goto Date: Wed Jul 23 21:28:17 2008 -0700 memory hotplug: small fixes to bootmem freeing for memory hotremove - Change some naming * Magic -> types * MIX_INFO -> MIX_SECTION_INFO * Change definition of bootmem type from direct hex value - __free_pages_bootmem() becomes __meminit. Signed-off-by: Yasunori Goto Cc: Andy Whitcroft Cc: Badari Pulavarty Cc: Yinghai Lu Cc: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48c906823f3927b981db9f0b03c2e2499977ee93 Author: Yasunori Goto Date: Wed Jul 23 21:28:15 2008 -0700 memory hotplug: allocate usemap on the section with pgdat Usemaps are allocated on the section which has pgdat by this. Because usemap size is very small, many other sections usemaps are allocated on only one page. If a section has usemap, it can't be removed until removing other sections. This dependency is not desirable for memory removing. Pgdat has similar feature. When a section has pgdat area, it must be the last section for removing on the node. So, if section A has pgdat and section B has usemap for section A, Both sections can't be removed due to dependency each other. To solve this issue, this patch collects usemap on same section with pgdat as much as possible. If other sections doesn't have any dependency, this section will be able to be removed finally. Signed-off-by: Yasunori Goto Cc: Mel Gorman Cc: Andy Whitcroft Cc: David Miller Cc: Badari Pulavarty Cc: Heiko Carstens Cc: Hiroyuki KAMEZAWA Cc: Tony Breeds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f84f9504bddeec33a72d64ebe95143d3aaeb3f9b Author: Vegard Nossum Date: Wed Jul 23 21:28:14 2008 -0700 mm: remove initialization of static per-cpu variables This was required by some old, no-longer-used gcc on sparc. Signed-off-by: Vegard Nossum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27ac792ca0b0a1e7e65f20342260650516c95864 Author: Andrea Righi Date: Wed Jul 23 21:28:13 2008 -0700 PAGE_ALIGN(): correctly handle 64-bit values on 32-bit architectures On 32-bit architectures PAGE_ALIGN() truncates 64-bit values to the 32-bit boundary. For example: u64 val = PAGE_ALIGN(size); always returns a value < 4GB even if size is greater than 4GB. The problem resides in PAGE_MASK definition (from include/asm-x86/page.h for example): #define PAGE_SHIFT 12 #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) #define PAGE_MASK (~(PAGE_SIZE-1)) ... #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) The "~" is performed on a 32-bit value, so everything in "and" with PAGE_MASK greater than 4GB will be truncated to the 32-bit boundary. Using the ALIGN() macro seems to be the right way, because it uses typeof(addr) for the mask. Also move the PAGE_ALIGN() definitions out of include/asm-*/page.h in include/linux/mm.h. See also lkml discussion: http://lkml.org/lkml/2008/6/11/237 [akpm@linux-foundation.org: fix drivers/media/video/uvc/uvc_queue.c] [akpm@linux-foundation.org: fix v850] [akpm@linux-foundation.org: fix powerpc] [akpm@linux-foundation.org: fix arm] [akpm@linux-foundation.org: fix mips] [akpm@linux-foundation.org: fix drivers/media/video/pvrusb2/pvrusb2-dvb.c] [akpm@linux-foundation.org: fix drivers/mtd/maps/uclinux.c] [akpm@linux-foundation.org: fix powerpc] Signed-off-by: Andrea Righi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d92bc318547507a944a22e7ef936793dc0fe167f Author: Adrian Bunk Date: Wed Jul 23 21:28:12 2008 -0700 mm: make register_page_bootmem_info_section() static Make the needlessly global register_page_bootmem_info_section() static. Signed-off-by: Adrian Bunk Acked-by: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b69a7288ea7bf171328f313f0edae629f50e3bdb Author: Adrian Bunk Date: Wed Jul 23 21:28:12 2008 -0700 mm/page_alloc.c: cleanups This patch contains the following cleanups: - make the following needlessly global variables static: - required_kernelcore - zone_movable_pfn[] - make the following needlessly global functions static: - move_freepages() - move_freepages_block() - setup_pageset() - find_usable_zone_for_movable() - adjust_zone_range_for_zone_movable() - __absent_pages_in_range() - find_min_pfn_for_node() - find_zone_movable_pfns_for_nodes() Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2be0ffe2b29bd31d3debd0877797892ff2d91f4c Author: Timur Tabi Date: Wed Jul 23 21:28:11 2008 -0700 mm: add alloc_pages_exact() and free_pages_exact() alloc_pages_exact() is similar to alloc_pages(), except that it allocates the minimum number of pages to fulfill the request. This is useful if you want to allocate a very large buffer that is slightly larger than an even power-of-two number of pages. In that case, alloc_pages() will waste a lot of memory. I have a video driver that wants to allocate a 5MB buffer. alloc_pages() wiill waste 3MB of physically-contiguous memory. Signed-off-by: Timur Tabi Cc: Andi Kleen Acked-by: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3560e249abda6bee41a07a7bf0383a6e193e2839 Author: Johannes Weiner Date: Wed Jul 23 21:28:09 2008 -0700 bootmem: replace node_boot_start in struct bootmem_data Almost all users of this field need a PFN instead of a physical address, so replace node_boot_start with node_min_pfn. [Lee.Schermerhorn@hp.com: fix spurious BUG_ON() in mark_bootmem()] Signed-off-by: Johannes Weiner Cc: Signed-off-by: Lee Schermerhorn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75a56cfe9fdb064d1db1cfbc564315fddb756fb1 Author: Johannes Weiner Date: Wed Jul 23 21:28:09 2008 -0700 bootmem: revisit alloc_bootmem_section Since alloc_bootmem_core does no goal-fallback anymore and just returns NULL if the allocation fails, we might now use it in alloc_bootmem_section without all the fixup code for a misplaced allocation. Also, the limit can be the first PFN of the next section as the semantics is that the limit is _above_ the allocated region, not within. Signed-off-by: Johannes Weiner Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4cc278b721d5bf3569dfc5f1100253042e097bc3 Author: Johannes Weiner Date: Wed Jul 23 21:28:08 2008 -0700 bootmem: Make __alloc_bootmem_low_node fall back to other nodes __alloc_bootmem_node already does this, make the interface consistent. Signed-off-by: Johannes Weiner Cc: Ingo Molnar Cc: Yinghai Lu Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0f3caba211babef6e3fbde1ba76ddc79321bc92f Author: Johannes Weiner Date: Wed Jul 23 21:28:07 2008 -0700 bootmem: respect goal more likely The old node-agnostic code tried allocating on all nodes starting from the one with the lowest range. alloc_bootmem_core retried without the goal if it could not satisfy it and so the goal was only respected at all when it happened to be on the first (lowest page numbers) node (or theoretically if allocations failed on all nodes before to the one holding the goal). Introduce a non-panicking helper that starts allocating from the node holding the goal and falls back only after all thes tries failed, thus moving the goal fallback code out of alloc_bootmem_core. Make all other allocation functions benefit from this new helper. Signed-off-by: Johannes Weiner Cc: Ingo Molnar Cc: Yinghai Lu Cc: Andi Kleen Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e2bf3cae515090fefe28329e71230dfe7ab873b1 Author: Johannes Weiner Date: Wed Jul 23 21:28:06 2008 -0700 bootmem: factor out the marking of a PFN range Introduce new helpers that mark a range that resides completely on a node or node-agnostic ranges that might also span node boundaries. The free/reserve API functions will then directly use these helpers. Note that the free/reserve semantics become more strict: while the prior code took basically arbitrary range arguments and marked the PFNs that happen to fall into that range, the new code requires node-specific ranges to be completely on the node. The node-agnostic requests might span node boundaries as long as the nodes are contiguous. Passing ranges that do not satisfy these criteria is a bug. [akpm@linux-foundation.org: fix printk warnings] Signed-off-by: Johannes Weiner Cc: Ingo Molnar Cc: Yinghai Lu Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d747fa4bcebcf3696607b86a6b0dafa644be0676 Author: Johannes Weiner Date: Wed Jul 23 21:28:05 2008 -0700 bootmem: free/reserve helpers Factor out the common operation of marking a range on the bitmap. [akpm@linux-foundation.org: fix various warnings] Signed-off-by: Johannes Weiner Cc: Ingo Molnar Cc: Yinghai Lu Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f2809e69c7128f86316048221cf45146f69a4a0 Author: Johannes Weiner Date: Wed Jul 23 21:28:05 2008 -0700 bootmem: clean up alloc_bootmem_core alloc_bootmem_core has become quite nasty to read over time. This is a clean rewrite that keeps the semantics. bdata->last_pos has been dropped. bdata->last_success has been renamed to hint_idx and it is now an index relative to the node's range. Since further block searching might start at this index, it is now set to the end of a succeeded allocation rather than its beginning. bdata->last_offset has been renamed to last_end_off to be more clear that it represents the ending address of the last allocation relative to the node. [y-goto@jp.fujitsu.com: fix new alloc_bootmem_core()] Signed-off-by: Johannes Weiner Signed-off-by: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 41546c17418fba08ece978bad72a33072715b8f3 Author: Johannes Weiner Date: Wed Jul 23 21:28:03 2008 -0700 bootmem: clean up free_all_bootmem_core Rewrite the code in a more concise way using less variables. [akpm@linux-foundation.org: fix printk warnings] Signed-off-by: Johannes Weiner Cc: Ingo Molnar Cc: Yinghai Lu Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 636cc40cb79f511d9caa27ef098a83e4fa4971fb Author: Johannes Weiner Date: Wed Jul 23 21:28:03 2008 -0700 bootmem: revisit bootmem descriptor list handling link_bootmem handles an insertion of a new descriptor into the sorted list in more or less three explicit branches; empty list, insert in between and append. These cases can be expressed implicite. Also mark the sorted list as initdata as it can be thrown away after boot as well. Signed-off-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit df049a5f41a3b2eee2131221959e3b558ba7c705 Author: Johannes Weiner Date: Wed Jul 23 21:28:02 2008 -0700 bootmem: revisit bitmap size calculations Reincarnate get_mapsize as bootmap_bytes and implement bootmem_bootmap_pages on top of it. Adjust users of these helpers and make free_all_bootmem_core use bootmem_bootmap_pages instead of open-coding it. Signed-off-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2e5237daf0cc3c8d87762f53f704dc54fa91dcf6 Author: Johannes Weiner Date: Wed Jul 23 21:28:02 2008 -0700 bootmem: add debugging framework Introduce the bootmem_debug kernel parameter that enables very verbose diagnostics regarding all range operations of bootmem as well as the initialization and release of nodes. [akpm@linux-foundation.org: fix printk warnings] Signed-off-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a66fd7daec1f40c1f0eac466f0da9206b615fe2a Author: Johannes Weiner Date: Wed Jul 23 21:28:01 2008 -0700 bootmem: add documentation to API functions Signed-off-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 57cfc29efac6670355ee0e107c8dbae8237d406b Author: Johannes Weiner Date: Wed Jul 23 21:28:00 2008 -0700 bootmem: clean up bootmem.c file header Change the description, move a misplaced comment about the allocator itself and add me to the list of copyright holders. Signed-off-by: Johannes Weiner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 223e8dc9249c9e15f6c8b638d73fcad78ccb0a88 Author: Johannes Weiner Date: Wed Jul 23 21:28:00 2008 -0700 bootmem: reorder code to match new bootmem structure This only reorders functions so that further patches will be easier to read. No code changed. Signed-off-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7251ff78b94c2a68d267623d09b32672b20662c1 Author: Adam Litke Date: Wed Jul 23 21:27:59 2008 -0700 hugetlb: quota is not freed for unused reserved private huge pages With shared reservations (and now also with private reservations), we reserve huge pages at mmap time. We also account for the mapping against fs quota to prevent a reservation from being preempted by quota exhaustion. When testing with the libhugetlbfs test suite, I found a problem with quota accounting. FS quota for allocated pages is handled correctly but we are not releasing quota for private pages that were reserved but never allocated. Do this in hugetlb_vm_op_close() at the same time as unused page reservations are released. Signed-off-by: Adam Litke Cc: Mel Gorman Cc: Johannes Weiner Cc: William Lee Irwin III Cc: Hugh Dickins Acked-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f09ca51e925ba62e9ebfd4979f093e97e38adeb Author: Mel Gorman Date: Wed Jul 23 21:27:58 2008 -0700 hugetlb: fix a hugepage reservation check for MAP_SHARED When removing a huge page from the hugepage pool for a fault the system checks to see if the mapping requires additional pages to be reserved, and if it does whether there are any unreserved pages remaining. If not, the allocation fails without even attempting to get a page. In order to determine whether to apply this check we call vma_has_private_reserves() which tells us if this vma is MAP_PRIVATE and is the owner. This incorrectly triggers the remaining reservation test for MAP_SHARED mappings which prevents allocation of the final page in the pool even though it is reserved for this mapping. In reality we only want to check this for MAP_PRIVATE mappings where the process is not the original mapper. Replace vma_has_private_reserves() with vma_has_reserves() which indicates whether further reserves are required, and update the caller. Signed-off-by: Mel Gorman Acked-by: Adam Litke Acked-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d9ea75443dc7e37843e656b8ebc947a6d16d618 Author: Jon Tollefson Date: Wed Jul 23 21:27:56 2008 -0700 powerpc: support multiple hugepage sizes Instead of using the variable mmu_huge_psize to keep track of the huge page size we use an array of MMU_PAGE_* values. For each supported huge page size we need to know the hugepte_shift value and have a pgtable_cache. The hstate or an mmu_huge_psizes index is passed to functions so that they know which huge page size they should use. The hugepage sizes 16M and 64K are setup(if available on the hardware) so that they don't have to be set on the boot cmd line in order to use them. The number of 16G pages have to be specified at boot-time though (e.g. hugepagesz=16G hugepages=5). Signed-off-by: Jon Tollefson Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4a67cceee4a6f5ed38011a698c9e34747270ae5 Author: Jon Tollefson Date: Wed Jul 23 21:27:55 2008 -0700 fs: check for statfs overflow Adds a check for an overflow in the filesystem size so if someone is checking with statfs() on a 16G blocksize hugetlbfs in a 32bit binary that it will report back EOVERFLOW instead of a size of 0. Acked-by: Nishanth Aravamudan Signed-off-by: Jon Tollefson Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 91224346aa8c1cdaa660300a98e0b074a3a95030 Author: Jon Tollefson Date: Wed Jul 23 21:27:55 2008 -0700 powerpc: define support for 16G hugepages The huge page size is defined for 16G pages. If a hugepagesz of 16G is specified at boot-time then it becomes the huge page size instead of the default 16M. The change in pgtable-64K.h is to the macro pte_iterate_hashed_subpages to make the increment to va (the 1 being shifted) be a long so that it is not shifted to 0. Otherwise it would create an infinite loop when the shift value is for a 16G page (when base page size is 64K). Signed-off-by: Jon Tollefson Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 658013e93eb70494f7300bc90457b09a807232a4 Author: Jon Tollefson Date: Wed Jul 23 21:27:54 2008 -0700 powerpc: scan device tree for gigantic pages The 16G huge pages have to be reserved in the HMC prior to boot. The location of the pages are placed in the device tree. This patch adds code to scan the device tree during very early boot and save these page locations until hugetlbfs is ready for them. Acked-by: Adam Litke Signed-off-by: Jon Tollefson Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ec4b2c0c8312d1118c2acd00c89988ecf955d5cc Author: Jon Tollefson Date: Wed Jul 23 21:27:53 2008 -0700 powerpc: function to allocate gigantic hugepages The 16G page locations have been saved during early boot in an array. The alloc_bootmem_huge_page() function adds a page from here to the huge_boot_pages list. Acked-by: Adam Litke Signed-off-by: Jon Tollefson Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 53ba51d21d6e048424ab8aadfebdb1f25ae07b60 Author: Jon Tollefson Date: Wed Jul 23 21:27:52 2008 -0700 hugetlb: allow arch overridden hugepage allocation Allow alloc_bootmem_huge_page() to be overridden by architectures that can't always use bootmem. This requires huge_boot_pages to be available for use by this function. This is required for powerpc 16G pages, which have to be reserved prior to boot-time. The location of these pages are indicated in the device tree. Acked-by: Adam Litke Signed-off-by: Jon Tollefson Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e11bfbfcb08ef4223b863799897c19cdf7c5bc00 Author: Nick Piggin Date: Wed Jul 23 21:27:52 2008 -0700 hugetlb: override default huge page size Allow configurations with the default huge page size which is different to the traditional HPAGE_SIZE size. The default huge page size is the one represented in the legacy /proc ABIs, SHM, and which is defaulted to when mounting hugetlbfs filesystems. This is implemented with a new kernel option default_hugepagesz=, which defaults to HPAGE_SIZE if not specified. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b4718e628dbf68a2dee23b5709e2aa3190409c56 Author: Andi Kleen Date: Wed Jul 23 21:27:51 2008 -0700 x86: add hugepagesz option on 64-bit Add an hugepagesz=... option similar to IA64, PPC etc. to x86-64. This finally allows to select GB pages for hugetlbfs in x86 now that all the infrastructure is in place. Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 39c11e6c05b7fedbf7ed4df3908b25f622d56204 Author: Andi Kleen Date: Wed Jul 23 21:27:50 2008 -0700 x86: support GB hugepages on 64-bit Acked-by: Adam Litke Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ceb868796181dc95ea01a110e123afd391639873 Author: Andi Kleen Date: Wed Jul 23 21:27:50 2008 -0700 hugetlb: introduce pud_huge Straight forward extensions for huge pages located in the PUD instead of PMDs. Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4abd32dbab201c3ced0b0af12accea77cd9eeffc Author: Andi Kleen Date: Wed Jul 23 21:27:49 2008 -0700 hugetlb: printk cleanup - Reword sentence to clarify meaning with multiple options - Add support for using GB prefixes for the page size - Add extra printk to delayed > MAX_ORDER allocation code Acked-by: Adam Litke Acked-by: Nishanth Aravamudan Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8faa8b077b2cdc4e4646842fe50b07840955a013 Author: Andi Kleen Date: Wed Jul 23 21:27:48 2008 -0700 hugetlb: support boot allocate different sizes Make some infrastructure changes to allow boot-time allocation of different hugepage page sizes. - move all basic hstate initialisation into hugetlb_add_hstate - create a new function hugetlb_hstate_alloc_pages() to do the actual initial page allocations. Call this function early in order to allocate giant pages from bootmem. - Check for multiple hugepages= parameters Acked-by: Adam Litke Acked-by: Nishanth Aravamudan Acked-by: Andrew Hastings Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa888a74977a8f2120ae9332376e179c39a6b07d Author: Andi Kleen Date: Wed Jul 23 21:27:47 2008 -0700 hugetlb: support larger than MAX_ORDER This is needed on x86-64 to handle GB pages in hugetlbfs, because it is not practical to enlarge MAX_ORDER to 1GB. Instead the 1GB pages are only allocated at boot using the bootmem allocator using the hugepages=... option. These 1G bootmem pages are never freed. In theory it would be possible to implement that with some complications, but since it would be a one-way street (>= MAX_ORDER pages cannot be allocated later) I decided not to currently. The >= MAX_ORDER code is not ifdef'ed per architecture. It is not very big and the ifdef uglyness seemed not be worth it. Known problems: /proc/meminfo and "free" do not display the memory allocated for gb pages in "Total". This is a little confusing for the user. Acked-by: Andrew Hastings Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 01ad1c0827db5b3695c53e296dbb2c1da16a0911 Author: Andi Kleen Date: Wed Jul 23 21:27:46 2008 -0700 mm: export prep_compound_page to mm hugetlb will need to get compound pages from bootmem to handle the case of them being greater than or equal to MAX_ORDER. Export the constructor function needed for this. Acked-by: Adam Litke Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b54bbf7b81170f03597c17dd0b559e3006bc9868 Author: Andi Kleen Date: Wed Jul 23 21:27:45 2008 -0700 mm: introduce non panic alloc_bootmem Straight forward variant of the existing __alloc_bootmem_node, only subsequent patch when allocating giant hugepages at boot -- don't want to panic if we can't allocate as many as the user asked for. Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5ced66c901f1cf0b684feb15c2cd8b126e263d07 Author: Andi Kleen Date: Wed Jul 23 21:27:45 2008 -0700 hugetlb: abstract numa round robin selection Need this as a separate function for a future patch. No behaviour change. Acked-by: Adam Litke Acked-by: Nishanth Aravamudan Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3437870160cf2caaac6bdd76c7377a5a4145a8c Author: Nishanth Aravamudan Date: Wed Jul 23 21:27:44 2008 -0700 hugetlb: new sysfs interface Provide new hugepages user APIs that are more suited to multiple hstates in sysfs. There is a new directory, /sys/kernel/hugepages. Underneath that directory there will be a directory per-supported hugepage size, e.g.: /sys/kernel/hugepages/hugepages-64kB /sys/kernel/hugepages/hugepages-16384kB /sys/kernel/hugepages/hugepages-16777216kB corresponding to 64k, 16m and 16g respectively. Within each hugepages-size directory there are a number of files, corresponding to the tracked counters in the hstate, e.g.: /sys/kernel/hugepages/hugepages-64/nr_hugepages /sys/kernel/hugepages/hugepages-64/nr_overcommit_hugepages /sys/kernel/hugepages/hugepages-64/free_hugepages /sys/kernel/hugepages/hugepages-64/resv_hugepages /sys/kernel/hugepages/hugepages-64/surplus_hugepages Of these files, the first two are read-write and the latter three are read-only. The size of the hugepage being manipulated is trivially deducible from the enclosing directory and is always expressed in kB (to match meminfo). [dave@linux.vnet.ibm.com: fix build] [nacc@us.ibm.com: hugetlb: hang off of /sys/kernel/mm rather than /sys/kernel] [nacc@us.ibm.com: hugetlb: remove CONFIG_SYSFS dependency] Acked-by: Greg Kroah-Hartman Signed-off-by: Nishanth Aravamudan Signed-off-by: Nick Piggin Cc: Dave Hansen Signed-off-by: Nishanth Aravamudan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a137e1cc6d6e7d315fef03962a2a5a113348b13b Author: Andi Kleen Date: Wed Jul 23 21:27:43 2008 -0700 hugetlbfs: per mount huge page sizes Add the ability to configure the hugetlb hstate used on a per mount basis. - Add a new pagesize= option to the hugetlbfs mount that allows setting the page size - This option causes the mount code to find the hstate corresponding to the specified size, and sets up a pointer to the hstate in the mount's superblock. - Change the hstate accessors to use this information rather than the global_hstate they were using (requires a slight change in mm/memory.c so we don't NULL deref in the error-unmap path -- see comments). [np: take hstate out of hugetlbfs inode and vma->vm_private_data] Acked-by: Adam Litke Acked-by: Nishanth Aravamudan Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5ff215941d59f8ae6bf58f6428dc5c26745a612 Author: Andi Kleen Date: Wed Jul 23 21:27:42 2008 -0700 hugetlb: multiple hstates for multiple page sizes Add basic support for more than one hstate in hugetlbfs. This is the key to supporting multiple hugetlbfs page sizes at once. - Rather than a single hstate, we now have an array, with an iterator - default_hstate continues to be the struct hstate which we use by default - Add functions for architectures to register new hstates [akpm@linux-foundation.org: coding-style fixes] Acked-by: Adam Litke Acked-by: Nishanth Aravamudan Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a5516438959d90b071ff0a484ce4f3f523dc3152 Author: Andi Kleen Date: Wed Jul 23 21:27:41 2008 -0700 hugetlb: modular state for hugetlb page size The goal of this patchset is to support multiple hugetlb page sizes. This is achieved by introducing a new struct hstate structure, which encapsulates the important hugetlb state and constants (eg. huge page size, number of huge pages currently allocated, etc). The hstate structure is then passed around the code which requires these fields, they will do the right thing regardless of the exact hstate they are operating on. This patch adds the hstate structure, with a single global instance of it (default_hstate), and does the basic work of converting hugetlb to use the hstate. Future patches will add more hstate structures to allow for different hugetlbfs mounts to have different page sizes. [akpm@linux-foundation.org: coding-style fixes] Acked-by: Adam Litke Acked-by: Nishanth Aravamudan Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b7ba30c679ed1eb7ed3ed8f281f6493282042bd4 Author: Andi Kleen Date: Wed Jul 23 21:27:40 2008 -0700 hugetlb: factor out prep_new_huge_page Needed to avoid code duplication in follow up patches. Acked-by: Adam Litke Acked-by: Nishanth Aravamudan Signed-off-by: Andi Kleen Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff7ea79cf7c3a481851bd4b2185fdeb6ce4afa29 Author: Nishanth Aravamudan Date: Wed Jul 23 21:27:39 2008 -0700 mm: create /sys/kernel/mm Add a kobject to create /sys/kernel/mm when sysfs is mounted. The kobject will exist regardless. This will allow for the hugepage related sysfs directories to exist under the mm "subsystem" directory. Add an ABI file appropriately. [kosaki.motohiro@jp.fujitsu.com: fix build] Signed-off-by: Nishanth Aravamudan Cc: Nick Piggin Cc: Mel Gorman Signed-off-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e9426abe209cf134adbbd62c5e73ef534eb73e9 Author: Nishanth Aravamudan Date: Wed Jul 23 21:27:39 2008 -0700 mm: remove mm_init compilation dependency on CONFIG_DEBUG_MEMORY_INIT Towards the end of putting all core mm initialization in mm_init.c, I plan on putting the creation of a mm kobject in a function in that file. However, the file is currently only compiled if CONFIG_DEBUG_MEMORY_INIT is set. Remove this dependency, but put the code under an #ifdef on the same config option. This should result in no functional changes. Signed-off-by: Nishanth Aravamudan Cc: Nick Piggin Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a47a126ad5ea072aca3e611ed8f8dc6adad24bab Author: Eric Dumazet Date: Wed Jul 23 21:27:38 2008 -0700 vmallocinfo: add NUMA information Christoph recently added /proc/vmallocinfo file to get information about vmalloc allocations. This patch adds NUMA specific information, giving number of pages allocated on each memory node. This should help to check that vmalloc() is able to respect NUMA policies. Example of output on a four nodes machine (one cpu per node) 1) network hash tables are evenly spreaded on four nodes (OK) (Same point for inodes and dentries hash tables) 2) iptables tables (x_tables) are correctly allocated on each cpu node (OK). 3) sys_swapon() allocates its memory from one node only. 4) each loaded module is using memory on one node. Sysadmins could tune their setup to change points 3) and 4) if necessary. grep "pages=" /proc/vmallocinfo 0xffffc20000000000-0xffffc20000201000 2101248 alloc_large_system_hash+0x204/0x2c0 pages=512 vmalloc N0=128 N1=128 N2=128 N3=128 0xffffc20000201000-0xffffc20000302000 1052672 alloc_large_system_hash+0x204/0x2c0 pages=256 vmalloc N0=64 N1=64 N2=64 N3=64 0xffffc2000031a000-0xffffc2000031d000 12288 alloc_large_system_hash+0x204/0x2c0 pages=2 vmalloc N1=1 N2=1 0xffffc2000031f000-0xffffc2000032b000 49152 cramfs_uncompress_init+0x2e/0x80 pages=11 vmalloc N0=3 N1=3 N2=2 N3=3 0xffffc2000033e000-0xffffc20000341000 12288 sys_swapon+0x640/0xac0 pages=2 vmalloc N0=2 0xffffc20000341000-0xffffc20000344000 12288 xt_alloc_table_info+0xfe/0x130 [x_tables] pages=2 vmalloc N0=2 0xffffc20000344000-0xffffc20000347000 12288 xt_alloc_table_info+0xfe/0x130 [x_tables] pages=2 vmalloc N1=2 0xffffc20000347000-0xffffc2000034a000 12288 xt_alloc_table_info+0xfe/0x130 [x_tables] pages=2 vmalloc N2=2 0xffffc2000034a000-0xffffc2000034d000 12288 xt_alloc_table_info+0xfe/0x130 [x_tables] pages=2 vmalloc N3=2 0xffffc20004381000-0xffffc20004402000 528384 alloc_large_system_hash+0x204/0x2c0 pages=128 vmalloc N0=32 N1=32 N2=32 N3=32 0xffffc20004402000-0xffffc20004803000 4198400 alloc_large_system_hash+0x204/0x2c0 pages=1024 vmalloc vpages N0=256 N1=256 N2=256 N3=256 0xffffc20004803000-0xffffc20004904000 1052672 alloc_large_system_hash+0x204/0x2c0 pages=256 vmalloc N0=64 N1=64 N2=64 N3=64 0xffffc20004904000-0xffffc20004bec000 3047424 sys_swapon+0x640/0xac0 pages=743 vmalloc vpages N0=743 0xffffffffa0000000-0xffffffffa000f000 61440 sys_init_module+0xc27/0x1d00 pages=14 vmalloc N1=14 0xffffffffa000f000-0xffffffffa0014000 20480 sys_init_module+0xc27/0x1d00 pages=4 vmalloc N0=4 0xffffffffa0014000-0xffffffffa0017000 12288 sys_init_module+0xc27/0x1d00 pages=2 vmalloc N0=2 0xffffffffa0017000-0xffffffffa0022000 45056 sys_init_module+0xc27/0x1d00 pages=10 vmalloc N1=10 0xffffffffa0022000-0xffffffffa0028000 24576 sys_init_module+0xc27/0x1d00 pages=5 vmalloc N3=5 0xffffffffa0028000-0xffffffffa0050000 163840 sys_init_module+0xc27/0x1d00 pages=39 vmalloc N1=39 0xffffffffa0050000-0xffffffffa0052000 8192 sys_init_module+0xc27/0x1d00 pages=1 vmalloc N1=1 0xffffffffa0052000-0xffffffffa0056000 16384 sys_init_module+0xc27/0x1d00 pages=3 vmalloc N1=3 0xffffffffa0056000-0xffffffffa0081000 176128 sys_init_module+0xc27/0x1d00 pages=42 vmalloc N3=42 0xffffffffa0081000-0xffffffffa00ae000 184320 sys_init_module+0xc27/0x1d00 pages=44 vmalloc N3=44 0xffffffffa00ae000-0xffffffffa00b1000 12288 sys_init_module+0xc27/0x1d00 pages=2 vmalloc N3=2 0xffffffffa00b1000-0xffffffffa00b9000 32768 sys_init_module+0xc27/0x1d00 pages=7 vmalloc N0=7 0xffffffffa00b9000-0xffffffffa00c4000 45056 sys_init_module+0xc27/0x1d00 pages=10 vmalloc N3=10 0xffffffffa00c6000-0xffffffffa00e0000 106496 sys_init_module+0xc27/0x1d00 pages=25 vmalloc N2=25 0xffffffffa00e0000-0xffffffffa00f1000 69632 sys_init_module+0xc27/0x1d00 pages=16 vmalloc N2=16 0xffffffffa00f1000-0xffffffffa00f4000 12288 sys_init_module+0xc27/0x1d00 pages=2 vmalloc N3=2 0xffffffffa00f4000-0xffffffffa00f7000 12288 sys_init_module+0xc27/0x1d00 pages=2 vmalloc N3=2 [akpm@linux-foundation.org: fix comment] Signed-off-by: Eric Dumazet Cc: Christoph Lameter Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cce770815869e9209171d819dfde89bcc738ab62 Author: Pavel Machek Date: Wed Jul 23 21:27:36 2008 -0700 SYNC_FILE_RANGE_WRITE may and will block. Document that. [akpm@linux-foundation.org: fix comment text] Signed-off-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bcd78e49613c41b5bed96fa288e983876f286a59 Author: Hugh Dickins Date: Wed Jul 23 21:27:35 2008 -0700 tmpfs: support aio We have a request for tmpfs to support the AIO interface: easily done, no more than replacing the old shmem_file_read by shmem_file_aio_read, cribbed from generic_file_aio_read. (In 2.6.25 its write side was already changed to use generic_file_aio_write.) Incorporate cleanups from Andrew Morton and Harvey Harrison. Tests out fine with LTP's ltp-aiodio.sh, given hacks (not included) to support O_DIRECT. tmpfs cannot honestly support O_DIRECT: its cache-avoiding-IO nature is at odds with direct IO-avoiding-cache. Signed-off-by: Hugh Dickins Tested-by: Lawrence Greenfield Cc: Christoph Rohland Cc: Badari Pulavarty Cc: Zach Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 11fa977ecde652ab324dd79c179deb52e82a8df1 Author: Hugh Dickins Date: Wed Jul 23 21:27:34 2008 -0700 generic_file_aio_read() cleanups As akpm points out, there's really no need for generic_file_aio_read to make a special case of count 0: just loop through nr_segs doing nothing. And as Harvey Harrison points out, there's no need to reset retval to 0 where it's already 0. Setting count (or ocount) to 0 before calling generic_segment_checks is unnecessary too; but reluctantly I'll leave that removal to someone with a wider range of gcc versions to hand - 4.1.2 and 4.2.1 don't warn about it, but perhaps others do - I forget which are the warniest versions. Signed-off-by: Hugh Dickins Tested-by: Lawrence Greenfield Cc: Christoph Rohland Cc: Badari Pulavarty Cc: Zach Brown Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a858f7b2e9bb4eb665176dde5cf32eeaaf90f153 Author: Johannes Weiner Date: Wed Jul 23 21:27:33 2008 -0700 vma_page_offset() has no callees: drop it Hugh adds: vma_pagecache_offset() has a dangerously misleading name, since it's using hugepage units: rename it to vma_hugecache_offset(). [apw@shadowen.org: restack onto fixed MAP_PRIVATE reservations] [akpm@linux-foundation.org: vma_split conversion] Signed-off-by: Johannes Weiner Signed-off-by: Hugh Dickins Cc: Adam Litke Cc: Nishanth Aravamudan Cc: Andi Kleen Cc: Nick Piggin Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84afd99b8398c9d73af8238aa3cd835858e3097a Author: Andy Whitcroft Date: Wed Jul 23 21:27:32 2008 -0700 hugetlb reservations: fix hugetlb MAP_PRIVATE reservations across vma splits When a hugetlb mapping with a reservation is split, a new VMA is cloned from the original. This new VMA is a direct copy of the original including the reservation count. When this pair of VMAs are unmapped we will incorrect double account the unused reservation and the overall reservation count will be incorrect, in extreme cases it will wrap. The problem occurs when we split an existing VMA say to unmap a page in the middle. split_vma() will create a new VMA copying all fields from the original. As we are storing our reservation count in vm_private_data this is also copies, endowing the new VMA with a duplicate of the original VMA's reservation. Neither of the new VMAs can exhaust these reservations as they are too small, but when we unmap and close these VMAs we will incorrect credit the remainder twice and resv_huge_pages will become out of sync. This can lead to allocation failures on mappings with reservations and even to resv_huge_pages wrapping which prevents all subsequent hugepage allocations. The simple fix would be to correctly apportion the remaining reservation count when the split is made. However the only hook we have vm_ops->open only has the new VMA we do not know the identity of the preceeding VMA. Also even if we did have that VMA to hand we do not know how much of the reservation was consumed each side of the split. This patch therefore takes a different tack. We know that the whole of any private mapping (which has a reservation) has a reservation over its whole size. Any present pages represent consumed reservation. Therefore if we track the instantiated pages we can calculate the remaining reservation. This patch reuses the existing regions code to track the regions for which we have consumed reservation (ie. the instantiated pages), as each page is faulted in we record the consumption of reservation for the new page. When we need to return unused reservations at unmap time we simply count the consumed reservation region subtracting that from the whole of the map. During a VMA split the newly opened VMA will point to the same region map, as this map is offset oriented it remains valid for both of the split VMAs. This map is referenced counted so that it is removed when all VMAs which are part of the mmap are gone. Thanks to Adam Litke and Mel Gorman for their review feedback. Signed-off-by: Andy Whitcroft Acked-by: Mel Gorman Cc: Adam Litke Cc: Johannes Weiner Cc: Andy Whitcroft Cc: William Lee Irwin III Cc: Hugh Dickins Cc: Michael Kerrisk Cc: Jon Tollefson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c37f9fb11c976ffc08200d631dada6dcbfd07ea4 Author: Andy Whitcroft Date: Wed Jul 23 21:27:30 2008 -0700 hugetlb: allow huge page mappings to be created without reservations By default all shared mappings and most private mappings now have reservations associated with them. This improves semantics by providing allocation guarentees to the mapper. However a small number of applications may attempt to make very large sparse mappings, with these strict reservations the system will never be able to honour the mapping. This patch set brings MAP_NORESERVE support to hugetlb files. This allows new mappings to be made to hugetlbfs files without an associated reservation, for both shared and private mappings. This allows applications which want to create very sparse mappings to opt-out of the reservation system. Obviously as there is no reservation they are liable to fault at runtime if the huge page pool becomes exhausted; buyer beware. Signed-off-by: Andy Whitcroft Cc: Mel Gorman Cc: Adam Litke Cc: Johannes Weiner Cc: Andy Whitcroft Cc: William Lee Irwin III Cc: Hugh Dickins Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9682290484370ce68ba23cd2ec2838e301934199 Author: Andy Whitcroft Date: Wed Jul 23 21:27:29 2008 -0700 hugetlb: move reservation region support earlier The following patch will require use of the reservation regions support. Move this earlier in the file. No changes have been made to this code. Signed-off-by: Andy Whitcroft Cc: Mel Gorman Acked-by: Adam Litke Cc: Johannes Weiner Cc: Andy Whitcroft Cc: William Lee Irwin III Cc: Hugh Dickins Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cdfd4325c0d878679bd6a3ba8285b71d9980e3c0 Author: Andy Whitcroft Date: Wed Jul 23 21:27:28 2008 -0700 mm: record MAP_NORESERVE status on vmas and fix small page mprotect reservations With Mel's hugetlb private reservation support patches applied, strict overcommit semantics are applied to both shared and private huge page mappings. This can be a problem if an application relied on unlimited overcommit semantics for private mappings. An example of this would be an application which maps a huge area with the intention of using it very sparsely. These application would benefit from being able to opt-out of the strict overcommit. It should be noted that prior to hugetlb supporting demand faulting all mappings were fully populated and so applications of this type should be rare. This patch stack implements the MAP_NORESERVE mmap() flag for huge page mappings. This flag has the same meaning as for small page mappings, suppressing reservations for that mapping. Thanks to Mel Gorman for reviewing a number of early versions of these patches. This patch: When a small page mapping is created with mmap() reservations are created by default for any memory pages required. When the region is read/write the reservation is increased for every page, no reservation is needed for read-only regions (as they implicitly share the zero page). Reservations are tracked via the VM_ACCOUNT vma flag which is present when the region has reservation backing it. When we convert a region from read-only to read-write new reservations are aquired and VM_ACCOUNT is set. However, when a read-only map is created with MAP_NORESERVE it is indistinguishable from a normal mapping. When we then convert that to read/write we are forced to incorrectly create reservations for it as we have no record of the original MAP_NORESERVE. This patch introduces a new vma flag VM_NORESERVE which records the presence of the original MAP_NORESERVE flag. This allows us to distinguish these two circumstances and correctly account the reserve. As well as fixing this FIXME in the code, this makes it much easier to introduce MAP_NORESERVE support for huge pages as this flag is available consistantly for the life of the mapping. VM_ACCOUNT on the other hand is heavily used at the generic level in association with small pages. Signed-off-by: Andy Whitcroft Cc: Mel Gorman Cc: Adam Litke Cc: Johannes Weiner Cc: Andy Whitcroft Cc: William Lee Irwin III Cc: Hugh Dickins Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7c4b0bfd025f71cf7624b7c1be174f63caade33 Author: Andy Whitcroft Date: Wed Jul 23 21:27:26 2008 -0700 huge page private reservation review cleanups Create some new accessors for vma private data to cut down on and contain the casts. Encapsulates the huge and small page offset calculations. Also adds a couple of VM_BUG_ONs for consistency. [akpm@linux-foundation.org: Make things static] Signed-off-by: Andy Whitcroft Acked-by: Mel Gorman Cc: Adam Litke Cc: Johannes Weiner Cc: Andy Whitcroft Cc: William Lee Irwin III Cc: Hugh Dickins Cc: Michael Kerrisk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04f2cbe35699d22dbf428373682ead85ca1240f5 Author: Mel Gorman Date: Wed Jul 23 21:27:25 2008 -0700 hugetlb: guarantee that COW faults for a process that called mmap(MAP_PRIVATE) on hugetlbfs will succeed After patch 2 in this series, a process that successfully calls mmap() for a MAP_PRIVATE mapping will be guaranteed to successfully fault until a process calls fork(). At that point, the next write fault from the parent could fail due to COW if the child still has a reference. We only reserve pages for the parent but a copy must be made to avoid leaking data from the parent to the child after fork(). Reserves could be taken for both parent and child at fork time to guarantee faults but if the mapping is large it is highly likely we will not have sufficient pages for the reservation, and it is common to fork only to exec() immediatly after. A failure here would be very undesirable. Note that the current behaviour of mainline with MAP_PRIVATE pages is pretty bad. The following situation is allowed to occur today. 1. Process calls mmap(MAP_PRIVATE) 2. Process calls mlock() to fault all pages and makes sure it succeeds 3. Process forks() 4. Process writes to MAP_PRIVATE mapping while child still exists 5. If the COW fails at this point, the process gets SIGKILLed even though it had taken care to ensure the pages existed This patch improves the situation by guaranteeing the reliability of the process that successfully calls mmap(). When the parent performs COW, it will try to satisfy the allocation without using reserves. If that fails the parent will steal the page leaving any children without a page. Faults from the child after that point will result in failure. If the child COW happens first, an attempt will be made to allocate the page without reserves and the child will get SIGKILLed on failure. To summarise the new behaviour: 1. If the original mapper performs COW on a private mapping with multiple references, it will attempt to allocate a hugepage from the pool or the buddy allocator without using the existing reserves. On fail, VMAs mapping the same area are traversed and the page being COW'd is unmapped where found. It will then steal the original page as the last mapper in the normal way. 2. The VMAs the pages were unmapped from are flagged to note that pages with data no longer exist. Future no-page faults on those VMAs will terminate the process as otherwise it would appear that data was corrupted. A warning is printed to the console that this situation occured. 2. If the child performs COW first, it will attempt to satisfy the COW from the pool if there are enough pages or via the buddy allocator if overcommit is allowed and the buddy allocator can satisfy the request. If it fails, the child will be killed. If the pool is large enough, existing applications will not notice that the reserves were a factor. Existing applications depending on the no-reserves been set are unlikely to exist as for much of the history of hugetlbfs, pages were prefaulted at mmap(), allocating the pages at that point or failing the mmap(). [npiggin@suse.de: fix CONFIG_HUGETLB=n build] Signed-off-by: Mel Gorman Acked-by: Adam Litke Cc: Andy Whitcroft Cc: William Lee Irwin III Cc: Hugh Dickins Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a1e78772d72b2616ed20e54896e68e0e7044854e Author: Mel Gorman Date: Wed Jul 23 21:27:23 2008 -0700 hugetlb: reserve huge pages for reliable MAP_PRIVATE hugetlbfs mappings until fork() This patch reserves huge pages at mmap() time for MAP_PRIVATE mappings in a similar manner to the reservations taken for MAP_SHARED mappings. The reserve count is accounted both globally and on a per-VMA basis for private mappings. This guarantees that a process that successfully calls mmap() will successfully fault all pages in the future unless fork() is called. The characteristics of private mappings of hugetlbfs files behaviour after this patch are; 1. The process calling mmap() is guaranteed to succeed all future faults until it forks(). 2. On fork(), the parent may die due to SIGKILL on writes to the private mapping if enough pages are not available for the COW. For reasonably reliable behaviour in the face of a small huge page pool, children of hugepage-aware processes should not reference the mappings; such as might occur when fork()ing to exec(). 3. On fork(), the child VMAs inherit no reserves. Reads on pages already faulted by the parent will succeed. Successful writes will depend on enough huge pages being free in the pool. 4. Quotas of the hugetlbfs mount are checked at reserve time for the mapper and at fault time otherwise. Before this patch, all reads or writes in the child potentially needs page allocations that can later lead to the death of the parent. This applies to reads and writes of uninstantiated pages as well as COW. After the patch it is only a write to an instantiated page that causes problems. Signed-off-by: Mel Gorman Acked-by: Adam Litke Cc: Andy Whitcroft Cc: William Lee Irwin III Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc1b8a73dd71226902a11928dd5500326e101df9 Author: Mel Gorman Date: Wed Jul 23 21:27:22 2008 -0700 hugetlb: move hugetlb_acct_memory() This is a patchset to give reliable behaviour to a process that successfully calls mmap(MAP_PRIVATE) on a hugetlbfs file. Currently, it is possible for the process to be killed due to a small hugepage pool size even if it calls mlock(). MAP_SHARED mappings on hugetlbfs reserve huge pages at mmap() time. This guarantees all future faults against the mapping will succeed. This allows local allocations at first use improving NUMA locality whilst retaining reliability. MAP_PRIVATE mappings do not reserve pages. This can result in an application being SIGKILLed later if a huge page is not available at fault time. This makes huge pages usage very ill-advised in some cases as the unexpected application failure cannot be detected and handled as it is immediately fatal. Although an application may force instantiation of the pages using mlock(), this may lead to poor memory placement and the process may still be killed when performing COW. This patchset introduces a reliability guarantee for the process which creates a private mapping, i.e. the process that calls mmap() on a hugetlbfs file successfully. The first patch of the set is purely mechanical code move to make later diffs easier to read. The second patch will guarantee faults up until the process calls fork(). After patch two, as long as the child keeps the mappings, the parent is no longer guaranteed to be reliable. Patch 3 guarantees that the parent will always successfully COW by unmapping the pages from the child in the event there are insufficient pages in the hugepage pool in allocate a new page, be it via a static or dynamic pool. Existing hugepage-aware applications are unlikely to be affected by this change. For much of hugetlbfs's history, pages were pre-faulted at mmap() time or mmap() failed which acts in a reserve-like manner. If the pool is sized correctly already so that parent and child can fault reliably, the application will not even notice the reserves. It's only when the pool is too small for the application to function perfectly reliably that the reserves come into play. Credit goes to Andy Whitcroft for cleaning up a number of mistakes during review before the patches were released. This patch: A later patch in this set needs to call hugetlb_acct_memory() before it is defined. This patch moves the function without modification. This makes later diffs easier to read. Signed-off-by: Mel Gorman Acked-by: Adam Litke Cc: Andy Whitcroft Cc: William Lee Irwin III Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9109fb7b3520de187ebc3646c209d66a233f7169 Author: Johannes Weiner Date: Wed Jul 23 21:27:20 2008 -0700 mm: drop unneeded pgdat argument from free_area_init_node() free_area_init_node() gets passed in the node id as well as the node descriptor. This is redundant as the function can trivially get the node descriptor itself by means of NODE_DATA() and the node's id. I checked all the users and NODE_DATA() seems to be usable everywhere from where this function is called. Signed-off-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2185e69f680ae8c8496b6fc15e20c889d5b39b67 Author: Andrew Morton Date: Wed Jul 23 21:27:19 2008 -0700 mapping_set_error: add unlikely() This is called on a per-page basis and in the vast majority of cases `error' is zero. Cc: Guillaume Chazarain Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9023cb7e8564d95a1893f8cb6895a293be9a71fe Author: Andy Whitcroft Date: Wed Jul 23 21:27:19 2008 -0700 slob: record page flag overlays explicitly SLOB reuses two page bits for internal purposes, it overlays PG_active and PG_private. This is hidden away in slob.c. Document these overlays explicitly in the main page-flags enum along with all the others. Signed-off-by: Andy Whitcroft Cc: Pekka Enberg Cc: Christoph Lameter Cc: Matt Mackall Cc: Nick Piggin Reviewed-by: KOSAKI Motohiro Cc: KOSAKI Motohiro Cc: Rik van Riel Cc: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8a38082d21cbc5ec961da7dda195e98a9a064dcf Author: Andy Whitcroft Date: Wed Jul 23 21:27:18 2008 -0700 slub: record page flag overlays explicitly SLUB reuses two page bits for internal purposes, it overlays PG_active and PG_error. This is hidden away in slub.c. Document these overlays explicitly in the main page-flags enum along with all the others. Signed-off-by: Andy Whitcroft Cc: Pekka Enberg Cc: Christoph Lameter Cc: Matt Mackall Cc: Nick Piggin Tested-by: KOSAKI Motohiro Cc: KOSAKI Motohiro Cc: Rik van Riel Cc: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0cad47cf13bc2e9142d3a11d9f50523797d0d4ea Author: Andy Whitcroft Date: Wed Jul 23 21:27:16 2008 -0700 page-flags: record page flag overlays explicitly With the recent page flag reorganisation we have a single enum which defines the valid page flags and their values, nice and clear. However there are a number of bits which are overloaded by different subsystems. Firstly there is PG_owner_priv_1 which is used by filesystems and by XEN. Secondly both SLOB and SLUB use a couple of extra page bits to manage internal state for pages they own; both overlay other bits. All of these "aliases" are scattered about the source making it very hard for a reader to know if the bits are safe to rely on in all contexts; confusion here is bad. As we now have a single place where the bits are clearly assigned it makes sense to clarify the reuse of bits by making the aliases explicit and visible with the original bit assignments. This patch creates explicit aliases within the enum itself for the overloaded bits, creates standard bit accessors PageFoo etc. and uses those throughout. This version pulls the bit manipulation out to standard named page bit accessors as suggested by Christoph, it retains the explicit mapping to the overlayed bits. A fusion of both ideas. This has been SLUB and SLOB have been compile tested on x86_64 only, and SLUB boot tested. If people feel this is worth doing then I can run a fuller set of testing. This patch: Some page flags are used for more than one purpose, for example PG_owner_priv_1. Currently there are individual accessors for each user, each built using the common flag name far away from the bit definitions. This makes it hard to see all possible uses of these bits. Now that we have a single enum to generate the bit orders it makes sense to express overlays in the same place. So create per use aliases for this bit in the main page-flags enum and use those in the accessors. [akpm@linux-foundation.org: fix xen] Signed-off-by: Andy Whitcroft Cc: Pekka Enberg Cc: Christoph Lameter Cc: Matt Mackall Cc: Nick Piggin Cc: KAMEZAWA Hiroyuki Reviewed-by: KOSAKI Motohiro Cc: Rik van Riel Cc: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da3bbdd4632c0171406b2677e31494afa5bde2f8 Author: Kentaro Makita Date: Wed Jul 23 21:27:13 2008 -0700 fix soft lock up at NFS mount via per-SB LRU-list of unused dentries [Summary] Split LRU-list of unused dentries to one per superblock to avoid soft lock up during NFS mounts and remounting of any filesystem. Previously I posted here: http://lkml.org/lkml/2008/3/5/590 [Descriptions] - background dentry_unused is a list of dentries which are not referenced. dentry_unused grows up when references on directories or files are released. This list can be very long if there is huge free memory. - the problem When shrink_dcache_sb() is called, it scans all dentry_unused linearly under spin_lock(), and if dentry->d_sb is differnt from given superblock, scan next dentry. This scan costs very much if there are many entries, and very ineffective if there are many superblocks. IOW, When we need to shrink unused dentries on one dentry, but scans unused dentries on all superblocks in the system. For example, we scan 500 dentries to unmount a filesystem, but scans 1,000,000 or more unused dentries on other superblocks. In our case , At mounting NFS*, shrink_dcache_sb() is called to shrink unused dentries on NFS, but scans 100,000,000 unused dentries on superblocks in the system such as local ext3 filesystems. I hear NFS mounting took 1 min on some system in use. * : NFS uses virtual filesystem in rpc layer, so NFS is affected by this problem. 100,000,000 is possible number on large systems. Per-superblock LRU of unused dentried can reduce the cost in reasonable manner. - How to fix I found this problem is solved by David Chinner's "Per-superblock unused dentry LRU lists V3"(1), so I rebase it and add some fix to reclaim with fairness, which is in Andrew Morton's comments(2). 1) http://lkml.org/lkml/2006/5/25/318 2) http://lkml.org/lkml/2006/5/25/320 Split LRU-list of unused dentries to each superblocks. Then, NFS mounting will check dentries under a superblock instead of all. But this spliting will break LRU of dentry-unused. So, I've attempted to make reclaim unused dentrins with fairness by calculate number of dentries to scan on this sb based on following way number of dentries to scan on this sb = count * (number of dentries on this sb / number of dentries in the machine) - ToDo - I have to measuring performance number and do stress tests. - When unmount occurs during prune_dcache(), scanning on same superblock, It is unable to reach next superblock because it is gone away. We restart scannig superblock from first one, it causes unfairness of reclaim unused dentries on first superblock. But I think this happens very rarely. - Test Results Result on 6GB boxes with excessive unused dentries. Without patch: $ cat /proc/sys/fs/dentry-state 10181835 10180203 45 0 0 0 # mount -t nfs 10.124.60.70:/work/kernel-src nfs real 0m1.830s user 0m0.001s sys 0m1.653s With this patch: $ cat /proc/sys/fs/dentry-state 10236610 10234751 45 0 0 0 # mount -t nfs 10.124.60.70:/work/kernel-src nfs real 0m0.106s user 0m0.002s sys 0m0.032s [akpm@linux-foundation.org: fix comments] Signed-off-by: Kentaro Makita Cc: Neil Brown Cc: Trond Myklebust Cc: David Chinner Cc: "J. Bruce Fields" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c82d0ce2c4f642b2f24ef98707a030543b06b90 Author: Andy Whitcroft Date: Wed Jul 23 21:27:11 2008 -0700 buddy: clarify comments describing buddy merge In __free_one_page(), the comment "Move the buddy up one level" appears attached to the break and by implication when the break is taken we are moving it up one level: if (!page_is_buddy(page, buddy, order)) break; /* Move the buddy up one level. */ In reality the inverse is true, we break out when we can no longer merge this page with its buddy. Looking back into pre-history (into the full git history) it appears that these two lines accidentally got joined as part of another change. Move the comment down where it belongs below the if and clarify its language. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 42b7772812d15b86543a23b82bd6070eef9a08b1 Author: Jan Beulich Date: Wed Jul 23 21:27:10 2008 -0700 mm: remove double indirection on tlb parameter to free_pgd_range() & Co The double indirection here is not needed anywhere and hence (at least) confusing. Signed-off-by: Jan Beulich Cc: Hugh Dickins Cc: Nick Piggin Cc: Christoph Lameter Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Luck, Tony" Cc: Paul Mundt Cc: "David S. Miller" Acked-by: Jeremy Fitzhardinge Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a352894d07059649398c4769dc8b645e1a1dad88 Author: Benjamin Herrenschmidt Date: Wed Jul 23 21:27:09 2008 -0700 spufs: use new vm_ops->access to allow local state access from gdb This uses the new vm_ops->access to allow gdb to access the SPU local store. We currently prevent access to problem state registers, this can be done later if really needed but it's safer not to. [akpm@linux-foundation.org: fix typo] Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Rik van Riel Cc: Dave Airlie Cc: Hugh Dickins Cc: Paul Mackerras Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a1f242ff460e4b50a045fa237c3c56cce9eabf83 Author: Benjamin Herrenschmidt Date: Wed Jul 23 21:27:08 2008 -0700 powerpc ioremap_prot This adds ioremap_prot and pte_pgprot() so that one can extract protection bits from a PTE and use them to ioremap_prot() (in order to support ptrace of VM_IO | VM_PFNMAP as per Rik's patch). This moves a couple of flag checks around in the ioremap implementations of arch/powerpc. There's a side effect of allowing non-cacheable and non-guarded mappings on ppc32 which before would always have _PAGE_GUARDED set whenever _PAGE_NO_CACHE is. (standard ioremap will still set _PAGE_GUARDED, but ioremap_prot will be capable of setting such a non guarded mapping). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Rik van Riel Cc: Dave Airlie Cc: Hugh Dickins Cc: Paul Mackerras Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ae8ed5053a39082d224a3f48409e016baca9c16 Author: Rik van Riel Date: Wed Jul 23 21:27:07 2008 -0700 use generic_access_phys for /dev/mem mappings Use generic_access_phys as the access_process_vm access function for /dev/mem mappings. This makes it possible to debug the X server. [akpm@linux-foundation.org: repair all the architectures which broke] Signed-off-by: Rik van Riel Cc: Benjamin Herrensmidt Cc: Dave Airlie Cc: Hugh Dickins Cc: Paul Mackerras Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28b2ee20c7cba812b6f2ccf6d722cf86d00a84dc Author: Rik van Riel Date: Wed Jul 23 21:27:05 2008 -0700 access_process_vm device memory infrastructure In order to be able to debug things like the X server and programs using the PPC Cell SPUs, the debugger needs to be able to access device memory through ptrace and /proc/pid/mem. This patch: Add the generic_access_phys access function and put the hooks in place to allow access_process_vm to access device or PPC Cell SPU memory. [riel@redhat.com: Add documentation for the vm_ops->access function] Signed-off-by: Rik van Riel Signed-off-by: Benjamin Herrensmidt Cc: Dave Airlie Cc: Hugh Dickins Cc: Paul Mackerras Cc: Arnd Bergmann Acked-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d71d10a4252a3938e6b70189bc776171c02e076 Author: Nick Piggin Date: Wed Jul 23 21:27:05 2008 -0700 mm: remove nopfn There are no users of nopfn in the tree. Remove it. [hugh@veritas.com: fix build error] Signed-off-by: Nick Piggin Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a969e903a944f69309ee5cc9e7c7b08310d1151e Author: Christoph Hellwig Date: Wed Jul 23 21:27:04 2008 -0700 kill generic_file_direct_IO() generic_file_direct_IO is a common helper around the invocation of ->direct_IO. But there's almost nothing shared between the read and write side, so we're better off without this helper. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75353bed36cfbbfb55bbde0896bbf5a02d9ba355 Author: Adrian Bunk Date: Wed Jul 23 21:27:03 2008 -0700 mm/hugetlb.c: fix duplicate variable It's confusing that set_max_huge_pages() contained two different variables named "ret", and although the code works correctly this should be fixed. The inner of the two variables can simply be removed. Spotted by sparse. Signed-off-by: Adrian Bunk Cc: "KOSAKI Motohiro" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c748e1340e0de3fa7fed86f8bdf499be9242afff Author: Adrian Bunk Date: Wed Jul 23 21:27:03 2008 -0700 mm/vmstat.c: proper externs This patch adds proper extern declarations for five variables in include/linux/vmstat.h Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4f5ca265788973e3f5a1129a96ee4a9cbf587f2b Author: Adrian Bunk Date: Wed Jul 23 21:27:02 2008 -0700 mm/migrate.c should #include Every file should include the headers containing the externs for its global functions (in this case for sys_move_pages()). Signed-off-by: Adrian Bunk Acked-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e4048e5dc4aecec670f48ed007a28779f09cebd6 Author: KOSAKI Motohiro Date: Wed Jul 23 21:27:01 2008 -0700 page allocator: inline some __alloc_pages() wrappers Two zonelist patch series rewrote __page_alloc() largely. Now, it is just a wrapper function. Inlining them will save a function call. [akpm@linux-foundation.org: export __alloc_pages_internal] Cc: Lee Schermerhorn Cc: Mel Gorman Signed-off-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit efe9e77997f6e0306fedc6efa98df491dcf5ecb0 Author: Nick Piggin Date: Wed Jul 23 21:27:00 2008 -0700 mspec: convert nopfn to fault [akpm@linux-foundation.org: remove unused variable] Signed-off-by: Nick Piggin Acked-by: Jes Sorensen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ffc6421f0720f433b5b35b89ff56e998eabff93b Author: Johannes Weiner Date: Wed Jul 23 21:26:59 2008 -0700 mm: unexport __alloc_bootmem_core() This function has no external callers, so unexport it. Also fix its naming inconsistency. Signed-off-by: Johannes Weiner Cc: Ingo Molnar Cc: Yinghai Lu Cc: Christoph Lameter Cc: Mel Gorman Cc: Andy Whitcroft Cc: Mel Gorman Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ae04463077324ed9f6b04ab3a5b17ae1ee4dd35 Author: Johannes Weiner Date: Wed Jul 23 21:26:59 2008 -0700 mm: normalize internal argument passing of bootmem data All _core functions only need the bootmem data, not the whole node descriptor. Adjust the two functions that take the node descriptor unneededly. Signed-off-by: Johannes Weiner Cc: Ingo Molnar Cc: Yinghai Lu Cc: Christoph Lameter Cc: Mel Gorman Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b312c0e6e2f44b020e12953d1dd37eed60e3609 Author: Johannes Weiner Date: Wed Jul 23 21:26:58 2008 -0700 mm: fix free_all_bootmem_core alignment check The check for node_boot_start is bogus because we start freeing at the corresponding pfn. So check if the pfn is properly aligned instead in a more readable way and adjust the documentation. Also remove an unneeded accounting variable. Signed-off-by: Johannes Weiner Cc: Ingo Molnar Cc: Yinghai Lu Cc: Christoph Lameter Cc: Mel Gorman Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b61bfa3c462671c48a51fb5c31af337c5a996a04 Author: Johannes Weiner Date: Wed Jul 23 21:26:55 2008 -0700 mm: move bootmem descriptors definition to a single place There are a lot of places that define either a single bootmem descriptor or an array of them. Use only one central array with MAX_NUMNODES items instead. Signed-off-by: Johannes Weiner Acked-by: Ralf Baechle Cc: Ingo Molnar Cc: Richard Henderson Cc: Russell King Cc: Tony Luck Cc: Hirokazu Takata Cc: Geert Uytterhoeven Cc: Kyle McMartin Cc: Paul Mackerras Cc: Paul Mundt Cc: David S. Miller Cc: Yinghai Lu Cc: Christoph Lameter Cc: Mel Gorman Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b05c7e6e159d2f33c9275281b8b909a89eb7c5d Author: FUJITA Tomonori Date: Wed Jul 23 21:26:53 2008 -0700 add a helper function to test if an object is on the stack lib/debugobjects.c has a function to test if an object is on the stack. The block layer and ide needs it (they need to avoid DMA from/to stack buffers). This patch moves the function to include/linux/sched.h so that everyone can use it. lib/debugobjects.c uses current->stack but this patch uses a task_stack_page() accessor, which is a preferable way to access the stack. Signed-off-by: FUJITA Tomonori Cc: Christoph Lameter Cc: Andy Whitcroft Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 68ad8df42e12037c3894c9706ab428bf5cd6426b Author: Mel Gorman Date: Wed Jul 23 21:26:52 2008 -0700 mm: print out the zonelists on request for manual verification This patch prints out the zonelists during boot for manual verification by the user if the mminit_loglevel is MMINIT_VERIFY or higher. Signed-off-by: Mel Gorman Cc: Christoph Lameter Cc: Andy Whitcroft Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2dbb51c49f4fecb8330e43247a0edfbc4b2b8974 Author: Mel Gorman Date: Wed Jul 23 21:26:52 2008 -0700 mm: make defensive checks around PFN values registered for memory usage There are a number of different views to how much memory is currently active. There is the arch-independent zone-sizing view, the bootmem allocator and memory models view. Architectures register this information at different times and is not necessarily in sync particularly with respect to some SPARSEMEM limitations. This patch introduces mminit_validate_memmodel_limits() which is able to validate and correct PFN ranges with respect to the memory model. It is only SPARSEMEM that currently validates itself. Signed-off-by: Mel Gorman Cc: Christoph Lameter Cc: Andy Whitcroft Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 708614e6180f398cd307ea0048d48ba6fa274610 Author: Mel Gorman Date: Wed Jul 23 21:26:51 2008 -0700 mm: verify the page links and memory model Print out information on how the page flags are being used if mminit_loglevel is MMINIT_VERIFY or higher and unconditionally performs sanity checks on the flags regardless of loglevel. When the page flags are updated with section, node and zone information, a check are made to ensure the values can be retrieved correctly. Finally we confirm that pfn_to_page and page_to_pfn are the correct inverse functions. [akpm@linux-foundation.org: fix printk warnings] Signed-off-by: Mel Gorman Cc: Christoph Lameter Cc: Andy Whitcroft Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b74ab97bc12ce74acec900f1d89a4aee2e4d70d Author: Mel Gorman Date: Wed Jul 23 21:26:49 2008 -0700 mm: add a basic debugging framework for memory initialisation Boot initialisation is very complex, with significant numbers of architecture-specific routines, hooks and code ordering. While significant amounts of the initialisation is architecture-independent, it trusts the data received from the architecture layer. This is a mistake, and has resulted in a number of difficult-to-diagnose bugs. This patchset adds some validation and tracing to memory initialisation. It also introduces a few basic defensive measures. The validation code can be explicitly disabled for embedded systems. This patch: Add additional debugging and verification code for memory initialisation. Once enabled, the verification checks are always run and when required additional debugging information may be outputted via a mminit_loglevel= command-line parameter. The verification code is placed in a new file mm/mm_init.c. Ideally other mm initialisation code will be moved here over time. Signed-off-by: Mel Gorman Cc: Christoph Lameter Cc: Andy Whitcroft Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9483a578df27fe7603605d565eefe039c1ba5845 Author: David Brownell Date: Wed Jul 23 21:26:48 2008 -0700 add HAVE_CLK to Kconfig, for driver dependencies Flag platforms as HAVE_CLK (or not) in Kconfig, based on whether they support calls, so that otherwise portable drivers which need those calls can list that dependency. Something like this is a prerequisite for merging the musb_hdrc driver, currently used on platforms including Davinci, OMAP2430, OMAP3xx ... and the discrete TUSB6010 chip, which doesn't have a natural platform dependency. (Used with OMAP 2420 in current Nokia N8x0 tablets.) Signed-off-by: David Brownell Cc: Russell King Acked-by: Haavard Skinnemoen Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Paul Mundt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d7ce20b2024d318b9ba88859226af1441270d99f Author: Adrian Bunk Date: Wed Jul 23 21:26:47 2008 -0700 remove is_tty() This patch removes the no longer used is_tty(). Signed-off-by: Adrian Bunk Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d36e74c4392b5f26a5c4d94d7881a156ddc8e593 Author: Clemens Ladisch Date: Wed Jul 23 21:26:46 2008 -0700 hpet: clarify maintainer entry The existing HPET maintainer entries are somewhat unclear about which one applies to what part of the kernel. Signed-off-by: Clemens Ladisch Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e108526e77aa41c89b3be96f75d97615db2b751c Author: Akinobu Mita Date: Wed Jul 23 21:26:44 2008 -0700 move memory_read_from_buffer() from fs.h to string.h James Bottomley warns that inclusion of linux/fs.h in a low level driver was always a danger signal. This patch moves memory_read_from_buffer() from fs.h to string.h and fixes includes in existing memory_read_from_buffer() users. Signed-off-by: Akinobu Mita Cc: James Bottomley Cc: Geert Uytterhoeven Cc: Zhang Rui Cc: Bob Moore Cc: Thomas Renninger Cc: Len Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2cc177364e4746becdf421f926fb967c047ccc32 Merge: 2f5de15... 1a867c3... 1ca8d15... 7644264... e8bb4be... 1fa6d81... Author: Roland Dreier Date: Thu Jul 24 08:38:47 2008 -0700 Merge branches 'bkl-removal', 'cma', 'ehca', 'for-2.6.27', 'mlx4', 'mthca' and 'nes' into for-linus commit b552068999b0b05087c454e525b30b785c79dc9b Author: Matthew Wilcox Date: Wed Apr 23 10:07:27 2008 -0400 Remove __DECLARE_SEMAPHORE_GENERIC There are no users of __DECLARE_SEMAPHORE_GENERIC in the kernel Signed-off-by: Matthew Wilcox commit 2351ec533ed0dd56052ab96988d2161d5ecc8ed9 Author: Matthew Wilcox Date: Thu Jul 24 08:09:32 2008 -0400 Remove asm/semaphore.h All users have now been converted to linux/semaphore.h and we don't need to keep these files around any longer. Signed-off-by: Matthew Wilcox commit 6310e472717ed736c9bff9840febb71f7bb400ed Author: Matthew Wilcox Date: Thu Jul 24 08:08:09 2008 -0400 Remove use of asm/semaphore.h Change to use linux/semaphore.h Signed-off-by: Matthew Wilcox commit 0f17e4c796e89d1f69f13b653aba60e6ccfb8ae0 Author: Matthew Wilcox Date: Thu Jul 24 08:30:48 2008 -0400 Add missing semaphore.h includes These files use semaphores but don't include semaphore.h Signed-off-by: Matthew Wilcox Acked-by: Geert Uytterhoeven commit 78305de2f99e9f43ab860dd95bb430b20e26c695 Author: Matthew Wilcox Date: Wed Apr 23 07:20:41 2008 -0400 Remove mention of semaphores from kernel-locking Since the consensus seems to be to eliminate semaphores where possible, we shouldn't be educating people about how to use them as locks. Use mutexes instead. Semaphores should be described in a separate document if we end up keeping them. Signed-off-by: Matthew Wilcox Acked-by: Rusty Russell commit 58838cf3ca3337d76141c33d6c68376490263468 Author: Peter Zijlstra Date: Thu Jul 24 12:43:13 2008 +0200 sched: clean up compiler warning Reported-by: Daniel Walker Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 04bbe430f73c6c31bbd067349c029e907e153a8d Author: Vegard Nossum Date: Mon Jul 21 15:06:35 2008 +0200 x86: fix header export, asm-x86/processor-flags.h, CONFIG_* leaks Apparently, commit 6330a30a76c1e62d4b4ec238368957f8febf9113 Author: Vegard Nossum Date: Wed May 28 09:46:19 2008 +0200 x86: break mutual header inclusion introduced some CONFIG names to processor-flags.h, which was exported in commit 6093015db2bd9e70cf20cdd23be1a50733baafdd Author: Ingo Molnar Date: Sun Mar 30 11:45:23 2008 +0200 x86: cleanup replace most vm86 flags with flags from processor-flags.h, fix Fix it by wrapping the CONFIG parts in __KERNEL__. Reported-by: Olaf Hering Signed-off-by: Vegard Nossum Cc: Adrian Bunk Cc: Olaf Hering Signed-off-by: Ingo Molnar commit 9d25d4db81833029d30b7b03cc1000cbbe09e192 Author: Hugh Dickins Date: Mon Jul 21 18:41:26 2008 +0100 x86: BUILD_IRQ say .text to avoid .data.percpu When I edit the x86_64 Makefile to -fno-unit-at-a-time, bootup panics on 0xCCs in IRQ0x3e_interrupt(): IRQ0x20_interrupt etc. have got linked into .data.percpu. Perhaps there are other ways of triggering that: specify ".text" in the BUILD_IRQ() macro for safety. I've been using -fno-unit-at-a-time (to lessen inlining, for easier debugging) for a long time. Signed-off-by: Hugh Dickins Cc: Mike Travis Signed-off-by: Ingo Molnar commit 2dc1697eb355c34f9f7bcbbb83f490de248c360a Author: Jeremy Fitzhardinge Date: Mon Jul 21 16:49:58 2008 -0700 xen: don't use sysret for sysexit32 When implementing sysexit32, don't let Xen use sysret to return to userspace. That results in usermode register state being trashed. Signed-off-by: Jeremy Fitzhardinge Cc: Mark McLoughlin Cc: Eduardo Habkost Signed-off-by: Ingo Molnar commit 9e882c9282512cc622752f29ec7c29ce338fc1eb Author: Jeremy Fitzhardinge Date: Mon Jul 21 16:49:54 2008 -0700 x86: call early_cpu_init at the same point Call early_cpu_init() at the same (early) point in setup_arch(). The x86_64 code was calling it relatively late, after when other arch code need to do cpu-related setup which depends on it. Signed-off-by: Jeremy Fitzhardinge Cc: Mark McLoughlin Cc: Eduardo Habkost Signed-off-by: Ingo Molnar commit f867e6af94239a04ec23aeec2fcda5aa58e41db7 Author: Jarek Poplawski Date: Wed Jul 23 21:34:27 2008 -0700 pkt_sched: sch_sfq: dump a real number of flows Dump the "flows" number according to the number of active flows instead of repeating the "limit". Reported-by: Denys Fedoryshchenko Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller commit 338b9bb3adac0d2c5a1e180491d9b001d624c402 Merge: 7f9dce3... af0575b... Author: Linus Torvalds Date: Wed Jul 23 20:39:21 2008 -0700 Merge branch 'x86/auditsc' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland * 'x86/auditsc' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland: i386 syscall audit fast-path x86_64 ia32 syscall audit fast-path x86_64 syscall audit fast-path x86_64: remove bogus optimization in sysret_signal commit 6f75a9b6426e686649ac440c37ec7c249501f9a5 Author: Chas Williams Date: Wed Jul 23 20:29:21 2008 -0700 atm: [fore200e] use MODULE_FIRMWARE() and other suggested cleanups Signed-off-by: Chas Williams Signed-off-by: David S. Miller commit 7f9dce38378f0a4a298e885553d6bb7121376376 Merge: 26dcce0... ba42059... Author: Linus Torvalds Date: Wed Jul 23 19:36:53 2008 -0700 Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: hrtick_enabled() should use cpu_active() sched, x86: clean up hrtick implementation sched: fix build error, provide partition_sched_domains() unconditionally sched: fix warning in inc_rt_tasks() to not declare variable 'rq' if it's not needed cpu hotplug: Make cpu_active_map synchronization dependency clear cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment (take 2) sched: rework of "prioritize non-migratable tasks over migratable ones" sched: reduce stack size in isolated_cpu_setup() Revert parts of "ftrace: do not trace scheduler functions" Fixed up conflicts in include/asm-x86/thread_info.h (due to the TIF_SINGLESTEP unification vs TIF_HRTICK_RESCHED removal) and kernel/sched_fair.c (due to cpu_active_map vs for_each_cpu_mask_nr() introduction). commit 26dcce0fabbef75ae426461edf21b5030bad60f3 Merge: d7b6de1... eb6a12c... Author: Linus Torvalds Date: Wed Jul 23 18:37:44 2008 -0700 Merge branch 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits) NR_CPUS: Replace NR_CPUS in speedstep-centrino.c cpumask: Provide a generic set of CPUMASK_ALLOC macros, FIXUP NR_CPUS: Replace NR_CPUS in cpufreq userspace routines NR_CPUS: Replace per_cpu(..., smp_processor_id()) with __get_cpu_var NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genapic_flat_64.c NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genx2apic_uv_x.c NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/mcheck/mce_64.c cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c, fix cpumask: Use optimized CPUMASK_ALLOC macros in the centrino_target cpumask: Provide a generic set of CPUMASK_ALLOC macros cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c cpumask: Optimize cpumask_of_cpu in kernel/time/tick-common.c cpumask: Optimize cpumask_of_cpu in drivers/misc/sgi-xp/xpc_main.c cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr Revert "cpumask: introduce new APIs" cpumask: make for_each_cpu_mask a bit smaller net: Pass reference to cpumask variable in net/sunrpc/svc.c ... Fix up trivial conflicts in drivers/cpufreq/cpufreq.c manually commit d7b6de14a0ef8a376f9d57b867545b47302b7bfb Merge: 30d3854... 4dca10a... Author: Linus Torvalds Date: Wed Jul 23 18:34:13 2008 -0700 Merge branch 'core/softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core/softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: softlockup: fix invalid proc_handler for softlockup_panic softlockup: fix watchdog task wakeup frequency softlockup: fix watchdog task wakeup frequency softlockup: show irqtrace softlockup: print a module list on being stuck softlockup: fix NMI hangs due to lock race - 2.6.26-rc regression softlockup: fix false positives on nohz if CPU is 100% idle for more than 60 seconds softlockup: fix softlockup_thresh fix softlockup: fix softlockup_thresh unaligned access and disable detection at runtime softlockup: allow panic on lockup commit 30d38542ec777468bb6a31829076a2dbc5690e35 Merge: 20b7997... 044e5f4... Author: Linus Torvalds Date: Wed Jul 23 18:24:08 2008 -0700 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (85 commits) [ARM] pxa: add base support for PXA930 Handheld Platform (aka SAAR) [ARM] pxa: add base support for PXA930 Evaluation Board (aka TavorEVB) [ARM] pxa: add base support for PXA930 (aka Tavor-P) [ARM] Update mach-types [ARM] pxa: make littleton to use the new smc91x platform data [ARM] pxa: make zylonite to use the new smc91x platform data [ARM] pxa: make mainstone to use the new smc91x platform data [ARM] pxa: make lubbock to use new smc91x platform data [NET] smc91x: prepare SMC_USE_PXA_DMA to be specified in platform data [NET] smc91x: prepare for SMC_IO_SHIFT to be a platform configurable variable [NET] smc91x: add SMC91X_NOWAIT flag to platform data [NET] smc91x: favor the use of SMC91X_USE_* instead of SMC_CAN_USE_* [NET] smc91x: remove "irq_flags" from "struct smc91x_platdata" [ARM] 5146/1: pxa2xx: convert all boards to call pxa2xx_transceiver_mode helper Support for LCD on e740 e750 e400 and e800 e-series PDAs E-series UDC support PXA UDC - allow use of inverted GPIO for pullup Add e350 support Fix broken e-series build E-series GPIO / IRQ definitions. ... commit af0575bba0f46dd9054d46e0a88c57afad3bf4d2 Author: Roland McGrath Date: Tue Jun 24 04:16:52 2008 -0700 i386 syscall audit fast-path This adds fast paths for 32-bit syscall entry and exit when TIF_SYSCALL_AUDIT is set, but no other kind of syscall tracing. These paths does not need to save and restore all registers as the general case of tracing does. Avoiding the iret return path when syscall audit is enabled helps performance a lot. Signed-off-by: Roland McGrath commit 5cbf1565f29eb57a86a305b08836613508e294d7 Author: Roland McGrath Date: Tue Jun 24 01:13:31 2008 -0700 x86_64 ia32 syscall audit fast-path This adds fast paths for 32-bit syscall entry and exit when TIF_SYSCALL_AUDIT is set, but no other kind of syscall tracing. These paths does not need to save and restore all registers as the general case of tracing does. Avoiding the iret return path when syscall audit is enabled helps performance a lot. Signed-off-by: Roland McGrath commit 86a1c34a929f30fde8ad01ea8245df61ddcf58b7 Author: Roland McGrath Date: Mon Jun 23 15:37:04 2008 -0700 x86_64 syscall audit fast-path This adds a fast path for 64-bit syscall entry and exit when TIF_SYSCALL_AUDIT is set, but no other kind of syscall tracing. This path does not need to save and restore all registers as the general case of tracing does. Avoiding the iret return path when syscall audit is enabled helps performance a lot. Signed-off-by: Roland McGrath commit 15e8f348db372dec21229fda5d52ae6ee7e64666 Author: Roland McGrath Date: Mon Jun 23 20:41:12 2008 -0700 x86_64: remove bogus optimization in sysret_signal This short-circuit path in sysret_signal looks wrong to me. AFAICT, in practice the branch is never taken--and if it were, it would go wrong. To wit, try loading a module whose init function does set_thread_flag(TIF_IRET), and see insmod crash (presumably with a wrong user stack pointer). This is because the FIXUP_TOP_OF_STACK work hasn't been done yet when we jump around the call to ptregscall_common and get to int_with_check--where it expects the user RSP,SS,CS and EFLAGS to have been stored by FIXUP_TOP_OF_STACK. I don't think it's normally possible to get to sysret_signal with no _TIF_DO_NOTIFY_MASK bits set anyway, so these two instructions are already superfluous. If it ever did happen, it is harmless to call do_notify_resume with nothing for it to do. Signed-off-by: Roland McGrath commit 70eed75d76635ba7350651b9bd96529a306ec67a Author: Patrick McHardy Date: Wed Jul 23 16:42:42 2008 -0700 netfilter: make security table depend on NETFILTER_ADVANCED Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller commit 4b53fb67e385b856a991d402096379dab462170a Author: David S. Miller Date: Wed Jul 23 16:38:45 2008 -0700 tcp: Clear probes_out more aggressively in tcp_ack(). This is based upon an excellent bug report from Eric Dumazet. tcp_ack() should clear ->icsk_probes_out even if there are packets outstanding. Otherwise if we get a sequence of ACKs while we do have packets outstanding over and over again, we'll never clear the probes_out value and eventually think the connection is too sick and we'll reset it. This appears to be some "optimization" added to tcp_ack() in the 2.4.x timeframe. In 2.2.x, probes_out is pretty much always cleared by tcp_ack(). Here is Eric's original report: ---------------------------------------- Apparently, we can in some situations reset TCP connections in a couple of seconds when some frames are lost. In order to reproduce the problem, please try the following program on linux-2.6.25.* Setup some iptables rules to allow two frames per second sent on loopback interface to tcp destination port 12000 iptables -N SLOWLO iptables -A SLOWLO -m hashlimit --hashlimit 2 --hashlimit-burst 1 --hashlimit-mode dstip --hashlimit-name slow2 -j ACCEPT iptables -A SLOWLO -j DROP iptables -A OUTPUT -o lo -p tcp --dport 12000 -j SLOWLO Then run the attached program and see the output : # ./loop State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 40 127.0.0.1:54455 127.0.0.1:12000 timer:(persist,200ms,1) State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 40 127.0.0.1:54455 127.0.0.1:12000 timer:(persist,200ms,3) State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 40 127.0.0.1:54455 127.0.0.1:12000 timer:(persist,200ms,5) State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 40 127.0.0.1:54455 127.0.0.1:12000 timer:(persist,200ms,7) State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 40 127.0.0.1:54455 127.0.0.1:12000 timer:(persist,200ms,9) State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 40 127.0.0.1:54455 127.0.0.1:12000 timer:(persist,200ms,11) State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 40 127.0.0.1:54455 127.0.0.1:12000 timer:(persist,201ms,13) State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 40 127.0.0.1:54455 127.0.0.1:12000 timer:(persist,188ms,15) write(): Connection timed out wrote 890 bytes but was interrupted after 9 seconds ESTAB 0 0 127.0.0.1:12000 127.0.0.1:54455 Exiting read() because no data available (4000 ms timeout). read 860 bytes While this tcp session makes progress (sending frames with 50 bytes of payload, every 500ms), linux tcp stack decides to reset it, when tcp_retries 2 is reached (default value : 15) tcpdump : 15:30:28.856695 IP 127.0.0.1.56554 > 127.0.0.1.12000: S 33788768:33788768(0) win 32792 15:30:28.856711 IP 127.0.0.1.12000 > 127.0.0.1.56554: S 33899253:33899253(0) ack 33788769 win 32792 15:30:29.356947 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 1:61(60) ack 1 win 257 15:30:29.356966 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 61 win 257 15:30:29.866415 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 61:111(50) ack 1 win 257 15:30:29.866427 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 111 win 257 15:30:30.366516 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 111:161(50) ack 1 win 257 15:30:30.366527 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 161 win 257 15:30:30.876196 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 161:211(50) ack 1 win 257 15:30:30.876207 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 211 win 257 15:30:31.376282 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 211:261(50) ack 1 win 257 15:30:31.376290 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 261 win 257 15:30:31.885619 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 261:311(50) ack 1 win 257 15:30:31.885631 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 311 win 257 15:30:32.385705 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 311:361(50) ack 1 win 257 15:30:32.385715 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 361 win 257 15:30:32.895249 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 361:411(50) ack 1 win 257 15:30:32.895266 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 411 win 257 15:30:33.395341 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 411:461(50) ack 1 win 257 15:30:33.395351 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 461 win 257 15:30:33.918085 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 461:511(50) ack 1 win 257 15:30:33.918096 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 511 win 257 15:30:34.418163 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 511:561(50) ack 1 win 257 15:30:34.418172 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 561 win 257 15:30:34.927685 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 561:611(50) ack 1 win 257 15:30:34.927698 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 611 win 257 15:30:35.427757 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 611:661(50) ack 1 win 257 15:30:35.427766 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 661 win 257 15:30:35.937359 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 661:711(50) ack 1 win 257 15:30:35.937376 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 711 win 257 15:30:36.437451 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 711:761(50) ack 1 win 257 15:30:36.437464 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 761 win 257 15:30:36.947022 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 761:811(50) ack 1 win 257 15:30:36.947039 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 811 win 257 15:30:37.447135 IP 127.0.0.1.56554 > 127.0.0.1.12000: P 811:861(50) ack 1 win 257 15:30:37.447203 IP 127.0.0.1.12000 > 127.0.0.1.56554: . ack 861 win 257 15:30:41.448171 IP 127.0.0.1.12000 > 127.0.0.1.56554: F 1:1(0) ack 861 win 257 15:30:41.448189 IP 127.0.0.1.56554 > 127.0.0.1.12000: R 33789629:33789629(0) win 0 Source of program : /* * small producer/consumer program. * setup a listener on 127.0.0.1:12000 * Forks a child * child connect to 127.0.0.1, and sends 10 bytes on this tcp socket every 100 ms * Father accepts connection, and read all data */ #include #include #include #include #include #include #include int port = 12000; char buffer[4096]; int main(int argc, char *argv[]) { int lfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in socket_address; time_t t0, t1; int on = 1, sfd, res; unsigned long total = 0; socklen_t alen = sizeof(socket_address); pid_t pid; time(&t0); socket_address.sin_family = AF_INET; socket_address.sin_port = htons(port); socket_address.sin_addr.s_addr = htonl(INADDR_LOOPBACK); if (lfd == -1) { perror("socket()"); return 1; } setsockopt(lfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int)); if (bind(lfd, (struct sockaddr *)&socket_address, sizeof(socket_address)) == -1) { perror("bind"); close(lfd); return 1; } if (listen(lfd, 1) == -1) { perror("listen()"); close(lfd); return 1; } pid = fork(); if (pid == 0) { int i, cfd = socket(AF_INET, SOCK_STREAM, 0); close(lfd); if (connect(cfd, (struct sockaddr *)&socket_address, sizeof(socket_address)) == -1) { perror("connect()"); return 1; } for (i = 0 ; ;) { res = write(cfd, "blablabla\n", 10); if (res > 0) total += res; else if (res == -1) { perror("write()"); break; } else break; usleep(100000); if (++i == 10) { system("ss -on dst 127.0.0.1:12000"); i = 0; } } time(&t1); fprintf(stderr, "wrote %lu bytes but was interrupted after %g seconds\n", total, difftime(t1, t0)); system("ss -on | grep 127.0.0.1:12000"); close(cfd); return 0; } sfd = accept(lfd, (struct sockaddr *)&socket_address, &alen); if (sfd == -1) { perror("accept"); return 1; } close(lfd); while (1) { struct pollfd pfd[1]; pfd[0].fd = sfd; pfd[0].events = POLLIN; if (poll(pfd, 1, 4000) == 0) { fprintf(stderr, "Exiting read() because no data available (4000 ms timeout).\n"); break; } res = read(sfd, buffer, sizeof(buffer)); if (res > 0) total += res; else if (res == 0) break; else perror("read()"); } fprintf(stderr, "read %lu bytes\n", total); close(sfd); return 0; } ---------------------------------------- Signed-off-by: David S. Miller commit 7ae93f51d7fa8b9130d47e0b7d17979a165c5bc3 Author: David S. Miller Date: Wed Jul 23 16:21:07 2008 -0700 sparc64: Fix cpufreq notifier registry. Based upon a report by Daniel Smolik. We do it too early, which triggers a BUG in cpufreq_register_notifier(). Signed-off-by: David S. Miller commit e8ebe3b893792887317bc24cc4608753f81b81d3 Author: Ingo Molnar Date: Wed Jul 23 15:30:52 2008 -0700 e1000e: fix e1000_netpoll(), remove extraneous e1000_clean_tx_irq() call Evgeniy Polyakov noticed that drivers/net/e1000e/netdev.c:e1000_netpoll() was calling e1000_clean_tx_irq() without taking the TX lock. David Miller suggested to remove the call altogether: since in this callpah there's periodic calls to ->poll() anyway which will do e1000_clean_tx_irq() and will garbage-collect any finished TX ring descriptors. This fix solved the e1000e+netconsole crashes i've been seeing: ============================================================================= BUG skbuff_head_cache: Poison overwritten ----------------------------------------------------------------------------- INFO: 0xf658ae9c-0xf658ae9c. First byte 0x6a instead of 0x6b INFO: Allocated in __alloc_skb+0x2c/0x110 age=0 cpu=0 pid=5098 INFO: Freed in __kfree_skb+0x31/0x80 age=0 cpu=1 pid=4440 INFO: Slab 0xc16cc140 objects=16 used=1 fp=0xf658ae00 flags=0x400000c3 INFO: Object 0xf658ae00 @offset=3584 fp=0xf658af00 Signed-off-by: Ingo Molnar Signed-off-by: David S. Miller commit 1fa6d8181b7bb0361512170c30e436dcc95591ee Author: Roland Dreier Date: Wed Jul 23 14:20:12 2008 -0700 MAINTAINERS: Remove Glenn Streiff from NetEffect entry Glenn is no longer at NetEffect. Signed-off-by: Roland Dreier commit b4942af65028c5eb516fdd9053020ccb2ee186ce Author: Oliver Hartkopp Date: Wed Jul 23 14:06:04 2008 -0700 net: Update entry in af_family_clock_key_strings In the merge phase of the CAN subsystem the af_family_clock_key_strings[] have been added to sock.c in commit 443aef0eddfa44c158d1b94ebb431a70638fcab4 (lockdep: fixup sk_callback_lock annotation). This trivial patch adds the missing name for address family 29 (AF_CAN). Signed-off-by: Oliver Hartkopp Signed-off-by: David S. Miller commit 5b3ab1dbd401b36ba2f9bfee2d2dae252fd62cd8 Author: David S. Miller Date: Wed Jul 23 14:01:29 2008 -0700 netdev: Remove warning from __netif_schedule(). It isn't helping anything and we aren't going to be able to change all the drivers that do queue wakeups in strange situations. Just letting a noop_qdisc get scheduled will work because when qdisc_run() executes via net_tx_work() it will simply find no packets pending when it makes the ->dequeue() call in qdisc_restart. Signed-off-by: David S. Miller commit 20b7997e8abdf338dcc27fb4f1333c4973a7f113 Merge: 5554b35... 7659150... Author: Linus Torvalds Date: Wed Jul 23 12:04:34 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: sdhci: highmem capable PIO routines sg: reimplement sg mapping iterator mmc_test: print message when attaching to card mmc: Remove Russell as primecell mci maintainer mmc_block: bounce buffer highmem support sdhci: fix bad warning from commit c8b3e02 sdhci: add warnings for bad buffers in ADMA path mmc_test: test oversized sg lists mmc_test: highmem tests s3cmci: ensure host stopped on machine shutdown au1xmmc: suspend/resume implementation s3cmci: fixes for section mismatch warnings pxamci: trivial fix of DMA alignment register bit clearing commit 5554b35933245e95710d709175e14c02cbc956a4 Merge: 0f6e38a... 7f1b358... Author: Linus Torvalds Date: Wed Jul 23 12:03:18 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (24 commits) I/OAT: I/OAT version 3.0 support I/OAT: tcp_dma_copybreak default value dependent on I/OAT version I/OAT: Add watchdog/reset functionality to ioatdma iop_adma: cleanup iop_chan_xor_slot_count iop_adma: document how to calculate the minimum descriptor pool size iop_adma: directly reclaim descriptors on allocation failure async_tx: make async_tx_test_ack a boolean routine async_tx: remove depend_tx from async_tx_sync_epilog async_tx: export async_tx_quiesce async_tx: fix handling of the "out of descriptor" condition in async_xor async_tx: ensure the xor destination buffer remains dma-mapped async_tx: list_for_each_entry_rcu() cleanup dmaengine: Driver for the Synopsys DesignWare DMA controller dmaengine: Add slave DMA interface dmaengine: add DMA_COMPL_SKIP_{SRC,DEST}_UNMAP flags to control dma unmap dmaengine: Add dma_client parameter to device_alloc_chan_resources dmatest: Simple DMA memcpy test client dmaengine: DMA engine driver for Marvell XOR engine iop-adma: fix platform driver hotplug/coldplug dmaengine: track the number of clients using a channel ... Fixed up conflict in drivers/dca/dca-sysfs.c manually commit 0f6e38a6381446eff5175b77d1094834a633a90f Merge: e669e81... 3b216c9... Author: Linus Torvalds Date: Wed Jul 23 11:59:37 2008 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb: kgdb: kgdboc console poll hooks for mpsc uart kgdb: kgdboc console poll hooks for cpm uart kgdb, powerpc: arch specific powerpc kgdb support kgdb: support for ARCH=arm kgdb: remove unused HAVE_ARCH_KGDB_SHADOW_INFO config variable commit e669e8179d364bb11ed51504e1a1c60830bff4c5 Merge: 876a425... fc41069... Author: Linus Torvalds Date: Wed Jul 23 11:59:09 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (60 commits) ide: small whitespace fixes ide: ide-cd_ioctl.c fix sparse integer as NULL pointer warnings ide: ide-cd.c fix sparse endianness warnings ide-cd: convert to using the new atapi_flags ide: remove unused PC_FLAG_DRQ_INTERRUPT ide-scsi: convert to using the new atapi_flags ide-tape: convert to using the new atapi_flags ide-floppy: convert to using the new atapi_flags (take 2) ide: add per-device flags ide: use rq->cmd instead of pc->c in atapi common code ide-scsi: pass packet command in rq->cmd ide-tape: pass packet command in rq->cmd ide-tape: make room for packet command ids in rq->cmd ide-floppy: pass packet command in rq->cmd ide: remove pc->callback member from ide_atapi_pc ide-scsi: use drive->pc_callback instead of pc->callback ide-tape: use drive->pc_callback instead of pc->callback ide-floppy: use drive->pc_callback instead of pc->callback ide: push pc callback pointer into the ide_drive_t structure drivers/ide/ide-tape.c: remove double kfree ... commit fc410698ebf7abfb64f0e2337b871298557f0575 Author: Pavel Machek Date: Wed Jul 23 19:56:02 2008 +0200 ide: small whitespace fixes Small whitespace fixes for drivers/ide. Signed-off-by: Pavel Machek Signed-off-by: Bartlomiej Zolnierkiewicz commit 1a677aba5e0e45cc5b2a04c059edfcf06c1ea9bb Author: Harvey Harrison Date: Wed Jul 23 19:56:02 2008 +0200 ide: ide-cd_ioctl.c fix sparse integer as NULL pointer warnings The function ide_cd_queue_pc should be checked as the bufflen arg is dereferenced and lots of callers are passing in NULL. drivers/ide/ide-cd_ioctl.c:124:46: warning: Using plain integer as NULL pointer drivers/ide/ide-cd_ioctl.c:149:47: warning: Using plain integer as NULL pointer drivers/ide/ide-cd_ioctl.c:231:46: warning: Using plain integer as NULL pointer drivers/ide/ide-cd_ioctl.c:374:46: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison Cc: Andrew Morton Acked-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 141d3b27fc4b4f97ca6d9b5c1cc8aeeab967dcfc Author: Harvey Harrison Date: Wed Jul 23 19:56:02 2008 +0200 ide: ide-cd.c fix sparse endianness warnings drivers/ide/ide-cd.c:1276:46: warning: Using plain integer as NULL pointer drivers/ide/ide-cd.c:1298:19: warning: cast to restricted __be32 drivers/ide/ide-cd.c:1300:4: warning: cast to restricted __be32 drivers/ide/ide-cd.c:1522:14: warning: cast to restricted __le16 drivers/ide/ide-cd.c:1523:14: warning: cast to restricted __le16 drivers/ide/ide-cd.c:1525:14: warning: cast to restricted __be16 drivers/ide/ide-cd.c:1526:14: warning: cast to restricted __be16 drivers/ide/ide-cd.c:1667:37: warning: cast to restricted __be16 Signed-off-by: Harvey Harrison Cc: Andrew Morton Acked-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 570f89ea5f3ee93756dc2293b83bdfedb8d35348 Author: Borislav Petkov Date: Wed Jul 23 19:56:02 2008 +0200 ide-cd: convert to using the new atapi_flags There should be no functionality change resulting from this patch. [bart: IDE_FLAG_* -> IDE_AFLAG_*, dev_flags -> atapi_flags] Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit ac77ef8b03677c8ae8afe77bccc5f6a969193a79 Author: Borislav Petkov Date: Wed Jul 23 19:56:01 2008 +0200 ide: remove unused PC_FLAG_DRQ_INTERRUPT There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit be4c916e96bcde629463d7577d4c402c7f6e6f3e Author: Borislav Petkov Date: Wed Jul 23 19:56:01 2008 +0200 ide-scsi: convert to using the new atapi_flags Remove unused IDESCSI_PC_RQ while at it. There should be no functionality change resulting from this patch. [bart: IDE_FLAG_* -> IDE_AFLAG_*, dev_flags -> atapi_flags] Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit f2e3ab52afb3b05879b9d82a05740cd924993325 Author: Borislav Petkov Date: Wed Jul 23 19:56:01 2008 +0200 ide-tape: convert to using the new atapi_flags There should be no functionality change resulting from this patch. [bart: IDE_FLAG_* -> IDE_AFLAG_*, dev_flags -> atapi_flags] Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit ea68d270ff55bcdfa5d07697eb68103b5b02c7bb Author: Borislav Petkov Date: Wed Jul 23 19:56:01 2008 +0200 ide-floppy: convert to using the new atapi_flags (take 2) while at it, remove PC_FLAG_ZIP_DRIVE from the packed command flags altogether and query the drive type through drive->atapi_flags. v2: ide-floppy fix. There should be no functionality change resulting from this patch. [bart: IDE_FLAG_* -> IDE_AFLAG_*, dev_flags -> atapi_flags] Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 3b8ac5398ca8137b41aa5da4d9fad89153450aaa Author: Borislav Petkov Date: Wed Jul 23 19:56:01 2008 +0200 ide: add per-device flags Push device flags up into ide_drive_t. There should be no functionality change resulting from this patch. [bart: IDE_FLAG_* -> IDE_AFLAG_*, dev_flags -> atapi_flags] Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 8fccf8995c6d462db50265a5f7fa9a288a5a4590 Author: Borislav Petkov Date: Wed Jul 23 19:56:01 2008 +0200 ide: use rq->cmd instead of pc->c in atapi common code There should be no functionality change resulting from this patch. [bart: s/HWGROUP(drive)/hwif->hwgroup/] Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 08feacf3bcc20c33e6a2a91d85d8190dd219d967 Author: Borislav Petkov Date: Wed Jul 23 19:56:00 2008 +0200 ide-scsi: pass packet command in rq->cmd Make a redundant copy of the packet command bits into rq->cmd. Later, after all drivers have been converted, it'll be switched to use that in the common code instead of pc->c. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 0014c75be31d9fa7435105afa9960374a82cc55c Author: Borislav Petkov Date: Wed Jul 23 19:56:00 2008 +0200 ide-tape: pass packet command in rq->cmd Make a redundant copy of the packet command bits into rq->cmd. Later, after all drivers have been converted, it'll be switched to use that in the common code instead of pc->c. While at it, simplify ide_tape_create_rw_cmd. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 83dd573513471c67f9cc93a88795c25a91ebf4b3 Author: Borislav Petkov Date: Wed Jul 23 19:56:00 2008 +0200 ide-tape: make room for packet command ids in rq->cmd ide-tape uses rq->cmd for special commands from the chrdev interface so move those to byte 13 (BLK_MAX_CDB = 16) since a packet cmd is max 12 bytes. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 20cd93be67f967c57e5abf62bf5652a00c66b9f0 Author: Borislav Petkov Date: Wed Jul 23 19:56:00 2008 +0200 ide-floppy: pass packet command in rq->cmd Make a redundant copy of the packet command bits into rq->cmd. Later, after all drivers have been converted, it'll be switched to use that in the common code instead of pc->c. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 8bcda3bc492c56abed33a8cbf824c410d7ce69f0 Author: Borislav Petkov Date: Wed Jul 23 19:56:00 2008 +0200 ide: remove pc->callback member from ide_atapi_pc There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit db9d286988b9e905045c536f681e85fa5e3a728b Author: Borislav Petkov Date: Wed Jul 23 19:55:59 2008 +0200 ide-scsi: use drive->pc_callback instead of pc->callback There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 776bb0270ea72c40f95347dcac868c9f602dcb3e Author: Borislav Petkov Date: Wed Jul 23 19:55:59 2008 +0200 ide-tape: use drive->pc_callback instead of pc->callback The if-else block in the IRQ handler is only temporary so that bisect searches don't break and it'll be removed after converting the remainder of the drivers. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 2207fa5af1507ea018fc95e777276edb1ca5601a Author: Borislav Petkov Date: Wed Jul 23 19:55:59 2008 +0200 ide-floppy: use drive->pc_callback instead of pc->callback It is important that drive->pc_callback is set prior to enabling IRQs on the device since this is called from the IRQ handler. Otherwise it hurts as I learnt the hard way from the several "Kernel panic - not synching: Fatal exception in interrupt" during the weekend :). The if-else block in the IRQ handler is only temporary so that bisect searches don't break and it'll be removed after converting the remainder of the drivers. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit d7c26ebb5bca284ece9db7311a9e180aabae1922 Author: Borislav Petkov Date: Wed Jul 23 19:55:59 2008 +0200 ide: push pc callback pointer into the ide_drive_t structure Refrain from carrying the callback ptr with every packet command since the callback function is only one anyways. ide_drive_t is probably not the most suitable place for it right now but is the more sane solution. Besides, these structs are going to be reorganized anyways during the generic ide rewrite. Signed-off-by: Borislav Petkov Signed-off-by: Bartlomiej Zolnierkiewicz commit 4b5075050072ed7c4730ee547ae80117c4fa8513 Author: Darren Jenkins Date: Wed Jul 23 19:55:59 2008 +0200 drivers/ide/ide-tape.c: remove double kfree Coverity CID: 2336 USE_AFTER_FREE drivers/ide/ide-tape.c ide_tape_kfree_buffer() double free's a pointer (hint freed by an alias in first outer loop). This patch simply removes the superfluous kfree(). Signed-off-by: Darren Jenkins Acked-by: Borislav Petkov Cc: gadio@netvision.net.il Signed-off-by: Bartlomiej Zolnierkiewicz commit 8a69580e1ea9516caada5eed202afd39546e9809 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:59 2008 +0200 ide: add ide_host_free() helper (take 2) * Add ide_host_free() helper and convert ide_host_remove() to use it. * Fix handling of ide_host_register() failure in ide_host_add(), icside.c, ide-generic.c, falconide.c and sgiioc4.c. While at it: * Fix handling of ide_host_alloc_all() failure in ide-generic.c. * Fix handling of ide_host_alloc() failure in falconide.c (also return the correct error value if no device is found). v2: * falconide build fix. (From Stephen Rothwell) Signed-off-by: Bartlomiej Zolnierkiewicz commit 18de10170df31d34b342612f1c896a16a52f0a5c Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:58 2008 +0200 ide: allocate ide_hwif_t instances dynamically * Allocate ide_hwif_t instances dynamically and remove ide_hwifs[]. This cuts almost ~14kB from ide-probe.o (x86-32, MAX_HWIFS == 10): text data bss dec hex filename 9140 40 14084 23264 5ae0 drivers/ide/ide-probe.o.before 9169 40 44 9253 2425 drivers/ide/ide-probe.o.after * Remove no longer needed ide_init_port_data() call from ide_unregister(). Signed-off-by: Bartlomiej Zolnierkiewicz commit af1cbba37343c827e116638b097b94f5e6c38963 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:58 2008 +0200 ide: add ide_ports[] * Add ide_ports[] table keeping pointers to all initialized ports. * Set ide_ports[] entry for a given port in init_irq() and clear it ide_remove_port_from_hwgroup(). * Convert init_irq() to use ide_ports[] instead of ide_hwifs[] for grouping ports into hwgroup. Signed-off-by: Bartlomiej Zolnierkiewicz commit 6059143ae34f30bb49ec8733468315284f78e2da Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:58 2008 +0200 ide: move ide_remove_port_from_hwgroup() to ide-probe.c Signed-off-by: Bartlomiej Zolnierkiewicz commit 8cdf310025bff8c5ef78564f525a8f347952237b Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:57 2008 +0200 ide: fix IDE port slots reservation and freeing (take 2) * Make ide_find_port_slot() return port slot index. * Add ide_free_port_slot() helper. * Move ide_init_port_data() call and error printk() from ide_find_port_slot() to ide_host_alloc_all(). * Make ide_{find,free}_port_slot() take ide_cfg_mtx mutex and convert them use ide_indexes bitmap to keep track of reserved port slots. * Don't set hwif->chipset in ide_host_alloc_all() as it is no longer necessary. v2: * Pass the correct slot index to ide_init_port_data(). Signed-off-by: Bartlomiej Zolnierkiewicz commit e0d0020788543febd10ab933bde0fa181b627f4f Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:57 2008 +0200 ide: fix ide_host_register() return value Fix ide_host_register() to fail only if all ports cannot be registered. While at it: * Use host->ports[] instead of ide_hwifs[] and remove idx[]. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 6f904d015262dfa43eb1cecc00b0998b4c3543f2 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:57 2008 +0200 ide: add ide_host_add() helper Add ide_host_add() helper which does ide_host_alloc()+ide_host_register(), then convert ide_setup_pci_device[s](), ide_legacy_device_add() and some host drivers to use it. While at it: * Fix ide_setup_pci_device[s](), ide_arm.c, gayle.c, ide-4drives.c, macide.c, q40ide.c, cmd640.c and cs5520.c to return correct error value. * -ENOENT -> -ENOMEM in rapide.c, ide-h8300.c, ide-generic.c, au1xxx-ide.c and pmac.c * -ENODEV -> -ENOMEM in palm_bk3710.c, ide_platform.c and delkin_cb.c * -1 -> -ENOMEM in ide-pnp.c Signed-off-by: Bartlomiej Zolnierkiewicz commit 48c3c1072651922ed153bcf0a33ea82cf20df390 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:57 2008 +0200 ide: add struct ide_host (take 3) * Add struct ide_host which keeps pointers to host's ports. * Add ide_host_alloc[_all]() and ide_host_remove() helpers. * Pass 'struct ide_host *host' instead of 'u8 *idx' to ide_device_add[_all]() and rename it to ide_host_register[_all](). * Convert host drivers and core code to use struct ide_host. * Remove no longer needed ide_find_port(). * Make ide_find_port_slot() static. * Unexport ide_unregister(). v2: * Add missing 'struct ide_host *host' to macide.c. v3: * Fix build problem in pmac.c (s/ide_alloc_host/ide_host_alloc/) (Noticed by Stephen Rothwell). Signed-off-by: Bartlomiej Zolnierkiewicz commit 374e042c3e767ac2e5a40b78529220e0b3de793c Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:56 2008 +0200 ide: add struct ide_tp_ops (take 2) * Add struct ide_tp_ops for transport methods. * Add 'const struct ide_tp_ops *tp_ops' to struct ide_port_info and ide_hwif_t. * Set the default hwif->tp_ops in ide_init_port_data(). * Set host driver specific hwif->tp_ops in ide_init_port(). * Export ide_exec_command(), ide_read_status(), ide_read_altstatus(), ide_read_sff_dma_status(), ide_set_irq(), ide_tf_{load,read}() and ata_{in,out}put_data(). * Convert host drivers and core code to use struct ide_tp_ops. * Remove no longer needed default_hwif_transport(). * Cleanup ide_hwif_t from methods that are now in struct ide_tp_ops. While at it: * Use struct ide_port_info in falconide.c and q40ide.c. * Rename ata_{in,out}put_data() to ide_{in,out}put_data(). v2: * Fix missing convertion in ns87415.c. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit d6276b5f5cc7508124de291f3ed59c6945c17ae7 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:56 2008 +0200 ide: add 'config' field to hw_regs_t Add 'config' field to hw_regs_t and use it to set hwif->config_data in ide_init_port_hw(), then convert ide_legacy_init_one() to use hw->config. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit edc74b247bedb3a1f80eb6371d4171f2d49c1c77 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:56 2008 +0200 ide-generic: probing fix * Don't skip probing IDE port if the corresponding ide_hwifs[] slot is already occupied. * Remove duplicate idx[i] assignment. Signed-off-by: Bartlomiej Zolnierkiewicz commit 73dc532bc1eebe3bff6b918c5685a219eae27f97 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:56 2008 +0200 gayle: reserve memory resources at once * Reserve memory resources for all IDE ports at once by moving request_mem_region() out of 'for ()' loop and always defining GAYLE_IDEREG_SIZE to 0x2000. * Keep memory resources even if no free IDE slots can be found (this driver is unloadable currently). Cc: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz commit 3b2a5c7149ee4af4aff8fee953f66fc846d92cea Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:56 2008 +0200 ide: filter out "default" transfer mode values in set_xfer_rate() * Filter out "default" transfer mode values (0x00 - default PIO mode, 0x01 - default PIO mode w/ IORDY disabled) in write handler for obsoleted /proc/ide/hd?/settings:current_speed setting. Allowing "default" transfer mode values is a dangerous thing to do as we don't support programming controller to the "default" transfer mode and devices often use different values for the default and maximum PIO mode (i.e. PIO2 default and PIO4 maximum) so the controller will stay programmed for higher PIO mode while device will use the lower PIO mode. There is no functionality loss as by using special IOCTLs device can still be programmed to "default" transfer modes (it is only useful for debugging/testing purposes anyway). * Remove no longer needed IDE_HFLAG_ABUSE_SET_DMA_MODE host flag, it was previously used by few host drivers to program the controller to PIO0 timings for "default" transfer mode == 0x01 (although some host drivers would program invalid PIO timings instead). * Cleanup ide_set_xfer_rate() and add BUG_ON(). Suggested-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit c30daac190de23779090c645e680c7977377032c Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:55 2008 +0200 ide: filter out invalid transfer mode values in set_xfer_rate() Filter out invalid transfer mode values (0x02-0x07) in write handler for obsoleted /proc/ide/hd?/settings:current_speed setting. While at it: * Use XFER_UDMA_6 define. Suggested-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz commit ba4b2e607e4e9eaa929935325dafd5c86d3b5262 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:55 2008 +0200 ide: remove dead Virtual DMA support Lets remove dead Virtual DMA support for now so it doesn't clutter core IDE code (it can be bring back when there is a need for it): * Remove IDE_HFLAG_VDMA host flag. * Remove ide_drive_t.vdma flag. * cs5520.c: remove stale FIXMEs, cs5520_dma_host_set() and cs5520_dma_ops (also there is no longer a need to set IDE_HFLAG_NO_ATAPI_DMA). There should be no functional changes caused by this patch. Cc: TAKADA Yoshihito Signed-off-by: Bartlomiej Zolnierkiewicz commit 472b4bc1af50431e08130c786ef0612f5b641839 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:55 2008 +0200 ide: mark hpt34x host driver as BROKEN Alan Cox has noticed some time ago that hpt34x is broken (http://lkml.org/lkml/2007/7/3/257): "No the old driver doesn't even do that. It starts up. It spuriously adjusts some non writable PCI BAR registers, prints a message about resources being in use already then exits." Reported-by: Alan Cox Signed-off-by: Bartlomiej Zolnierkiewicz commit cbf3d262e0b70652d602b9c072daf1c1f29dccf0 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:54 2008 +0200 ide: limit cy82c693 host driver to ALPHA Cc: Ivan Kokshaysky Signed-off-by: Bartlomiej Zolnierkiewicz commit 761052e676372465fdeb97c148d5a4b0790fa8a0 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:54 2008 +0200 ide: remove ->INB, ->OUTB and ->OUTBSYNC methods * Remove no longer needed ->INB, ->OUTB and ->OUTBSYNC methods. Then: * Remove no longer used default_hwif_[mm]iops() and ide_[mm_]outbsync(). * Cleanup SuperIO handling in ns87415.c. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 1823649b5abb77ffe638178bc5253249d3ecd17d Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:54 2008 +0200 ide: add ide_read_bcount_and_ireason() helper Add ide_read_bcount_and_ireason() helper and use it instead of ->INB in {cdrom_newpc,ide_pc}_intr(). Signed-off-by: Bartlomiej Zolnierkiewicz commit 88a72109b2256bf2974f324a8f890b4a06faf7e9 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:54 2008 +0200 ide: add ide_read_ireason() helper Add ide_read_ireason() helper and use instead of ->INB for reading ATAPI Interrupt Reason register. Signed-off-by: Bartlomiej Zolnierkiewicz commit 1f2efb82af3cfbac995f590a8f8d3beb6fa5678b Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:54 2008 +0200 ide: add ide_read_device() helper Add ide_read_device() helper and convert do_probe() to use it instead of ->INB. Signed-off-by: Bartlomiej Zolnierkiewicz commit 92eb43800a3c1300bd5cb8a2a27e6f2a84f7042e Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:53 2008 +0200 ide: use ->tf_read in ide_read_error() * Add IDE_TFLAG_IN_FEATURE taskfile flag for reading Feature register and handle it in ->tf_read. * Convert ide_read_error() to use ->tf_read instead of ->INB, then uninline and export it. Signed-off-by: Bartlomiej Zolnierkiewicz commit 40f095f0138ea5b5971e5128b27e1bb907161149 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:53 2008 +0200 ide: use ->tf_load in SELECT_DRIVE() Convert SELECT_DRIVE() to use ->tf_load instead of ->OUTB. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 4e65837b293f3ee6399006e94120d61430f72f26 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:53 2008 +0200 ide: use ->tf_load in actual_try_to_identify() Convert actual_try_to_identify() to use ->tf_load instead of ->OUTB. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 59be2c80f0c1080634006135aa9130f1736fbfba Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:52 2008 +0200 ide: use ->tf_load in ide_config_drive_speed() Convert ide_config_drive_speed() to use ->tf_load instead of ->OUTB. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 3c09384e95fa4048a06f179849901f3e57266d58 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:52 2008 +0200 ide: change order of register access in ide_config_drive_speed() Write ATA Feature register before ATA Sector Count register as a preparation to use ->tf_load in ide_config_drive_speed(). This change shouldn't affect anything (just an usual paranoia). Signed-off-by: Bartlomiej Zolnierkiewicz commit 6e6afb3b7401f0181da74a1add57f126946b43e6 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:52 2008 +0200 ide: add ->set_irq method Add ->set_irq method for setting nIEN bit of ATA Device Control register and use it instead of ide_set_irq(). While at it: * Use ->set_irq in init_irq() and do_reset1(). * Don't use HWIF() macro in ide_check_pm_state(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 1f6d8a0fd8f6cc5ee2219a8cf9b2da16dfd67397 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:52 2008 +0200 ide: add ->read_altstatus method * Remove ide_read_altstatus() inline helper. * Add ->read_altstatus method for reading ATA Alternate Status register and use it instead of ->INB. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit b73c7ee25da6133f97f47ffd3557288417da7c76 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:52 2008 +0200 ide: add ->read_status method * Remove ide_read_status() inline helper. * Add ->read_status method for reading ATA Status register and use it instead of ->INB. While at it: * Don't use HWGROUP() macro. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit c6dfa867bb45f4bff2e48f3bc89ab1d6a7ab4c21 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:51 2008 +0200 ide: add ->exec_command method Add ->exec_command method for writing ATA Command register and use it instead of ->OUTBSYNC. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit ebb00fb55d0566bb3e81518122a57b4b3bedf1e4 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:51 2008 +0200 ide: factor out simplex handling from ide_pci_dma_base() * Factor out simplex handling from ide_pci_dma_base() to ide_pci_check_simplex(). * Set hwif->dma_base early in ->init_dma method / ide_hwif_setup_dma() and reset it in ide_init_port() if DMA initialization fails. * Use ->read_sff_dma_status instead of ->INB in ide_pci_dma_base(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit 81e8d5a34f7d2a2acbe309cfa5810a9699a63239 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:51 2008 +0200 ide: remove ide_setup_dma() Export sff_dma_ops and then remove ide_setup_dma(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit cab7f8eda40d3e3e16b137c67cdddc2cf893c5d7 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:51 2008 +0200 ide: remove ->dma_{status,command} fields from ide_hwif_t * Use ->dma_base + offset instead of ->dma_{status,command} and remove no longer needed ->dma_{status,command}. While at it: * Use ATA_DMA_* defines. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit ab86f91e8739e0b1587a16e4792ab5e4bb11f1b5 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:50 2008 +0200 ide: use I/O ops directly in ide-dma.c Use I/O ops directly in ide_dma_host_set(), ide_dma_setup(), ide_dma_start() and __ide_dma_end(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit b2f951aabc9cc7d5fb987aeec9aef96ccce618a5 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:50 2008 +0200 ide: add ->read_sff_dma_status method Add ->read_sff_dma_status method for reading DMA Status register and use it instead of ->INB. While at it: * Use inb() directly in ns87415.c::ns87415_dma_end(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit c97c6aca75fd5f718056fde7cff798b8cbdb07c0 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:50 2008 +0200 ide: pass hw_regs_t-s to ide_device_add[_all]() (take 3) * Add 'hw_regs_t **hws' argument to ide_device_add[_all]() and convert host drivers + ide_legacy_init_one() + ide_setup_pci_device[s]() to use it instead of calling ide_init_port_hw() directly. [ However if host has > 1 port we must still set hwif->chipset to hint consecutive ide_find_port() call that the previous slot is occupied. ] * Unexport ide_init_port_hw(). v2: * Use defines instead of hard-coded values in buddha.c, gayle.c and q40ide.c. (Suggested by Geert Uytterhoeven) * Better patch description. v3: * Fix build problem in ide-cs.c. (Noticed by Stephen Rothwell) There should be no functional changes caused by this patch. Cc: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz commit 51d87ed0aab98999bebaf891b99730e15502a592 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:49 2008 +0200 ide: move ide_pci_setup_ports() call out from do_ide_setup_pci_device() * Move ide_pci_setup_ports() call out from do_ide_setup_pci_device() to ide_setup_pci_device[s](). * Drop no longer needed idx argument from do_ide_setup_pci_device(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz commit b36ba53218e164e49623e36fa3a2fec9f08cf70a Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:49 2008 +0200 ide-pmac: move ide_find_port() call to pmac_ide_setup_device() (take 2) Move ide_find_port() call to pmac_ide_setup_device(). While at it: - fix return value (s/-ENODEV/-ENOENT/) - add DRV_NAME define and use it to set name field of pmac_port_info - use ide_find_port_slot() instead of ide_find_port() - remove superfluous error message (ide_find_port_slot() takes care of it) - drop IDE interface number from driver banner message (but include bus type) v2: * Build fix (thanks to Stephen Rothwell for noticing the issue). Cc: Benjamin Herrenschmidt Cc: Stephen Rothwell Signed-off-by: Bartlomiej Zolnierkiewicz commit 07eb106f3a69400b628b7b6ca3464a1a8f847fa3 Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:49 2008 +0200 ide-pmac: add ->init_dev method (take 4) v2/3: * Build fixes from Stephen Rothwell. v4: * Fix ->noprobe setting. (From Benjamin Herrenschmidt) Cc: Benjamin Herrenschmidt Cc: Stephen Rothwell Signed-off-by: Bartlomiej Zolnierkiewicz commit 7b8797acd499d59ed03c7a5b98d82cdf054fd04d Author: Bartlomiej Zolnierkiewicz Date: Wed Jul 23 19:55:48 2008 +0200 ide-pmac: store pmif instead of hwif in ->driver_data (take 2) * Pass pmif instead of hwif to pmac_ide_do_{suspend,resume}(). * Store pmif instead of hwif in ->driver_data. * Use dev_get_drvdata() instead of ->hwif_data to obtain pmif. v2: * Build fixes from Stephen Rothwell. There should be no functional changes caused by this patch. Cc: Benjamin Herrenschmidt Cc: Stephen Rothwell Signed-off-by: Bartlomiej Zolnierkiewicz commit 876a4256d25b7fd7917f53e767da1ebdf3168457 Merge: 7c1fed0... b22d837... Author: Linus Torvalds Date: Wed Jul 23 09:44:31 2008 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: apple_fn_keys F5 and F6 HID: remove quirk lookup from usbkbd/usbmouse HID: Add mapping of new KEY_MEDIA_REPEAT keycode HID: gyration remote support HID: gyration sleep button quirk HID: add quirk for Logitech DiNovo desktop HID: fix quirk handling in usbmouse/kbd HID: fix memory leak in hidraw_release HID: add n-trig digitizer usage HID: Invert HWHEEL mappings for some Logitech mice HID:usbkbd:mark usb_kbd_keycode array as const HID: add fn key support on Macbook Pro 4,1 and Macbook Air HID: remove unused variable from hiddev compat ioctl HID: fix compile issue in hiddev ioctl HID: Push down BKL into ioctl handler in hidraw HID: Switch hiddev to unlocked_ioctl HID: use get/put_unaligned_* helpers HID: fix report descriptor handling for MS Wireless model 1028 commit 7c1fed03b9fa32d4323d5caa6a9c7dcdd7eba767 Author: Jeff Dike Date: Wed Jul 23 11:46:50 2008 -0400 UML - Fix boot crash My copying of linux/init.h didn't go far enough. The definition of __used singled out gcc minor version 3, but didn't care what the major version was. This broke when unit-at-a-time was added and gcc started throwing out initcalls. This results in an early boot crash when ptrace tries to initialize a process with an empty, uninitialized register set. Signed-off-by: Jeff Dike Signed-off-by: Linus Torvalds commit 4d8f54d9e4323baae8c8ca753db91563f4b34ddb Author: Huang Weiyi Date: Wed Jul 23 22:45:20 2008 +0800 drivers/char/nvram.c: Removed duplicated include Removed duplicated include file in drivers/char/nvram.c. Signed-off-by: Huang Weiyi Signed-off-by: Linus Torvalds commit 2db873211ba47ef704c301f9ecf4a33413a0b649 Author: Uwe Kleine-König Date: Wed Jul 23 14:42:25 2008 +0200 set_irq_wake: fix return code and wake status tracking Since 15a647eba94c3da27ccc666bea72e7cca06b2d19 set_irq_wake returned -ENXIO if another device had it already enabled. Zero is the right value to return in this case. Moreover the change to desc->status was not reverted if desc->chip->set_wake returned an error. Signed-off-by: Uwe Kleine-König Acked-by: David Brownell Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Russell King Cc: Andrew Morton Signed-off-by: Linus Torvalds commit 3b216c9ed347924efb5e7a66b3257c40a5596d30 Author: Jason Wessel Date: Wed Jul 23 11:30:16 2008 -0500 kgdb: kgdboc console poll hooks for mpsc uart Add in console polling hooks for the mpsc uart for use with kgdb and kgdboc. Signed-off-by: Jason Wessel commit 8e21d04c077c50284bdad10fda8f8cea674458e1 Author: Jason Wessel Date: Wed Jul 23 11:30:16 2008 -0500 kgdb: kgdboc console poll hooks for cpm uart Add in console polling hooks for the cpm uart for use with kgdb and kgdboc. Signed-off-by: Jason Wessel CC: galak@kernel.crashing.org commit 17ce452f7ea3df760b7f9f42453b6f6acd765217 Author: Jason Wessel Date: Wed Jul 23 11:30:15 2008 -0500 kgdb, powerpc: arch specific powerpc kgdb support This patch removes the old kgdb reminants from ARCH=powerpc and implements the new style arch specific stub for the common kgdb core interface. It is possible to have xmon and kgdb in the same kernel, but you cannot use both at the same time because there is only one set of debug hooks. The arch specific kgdb implementation saves the previous state of the debug hooks and restores them if you unconfigure the kgdb I/O driver. Kgdb should have no impact on a kernel that has no kgdb I/O driver configured. Signed-off-by: Jason Wessel commit 5cbad0ebf45c5417104b383dc0e34f64fa7f2473 Author: Jason Wessel Date: Wed Feb 20 13:33:40 2008 -0600 kgdb: support for ARCH=arm This patch adds the ARCH=arm specific a kgdb backend, originally written by Deepak Saxena and George Davis . Geoff Levand , Nicolas Pitre, Manish Lachwani, and Jason Wessel have contributed various fixups here as well. The KGDB patch makes one change to the core ARM architecture such that the traps are initialized early for use with the debugger or other subsystems. [ mingo@elte.hu: small cleanups. ] [ ben-linux@fluff.org: fixed early_trap_init ] Signed-off-by: Jason Wessel Acked-by: Deepak Saxena commit 68afab1cb31436fc9b256a5f44771fa58ed019e2 Author: Jason Wessel Date: Wed Jul 23 11:30:15 2008 -0500 kgdb: remove unused HAVE_ARCH_KGDB_SHADOW_INFO config variable Remove HAVE_ARCH_KGDB_SHADOW_INFO because it does not exist anywhere in the kernel mainline sources Signed-off-by: Jason Wessel commit 76442640829163d0cdb67c2bf0cb4b81a0fe537b Author: Roland Dreier Date: Wed Jul 23 08:12:47 2008 -0700 mlx4_core: Improve error message when not enough UAR pages are available If an mlx4 device with default FW (which gives a UAR BAR size of 8 MB) is used in a system with 64 KB pages, then there are only 8192/64==128 UAR pages available. However, the first 128 UAR pages are reserved for use with event queue doorbells, so no UAR pages are available to do anything else with, which means that the driver cannot work. The current driver fails with a fairly cryptic "Failed to allocate driver access region, aborting" message in this situation. Fix the driver to detect the problem earlier and print out a clearer description of the problem and a suggestion of how to fix it (use a new firmware image). Signed-off-by: Roland Dreier commit 95d04f0735b4fc837bff9aedcc3f3efb20ddc3d1 Author: Roland Dreier Date: Wed Jul 23 08:12:26 2008 -0700 IB/mlx4: Add support for memory management extensions and local DMA L_Key Add support for the following operations to mlx4 when device firmware supports them: - Send with invalidate and local invalidate send queue work requests; - Allocate/free fast register MRs; - Allocate/free fast register MR page lists; - Fast register MR send queue work requests; - Local DMA L_Key. Signed-off-by: Roland Dreier commit b22d8370061898f3029cdc2601fbdec493443f03 Merge: 00b3327... 6a25077... Author: Jiri Kosina Date: Wed Jul 23 15:26:10 2008 +0200 Merge branches 'upstream' and 'upstream-fixes' into for-linus commit 6a250778c79d6d14db9ed8e1f86f7b934e2bf3dc Author: Henrik Rydberg Date: Tue Jul 22 15:54:05 2008 +0200 HID: apple_fn_keys F5 and F6 In drivers/hid/hid-input.c, the apple_fn_keys translation table contains no entries for the F5 and F6 keys. This patch maps the F5 and F6 keys to KBDILLUMDOWN and KBDILLUMUP, respektively, which make them work as keyboard backlight control keys. Signed-off-by: Henrik Rydberg Signed-off-by: Jiri Kosina commit acc0b7c40983c316bc69d97b1acf05a228b0d61e Author: Jiri Kosina Date: Mon Jul 21 18:30:05 2008 +0200 HID: remove quirk lookup from usbkbd/usbmouse This patch completely removes the dependency of usbkbd and usbmouse drivers on usbhid code. usbkbd/usbmouse drivers are not needed in the vast majority of cases anyway, and they shouldn't be loaded in standard configurations at all. They are supposed to be as trivial as possible, and searching for HID_QUIRK_IGNORE can even be bad in some cases. Signed-off-by: Jiri Kosina commit 094403ce3ec30e9819b1526134a948a1c92d1421 Author: Dmitry Torokhov Date: Fri Jul 4 12:48:20 2008 -0400 HID: Add mapping of new KEY_MEDIA_REPEAT keycode Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit a7f32697ed571d8a222ff9e77b9f4476e877ed1a Author: Daniel Walker Date: Fri Jul 4 15:23:10 2008 +0200 HID: gyration remote support This adds in a quirk for the additional un-mapped buttons on the gyration MCE remote. Defines are now alphabetical. Signed-off-by: Daniel Walker Signed-off-by: Jiri Kosina commit 32146dc90860b3847b945fdb220a7d86c1ead92a Author: Jiri Kosina Date: Fri Jul 4 15:22:53 2008 +0200 HID: gyration sleep button quirk This patch is based on one provided by Jiri Kosina to handle the sleep button. I just added some cleanup and integrated it into my series. Signed-off-by: Daniel Walker Signed-off-by: Jiri Kosina commit 2c3e3bfbb667f486579d6742b481058e4316dafd Author: Jiri Kosina Date: Tue Jul 1 12:35:16 2008 +0200 HID: add quirk for Logitech DiNovo desktop Logitech DiNovo desktop needs the same quirk as other DiNovo devices. Reported-by: Farid Benamrouche Signed-off-by: Jiri Kosina commit dc25b78f21384f534a8a5da9600972aa9a51a680 Author: Jiri Slaby Date: Fri Jun 27 22:09:25 2008 +0200 HID: fix quirk handling in usbmouse/kbd When usbmouse/kbd is set to build, USB_HID is never defined due to the USB_HID!=y Kconfig rule. Test CONFIG_USB_HID_MODULE in both drivers instead. Signed-off-by: Jiri Slaby Signed-off-by: Jiri Kosina commit 4db1c62c9991e62b441672db7f227e722776adc4 Author: Jiri Kosina Date: Tue Jun 24 14:45:27 2008 +0200 HID: fix memory leak in hidraw_release hidraw_release() forgot to free the linked list structure, causing memory leak. Reported-by: Juan Marcos Diez Esteban Signed-off-by: Jiri Kosina commit f472f80034ae5d0be7d7196c7e65d0ca8890afb4 Author: Rafi Rubin Date: Thu Jun 19 11:51:04 2008 +0200 HID: add n-trig digitizer usage This adds a hid usage that is reported by the N-Trig digitizer in the Dell Latitude XT screen. Signed-off-by: Rafi Rubin Signed-off-by: Vojtech Pavlik Signed-off-by: Jiri Kosina commit 740f370dc61dc478d891d7d47660bb3ae39ddb4f Author: Dan Nicholson Date: Sat Jun 14 10:26:24 2008 -0700 HID: Invert HWHEEL mappings for some Logitech mice Some Logitech mice have a tilt wheel which register as HWHEEL buttons. The events are positive for a click to the right and negative for a click to the left. Applications expect the opposite, though. I suspect this affects a lot more Logitech mice, but these are the only two I have. I tested this using evtest and a GTK application. A similar Microsoft Intellimouse I have works correctly. Signed-off-by: Dan Nicholson Signed-off-by: Jiri Kosina commit a44ebccea873cf7d58b63605f1cdd6da9dfec70f Author: Ming Lei Date: Sun Jun 8 16:15:16 2008 +0800 HID:usbkbd:mark usb_kbd_keycode array as const mark it as const because it is read only Signed-off-by: Ming Lei Signed-off-by: Jiri Kosina commit 37cdffdadf7ad1b28fa4bd14bb904f4f612e5ae3 Author: Alexandre Karpenko Date: Wed Jun 4 10:31:24 2008 +0200 HID: add fn key support on Macbook Pro 4,1 and Macbook Air Added device ids to hid-quriks for detection of keyboards on 4th generation Macbook Pro and Macbook Air The naming scheme is consistent with past Apple keyboards in hid-quirks; as defined by Apple (including device ids) in: /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/Co ntents/Info.plist Patch was originally posted and tested at: https://bugs.launchpad.net/mactel-support/+bug/207127 Signed-off-by: Alexandre Karpenko Signed-off-by: Andrew Morton Signed-off-by: Jiri Kosina commit 00b33277fa544676250d898fccea0a0255608e7f Author: Jiri Kosina Date: Wed Jun 4 15:29:42 2008 +0200 HID: remove unused variable from hiddev compat ioctl Remove unused inode variable from hiddev compat ioctl handler. Signed-off-by: Jiri Kosina commit 88af45bafdda8f892c9d45ce38d55fdf7e734513 Author: Jiri Kosina Date: Tue May 27 11:36:40 2008 +0200 HID: fix compile issue in hiddev ioctl Fix build failure introduced by Alan's ioctl -> unlocked_ioctl (pushing BKL down to the driver) conversion patch for hiddev. Signed-off-by: Jiri Kosina commit 979c407e3b89b606e810fa494ef316896eadbfad Author: Alan Cox Date: Mon May 26 11:25:26 2008 +0200 HID: Push down BKL into ioctl handler in hidraw In this case I simply wrapped it as code review suggests the locking already terminally broken and I didn't want to make it first. See added comment Signed-off-by: Alan Cox Signed-off-by: Jiri Kosina commit 7961df16819085b8a357720d89d0239036e6af2a Author: Alan Cox Date: Mon May 26 11:25:20 2008 +0200 HID: Switch hiddev to unlocked_ioctl Push down the BKL. In some cases compat_ioctl already doesn't take the BKL so we don't either. Some of the locking here seems already dubious and object lifetimes want documenting Signed-off-by: Alan Cox Signed-off-by: Jiri Kosina commit 6f0168d2dacd7972d887e1ca27943ef8af7512a5 Author: Harvey Harrison Date: Fri May 16 11:00:23 2008 +0200 HID: use get/put_unaligned_* helpers Signed-off-by: Harvey Harrison Signed-off-by: Andrew Morton Signed-off-by: Jiri Kosina commit 9063974cdbc5463528cb6aa60c91bc0267af7bbb Merge: d6d6a86... c010b2f... Author: Jiri Kosina Date: Wed Jul 23 15:19:00 2008 +0200 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 commit 7659150c60839a2bd31f74e866374abb9be17e43 Author: Pierre Ossman Date: Mon Jul 21 00:32:11 2008 +0200 sdhci: highmem capable PIO routines Improve the PIO handling so that it can service highmem pages. Signed-off-by: Pierre Ossman commit 137d3edb48425f82a6a4226b664f90ed5e42eea5 Author: Tejun Heo Date: Sat Jul 19 23:03:35 2008 +0900 sg: reimplement sg mapping iterator This is alternative implementation of sg content iterator introduced by commit 83e7d317... from Pierre Ossman in next-20080716. As there's already an sg iterator which iterates over sg entries themselves, name this sg_mapping_iterator. Slightly edited description from the original implementation follows. Iteration over a sg list is not that trivial when you take into account that memory pages might have to be mapped before being used. Unfortunately, that means that some parts of the kernel restrict themselves to directly accesible memory just to not have to deal with the mess. This patch adds a simple iterator system that allows any code to easily traverse an sg list and not have to deal with all the details. The user can decide to consume part of the iteration. Also, iteration can be stopped and resumed later if releasing the kmap between iteration steps is necessary. These features are useful to implement piecemeal sg copying for interrupt drive PIO for example. Signed-off-by: Tejun Heo Signed-off-by: Pierre Ossman commit 60c9c7b1d91396f511e55a2a5be13d148dcf66ff Author: Pierre Ossman Date: Tue Jul 22 14:38:35 2008 +0200 mmc_test: print message when attaching to card Make it a bit more obvious that the card has been claimed by the mmc_test driver so that people don't have to wonder why their block device never shows up. Signed-off-by: Pierre Ossman commit 6d79947a2d34470311012c3ee45ad33650a7f192 Author: Pierre Ossman Date: Tue Jul 22 14:36:57 2008 +0200 mmc: Remove Russell as primecell mci maintainer Russell no longer has the resources to fully test the controller, so he is stepping down as maintainer. Signed-off-by: Pierre Ossman commit 2ff1fa679115e3c8c78ad74ad8fd2d7fd87ae4e7 Author: Pierre Ossman Date: Tue Jul 22 14:35:42 2008 +0200 mmc_block: bounce buffer highmem support Support highmem pages in the bounce buffer code by using the sg_copy_from/to_buffer() functions. Signed-off-by: Pierre Ossman commit 719a61b452ff74cf81a96e4212748d9d63bcc924 Author: Pierre Ossman Date: Tue Jul 22 13:23:23 2008 +0200 sdhci: fix bad warning from commit c8b3e02 Commit c8b3e02 renamed a variable, but missed one reference to it inside a WARN_ON, causing it to incorrectly trigger. Signed-off-by: Pierre Ossman commit 6cefd05f35177ad5d22d44519c680cf43f2ac86d Author: Pierre Ossman Date: Mon Jul 21 00:45:15 2008 +0200 sdhci: add warnings for bad buffers in ADMA path The ADMA code path assumes that the 3 byte alignment fix doesn't cross a page boundary. I'm not convinced this is worth supporting, but at least print a warning in the off chance we'll actually see such a request. Signed-off-by: Pierre Ossman commit 48b5352ea1891455eb8e824cf7d92f66931a090f Author: Pierre Ossman Date: Mon Jul 21 00:14:52 2008 +0200 mmc_test: test oversized sg lists Add tests that make sure the driver properly checks the blocks and blksz fields and doesn't assume the sg list has a size that perfectly matches the current request. Signed-off-by: Pierre Ossman commit 2661081f5ab9cb25359d27f88707a018cf4e68e9 Author: Pierre Ossman Date: Fri Jul 4 18:17:13 2008 +0200 mmc_test: highmem tests Add a couple of tests to make sure the host driver handles highmem memory pages properly. Unfortunately there is no way to guarantee an allocation below 4 GB in i386, so it might give you addresses that are out of reach for the hardware (OTOH, so will any other highmem allocation in the kernel). Signed-off-by: Pierre Ossman commit 907b2cd6dbbdfd6a4be7908f57b1498dfabc880e Author: Ben Dooks Date: Thu Jul 17 15:32:54 2008 +0100 s3cmci: ensure host stopped on machine shutdown Ensure that the s3cmci host controller is turned off when the machine is shutdown, otherwise we end up leaving the card powered and processing insertion and removal events after the system prints "System halted." Signed-off-by: Ben Dooks Signed-off-by: Pierre Ossman commit dd8572af68229a65b6716b286395ad7f5e2ecc48 Author: Manuel Lauss Date: Thu Jul 17 13:07:28 2008 +0200 au1xmmc: suspend/resume implementation Basic suspend/resume support: disable peripheral on suspend and reinit on resume. Tested on Au1200. Signed-off-by: Manuel Lauss Signed-off-by: Pierre Ossman commit d2f2761bb75ee365077b52c7e73a6e5164d3efa0 Author: Ben Dooks Date: Thu Jul 17 11:54:01 2008 +0100 s3cmci: fixes for section mismatch warnings Fix the naming of various functions in the s3cmc driver to stop triggering section mismatch warnings. Signed-off-by: Ben Dooks Signed-off-by: Pierre Ossman commit 4fe16897c59882420d66f2d503106653d026ed6c Author: Karl Beldan Date: Wed Jul 16 18:29:11 2008 +0200 pxamci: trivial fix of DMA alignment register bit clearing Signed-off-by: Karl Beldan Acked-by: Eric Miao Signed-off-by: Pierre Ossman commit 36bd53d07243ae83c1b73bae549086cea2252854 Author: Andrew Morton Date: Wed Jul 23 00:58:13 2008 -0700 arch/mips/kernel/stacktrace.c: Heiko can't type Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar commit 422037bafde8083acc3c539ceba3dfc60a04110c Author: Ingo Molnar Date: Wed Jul 23 11:16:38 2008 +0200 sched: fix hrtick & generic-ipi dependency Andrew Morton reported this s390 allmodconfig build failure: kernel/built-in.o: In function `hrtick_start_fair': sched.c:(.text+0x69c6): undefined reference to `__smp_call_function_single' the reason is that s390 is not a generic-ipi SMP platform yet, while the hrtick code relies on it. Fix the dependency. Signed-off-by: Ingo Molnar commit f6ec2d96796d0accda6c325890206f3629130729 Author: Sebastian Siewior Date: Wed Jul 16 23:05:49 2008 +0100 backlight: Fix missing kernel doc entry Signed-off-by: Sebastian Siewior Signed-off-by: Richard Purdie commit 7be35c72e6454059a33ad844153349973d22fcb7 Author: Matthew Garrett Date: Mon Jun 9 21:56:16 2008 +0100 backlight: Add Nvidia-based Apple Macbook Pro backlight driver Nvidia-based Apple Macbook Pros don't appear to handle backlight control through the graphics card registers or ACPI, but instead trigger changes via SMI calls. This driver registers a generic backlight device that lets existing userspace deal with it. Code derived from Julien Blache's Pommed application. Signed-off-by: Julien Blache Signed-off-by: Matthew Garrett Signed-off-by: Richard Purdie commit fe3025b55c8ed06929afe94e9c9095fc19d15aa0 Author: Dmitry Baryshkov Date: Wed Jul 16 22:51:14 2008 +0100 leds: Ensure led->trigger is set earlier Make sure led->trigger is valid before calling trigger->activate Signed-off-by: Dmitry Baryshkov Signed-off-by: Andrew Morton Signed-off-by: Richard Purdie commit f46e9203d9a100bae216cc06e17f2e77351aa8d8 Author: Nate Case Date: Wed Jul 16 22:49:55 2008 +0100 leds: Add support for Philips PCA955x I2C LED drivers This driver supports the PCA9550, PCA9551, PCA9552, and PCA9553 LED driver chips. Signed-off-by: Nate Case Signed-off-by: Andrew Morton Signed-off-by: Richard Purdie commit dd1160dc1842ae172495a6da274a77e35c593ed8 Author: Ben Dooks Date: Mon Jun 9 22:00:49 2008 +0100 leds: Fix sparse warnings in leds-h1940 driver Fixes the following sparse errors: drivers/leds/leds-h1940.c:26:6: warning: symbol 'h1940_greenled_set' was not declared. Should it be static? drivers/leds/leds-h1940.c:55:6: warning: symbol 'h1940_redled_set' was not declared. Should it be static? drivers/leds/leds-h1940.c:85:6: warning: symbol 'h1940_blueled_set' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Richard Purdie commit 781a54e7664cc0089287a90d27086e9656ac68a1 Author: Anton Vorontsov Date: Sat May 31 15:23:19 2008 +0100 leds: mark led_classdev.default_trigger as const LED classdev core doesn't modify memory pointed by the default_trigger, so mark it as const and we'll able to pass const char *s without getting compiler warnings. Signed-off-by: Anton Vorontsov Signed-off-by: Richard Purdie commit e49575f46cdb40014e14789a18e637f8fb917317 Author: Li Zefan Date: Sat May 31 15:18:55 2008 +0100 leds: fix unsigned value overflow in atmel pwm driver Fix an unsigned value overflow in the error handling code in the Atmel PWM driver. Signed-off-by: Li Zefan Signed-off-by: Richard Purdie commit 30be0486791fb637e758c771956c8f73bef3467c Author: Riku Voipio Date: Sat May 31 14:45:16 2008 +0100 leds: Add pca9532 platform data for Thecus N2100 Thecus N2100 has leds and a buzzer attached to a pca9532 controller. Attach the driver to the i2c bus and define the pca9532 pin coniguration for this platform in n2100_leds. With this patch, support for N2100 should be complete in mainline Linux. Signed-off-by: Riku Voipio Acked-by: Lennert Buytenhek Signed-off-by: Andrew Morton Signed-off-by: Richard Purdie commit e14fa82439d33cef67eaafc1a48960bbfa610c8e Author: Riku Voipio Date: Sat May 31 14:43:41 2008 +0100 leds: Add pca9532 led driver NXP pca9532 is a LED dimmer/controller attached to i2c bus. It allows attaching upto 16 leds which can either be on, off or dimmed and/or blinked with the two PWM modulators available. This driver is a "new-style" i2c driver that adheres to the driver model and implements the led framework api. Since the leds connected to the driver are platform specific, it is only useful when platform data is passed to the driver to define what leds are connected to which pins. Signed-off-by: Riku Voipio Signed-off-by: Andrew Morton Signed-off-by: Richard Purdie commit b7c2a75725dee9b5643a0aae3a4cb47f52e00a49 Author: David S. Miller Date: Tue Jul 22 22:34:29 2008 -0700 sparc64: Fix lockdep issues in LDC protocol layer. We're calling request_irq() with a IRQs disabled. No straightforward fix exists because we want to enable these IRQs and setup state atomically before getting into the IRQ handler the first time. What happens now is that we mark the VIRQ to not be automatically enabled by request_irq(). Then we make explicit enable_irq() calls when we grab the LDC channel. This way we don't need to call request_irq() illegally under the LDC channel lock any more. Bump LDC version and release date. Signed-off-by: David S. Miller commit 9b0e74102494971ca37a425c63031fea68bb5b79 Author: Greg Ungerer Date: Fri Jul 11 15:29:36 2008 +1000 m68knommu: put ColdFire head code into .text.head section Switch the ColdFire head start up code to be in the .text.head segment. And make sure that segment is at the start of the final linked text segment. Fixes the linker warnings about section use mis-matches: WARNING: vmlinux.o(.text+0xa8): Section mismatch in reference from the variable _clear_bss to the function .init.text:start_kernel() The function _clear_bss() references the function __init start_kernel(). This is often because _clear_bss lacks a __init annotation or the annotation of start_kernel is wrong. Signed-off-by: Greg Ungerer commit 87f4abb45bc640638e6986f0f4d412b2d0ea21e1 Author: Greg Ungerer Date: Fri Jun 6 15:55:36 2008 +1000 m68knommu: remove last use of CONFIG_FADS and CONFIG_RPXCLASSIC They have never been used in this port of the driver. It is has only ever been used on the ColdFire SoC ethernet core. Signed-off-by: Greg Ungerer commit c1863bed8c88324405dc2a922c153fe5d7df716c Author: Sebastian Siewior Date: Mon Apr 28 11:43:17 2008 +0200 m68knommu: remove RPXCLASSIC from the m68k tree This ifdefs are leftovers from the time as the driver was running on a ppc. Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit 0d176af5b7e658490b75427ccd23ff6a158c472b Author: Sebastian Siewior Date: Mon Apr 28 11:43:20 2008 +0200 m68knommu: fec: remove FADS I found config FADS only in ppc/Kconfig. Bye bye relic. Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit 2b9a69861c39ae4c232385def833816acc07a0a4 Author: Sebastian Siewior Date: Mon Apr 28 11:43:04 2008 +0200 m68knommu: MCF5307 PIT GENERIC_CLOCKEVENTS support The PIT code has been changed in order to suppport GENERIC_CLOCKEVENTS. The priority of the PIT clocksource has been decreased in favor of the DMA timer. pit_cycles_per_jiffy become a constant (PIT_CYCLES_PER_JIFFY) because it is known at compile time and does not change afterwards. Signed-off-by: Benedikt Spranger Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit 6dbeb456baaba05d60e7ca8213da26142062408a Author: Sebastian Siewior Date: Tue May 13 18:52:44 2008 +0200 m68knommu: add read_barrier_depends() and irqs_disabled_flags() /home/bigeasy/git/linux-2.6-ftrace/kernel/trace/trace.c: In function 'tracing_generic_entry_update': /home/bigeasy/git/linux-2.6-ftrace/kernel/trace/trace.c:802: error: implicit declaration of function 'irqs_disabled_flags' make[3]: *** [kernel/trace/trace.o] Error 1 /home/bigeasy/git/linux-2.6-ftrace/kernel/trace/ftrace.c: In function 'ftrace_list_func': /home/bigeasy/git/linux-2.6-ftrace/kernel/trace/ftrace.c:61: error: implicit declaration of function 'read_barrier_depends' Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit e872504b311cec52f7a316a0037fb959080dbea0 Author: Sebastian Siewior Date: Sat May 17 21:51:15 2008 +0200 m68knommu: add byteswap assembly opcode for ISA A+ Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit a6260ef84103fa8a51a67b6a58e5e16c676e08ad Author: Sebastian Siewior Date: Fri May 9 16:10:37 2008 +0200 m68knommu: add ffs and __ffs plattform which support ISA A+ or ISA C the ff1 and bitrev opcode appears in ISA C and ISA A+ what isn't supported by all plattforms. The assembly optimization is automaticly enabled if the compiler understand the required cpu keyword. My m5235 seems to boot and run fine so far. Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit 5bed10a5ee272fbf18ce0ce764245bbb8f28e2e6 Author: Sebastian Siewior Date: Mon Apr 28 11:43:03 2008 +0200 m68knommu: add sched_clock() for the DMA timer with this printk() and other sched_clock() user use the more precise timestamps. The highly optimized math is from arch/x86/kernel/tsc_32.c. Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit 95469bd64a7a9ab405b566deb8c81d4aaf67ed9e Author: Sebastian Siewior Date: Mon Apr 28 11:43:01 2008 +0200 m68knommu: complete generic time do_set_rtc() isn't required because the work that is handled is allready served if read_persistent_clock() & update_persistent_clock() are implemented and CONFIG_GENERIC_CMOS_UPDATE is. sync_cmos_clock() looks very familiar :) Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit 0df185f5a1430ab8b437be402d286ee0728ef9f8 Author: Sebastian Siewior Date: Mon Apr 28 11:43:00 2008 +0200 m68knommu: move code within time.c This patch creates two functions do_set_rtc() and read_rtc_mmss() based on allready available code. Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit 1fda83d83c664ad74bfec8ce093a86d4d962f093 Author: Sebastian Siewior Date: Fri May 9 16:13:36 2008 +0200 m68knommu: m68knommu: add old stack trace method The old method is used when frame pointers are not available. Also fix formating with CONFIG_KALLSYMS=n which eliminates \n. Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit 5732b38ddb770b98110ea218232fc072e5626b87 Author: Sebastian Siewior Date: Fri May 9 16:18:33 2008 +0200 m68knommu: Add Coldfire DMA Timer support This one could be used as a hrtimer. Signed-off-by: Benedikt Spranger Signed-off-by: Sebastian Siewior Signed-off-by: Greg Ungerer commit ab88e474c8ffa300660f03a8e6b08ea660956bef Author: Greg Ungerer Date: Wed Jun 4 21:26:38 2008 +1000 m68knommu: defconfig for M5407C3 board Add a defconfig for the Freescale M5407C3 board. Signed-off-by: Greg Ungerer commit f3a64eaf9ea87d70487b482a6d733cfd52ae4499 Author: Greg Ungerer Date: Wed Jun 4 21:24:54 2008 +1000 m68knommu: defconfig for M5307C3 board Add a defconfig for the Freescale M5307C3 board. Signed-off-by: Greg Ungerer commit c26def07f97d662ee96362795400cbf6f44d11ce Author: Greg Ungerer Date: Wed Jun 4 21:23:43 2008 +1000 m68knommu: defconfig for M5275EVB board Add a defconfig for the Freescale M5275EVB board. Signed-off-by: Greg Ungerer commit 8c81b0574fd8877b5214f2d33816b199c62e3335 Author: Greg Ungerer Date: Wed Jun 4 21:22:18 2008 +1000 m68knommu: defconfig for M5249EVB board Add a defconfig for the Freescale M5249EVB board. Signed-off-by: Greg Ungerer commit deca05c3e81df4fcc38aa891eb8d8add14bce68b Author: Greg Ungerer Date: Wed Jun 4 21:20:32 2008 +1000 m68knommu: change to a configs directory for board configurations Remove the old example m68knommu defconfig. Create a configs directory for specific board configurations. Make the m5208evb the default. Signed-off-by: Greg Ungerer commit 8a6d2ea0cd121e3bfff4dbce5bc111874cf9e9d2 Author: Stephen Hemminger Date: Tue Jul 22 21:53:40 2008 -0700 sky2: don't stop queue on shutdown It is unnecessary, to stop queue and turn off carrier in shutdown routine. With new netdev_queue this causes warnings. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 1bad879a078111748ebc27fb0d29e8c916556835 Author: Alan Cox Date: Tue Jul 22 23:38:04 2008 +0100 tty: Fix up escaped character Louis Rilling noticed this. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit c010b2f76c3032e48097a6eef291d8593d5d79a6 Merge: 6069fb2... 521c4d9... Author: Linus Torvalds Date: Tue Jul 22 19:09:51 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (82 commits) ipw2200: Call netif_*_queue() interfaces properly. netxen: Needs to include linux/vmalloc.h [netdrvr] atl1d: fix !CONFIG_PM build r6040: rework init_one error handling r6040: bump release number to 0.18 r6040: handle RX fifo full and no descriptor interrupts r6040: change the default waiting time r6040: use definitions for magic values in descriptor status r6040: completely rework the RX path r6040: call napi_disable when puting down the interface and set lp->dev accordingly. mv643xx_eth: fix NETPOLL build r6040: rework the RX buffers allocation routine r6040: fix scheduling while atomic in r6040_tx_timeout r6040: fix null pointer access and tx timeouts r6040: prefix all functions with r6040 rndis_host: support WM6 devices as modems at91_ether: use netstats in net_device structure sfc: Create one RX queue and interrupt per CPU package by default sfc: Use a separate workqueue for resets sfc: I2C adapter initialisation fixes ... commit 6069fb2ef5d4f47432359c97f350e0cfcc4d208e Author: Linus Torvalds Date: Tue Jul 22 19:06:00 2008 -0700 Re-delete zombie 'drivers/usb/serial/airprime.c' file Stephen Rothwell points out that this file got deleted (on purpose) by commit 640c1bce86d1e11ee6a1263fdf6170d3210b1684 ("USB: delete airprime driver"), but then almost immediately incorrectly resurrected by commit 95da310e66ee8090119596c70ca8432e57f9a97f ("usb_serial: API all change"). Delete it again. If it comes back, we'll need to drive a stake through its heart. Reported-by: Stephen Rothwell Acked-by: Greg KH Cc: Alan Cox Cc: Andrew Morton Signed-off-by: Linus Torvalds commit e9dd54da0ba494bd86c45bdf574a6fd6ff8f2210 Merge: 0988c37... 4a0a088... Author: Linus Torvalds Date: Tue Jul 22 19:04:22 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc32: pass -m32 when building vmlinux.lds sparc: Fixes the DRM layer build on sparc. ide: merge with ide: : use __raw_{read,write}w() ide: : use __raw_{read,write}w() ide: : use %r0 for outw_be() sparc64: Do not define BIO_VMERGE_BOUNDARY. commit 521c4d96e0840ecce25b956e00f416ed499ef2ba Author: David S. Miller Date: Tue Jul 22 18:32:47 2008 -0700 ipw2200: Call netif_*_queue() interfaces properly. netif_carrier_{on,off}() handles starting and stopping packet flow into the driver. So there is no reason to invoke netif_stop_queue() and netif_wake_queue() in response to link status events. Signed-off-by: David S. Miller commit 4255589293b78c4dab324323e12857876b154863 Author: David S. Miller Date: Tue Jul 22 18:29:10 2008 -0700 netxen: Needs to include linux/vmalloc.h Signed-off-by: David S. Miller commit 380bab10de09c22c813ae83f8e148f5a46c1de40 Merge: 7cf7526... d6f8aa8... Author: David S. Miller Date: Tue Jul 22 18:19:22 2008 -0700 Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 commit d6f8aa8586dabe605454f3c98a5c1a577c3e0cfb Author: Jeff Garzik Date: Tue Jul 22 21:17:38 2008 -0400 [netdrvr] atl1d: fix !CONFIG_PM build Signed-off-by: Jeff Garzik commit 7cf75262a4aafe1483349e897bf905e121314dff Merge: c8f1568... b0e4539... Author: David S. Miller Date: Tue Jul 22 17:54:47 2008 -0700 Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 commit 7f1b358a236ee9c19657a619ac6f2dcabcaa0924 Author: Maciej Sosnowski Date: Tue Jul 22 17:30:57 2008 -0700 I/OAT: I/OAT version 3.0 support This patch adds to ioatdma and dca modules support for Intel I/OAT DMA engine ver.3 (aka CB3 device). The main features of I/OAT ver.3 are: * 8 single channel DMA devices (8 channels total) * 8 DCA providers, each can accept 2 requesters * 8-bit TAG values and 32-bit extended APIC IDs Signed-off-by: Maciej Sosnowski Signed-off-by: Dan Williams commit 16a37acaaf4aaa631ba3f83710ed6cdb1a597520 Author: Maciej Sosnowski Date: Tue Jul 22 17:30:57 2008 -0700 I/OAT: tcp_dma_copybreak default value dependent on I/OAT version I/OAT DMA performance tuning showed different optimal values of tcp_dma_copybreak for different I/OAT versions (4096 for 1.2 and 2048 for 2.0). This patch lets ioatdma driver set tcp_dma_copybreak value according to these results. [dan.j.williams@intel.com: remove some ifdefs] Signed-off-by: Maciej Sosnowski Signed-off-by: Dan Williams commit b0e453902ad53580a77c2b1baddcc0b2d8ce8acc Author: Florian Fainelli Date: Mon Jul 21 12:32:29 2008 +0200 r6040: rework init_one error handling This patch reworks the error handling in r6040_init_one in order not to leak resources and correcly unmap and release PCI regions of the MAC. Also prefix printk's with the driver name for clarity. Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit 1de95294f16cab0e924e1b4cd9b554a6eca65e6e Author: Florian Fainelli Date: Sun Jul 13 14:36:04 2008 +0200 r6040: bump release number to 0.18 This patch bumps the release of the r6040 driver. There has been quite some versions of it out there, but this one is the one people should report bugs against. Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit e24ddf3aa8a2c4c14df1136e762c315c436488e7 Author: Florian Fainelli Date: Sun Jul 13 14:35:32 2008 +0200 r6040: handle RX fifo full and no descriptor interrupts This patch allows the MAC to handle the RX FIFO full and no descriptor available interrupts. While we are at it replace the TX interrupt with its corresponding definition. Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit 31718dedf62fd62e807001138ab5ac76e9b11064 Author: Florian Fainelli Date: Sun Jul 13 14:35:00 2008 +0200 r6040: change the default waiting time This patch changes the default waiting time of a packet, which along with our previous r6040_rx path, was causing huge delays with another host (160 to 230 ms). Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit 32f565df9ba451a24117db67003ed2ae21bab88c Author: Florian Fainelli Date: Sun Jul 13 14:34:15 2008 +0200 r6040: use definitions for magic values in descriptor status Define all the descriptor status the MAC can set. Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit 9ca28dc4c75f018201e21b10e34b8161bcb0ffb2 Author: Florian Fainelli Date: Sun Jul 13 14:33:36 2008 +0200 r6040: completely rework the RX path This patch completely reworks the RX path in order to be more accurate about what is going on with the MAC. We no longer read the error from the MLSR register instead read the descriptor status register which reflects, the error per descriptor. We now allocate skbs on the fly in r6040_rx, and we handle allocation failure instead of simply dropping the packet. Remove the rx_free_desc counter of r6040_private structure since we allocate skbs in the RX path. r6040_rx_buf_alloc is now removed and becomes unuseless. Signed-Off-By: Joerg Albert Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit 129cf9a7028fc50b226b8021bc0b76fb38efa81d Author: Florian Fainelli Date: Sun Jul 13 14:32:45 2008 +0200 r6040: call napi_disable when puting down the interface and set lp->dev accordingly. We did not call napi_disabled when putting down the interface which should be done. Finally initialize lp->dev when everything is set. Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit f2ca60f2067958e45f949e74abd580715c6c4b33 Author: Lennert Buytenhek Date: Mon Jul 7 00:03:00 2008 +0200 mv643xx_eth: fix NETPOLL build Joseph Fannin and Takashi Iwai noticed that commit 073a345c04b01da0cc5b79ac7be0c7c8b1691ef5 ("mv643xx_eth: clarify irq masking and unmasking") broke the mv643xx_eth build when NETPOLL is enabled, due to it not renaming one instance of INT_CAUSE_EXT in mv643xx_eth_netpoll(). This patch takes care of that instance as well. Signed-off-by: Lennert Buytenhek Cc: Dale Farnsworth Cc: Joseph Fannin Cc: Takashi Iwai Signed-off-by: Jeff Garzik commit 3d4634193aa95a6d04a786fc12b190d0e4295685 Author: Florian Fainelli Date: Sun Jul 13 14:32:18 2008 +0200 r6040: rework the RX buffers allocation routine Rework the RX buffers allocation function so that we do not leak memory in the case we could not allocate skbs for the RX path. Propagate the errors to the r6040_up function where we call the RX buffers allocation function. Also rename the r6040_alloc_txbufs function to r6040_init_txbufs, to reflect what it really does. Signed-Off-By: Joerg Albert Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit fec3a23be0daceeb0695f8296aea07ea1ad073d8 Author: Florian Fainelli Date: Sun Jul 13 14:29:20 2008 +0200 r6040: fix scheduling while atomic in r6040_tx_timeout Add a helper function which only modifies R6040 MAC registers use it when we timeout, and on adapter initialization. Fix the scheduling while atomic but in the timeout routine due to the reallocation of rx/tx buffers. Signed-Off-By: Joerg Albert Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit 3d25434816356e8d1e3167c5f7a56d3d81aeb239 Author: Florian Fainelli Date: Sun Jul 13 14:28:27 2008 +0200 r6040: fix null pointer access and tx timeouts This patch fixes a null pointer access in r6040_rx due to lp->dev not being initialized. Fix the TX timeouts, TX irq was not re-enabled on RX irq Signed-Off-By: Joerg Albert Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit c6e69bb92ed6e22a0931e29daff6539f2bac29b9 Author: Florian Fainelli Date: Sun Jul 13 13:39:32 2008 +0200 r6040: prefix all functions with r6040 Prefix all functions inside the r6040 driver with r6040 to avoid namespace clashing. Signed-off-by: Florian Fainelli Signed-off-by: Jeff Garzik commit 7e99eeddb35cdaafb820676a57517b5e58685e4c Author: Thomas Backlund Date: Tue Jul 22 13:55:58 2008 -0700 rndis_host: support WM6 devices as modems This patch allows Windows Mobile 6 devices to be used for tethering -- that is, used as modems. It was requested by AdamW in kernel bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=11119 and Mandriva kernel-discuss list. It is tested and confirmed to work by Peterl: http://forum.eeeuser.com/viewtopic.php?pid=323543#p323543 This patch is based on the patch in the above kernel bugzilla, which is from the usb-rndis-lite tree. [ dbrownell@users.sourceforge.net: misc fixes ] Signed-off-by: Thomas Backlund Signed-off-by: David Brownell Signed-off-by: Jeff Garzik commit 7a2f53ee0b56ff7e1c0c24404575cb62935d37d9 Author: Paulius Zaleckas Date: Thu Jul 17 11:01:26 2008 +0300 at91_ether: use netstats in net_device structure Use net_device_stats from net_device structure instead of local. Signed-off-by: Paulius Zaleckas Tested-by: Marc Pignat Acked-by: Andrew Victor Signed-off-by: Jeff Garzik commit aa6ef27ea906e74bd23d14f43f095c012469d9c7 Author: Ben Hutchings Date: Fri Jul 18 19:03:10 2008 +0100 sfc: Create one RX queue and interrupt per CPU package by default Using multiple cores in the same package to handle received traffic does not appear to provide a performance benefit. Therefore use CPU topology information to count CPU packages and use that as the default number of RX queues and interrupts. We rely on interrupt balancing to spread the interrupts across packages. Signed-off-by: Ben Hutchings Signed-off-by: Jeff Garzik commit 8d9853d911b9d3fb767c3886066530c0e39b78ba Author: Ben Hutchings Date: Fri Jul 18 19:01:20 2008 +0100 sfc: Use a separate workqueue for resets This avoids deadlock in case a reset is triggered during self-test. Signed-off-by: Ben Hutchings Signed-off-by: Jeff Garzik commit 9dadae686fce02a02982fc9c0563f6b917217a66 Author: Ben Hutchings Date: Fri Jul 18 18:59:12 2008 +0100 sfc: I2C adapter initialisation fixes As recommended by Jean Delvare: - Increase timeout to 50 ms - Leave adapter class clear so that unwanted drivers do not probe our bus - Use strlcpy() for name initialisation Signed-off-by: Ben Hutchings Signed-off-by: Jeff Garzik commit 81250297d85b26eb4e9de5decf752dce430277f9 Author: Taku Izumi Date: Fri Jul 11 15:17:44 2008 -0700 e1000: make ioport free This patch makes e1000 driver ioport-free. This corrects behavior in probe function so as not to request ioport resources as long as they are not really needed. This is based on the ioport-free patch of e1000 driver from Auke Kok and Tomohiro Kusumi. Signed-off-by: Tomohiro Kusumi Signed-off-by: Auke Kok Signed-off-by: Taku Izumi Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik commit c3570acb53c885f8accb8c85eda195781d30632f Author: Francois Romieu Date: Fri Jul 11 15:17:38 2008 -0700 e1000: delete non NAPI code from the driver Compile-tested only. Signed-off-by: Francois Romieu Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik commit 63cd31f60716c4a9f1b5b6ffd804326dc766d2d2 Author: Jeff Kirsher Date: Fri Jul 11 15:17:33 2008 -0700 e1000: remove email reference The email linux-nics@intel.com is no longer available, remove all references. Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik commit c7be73bc9bfc8a650fe646f484dea5bad3cf92d5 Author: Joe Perches Date: Fri Jul 11 15:17:28 2008 -0700 e1000: Move assignments in tests before test Signed-off-by: Joe Perches Signed-off-by: Auke Kok Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik commit b11840204f36f9a1e3027033227e17d167e04377 Author: Joe Perches Date: Fri Jul 11 15:17:23 2008 -0700 e1000: checkpatch clean Redefine DPRINTK macro using do while(0) __FUNCTION__ to __func__ structs {} on separate lines Surround negative constants with () Signed-off-by: Joe Perches Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik commit e982f17c87488a98df6bc4f5454a176646b4d00b Author: Joe Perches Date: Fri Jul 11 15:17:18 2008 -0700 e1000: Remove spaces after casts and function names Signed-off-by: Joe Perches Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik commit c03e83b0351f8a9464d32f31302ec75ba88518dc Author: Joe Perches Date: Fri Jul 11 15:17:13 2008 -0700 e1000: Move extern function definitions to e1000.h Signed-off-by: Joe Perches Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik commit 1dc329180fe22ff8651e0ef550ba17ca1cc7bf22 Author: Joe Perches Date: Fri Jul 11 15:17:08 2008 -0700 e1000: Use hw, er32, and ew32 Use struct e1000_hw *hw = adapter->hw; where necessary Change macros E1000_READ_REG and E1000_WRITE_REG to er32 and ew32 Signed-off-by: Auke Kok Signed-off-by: Joe Perches Signed-off-by: Jeff Garzik commit 6479884509e6cd30c6708fbf05fafc0d1fc85f7a Author: Joe Perches Date: Fri Jul 11 15:17:02 2008 -0700 e1000: neaten function declarations Signed-off-by: Joe Perches Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik commit cdc18a670923d01a762d66be582bfe763772d441 Author: Christoph Lameter Date: Fri Jul 11 16:12:34 2008 -0500 Fix typo in meth driver An | in an if statement to check a bit? I think this needs to be a &. As a result of this typo meth will always operate in promiscuous mode. Signed-off-by: Christoph Lameter Signed-off-by: Jeff Garzik commit a6a5325239c20202e18e21e94291bccc659fbf9e Author: Jie Yang Date: Fri Jul 18 11:37:13 2008 +0800 atl1e: Atheros L1E Gigabit Ethernet driver Full patch for the Atheros L1E Gigabit Ethernet driver. Supportring AR8121, AR8113 and AR8114 Signed-off-by: Jie Yang Signed-off-by: Jeff Garzik commit bb5d10ac8cc315d53306963001fe650d88a1cbb2 Author: Jesse Brandeburg Date: Fri Jul 11 17:34:58 2008 -0700 ixgbe: remove device ID for unsupported device The ixgbe driver was untested with device ID 8086:10c8 but still advertises support. Currently if this device is present in the system when the driver is loaded, the system will panic. Remove this device ID until full support can be tested with available hardware. This patch is necessary for 2.6.24, 2.6.25 and 2.6.26 Signed-off-by: Jesse Brandeburg Signed-off-by: Jeff Kirsher Signed-off-by: Jeff Garzik commit 4a0a088970a553e9f89d23eec688932f689d57f9 Author: Stephen Rothwell Date: Tue Jul 22 15:47:17 2008 -0700 sparc32: pass -m32 when building vmlinux.lds Otherwise it breaks since we merged asm/page.h Signed-off-by: Stephen Rothwell Signed-off-by: David S. Miller commit c8f15686a4b3345e3e81e09cfe191df58bbedd45 Author: Anton Vorontsov Date: Tue Jul 22 15:41:24 2008 -0700 netdev: bunch of drivers: avoid WARN at net/core/dev.c:1328 The drivers were touching net queue before it has been started, so without this patch, the drivers will potentially WARN at net/core/dev.c:1328. I don't have the hardware for the drivers below, so this patch is untested, and thus should be carefully peer reviewed. tc35815.c au1000_eth.c bfin_mac.c macb.c ^ The four drivers are using phylib, they're calling netif_start_queue() in open() callback. So trivially remove netif_tx_schedule_all(). Phylib will handle netif_carrier_*(). cpmac.c fec_mpc52xx.c fs_enet/fs_enet-main.c sh_eth.c ^ The same as above, but these were also needlessly calling netif_carrier_*() functions. So removed queue calls and also remove carrier calls, since phylib will handle it. fs_enet-main.c also didn't call netif_start_queue() at open(), this is fixed now. Signed-off-by: Anton Vorontsov Signed-off-by: David S. Miller commit f17a077e61b627e58db5926bc474cf308318dad9 Author: Harvey Harrison Date: Tue Jul 22 14:40:47 2008 -0700 PCI: fixup sparse endianness warnings in proc.c drivers/pci/proc.c:91:3: warning: cast from restricted __le16 drivers/pci/proc.c:100:3: warning: cast from restricted __le32 drivers/pci/proc.c:109:3: warning: cast from restricted __le16 drivers/pci/proc.c:161:40: warning: cast to restricted __le16 drivers/pci/proc.c:170:41: warning: cast to restricted __le32 drivers/pci/proc.c:179:40: warning: cast to restricted __le16 Signed-off-by: Harvey Harrison Signed-off-by: Jesse Barnes commit 1a4dc68b31fd04573ab3c554702372941a4fd46f Author: Dave Jones Date: Tue Jul 15 19:54:52 2008 -0400 8139too: Fall back to PIO when MMIO fails. Signed-off-by: Dave Jones Signed-off-by: Jeff Garzik commit 152151daece9d5dfd86e652b95846072c0d2b566 Author: Dave Jones Date: Tue Jul 15 19:54:53 2008 -0400 8139too: Force usage of PIO on OQO2 The OQO model 2 has an RTL8139 from Atheros that doesn't like MMIO. It fails on modprobe, with a 'PCI Bus error' message. Force it to always use polled IO. Signed-off-by: Dave Jones Signed-off-by: Jeff Garzik commit eb5813481a97582c80c8d402ecb371149c77b4e0 Author: Dave Jones Date: Tue Jul 15 19:54:53 2008 -0400 8139too: Make PIO/MMIO a runtime decision through a module parameter. This is needed to support devices that only work with PIO without penalising devices that work fine with MMIO in distro kernels. It also allows us to eventually use PIO as a fallback when setting up MMIO fails. Signed-off-by: Dave Jones Signed-off-by: Jeff Garzik commit 7239016d52c6d568d069f083bdcd17f35ab79fd8 Author: Wang Jian Date: Wed Jul 16 21:46:20 2008 +0800 net/phy: Fix 88e1111 copper/fiber selection in RGMII mode MII_M1111_HWCFG_FIBER_COPPER_RES is a bit of MII_M1111_PHY_EXT_SR, not MII_M1111_PHY_EXT_CR. Signed-off-by: Wang Jian Signed-off-by: Jeff Garzik commit 9cf8fa4334e60f27b4a392f432c292f3af268215 Author: Wang Jian Date: Wed Jul 16 21:46:17 2008 +0800 net/phy: Fix copper/fiber auto-selection for 88e1111 The 27.15 bit (MII_M1111_HWCFG_FIBER_COPPER_AUTO) is disable bit. When set to 1, copper/fiber auto selection is disabled. The current code to enable but actually disable auto selection. Signed-off-by: Wang Jian Signed-off-by: Jeff Garzik commit c0e5a8c21bb9bb222917c36eba503ae88af52c34 Author: Harvey Harrison Date: Wed Jul 16 12:45:34 2008 -0700 net: tun.c fix cast Signed-off-by: Harvey Harrison Signed-off-by: Jeff Garzik commit 25ac3c24839002298e9329a5fda305e5383b1dc7 Author: Harvey Harrison Date: Wed Jul 16 12:45:27 2008 -0700 net: igb_main.c fix sparse integer as NULL pointer warning drivers/net/igb/igb_main.c:388:20: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison Signed-off-by: Jeff Garzik commit f8e5e776a3ac29705b1a357b23cad0920ef1a1d2 Author: Ben Dooks Date: Thu Jul 17 20:29:13 2008 +0100 DM9000: Remove magic numbers Remove magic numbers for items that we already have defined in the register header file. Signed-off-by: Ben Dooks Signed-off-by: Jeff Garzik commit 23fcc8d991c7f7bf3eaa64c296217103ab59f5dc Author: Ursula Braun Date: Fri Jul 18 15:24:58 2008 +0200 MAINTAINERS: Update email address of Ursula Braun Signed-off-by: Ursula Braun Signed-off-by: Jeff Garzik commit aa3f2cb63086e474a2ac3836d01fc6d9db393846 Author: Peter Tiedemann Date: Fri Jul 18 15:24:57 2008 +0200 s390/net/ctcm: message cleanup Cc: Martin Schwidefsky Signed-off-by: Peter Tiedemann Signed-off-by: Ursula Braun Signed-off-by: Jeff Garzik commit b805da74dee3a8de8a29654078c5198f2fb0e15b Author: Andy Richter Date: Fri Jul 18 15:24:56 2008 +0200 s390/net: Cleanup claw printk messages. Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andy Richter Signed-off-by: Ursula Braun Signed-off-by: Jeff Garzik commit 58735567b6de3034c9d0d7e1dcf31614b66de986 Author: Dhananjay Phadke Date: Mon Jul 21 19:44:10 2008 -0700 netxen: update driver version Change driver version to 4.0.0. Netxen firmwares as old as v3.4.216 are supported. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit cd1f8160e015cd1538701b7de216cbeaefc6b0a8 Author: Dhananjay Phadke Date: Mon Jul 21 19:44:09 2008 -0700 netxen: enable tso6, intr coalescing. Enable tso6 and ipv6 checksum, interrupt coalescing for NX3031. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit d9e651bc06690c5a5326e8d019fa7668409bc819 Author: Dhananjay Phadke Date: Mon Jul 21 19:44:08 2008 -0700 netxen: cut-through rx changes NX3031 supports cut-through operation where ingress packets are directly dma'ed into host buffers to reduce latency. This requires larger dma buffers (2kb) and different alignemnt. The buffer posting logic is changed a bit. The free rx buffers are maintained in linked list, since the received reference handles can be out of order. However rx descriptors are still posted sequentially, indexed by producer. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit c9fc891f86c062449116fde8826a0ead650e17ac Author: Dhananjay Phadke Date: Mon Jul 21 19:44:07 2008 -0700 netxen: mtu, mac, link status changes MAC addr, multicast filters, mtu are set through firmware commands in firmware v4.0.0+ because of virtualization of physical ports. Link status is also read from registers allocated by firmware for each virtual port. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit 48bfd1e0fc66b27254ec742b014e689ef218e76c Author: Dhananjay Phadke Date: Mon Jul 21 19:44:06 2008 -0700 netxen: add netxen_nic_ctx.c Contains rx and tx ring context management and certain firmware commands for netxen firmware v4.0.0+. This patch gathers all HW context management code into netxen_nic_ctx.c. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit a97342f9790f14ac20bd5f8b16ed661411fa2e3e Author: Dhananjay Phadke Date: Mon Jul 21 19:44:05 2008 -0700 netxen: remove netxen_nic_isr.c It had only couple of functions which are moved to main.c Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit 2956640d4aaaecd42bd8ba800cc8c33bfe206b7e Author: Dhananjay Phadke Date: Mon Jul 21 19:44:04 2008 -0700 netxen: pci probe and firmware init changes Add initialization code in pci probe for new chip and retain compatibility with old revisions. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit 3ce06a320f8d5a3f16960e63021cc372283efffb Author: Dhananjay Phadke Date: Mon Jul 21 19:44:03 2008 -0700 netxen: add 2MB PCI memory support New revision of netxen chip has 2MB PCI memory. Older chips had 128MB addressable PCI memory. To retain compatibility, this patch adds function pointers based on pci bar0 size. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit e4c93c817ce650401db42db6c869cf7688217ff4 Author: Dhananjay Phadke Date: Mon Jul 21 19:44:02 2008 -0700 netxen: add defs for new chip/boards Add macros for new chip revision and board configurations. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit 623621b07ebc5b72e0bdfa4a50bbb28f4587de0c Author: Dhananjay Phadke Date: Mon Jul 21 19:44:01 2008 -0700 netxen: hw multicast filtering Enable multicast address filtering capabilities in the hardware. Upto 16 multicast addresses can be programmed for each physical port. Support "allmulti" mode, if enabled. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit 7830b22cbc5f5e804469b74a3fe0d3a8ed88ca31 Author: Dhananjay Phadke Date: Mon Jul 21 19:44:00 2008 -0700 netxen: cleanup unused variables/functions o Reduce access to global arrays in data path. o Remove duplicate/unused variables, unecessary alignment constraints. o Use correct pci_dev instead of fallback device for consistent allocations. o Disable ethtool set_eeprom functionality for now, it was only used for flashing firmware. Signed-off-by: Dhananjay Phadke Signed-off-by: Jeff Garzik commit f0084a36d4d799c024a5211555334d56c91d236d Author: Ingo Molnar Date: Tue Jul 22 09:23:34 2008 +0200 net 8390p: fix interface usage various drivers were using the wrong APIs: drivers/built-in.o: In function `hp_probe1': hp.c:(.init.text+0xa280): undefined reference to `NS8390_init' fixed via: cd drivers/net/; sed -i 's/NS8390_/NS8390p_/g' \ $(grep -l NS8390_ $(grep 8390p.o Makefile | cut -d' ' -f3 | \ sed 's/.o$/.c/g')) Signed-off-by: Ingo Molnar Signed-off-by: Jeff Garzik commit 3d0f24a74e7957593a5622eb5c04ed6860dd8391 Author: Stephen Hemminger Date: Tue Jul 22 14:35:50 2008 -0700 ipv6: icmp6_dst_gc return change Change icmp6_dst_gc to return the one value the caller cares about rather than using call by reference. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 75307c0fe7fcb3b52a92fe32384fc33f50622654 Author: Stephen Hemminger Date: Tue Jul 22 14:35:07 2008 -0700 ipv6: use kcalloc Th fib_table_hash is an array, so use kcalloc. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit a76d7345a3f92bb8352f200e7b2e380dddcd7e36 Author: Stephen Hemminger Date: Tue Jul 22 14:34:35 2008 -0700 ipv6: use spin_trylock_bh Now there is spin_trylock_bh, use it rather than open coding. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit c8a4522245e9931a53a98d5160bb4c00d3f73921 Author: Stephen Hemminger Date: Tue Jul 22 14:34:09 2008 -0700 ipv6: use round_jiffies This timer normally happens once a minute, there is no need to cause an early wakeup for it, so align it to next second boundary to safe power. It can't be deferred because then it could take too long on cleanup or DoS. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 417f28bb340725544c36b35465444d2fd57232b8 Author: Stephen Hemminger Date: Tue Jul 22 14:33:45 2008 -0700 netns: dont alloc ipv6 fib timer list FIB timer list is a trivial size structure, avoid indirection and just put it in existing ns. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 428695b89831d781ba203d97ee07da68150ea40d Author: David S. Miller Date: Tue Jul 22 14:30:55 2008 -0700 sparc: Fixes the DRM layer build on sparc. By providing an ioremap_wc(). Signed-off-by: David S. Miller commit e5899e1b7d73e67de758a32174a859cc2586c0b9 Author: Rafael J. Wysocki Date: Sat Jul 19 14:39:24 2008 +0200 PCI PM: make more PCI PM core functionality available to drivers Make more PCI PM core functionality available to drivers * Export pci_pme_capable() so that it can be called directly by drivers (for example, tg3 needs that). * Move the state choosing part of pci_prepare_to_sleep() to a separate function, pci_target_state(), that can be called directly by drivers (for example, tg3 needs that). Signed-off-by: Rafael J. Wysocki Signed-off-by: Jesse Barnes commit 888c848ed34bd5f8cb56567624c0d951ab35174e Author: Adrian Bunk Date: Tue Jul 22 14:21:58 2008 -0700 ipv6: make struct ipv6_devconf static struct ipv6_devconf can now become static. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller commit 4d6971e909e904be60218739fc961188471fc4f4 Author: Adrian Bunk Date: Tue Jul 22 14:21:30 2008 -0700 sctp: remove sctp_assoc_proc_exit() Commit 20c2c1fd6c842caf70dcb1d94b9d58861949fd3d (sctp: add sctp/remaddr table to complete RFC remote address table OID) added an unused sctp_assoc_proc_exit() function that seems to have been unintentionally created when copying the assocs code. Signed-off-by: Adrian Bunk Acked-by: Neil Horman Signed-off-by: David S. Miller commit abd0b198ea699578c3c3476d646c91842e19dbd2 Author: Adrian Bunk Date: Tue Jul 22 14:20:45 2008 -0700 sctp: make sctp_outq_flush() static sctp_outq_flush() can now become static. Signed-off-by: Adrian Bunk Acked-by: Neil Horman Signed-off-by: David S. Miller commit a94f779f9d82eb2d758a8715eaae5df98e8dcb21 Author: Adrian Bunk Date: Tue Jul 22 14:20:11 2008 -0700 pkt_sched: make qdisc_class_hash_alloc() static This patch makes the needlessly global qdisc_class_hash_alloc() static. Signed-off-by: Adrian Bunk Acked-by: Patrick McHardy Signed-off-by: David S. Miller commit e8bb4beb2b1f90d499134f2849727ed04c3bedc4 Author: Roland Dreier Date: Tue Jul 22 14:20:05 2008 -0700 IB/mthca: Keep free count for MTT buddy allocator MTT entries are allocated with a buddy allocator, which just keeps bitmaps for each level of the buddy table. However, all free space starts out at the highest order, and small allocations start scanning from the lowest order. When the lowest order tables have no free space, this can lead to scanning potentially millions of bits before finding a free entry at a higher order. We can avoid this by just keeping a count of how many free entries each order has, and skipping the bitmap scan when an order is completely empty. This provides a nice performance boost for a negligible increase in memory usage. Signed-off-by: Roland Dreier commit e4044cfc493338cd09870bd45dc646336bb66e9f Author: Roland Dreier Date: Tue Jul 22 14:19:40 2008 -0700 mlx4_core: Keep free count for MTT buddy allocator MTT entries are allocated with a buddy allocator, which just keeps bitmaps for each level of the buddy table. However, all free space starts out at the highest order, and small allocations start scanning from the lowest order. When the lowest order tables have no free space, this can lead to scanning potentially millions of bits before finding a free entry at a higher order. We can avoid this by just keeping a count of how many free entries each order has, and skipping the bitmap scan when an order is completely empty. This provides a nice performance boost for a negligible increase in memory usage. Signed-off-by: Roland Dreier commit 899698dad72340b562478b8b770317f2f0fe0c09 Author: Jack Morgenstein Date: Tue Jul 22 14:19:39 2008 -0700 mlx4_code: Add missing FW status return code Add ICM_ERROR firmware status code. In mapping to errnos, -ENFILE seems closest. This is in preparation for providing more detailed log info using mlx4_err() in low-level driver when a non-zero status is returned. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit 47b374752aed1c029f995473c7c463ee3ae5fbaa Author: Roland Dreier Date: Tue Jul 22 14:19:39 2008 -0700 IB/mlx4: Rename struct mlx4_lso_seg to mlx4_wqe_lso_seg Make the struct name consistent with other WQE segment struct types defined in . Signed-off-by: Roland Dreier commit 51f5f0ee22b98980f7816d42647467cd5f4b3b45 Author: Jack Morgenstein Date: Tue Jul 22 14:19:37 2008 -0700 mlx4_core: Add module parameter to enable QoS support Add a module parameter "enable_qos" to mlx4_core. If this param is set, enable support for QoS in the INIT_HCA command. By default, the parameter is set to 0 (disabled). Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit 8086cd451f08f4c0f9693fc66d87754bbd18cfba Author: Adrian Bunk Date: Tue Jul 22 14:19:19 2008 -0700 netns: make get_proc_net() static get_proc_net() can now become static. Signed-off-by: Adrian Bunk Acked-by: Pavel Emelyanov Signed-off-by: David S. Miller commit 1ca8d15619f725e223c19137350b0336b9196193 Author: Dotan Barak Date: Tue Jul 22 14:18:34 2008 -0700 RDMA/iwcm: Remove IB_ACCESS_LOCAL_WRITE from remote QP attributes Remove IB_ACCESS_LOCAL_WRITE from qp.qp_access_flags because this attribute is only used to set remote permissions. Signed-off-by: Dotan Barak Signed-off-by: Roland Dreier commit 01b3fc8b15432f7931e40fe099839e1559fb0e09 Author: Or Gerlitz Date: Tue Jul 22 14:18:34 2008 -0700 IPoIB: Include err code in trace message for ib_sa_path_rec_get() failures Print the return code of ib_sa_path_rec_get() if it fails to help debug errors. Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier commit 64b784b583061ebfe1d484dd1fdc5a26c6d4293f Author: Ralph Campbell Date: Tue Jul 22 14:18:33 2008 -0700 IB/sa_query: Check if sm_ah is NULL in ib_sa_remove_one() If update_sm_ah() fails, it leaves the port's sm_ah as NULL. Then if the device or module is removed, ib_sa_remove_one() will dereference a NULL pointer when it calls kref_put(). Fix this by testing if sm_ah is NULL before dropping the reference. Signed-off-by: Ralph Campbell Signed-off-by: Roland Dreier commit 1a867c33bb65f2921351a9bdd98548bb96f0ff8c Author: Julia Lawall Date: Tue Jul 22 14:18:10 2008 -0700 IB/ehca: Release mutex in error path of alloc_small_queue_page() The pd->lock mutex is released on a successful return, so it should be released on an error return as well. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression l; @@ mutex_lock(l); ... when != mutex_unlock(l) when any when strict ( if (...) { ... when != mutex_unlock(l) + mutex_unlock(l); return ...; } | mutex_unlock(l); ) // Signed-off-by: Julia Lawall Signed-off-by: Roland Dreier commit 593e4d4a05c8263a6dbd5452c21d47c5bdadd40c Author: Joachim Fenkes Date: Tue Jul 22 14:18:08 2008 -0700 IB/ehca: Use default value for Local CA ACK Delay if FW returns 0 Some firmware versions report a Local CA ACK Delay of 0. In that case, return a more sensible default value of 12 (-> 16 msec) instead. Signed-off-by: Joachim Fenkes Signed-off-by: Roland Dreier commit 5b673b71c8ca0fbdb99dc1b1434cfb554212d6ff Author: Joachim Fenkes Date: Tue Jul 22 14:18:07 2008 -0700 IB/ehca: Filter PATH_MIG events if QP was never armed Certain firmware versions sometimes cause spurious PATH_MIG events to occur during QP creation. Filter these events by making sure PATH_MIG events are only handed down when they actually make sense (i.e. when the QP has been armed at least once). Signed-off-by: Joachim Fenkes Signed-off-by: Roland Dreier commit cf508b1211dbe576778ff445ea1b4b0bcfa5c4ea Author: David S. Miller Date: Tue Jul 22 14:16:42 2008 -0700 netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep. The new address list lock needs to handle the same device layering issues that the _xmit_lock one does. This integrates work done by Patrick McHardy. Signed-off-by: David S. Miller commit 2f5de1512884da8c74bec2c76e8f114b972ab4be Author: Or Gerlitz Date: Tue Jul 22 14:16:21 2008 -0700 IB/iser: Add support for RDMA_CM_EVENT_ADDR_CHANGE event Enhance iser to act upon notification on network stack changes that make its RDMA connection unaligned with the link used by the stack for the IPs used to establish the connection. When RDMA_CM_EVENT_ADDR_CHANGE arrives, just disconnect the connection, assuming that the user space iscsid daemon will reconnect, and the new connection will be aligned with the IP stack. Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier commit 38ca83a588662f0af684ba2567dd910a564268ab Author: Amir Vadai Date: Tue Jul 22 14:14:23 2008 -0700 RDMA/cma: Add RDMA_CM_EVENT_TIMEWAIT_EXIT event Consumers that want to re-use their QPs in new connections need to know when the QP has exited the timewait state. Report the timewait event through the rdma_cm. Signed-off-by: Amir Vadai Acked-by: Sean Hefty Signed-off-by: Roland Dreier commit dd5bdff83b19d9174126e0398b47117c3a80e22d Author: Or Gerlitz Date: Tue Jul 22 14:14:22 2008 -0700 RDMA/cma: Add RDMA_CM_EVENT_ADDR_CHANGE event Add an RDMA_CM_EVENT_ADDR_CHANGE event can be used by rdma-cm consumers that wish to have their RDMA sessions always use the same links (eg ) as the IP stack does. In the current code, this does not happen when bonding is used and fail-over happened but the IB link used by an already existing session is operating fine. Use the netevent notification for sensing that a change has happened in the IP stack, then scan the rdma-cm ID list to see if there is an ID that is "misaligned" with respect to the IP stack, and deliver RDMA_CM_EVENT_ADDR_CHANGE for this ID. The consumer can act on the event or just ignore it. Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier commit f42e86d95fa53d3a62b2795515da18b4f41b0480 Author: Yong Wang Date: Tue Jul 22 14:14:18 2008 -0700 PCI/DMAR: don't assume presence of RMRRs RMRRs do not necessarily have to be present on all VT-d capable platforms. The printk is just informational and does not need to be followed by an error return. Signed-off-by: Yong Y Wang Cc: Fenghua Yu Cc: mark gross Cc: Keshavamurthy, Anil S Signed-off-by: Andrew Morton Signed-off-by: Jesse Barnes commit d29f749e252bcdbfe7a75a58f0ee92da16f127c0 Author: Dave Jones Date: Tue Jul 22 14:09:06 2008 -0700 net: Fix build failure with 'make mandocs'. The function header comments have to go with the functions they are documenting, or things go horribly wrong when we try to process them with the docbook tools. Warning(include/linux/netdevice.h:1006): No description found for parameter 'dev_queue' Warning(include/linux/netdevice.h:1033): No description found for parameter 'dev_queue' Warning(include/linux/netdevice.h:1067): No description found for parameter 'dev_queue' Warning(include/linux/netdevice.h:1093): No description found for parameter 'dev_queue' Warning(include/linux/netdevice.h:1474): No description found for parameter 'txq' Error(net/core/dev.c:1674): cannot understand prototype: 'u32 simple_tx_hashrnd; ' Signed-off-by: Dave Jones Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 0988c37c248e824953d95a11412696c348dbca91 Merge: 6eaaaac... d536b1f... Author: Linus Torvalds Date: Tue Jul 22 13:40:24 2008 -0700 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: fix crash due to missing debugctlmsr on AMD K6-3 x86: add PTE_FLAGS_MASK x86: rename PTE_MASK to PTE_PFN_MASK x86: fix pte_flags() to only return flags, fix lguest (updated) x86: use setup_clear_cpu_cap with disable_apic, fix x86: move the last Dprintk instance to pr_debug() commit 6eaaaac97433575894570a990aa27310040a8177 Merge: 06b8147... a1ef5ad... Author: Linus Torvalds Date: Tue Jul 22 13:17:15 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: remove CONFIG_KMOD from core kernel code remove CONFIG_KMOD from lib remove CONFIG_KMOD from sparc64 rework try_then_request_module to do less in non-modular kernels remove mention of CONFIG_KMOD from documentation make CONFIG_KMOD invisible modules: Take a shortcut for checking if an address is in a module module: turn longs into ints for module sizes Shrink struct module: CONFIG_UNUSED_SYMBOLS ifdefs module: reorder struct module to save space on 64 bit builds module: generic each_symbol iterator function module: don't use stop_machine for waiting rmmod commit 06b8147c5dbd385b5b97ca74e19f6f3951ebc1cb Merge: 53baaaa... 8725f25... Author: Linus Torvalds Date: Tue Jul 22 13:16:01 2008 -0700 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (49 commits) powerpc: Fix build bug with binutils < 2.18 and GCC < 4.2 powerpc/eeh: Don't panic when EEH_MAX_FAILS is exceeded fbdev: Teaches offb about palette on radeon r5xx/r6xx powerpc/cell/edac: Log a syndrome code in case of correctable error powerpc/cell: Add DMA_ATTR_WEAK_ORDERING dma attribute and use in Cell IOMMU code powerpc: Indicate which oprofile counters to use while in compat mode powerpc/boot: Change spaces to tabs powerpc: Remove duplicate 6xx option in Kconfig powerpc: Use PPC_LONG and PPC_LONG_ALIGN in lib/string.S powerpc: Use PPC_LONG_ALIGN in uaccess.h powerpc: Add a #define for aligning to a long-sized boundary powerpc: Fix OF parsing of 64 bits PCI addresses powerpc: Use WARN_ON(1) instead of __WARN() powerpc: Fix support for latencytop powerpc/ps3: Update ps3_defconfig powerpc/ps3: Add a sub-match id to ps3_system_bus powerpc: Add a 6xx defconfig powerpc/dma: Use the struct dma_attrs in iommu code powerpc/cell: Add support for power button of future IBM cell blades powerpc/cell: Cleanup sysreset_hack for IBM cell blades ... commit 53baaaa9682c230410a057263d1ce2922f43ddc4 Merge: f10140f... 3f97870... Author: Linus Torvalds Date: Tue Jul 22 13:13:47 2008 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits) arm: bus_id -> dev_name() and dev_set_name() conversions sparc64: fix up bus_id changes in sparc core code 3c59x: handle pci_name() being const MTD: handle pci_name() being const HP iLO driver sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute sysdev: Add utility functions for simple int/ulong variable sysdev attributes sysdev: Pass the attribute to the low level sysdev show/store function driver core: Suppress sysfs warnings for device_rename(). kobject: Transmit return value of call_usermodehelper() to caller sysfs-rules.txt: reword API stability statement debugfs: Implement debugfs_remove_recursive() HOWTO: change email addresses of James in HOWTO always enable FW_LOADER unless EMBEDDED=y uio-howto.tmpl: use unique output names uio-howto.tmpl: use standard copyright/legal markings sysfs: don't call notify_change sysdev: fix debugging statements in registration code. kobject: should use kobject_put() in kset-example kobject: reorder kobject to save space on 64 bit builds ... commit c7f80993a38f0354a8ad821bcd9335b47a464357 Author: Brice Goglin Date: Mon Jul 21 10:26:25 2008 +0200 myri10ge: use ioremap_wc Switch to ioremap_wc(). We keep the MTRR code since ioremap_wc() will use UC_MINUS when falling back to uncachable, and thus let the MTRR WC take precedence. Also rename the error path better. Signed-off-by: Brice Goglin Signed-off-by: Jeff Garzik commit e454e7e2e3afbcdc002ed55a087a14e8b057519d Author: Brice Goglin Date: Mon Jul 21 10:25:50 2008 +0200 myri10ge: remove wcfifo Remove the wcfifo since it never gave any performance improvement. Signed-off-by: Brice Goglin Signed-off-by: Jeff Garzik commit b57f9cae8724e4822fedfcc12530f868dcf6ea94 Author: Wang Chen Date: Tue Jul 22 13:13:18 2008 +0800 de4x5: Remove developer debug feature about set/clear promisc IFF_PROMISC flag shouldn't be set or cleared by drivers, because whether device be promisc mode is decided by how many upper layer callers being referenced to it. And the promisc changing feature of de4x5 ioctl is developer debug feature, we can remove it now. Signed-off-by: Wang Chen Acked-by: Grant Grundler Signed-off-by: Jeff Garzik commit 2b4ff112a0b3fe90de561a77f2e66000c028ca54 Author: frank.blaschka@de.ibm.com Date: Tue Jul 22 09:39:25 2008 +0200 qeth: fix build error caused by VLAN changes Adrian Bunk reports this build error: CC drivers/s390/net/qeth_l3_main.o /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_hard_start_xmit': /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/s390/net/qeth_l3_main.c: 2654: error: implicit declaration of function 'VLAN_TX_SKB_CB' /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/s390/net/qeth_l3_main.c: 2654: error: invalid type argument of '->' (have 'int') make[3]: *** [drivers/s390/net/qeth_l3_main.o] Error 1 The intention of the driver appears to be to invalidate the VLAN tag. Change it to set skb->vlan_tci to zero, which has the same effect. Signed-off-by: Patrick McHardy Signed-off-by: Frank Blaschka Signed-off-by: Jeff Garzik commit 217d5a51953143046cf2972eebdefe2b2db05718 Author: Laurent Pinchart Date: Tue Jul 22 17:43:42 2008 +0200 fs_enet: Remove unused fields in the fs_mii_bb_platform_info structure. The mdio_port, mdio_bit, mdc_port and mdc_bit fields in the fs_mii_bb_platform_info structure are left-overs from the move to the Phy Abstraction Layer subsystem. They are not used anymore and can be safely removed. Signed-off-by: Laurent Pinchart Signed-off-by: Jeff Garzik commit d999597349dcfd3b11205705c31a2f8e00688dd3 Merge: b32d131... 7733289... Author: Jeff Garzik Date: Tue Jul 22 16:07:11 2008 -0400 Merge branch 'r8169-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream-fixes commit f10140fbe5f97ecfeda986a12d0f1bad75642779 Author: Alan Cox Date: Tue Jul 22 15:25:07 2008 +0100 port_fixups: Fix ups for tty port changes I missed the cpm_uart one. Thanks to Kumar Gala for reporting it. A double check found samsung also needed fixing up. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit ed569bfb8e5d0725db11018130e44eb567d829c1 Author: Alan Cox Date: Tue Jul 22 13:44:14 2008 +0100 istallion: Use helpers The ldisc needs to be referenced properly when used. The tty layer has a helper for this which should have been used but this driver got missed originally. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit c68a99cda87a8356ea0e56cc5111043ac8402ffd Author: Paul Fulghum Date: Tue Jul 22 11:23:24 2008 +0100 synclink_gt fix locking in error path of rx enable Fix locking in error path of rx_enable() introduced by synclink_gt-add-rx-dma-buffer-fill-level-control patch. Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 814dae031d08d40d34c0403a54d6e659baf0ae71 Author: Paul Fulghum Date: Tue Jul 22 11:22:14 2008 +0100 synclink_gt: add rx DMA buffer fill level control Add run time control for receive DMA buffer fill level to allow application to control receive latency when using stream oriented serial protocols that pass receive data to application only after a DMA buffer fills. This was previously a compile time option, but run time control is needed when application changes data rate (and latency requirements) or uses different data rates on different ports. Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 993456cdc853a52e1042ebf93fc6e1a12d1216f7 Author: Paul Fulghum Date: Tue Jul 22 11:22:04 2008 +0100 synclink_gt: leave transmitter in reset state after configuration Leave the transmitter in reset state after configuration so that transmit signal is held at mark until transmitter is explicitly enabled by application, otherwise transmitter sends idle pattern. Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 403214d0ad9b2b9e46c89a5b4b513c910c89068d Author: Paul Fulghum Date: Tue Jul 22 11:21:55 2008 +0100 synclink_gt: improve TIOCOUTQ accuracy Improve the accuracy of TIOCOUTQ value as implemented in chars_in_buffer() method by walking and counting tx DMA buffers, reading controller tx FIFO level and accounting for controller tx shift register. The greatly improves application control of transmit latency at lower data rates. Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit e5590717afd5fb6f494323206a1a35ea25610c2d Author: Paul Fulghum Date: Tue Jul 22 11:21:39 2008 +0100 synclink_gt: add serial bit order control Add control of hardware serial bit order between LSB first (default/standard) and MSB first. Signed-off-by: Paul Fulghum Signed-off-by: Andrew Morton Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 8a38c2851d69