commit bed8cad9593974a46de5c8aa3d2ee7c49c17182f Merge: 5ccc387 b095cd0 Author: Linus Torvalds Date: Fri Aug 19 23:07:08 2011 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/drm-intel: drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge commit b095cd0a0ccdbc00c9fd99d90b22f8563687971f Author: Jesse Barnes Date: Fri Aug 12 15:28:32 2011 -0700 drm/i915: set GFX_MODE to pre-Ivybridge default value even on Ivybridge Prior to Ivybridge, the GFX_MODE would default to 0x800, meaning that MI_FLUSH would flush the TLBs in addition to the rest of the caches indicated in the MI_FLUSH command. However starting with Ivybridge, the register defaults to 0x2800 out of reset, meaning that to invalidate the TLB we need to use PIPE_CONTROL. Since we're not doing that yet, go back to the old default so things work. v2: don't forget to actually *clear* the new bit Reviewed-by: Eric Anholt Reviewed-by: Chris Wilson Tested-by: Kenneth Graunke Signed-off-by: Jesse Barnes commit 5ccc38740a283aba81a00e92941310d0c1aeb2ee Merge: 0c3bef6 b53d1ed Author: Linus Torvalds Date: Fri Aug 19 10:47:07 2011 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block * 'for-linus' of git://git.kernel.dk/linux-block: (23 commits) Revert "cfq: Remove special treatment for metadata rqs." block: fix flush machinery for stacking drivers with differring flush flags block: improve rq_affinity placement blktrace: add FLUSH/FUA support Move some REQ flags to the common bio/request area allow blk_flush_policy to return REQ_FSEQ_DATA independent of *FLUSH xen/blkback: Make description more obvious. cfq-iosched: Add documentation about idling block: Make rq_affinity = 1 work as expected block: swim3: fix unterminated of_device_id table block/genhd.c: remove useless cast in diskstats_show() drivers/cdrom/cdrom.c: relax check on dvd manufacturer value drivers/block/drbd/drbd_nl.c: use bitmap_parse instead of __bitmap_parse bsg-lib: add module.h include cfq-iosched: Reduce linked group count upon group destruction blk-throttle: correctly determine sync bio loop: fix deadlock when sysfs and LOOP_CLR_FD race against each other loop: add BLK_DEV_LOOP_MIN_COUNT=%i to allow distros 0 pre-allocated loop devices loop: add management interface for on-demand device allocation loop: replace linked list of allocated devices with an idr index ... commit 0c3bef612881ee6216a36952ffaabfc35b83545c Merge: 01b8833 69566dd Author: Linus Torvalds Date: Fri Aug 19 10:02:37 2011 -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: OF: Don't crash when bridge parent is NULL. PCI: export pcie_bus_configure_settings symbol PCI: code and comments cleanup PCI: make cardbus-bridge resources optional PCI: make SRIOV resources optional PCI : ability to relocate assigned pci-resources PCI: honor child buses add_size in hot plug configuration PCI: Set PCI-E Max Payload Size on fabric commit 69566dd8be42dea7a22f625abc96e65bb4b45d1f Author: David Daney Date: Tue Aug 16 11:24:37 2011 -0700 PCI: OF: Don't crash when bridge parent is NULL. In pcibios_get_phb_of_node(), we will crash while booting if bus->bridge->parent is NULL. Check for this case and avoid dereferencing the NULL pointer. Signed-off-by: David Daney Acked-by: Benjamin Herrenschmidt Acked-by: Grant Likely Signed-off-by: Jesse Barnes commit b53d1ed734a2b9af8da115b836b658daa7d47a48 Author: Jens Axboe Date: Fri Aug 19 08:34:48 2011 +0200 Revert "cfq: Remove special treatment for metadata rqs." We have a kernel build regression since 3.1-rc1, which is about 10% regression. The kernel source is in an ext3 filesystem. Alex Shi bisect it to commit: commit a07405b7802691d29ab3b23bdc76ee6d006aad0b Author: Justin TerAvest Date: Sun Jul 10 22:09:19 2011 +0200 cfq: Remove special treatment for metadata rqs. Apparently this is caused by lack metadata preemption, where ext3/ext4 do use READ_META. I didn't see a way to fix the issue, so suggest reverting the patch. This reverts commit a07405b7802691d29ab3b23bdc76ee6d006aad0b. Reported-by: Alex Shi Reported-by: Shaohua Li Signed-off-by: Jens Axboe commit 01b883358ba4b616d9d161b43af4bb5ee8124fe8 Merge: 2c4ac99 4a0342c Author: Linus Torvalds Date: Thu Aug 18 22:49:34 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc: fix array bounds error setting up PCIC NMI trap commit 2c4ac99f983f1341b5962a16b5e8de6049bf10b5 Merge: 35a21b4 a081da6 Author: Linus Torvalds Date: Thu Aug 18 22:48:30 2011 -0700 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: drivers/ata/sata_dwc_460ex.c: add missing kfree ata: Add iMX pata support pata_via: disable ATAPI DMA on AVERATEC 3200 [libata] sata_sil: fix used-uninit warning commit 35a21b429917baf86d7595826e7314662ec09d0a Merge: 5c80c71 910ac68 Author: Linus Torvalds Date: Thu Aug 18 22:47:13 2011 -0700 Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFSv4.1: Return NFS4ERR_BADSESSION to callbacks during session resets NFSv4.1: Fix the callback 'highest_used_slotid' behaviour pnfs-obj: Fix the comp_index != 0 case pnfs-obj: Bug when we are running out of bio nfs: add missing prefetch.h include commit 4a0342ca8e8150bd47e7118a76e300692a1b6b7b Author: Ian Campbell Date: Wed Aug 17 22:14:57 2011 +0000 sparc: fix array bounds error setting up PCIC NMI trap CC arch/sparc/kernel/pcic.o arch/sparc/kernel/pcic.c: In function 'pcic_probe': arch/sparc/kernel/pcic.c:359:33: error: array subscript is above array bounds [-Werror=array-bounds] arch/sparc/kernel/pcic.c:359:8: error: array subscript is above array bounds [-Werror=array-bounds] arch/sparc/kernel/pcic.c:360:33: error: array subscript is above array bounds [-Werror=array-bounds] arch/sparc/kernel/pcic.c:360:8: error: array subscript is above array bounds [-Werror=array-bounds] arch/sparc/kernel/pcic.c:361:33: error: array subscript is above array bounds [-Werror=array-bounds] arch/sparc/kernel/pcic.c:361:8: error: array subscript is above array bounds [-Werror=array-bounds] cc1: all warnings being treated as errors I'm not particularly familiar with sparc but t_nmi (defined in head_32.S via the TRAP_ENTRY macro) and pcic_nmi_trap_patch (defined in entry.S) both appear to be 4 instructions long and I presume from the usage that instructions are int sized. Signed-off-by: Ian Campbell Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Reviewed-by: Sam Ravnborg Signed-off-by: David S. Miller commit a081da630d64acf132b2db1043c586b993d49da7 Author: Julia Lawall Date: Mon Aug 8 13:17:57 2011 +0200 drivers/ata/sata_dwc_460ex.c: add missing kfree Currently, error handling code in this function calls the function sata_dwc_port_stop, but this function has essentially no effect if hsdevp has not been stored in ap, which is the case throughout this function. The only effect is to print a debugging message including ap->print_id. The code is rewritten to not call sata_dwc_port_stop, but instead to jump to a local label that prints the original error message and the print_id information. In the case where hsdevp has been already allocated (but not yet stored in ap), this value is freed as well. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @exists@ local idexpression x; statement S,S1; expression E; identifier fl; expression *ptr != NULL; @@ x = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...kfree(x)...+> } when any when != true x == NULL x->fl ...> ( if (x == NULL) S1 | if (...) { ... when != x when forall ( return \(0\|<+...x...+>\|ptr\); | * return ...; ) } ) // Signed-off-by: Julia Lawall Signed-off-by: Jeff Garzik commit e39c75cf3e045c2fb3988770b207dfd09c30d4ac Author: Arnaud Patard (Rtp) Date: Tue Jul 26 16:58:19 2011 +0200 ata: Add iMX pata support Add basic support for pata on iMX. It has been tested only on imx51. SDMA support will probably be added later so this version supports only PIO. v2: - enable only when needed IORDY - use dev_get_drvdata v3: - add missing clk_put() calls - use platform_get_irq() - fix resume code to avoid disabling IORDY on resume v4: - Remove EXPERIMENTAL and switch to depends on ARCH_MXC - Use devm_kzalloc() - make clock a must-have - Use only 1 ioremap Signed-off-by: Arnaud Patard Signed-off-by: Jeff Garzik commit 6d0e194d2eefcaab6dbdca1f639748660144acb5 Author: Tejun Heo Date: Thu Aug 4 11:15:07 2011 +0200 pata_via: disable ATAPI DMA on AVERATEC 3200 On AVERATEC 3200, pata_via causes memory corruption with ATAPI DMA, which often leads to random kernel oops. The cause of the problem is not well understood yet and only small subset of machines using the controller seem affected. Blacklist ATAPI DMA on the machine. Signed-off-by: Tejun Heo Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=11426 Reported-and-tested-by: Jim Bray Cc: Alan Cox Cc: stable@kernel.org Signed-off-by: Jeff Garzik commit ebd1699ec5f1a6f1f2df6b48fa54bc6ff790143c Author: Jeff Garzik Date: Thu Aug 18 23:52:36 2011 -0400 [libata] sata_sil: fix used-uninit warning Init 'serror' to silence the following warning: drivers/ata/sata_sil.c: In function ‘sil_interrupt’: drivers/ata/sata_sil.c:453:14: warning: ‘serror’ may be used uninitialized in this function [-Wuninitialized] This is not a 'can never happen' but is nonetheless extremely unlikely. The easiest and cleanest warning fix is simply to init the var, rather than worry about marking the var uninit-ok. Signed-off-by: Jeff Garzik commit 5c80c71b9a0ec518b4b58d2a61de01a04f4a4453 Merge: 01fa4ba 81d86e1 Author: Linus Torvalds Date: Thu Aug 18 14:20:00 2011 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: set i_size properly when fallocating and we already btrfs: unlock on error in btrfs_file_llseek() btrfs: btrfs_permission's RO check shouldn't apply to device nodes Btrfs: truncate pages from clone ioctl target range Btrfs: fix uninitialized sync_pending Btrfs: fix wrong free space information btrfs: memory leak in btrfs_add_inode_defrag() Btrfs: use plain page_address() in header fields setget functions Btrfs: forced readonly when btrfs_drop_snapshot() fails Btrfs: check if there is enough space for balancing smarter Btrfs: fix a bug of balance on full multi-disk partitions Btrfs: fix an oops of log replay Btrfs: detect wether a device supports discard Btrfs: force unplugs when switching from high to regular priority bios commit 01fa4ba52c36224783107a40126f1c6354d4e965 Merge: fbad899 04c05b4 Author: Linus Torvalds Date: Thu Aug 18 14:19:36 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: update cifs version to 1.75 [CIFS] possible memory corruption on mount cifs: demote cERROR in build_path_from_dentry to cFYI commit fbad8991ef9d41d1fad587dff23fa6deff01af83 Merge: f6a975c 80b43de Author: Linus Torvalds Date: Thu Aug 18 14:18:55 2011 -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: IB/iser: Support iSCSI PDU padding IBiser: Fix wrong mask when sizeof (dma_addr_t) > sizeof (unsigned long) IPoIB: Fix possible NULL dereference in ipoib_start_xmit() commit f6a975c50a1c5e68c376634b4331052990ca3dfd Merge: d522a0d 710d440 Author: Linus Torvalds Date: Thu Aug 18 14:16:13 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6: fat: fat16 support maximum 4GB file/vol size as WinXP or 7. fat: fix utf8 iocharset warning message fat: fix build warning commit d522a0d17963e9c2e556db2cbd60c96d40505b6c Author: Randy Dunlap Date: Thu Aug 18 12:19:27 2011 -0700 irqdesc: fix new kernel-doc warning Fix kernel-doc warning in irqdesc.c: Warning(kernel/irq/irqdesc.c:353): No description found for parameter 'owner' Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 8cf2d2399ab60842f55598bc1b00fd15503b9950 Author: Mathias Krause Date: Thu Aug 18 09:17:00 2011 +0200 i7core_edac: fixed typo in error count calculation Based on a patch from the PaX Team, found during a clang analysis pass. Signed-off-by: Mathias Krause Acked-by: Mauro Carvalho Chehab Cc: PaX Team Cc: stable@kernel.org [v2.6.35+] Signed-off-by: Linus Torvalds commit 04c05b4a68c0ab0d6bb41c710a646e56f62a70a3 Author: Steve French Date: Thu Aug 18 04:44:35 2011 +0000 update cifs version to 1.75 Signed-off-by: Steve French commit 13589c437daf4c8e429b3236c0b923de1c9420d8 Author: Steve French Date: Thu Aug 18 04:41:55 2011 +0000 [CIFS] possible memory corruption on mount CIFS cleanup_volume_info_contents() looks like having a memory corruption problem. When UNCip is set to "&vol->UNC[2]" in cifs_parse_mount_options(), it should not be kfree()-ed in cleanup_volume_info_contents(). Introduced in commit b946845a9dc523c759cae2b6a0f6827486c3221a Signed-off-by: J.R. Okajima Reviewed-by: Jeff Layton CC: Stable Signed-off-by: Steve French commit 81d86e1b70961f4816f961875e0c706b0954acad Merge: 9a4327c f1e490a Author: Chris Mason Date: Thu Aug 18 10:38:03 2011 -0400 Merge branch 'btrfs-3.0' into for-linus commit f1e490a7ebe41e06324abbbcd86005b0af02a375 Author: Josef Bacik Date: Thu Aug 18 10:36:39 2011 -0400 Btrfs: set i_size properly when fallocating and we already xfstests exposed a problem with preallocate when it fallocates a range that already has an extent. We don't set the new i_size properly because we see that we already have an extent. This isn't right and we should update i_size if the space already exists. With this patch we now pass xfstests 075. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason commit 9a4327ca1f45f82edad7dc0a4e52ce9316e0950c Author: Dan Carpenter Date: Thu Aug 18 10:16:05 2011 -0400 btrfs: unlock on error in btrfs_file_llseek() There were some unlocks on error missing in a recent patch to btrfs_file_llseek(). Signed-off-by: Dan Carpenter Signed-off-by: Chris Mason commit cb6db4e57632ba8589cc2f9fe1d0aa9116b87ab8 Author: Jeff Mahoney Date: Mon Aug 15 17:27:21 2011 +0000 btrfs: btrfs_permission's RO check shouldn't apply to device nodes This patch tightens the read-only access checks in btrfs_permission to match the constraints in inode_permission. Currently, even though the device node itself will be unmodified, read-write access to device nodes is denied to when the device node resides on a read-only subvolume or a is a file that has been marked read-only by the btrfs conversion utility. With this patch applied, the check only affects regular files, directories, and symlinks. It also restructures the code a bit so that we don't duplicate the MAY_WRITE check for both tests. Signed-off-by: Jeff Mahoney Signed-off-by: Chris Mason commit 338d0f0a6fbc82407864606f5b64b75aeb3c70f2 Author: Timo Warns Date: Wed Aug 17 17:59:56 2011 +0200 befs: Validate length of long symbolic links. Signed-off-by: Timo Warns Signed-off-by: Linus Torvalds commit b4fd4ae6c6420c18e4bae2c294b7e06f5ff5210f Merge: aa462ab 17f2ae7 Author: Linus Torvalds Date: Wed Aug 17 13:15:25 2011 -0700 Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / Domains: Fix build for CONFIG_PM_RUNTIME unset commit aa462abe8aaf2198d6aef97da20c874ac694a39f Author: Ian Campbell Date: Wed Aug 17 17:40:33 2011 +0100 mm: fix __page_to_pfn for a const struct page argument This allows the cast in lowmem_page_address (introduced as a warning fixup to 33dd4e0ec911 "mm: make some struct page's const") to be removed. Propagate const'ness to page_to_section() as well since it is required by __page_to_pfn. Signed-off-by: Ian Campbell Acked-by: Rik van Riel Cc: Andrea Arcangeli Cc: Michel Lespinasse Cc: Mel Gorman Cc: Andrew Morton Signed-off-by: Linus Torvalds commit f991879473828f320a714e9494fb37a26ccd6b66 Author: Ian Campbell Date: Wed Aug 17 13:45:09 2011 +0100 mm: make HASHED_PAGE_VIRTUAL page_address' struct page argument const. Followup to 33dd4e0ec911 "mm: make some struct page's const" which missed the HASHED_PAGE_VIRTUAL case. Signed-off-by: Ian Campbell Cc: Andrea Arcangeli Cc: Rik van Riel Cc: Michel Lespinasse Cc: Mel Gorman Cc: Andrew Morton Signed-off-by: Linus Torvalds commit 80b43de83781ed67810d54c7892ac9cb2a2601df Merge: 22cfb0b 200ae1a Author: Roland Dreier Date: Wed Aug 17 10:57:43 2011 -0700 Merge branches 'ipoib' and 'iser' into for-next commit 72ed62bdc46d76c965fb95aecb5d0bf97c976723 Merge: 6cac952 bdc2209 Author: Linus Torvalds Date: Wed Aug 17 10:31:39 2011 -0700 Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf probe: Filter out redundant inline-instances perf probe: Search concrete out-of-line instances perf probe: Avoid searching variables in intermediate scopes perf probe: Fix to search local variables in appropriate scope perf probe: Warn when more than one line are given perf probe: Fix to walk all inline instances perf probe: Fix to search nested inlined functions in CU perf probe: Fix line walker to check CU correctly perf probe: Fix a memory leak for scopes array perf: fix temporary file ownership check perf report: Use properly build_id kernel binaries perf top browser: Remove spurious helpline update commit 6cac95296034bed7b2716d5f4e417a26a618da94 Merge: 2da9f36 6e7a333 Author: Linus Torvalds Date: Wed Aug 17 10:28:33 2011 -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: rtc: Limit RTC PIE frequency rtc: Fix hrtimer deadlock rtc: Handle errors correctly in rtc_irq_set_state() Fixup trivial conflicts in drivers/rtc/interface.c due to slightly trivially versions of the same patch coming in two different ways. commit 2da9f365fc401b79627bc7be56d8a2b4ee9b390b Merge: 950d0a1 80e0401 Author: Linus Torvalds Date: Wed Aug 17 10:25:08 2011 -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: lockdep: Fix wrong assumption in match_held_lock commit 950d0a10d12578a270f3dfa9fd76fe5c2deb343f Merge: ab7e2db b687380 Author: Linus Torvalds Date: Wed Aug 17 10:23:50 2011 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: irq: Track the owner of irq descriptor irq: Always set IRQF_ONESHOT if no primary handler is specified genirq: Fix wrong bit operation commit 200ae1a08bec8f3fedfcfe94c892d9a024db4e46 Author: Or Gerlitz Date: Mon Aug 1 21:14:09 2011 +0000 IB/iser: Support iSCSI PDU padding RFC3270 mandates that iSCSI PDUs are padded to the closest integer number of four byte words. Fix the iser code to support that on both the TX/RX flows. Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier commit 0ace64b85ea7b90e3bffe408b9d7c3364692bfa4 Author: Or Gerlitz Date: Mon Aug 1 21:12:09 2011 +0000 IBiser: Fix wrong mask when sizeof (dma_addr_t) > sizeof (unsigned long) The code that prepares the SG associated with SCSI command for FMR was buggy for systems with DMA addresses that don't fit in unsigned long, e.g under the 32-bit based XenServer dom0 sizeof(dma_addr_t) is 8. Fix that by casting to unsigned long long a masking constant used by the code. This resolves a crash in iser_sg_to_page_vec on this system. Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier commit 710d4403a45c4040a9aa86971d50958f5ae6ed40 Author: Namjae Jeon Date: Wed Aug 17 19:10:09 2011 +0900 fat: fat16 support maximum 4GB file/vol size as WinXP or 7. FAT16 support maximum 4GB vol/file size with 64KB cluster size. Win NT/XP/7 increased the maximum cluster size to 64KB, and file/vol size increased 4GB also. Although increasing, the file size of linux FAT is still limited at 2GB. I found that it is limited by sb->maxbytes(0x7fffffff) when partition is formatted by FAT16. sb->s_maxbytes in fill_super should be set to 0xffffffff like fat32. Signed-off-by: Namjae Jeon Signed-off-by: OGAWA Hirofumi commit 186b53701ca5a843b07ca44a8d954dc6043c70f4 Author: Mihai Moldovan Date: Wed Aug 17 19:10:08 2011 +0900 fat: fix utf8 iocharset warning message The fat_msg function already formats the given message and appends a newline to it - we don't need to do this in the passed message string as well, or will end up with a blank line printed in the kernel log ring buffer. Also change the loglevel from error to warning. Signed-off-by: Mihai Moldovan Signed-off-by: OGAWA Hirofumi commit 8c320c079cde0286d71368961231e426539868b4 Author: Jonas Aberg Date: Wed Aug 17 19:10:06 2011 +0900 fat: fix build warning This fixes a compile warning (unititialized variable) in the fat filesystem code. Signed-off-by: Jonas Aberg Signed-off-by: Lee Jones Signed-off-by: Linus Walleij Signed-off-by: OGAWA Hirofumi commit f81c9cdc567cd3160ff9e64868d9a1a7ee226480 Author: Sage Weil Date: Wed Aug 10 18:04:04 2011 +0000 Btrfs: truncate pages from clone ioctl target range We need to truncate page cache pages for the clone ioctl target range or else we'll confuse ourselves to no end. If the old data was cached, we used to still see it (until remount). If the page was partially updated we used to get a mix of old and new data. Signed-off-by: Sage Weil Signed-off-by: Chris Mason commit 0e588859618be54ec100373f1b86296271ce5307 Author: Miao Xie Date: Fri Aug 5 09:32:37 2011 +0000 Btrfs: fix uninitialized sync_pending sync_pending is uninitialized before it be used, fix it. Signed-off-by: Miao Xie Signed-off-by: Chris Mason commit bb3ac5a4dfc8eeb881206c77d9f925e320d9c41a Author: Miao Xie Date: Fri Aug 5 09:32:35 2011 +0000 Btrfs: fix wrong free space information Btrfs subtracted the size of the allocated space twice when it allocated the space from the bitmap in the cluster, it broke the free space information and led to oops finally. And this patch also fixes the bug that ctl->free_space was subtracted without lock. Reported-by: Liu Bo Signed-off-by: Miao Xie Signed-off-by: Chris Mason commit f4ac904c411b55e58bb240f332f93db2455f0010 Author: Dan Carpenter Date: Fri Aug 5 14:19:00 2011 +0000 btrfs: memory leak in btrfs_add_inode_defrag() We don't use the defrag struct on this path. Signed-off-by: Dan Carpenter Signed-off-by: Chris Mason commit c97c2916e25c56e878e3e94efd449e2d688fcb31 Author: Li Zefan Date: Wed Aug 3 08:11:41 2011 +0000 Btrfs: use plain page_address() in header fields setget functions We've stopped using highmem for extent buffers. Signed-off-by: Li Zefan Signed-off-by: Chris Mason commit cb1b69f4508a1e8c1a7907379eafceb7ae0325ef Author: Tsutomu Itoh Date: Tue Aug 9 07:11:13 2011 +0000 Btrfs: forced readonly when btrfs_drop_snapshot() fails The filesystem turns readonly instead of returning the error to the caller when detected error in btrfs_drop_snapshot(). and, because the caller doesn't check the error, the function type is changed to 'void'. Signed-off-by: Tsutomu Itoh Signed-off-by: Chris Mason commit cdcb725c05fe0cb71777c66ddc2445fedbbb3c59 Author: liubo Date: Wed Aug 3 10:15:25 2011 +0000 Btrfs: check if there is enough space for balancing smarter When checking if there is enough space for balancing a block group, since we do not take raid types into consideration, we do not account corrent amounts of space that we needed. This makes us do some extra work before we get ENOSPC. Signed-off-by: Liu Bo Signed-off-by: Chris Mason commit 38c01b9605923cfdff5413e0a12e58ee8d962257 Author: liubo Date: Tue Aug 2 02:39:03 2011 +0000 Btrfs: fix a bug of balance on full multi-disk partitions When balancing, we'll first try to shrink devices for some space, but if it is working on a full multi-disk partition with raid protection, we may encounter a bug, that is, while shrinking, total_bytes may be less than bytes_used, and btrfs may allocate a dev extent that accesses out of device's bounds. Then we will not be able to write or read the data which stores at the end of the device, and get the followings: device fsid 0939f071-7ea3-46c8-95df-f176d773bfb6 devid 1 transid 10 /dev/sdb5 Btrfs detected SSD devices, enabling SSD mode btrfs: relocating block group 476315648 flags 9 btrfs: found 4 extents attempt to access beyond end of device sdb5: rw=145, want=546176, limit=546147 attempt to access beyond end of device sdb5: rw=145, want=546304, limit=546147 attempt to access beyond end of device sdb5: rw=145, want=546432, limit=546147 attempt to access beyond end of device sdb5: rw=145, want=546560, limit=546147 attempt to access beyond end of device Signed-off-by: Liu Bo Signed-off-by: Chris Mason commit 34f3e4f23ca3d259fe078f62a128d97ca83508ef Author: liubo Date: Sat Aug 6 08:35:23 2011 +0000 Btrfs: fix an oops of log replay When btrfs recovers from a crash, it may hit the oops below: ------------[ cut here ]------------ kernel BUG at fs/btrfs/inode.c:4580! [...] RIP: 0010:[] [] btrfs_add_link+0x161/0x1c0 [btrfs] [...] Call Trace: [] ? btrfs_inode_ref_index+0x31/0x80 [btrfs] [] add_inode_ref+0x319/0x3f0 [btrfs] [] replay_one_buffer+0x2c7/0x390 [btrfs] [] walk_down_log_tree+0x32a/0x480 [btrfs] [] walk_log_tree+0xf5/0x240 [btrfs] [] btrfs_recover_log_trees+0x250/0x350 [btrfs] [] ? btrfs_recover_log_trees+0x350/0x350 [btrfs] [] open_ctree+0x1442/0x17d0 [btrfs] [...] This comes from that while replaying an inode ref item, we forget to check those old conflicting DIR_ITEM and DIR_INDEX items in fs/file tree, then we will come to conflict corners which lead to BUG_ON(). Signed-off-by: Liu Bo Tested-by: Andy Lutomirski Signed-off-by: Chris Mason commit d5e2003c2bcda93a8f2e668eb4642d70c9c38301 Author: Josef Bacik Date: Thu Aug 4 14:52:27 2011 +0000 Btrfs: detect wether a device supports discard We have a problem where if a user specifies discard but doesn't actually support it we will return EOPNOTSUPP from btrfs_discard_extent. This is a problem because this gets called (in a fashion) from the tree log recovery code, which has a nice little BUG_ON(ret) after it, which causes us to fail the tree log replay. So instead detect wether our devices support discard when we're adding them and then don't issue discards if we know that the device doesn't support it. And just for good measure set ret = 0 in btrfs_issue_discard just in case we still get EOPNOTSUPP so we don't screw anybody up like this again. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason commit ab7e2dbf9b5da4d4eb4fdb019cc8881fbeb1299b Merge: 4bc9b07 df3d8ae Author: Linus Torvalds Date: Tue Aug 16 11:14:44 2011 -0700 Merge branch 'kvm-updates/3.1' of git://git.kernel.org/pub/scm/virt/kvm/kvm * 'kvm-updates/3.1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: uses TASKSTATS, depends on NET KVM: fix TASK_DELAY_ACCT kconfig warning commit 4bc9b0796b5abe6dffa16faaa7f6b9b25dd4b251 Merge: 4fec0e0 88ff987 Author: Linus Torvalds Date: Tue Aug 16 10:40:29 2011 -0700 Merge branch 'fixallnoconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'fixallnoconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] fix "allnoconfig" build commit 22cfb0bf6721bb1f865f67bc21e3c36c272faf36 Author: Bernd Schubert Date: Tue Aug 16 10:56:54 2011 +0000 IPoIB: Fix possible NULL dereference in ipoib_start_xmit() Fix a bug introduced in 69cce1d14049 ("net: Abstract dst->neighbour accesses behind helpers.") where we might dereference skb_dst(skb) even if it is NULL, which causes: [ 240.944030] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040 [ 240.948007] IP: [] ipoib_start_xmit+0x39/0x280 [ib_ipoib] [...] [ 240.948007] Call Trace: [ 240.948007] [ 240.948007] [] dev_hard_start_xmit+0x2a0/0x590 [ 240.948007] [] ? arp_create+0x70/0x200 [ 240.948007] [] sch_direct_xmit+0xef/0x1c0 Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=41212 Signed-off-by: Bernd Schubert Signed-off-by: Roland Dreier commit df3d8ae1f8780166a16dd7d08b4842a4d5b5f2b4 Author: Randy Dunlap Date: Tue Aug 2 12:54:31 2011 -0700 KVM: uses TASKSTATS, depends on NET CONFIG_TASKSTATS just had a change to use netlink, including a change to "depends on NET". Since "select" does not follow dependencies, KVM also needs to depend on NET to prevent build errors when CONFIG_NET is not enabled. Sample of the reported "undefined reference" build errors: taskstats.c:(.text+0x8f686): undefined reference to `nla_put' taskstats.c:(.text+0x8f721): undefined reference to `nla_reserve' taskstats.c:(.text+0x8f8fb): undefined reference to `init_net' taskstats.c:(.text+0x8f905): undefined reference to `netlink_unicast' taskstats.c:(.text+0x8f934): undefined reference to `kfree_skb' taskstats.c:(.text+0x8f9e9): undefined reference to `skb_clone' taskstats.c:(.text+0x90060): undefined reference to `__alloc_skb' taskstats.c:(.text+0x901e9): undefined reference to `skb_put' taskstats.c:(.init.text+0x4665): undefined reference to `genl_register_family' taskstats.c:(.init.text+0x4699): undefined reference to `genl_register_ops' taskstats.c:(.init.text+0x4710): undefined reference to `genl_unregister_ops' taskstats.c:(.init.text+0x471c): undefined reference to `genl_unregister_family' Signed-off-by: Randy Dunlap Signed-off-by: Marcelo Tosatti commit 4fec0e0bde09095b6349dc6206dbf19cebcd0a7e Author: Randy Dunlap Date: Mon Aug 15 21:41:43 2011 -0700 xen: self-balloon needs module.h Fix build errors (found when CONFIG_SYSFS is not enabled): drivers/xen/xen-selfballoon.c:446: warning: data definition has no type or storage class drivers/xen/xen-selfballoon.c:446: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' drivers/xen/xen-selfballoon.c:446: warning: parameter names (without types) in function declaration drivers/xen/xen-selfballoon.c:485: error: expected declaration specifiers or '...' before string constant drivers/xen/xen-selfballoon.c:485: warning: data definition has no type or storage class drivers/xen/xen-selfballoon.c:485: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/xen/xen-selfballoon.c:485: warning: function declaration isn't a prototype Signed-off-by: Randy Dunlap Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Linus Torvalds commit c3585aa91a25264234c8bd27a4a6823d4e544c2a Author: Alan Cox Date: Tue Aug 16 14:18:48 2011 +0100 gma500: kill MIPI interface types Kirill Shutemov found problems with the non-upstream IMG driver where the use of extra DRM encoder/connector types caused random crashes when the DRM layer tried to display their matching name. This removes the MIPI types matching the changes Pauli Nieminen made to the non upstream driver set. As Pauli points out: " MIPI (or DSI) is protocol specification on top of LVDS serial bus. That makes it resonable to call MIPI connectors and encoders LVDS." (and indeed they may also be HDMI convertors or similar when we want to report a more useful to end user result) Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit fa71f447065f676157ba6a2c121ba419818fc559 Author: Jeff Layton Date: Mon Aug 8 11:50:24 2011 -0400 cifs: demote cERROR in build_path_from_dentry to cFYI Running the cthon tests on a recent kernel caused this message to pop occasionally: CIFS VFS: did not end path lookup where expected namelen is 0 Some added debugging showed that namelen and dfsplen were both 0 when this occurred. That means that the read_seqretry returned true. Assuming that the comment inside the if statement is true, this should be harmless and just means that we raced with a rename. If that is the case, then there's no need for alarm and we can demote this to cFYI. While we're at it, print the dfsplen too so that we can see what happened here if the message pops during debugging. Cc: stable@kernel.org Cc: Al Viro Signed-off-by: Jeff Layton Signed-off-by: Steve French commit b5ddbf465f3675b19c8f5528b4064cbf278a5c6f Author: Stephen Rothwell Date: Tue Aug 16 09:36:06 2011 +1000 regmap: using module facilities requires module.h Commit b33f9cbd67ba ("regmap: Specify a module license") added a MODULES_LICENSE to this file without adding an include of module.h. module.h should have been included anyway, since this file has EXPORT_SYMBOLs as well. With the pending module.h split up, this would probably have caused build problems. Cc: Stephen Warren Cc: Mark Brown Signed-off-by: Stephen Rothwell Signed-off-by: Linus Torvalds commit 870d3be1249b1397395ed3164987397993a16d91 Merge: edb5811 52884b2 Author: Linus Torvalds Date: Mon Aug 15 19:24:42 2011 -0700 Merge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs * 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs: Docs: MSI-HOWTO: MSI -> MSIs Docs: MSI-HOWTO: Insert a comma Docs: MSI-HOWTO: can -> could Docs: MSI-HOWTO: Use `unknown ...' rather than `... know about.' Docs: MSI-HOWTO: may -> might Docs: MSI-HOWTO: Insert a comma Docs: MSI-HOWTO: API -> function Docs: MSI-HOWTO: , -> ; Docs: MSI-HOWTO: Move a sentence to another paragraph Docs: MSI-HOWTO: Insert `that' Docs: MSI-HOWTO: Offset modifier with a comma, and insert `yet' for emphasis Docs: MSI-HOWTO: Put the `because' subordinate clause first Docs: MSI-HOWTO: Streamline some wording Docs: MSI-HOWTO: `asked for' -> `requested' Docs: MSI-HOWTO: Use present tense and streamline some wording Docs: MSI-HOWTO: Use the subjunctive, and change `can' to `may' commit edb581110d04c70a4be5723ff8862a0f523657dd Merge: 291b63c 178a296 Author: Linus Torvalds Date: Mon Aug 15 19:16:01 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Set HAVE_C_RECORDMCOUNT sparc32: unbreak arch_write_unlock() sparc64: remove unnecessary macros from spinlock_64.h commit 291b63c86aea8a571ddf913d41ab5156b8314dad Merge: cedf03b 92b79f4 Author: Linus Torvalds Date: Mon Aug 15 19:14:18 2011 -0700 Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6 * 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6: drm/i915: Cannot set clock gating under UMS drm/i915: Can't do accurate vblank timestamps with UMS Not all systems expose a firmware or platform mechanism for changing the backlight intensity on i915, so add native driver support. drm/i915: split out PCH refclk update code drm/i915: show interrupt info on IVB drm/i915: Remove unused 'reg' argument to dp_pipe_enabled drm/i915: Fix PCH port pipe select in CPT disable paths drm/i915: Leave LVDS registers unlocked drm/i915: Wait for LVDS panel power sequence commit cedf03bd9aa54d1d7a9065dddc9e76505f476b12 Author: Randy Dunlap Date: Mon Aug 15 10:18:46 2011 -0700 x86: fix mm/fault.c build arch/x86/mm/fault.c needs to include asm/vsyscall.h to fix a build error: arch/x86/mm/fault.c: In function '__bad_area_nosemaphore': arch/x86/mm/fault.c:728: error: 'VSYSCALL_START' undeclared (first use in this function) Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 178a29600340bef5b13cd4157053679debe35351 Author: David S. Miller Date: Mon Aug 15 14:45:17 2011 -0700 sparc64: Set HAVE_C_RECORDMCOUNT Signed-off-by: David S. Miller commit 3f6aa0b113846a8628baa649af422cfc6fb1d786 Author: Mikael Pettersson Date: Mon Aug 15 10:11:50 2011 +0000 sparc32: unbreak arch_write_unlock() The sparc32 version of arch_write_unlock() is just a plain assignment. Unfortunately this allows the compiler to schedule side-effects in a protected region to occur after the HW-level unlock, which is broken. E.g., the following trivial test case gets miscompiled: #include rwlock_t lock; int counter; void foo(void) { write_lock(&lock); ++counter; write_unlock(&lock); } Fixed by adding a compiler memory barrier to arch_write_unlock(). The sparc64 version combines the barrier and assignment into a single asm(), and implements the operation as a static inline, so that's what I did too. Compile-tested with sparc32_defconfig + CONFIG_SMP=y. Signed-off-by: Mikael Pettersson Signed-off-by: David S. Miller commit a0fba3eb059e73fed2d376a901f8117734c12f1f Author: Mikael Pettersson Date: Mon Aug 15 10:10:31 2011 +0000 sparc64: remove unnecessary macros from spinlock_64.h The sparc64 spinlock_64.h contains a number of operations defined first as static inline functions, and then as macros with the same names and parameters as the functions. Maybe this was needed at some point in the past, but now nothing seems to depend on these macros (checked with a recursive grep looking for ifdefs on these names). Other archs don't define these identity-macros. So this patch deletes these unnecessary macros. Compile-tested with sparc64_defconfig. Signed-off-by: Mikael Pettersson Signed-off-by: David S. Miller commit 4853abaae7e4a2af938115ce9071ef8684fb7af4 Author: Jeff Moyer Date: Mon Aug 15 21:37:25 2011 +0200 block: fix flush machinery for stacking drivers with differring flush flags Commit ae1b1539622fb46e51b4d13b3f9e5f4c713f86ae, block: reimplement FLUSH/FUA to support merge, introduced a performance regression when running any sort of fsyncing workload using dm-multipath and certain storage (in our case, an HP EVA). The test I ran was fs_mark, and it dropped from ~800 files/sec on ext4 to ~100 files/sec. It turns out that dm-multipath always advertised flush+fua support, and passed commands on down the stack, where those flags used to get stripped off. The above commit changed that behavior: static inline struct request *__elv_next_request(struct request_queue *q) { struct request *rq; while (1) { - while (!list_empty(&q->queue_head)) { + if (!list_empty(&q->queue_head)) { rq = list_entry_rq(q->queue_head.next); - if (!(rq->cmd_flags & (REQ_FLUSH | REQ_FUA)) || - (rq->cmd_flags & REQ_FLUSH_SEQ)) - return rq; - rq = blk_do_flush(q, rq); - if (rq) - return rq; + return rq; } Note that previously, a command would come in here, have REQ_FLUSH|REQ_FUA set, and then get handed off to blk_do_flush: struct request *blk_do_flush(struct request_queue *q, struct request *rq) { unsigned int fflags = q->flush_flags; /* may change, cache it */ bool has_flush = fflags & REQ_FLUSH, has_fua = fflags & REQ_FUA; bool do_preflush = has_flush && (rq->cmd_flags & REQ_FLUSH); bool do_postflush = has_flush && !has_fua && (rq->cmd_flags & REQ_FUA); unsigned skip = 0; ... if (blk_rq_sectors(rq) && !do_preflush && !do_postflush) { rq->cmd_flags &= ~REQ_FLUSH; if (!has_fua) rq->cmd_flags &= ~REQ_FUA; return rq; } So, the flush machinery was bypassed in such cases (q->flush_flags == 0 && rq->cmd_flags & (REQ_FLUSH|REQ_FUA)). Now, however, we don't get into the flush machinery at all. Instead, __elv_next_request just hands a request with flush and fua bits set to the scsi_request_fn, even if the underlying request_queue does not support flush or fua. The agreed upon approach is to fix the flush machinery to allow stacking. While this isn't used in practice (since there is only one request-based dm target, and that target will now reflect the flush flags of the underlying device), it does future-proof the solution, and make it function as designed. In order to make this work, I had to add a field to the struct request, inside the flush structure (to store the original req->end_io). Shaohua had suggested overloading the union with rb_node and completion_data, but the completion data is used by device mapper and can also be used by other drivers. So, I didn't see a way around the additional field. I tested this patch on an HP EVA with both ext4 and xfs, and it recovers the lost performance. Comments and other testers, as always, are appreciated. Cheers, Jeff Signed-off-by: Jeff Moyer Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 92b79f4322b8a2506bdd862f554a2a81ff0a2dad Author: Keith Packard Date: Fri Aug 12 17:07:18 2011 -0700 drm/i915: Cannot set clock gating under UMS The clock gating functions are only assigned under KMS, so don't try to call them under UMS. Signed-off-by: Keith Packard Tested-by: Justin P. Mattock commit c3613de92ebea302137d21d8938421c3f88d8741 Author: Keith Packard Date: Fri Aug 12 17:05:54 2011 -0700 drm/i915: Can't do accurate vblank timestamps with UMS Disable this feature when KMS is not running by setting the driver->get_vblank_timestamp function pointer to NULL. Signed-off-by: Keith Packard Tested-by: Justin P. Mattock commit aaa6fd2a004147bf32fce05720938236de3361d9 Author: Matthew Garrett Date: Fri Aug 12 12:11:33 2011 +0200 Not all systems expose a firmware or platform mechanism for changing the backlight intensity on i915, so add native driver support. Signed-off-by: Matthew Garrett Cc: Richard Purdie Cc: Chris Wilson Cc: David Airlie Cc: Alex Deucher Cc: Ben Skeggs Cc: Zhang Rui Cc: Len Brown Cc: Jesse Barnes Tested-by: Sedat Dilek Tested-by: Michel Alexandre Salim Tested-by: Kamal Mostafa Signed-off-by: Andrew Morton Signed-off-by: Keith Packard commit 2f6a123821a7feaba7cee787ef0f21d2354d1730 Merge: 6f02bfc e22a539 Author: Linus Torvalds Date: Mon Aug 15 08:46:11 2011 -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: lguest: allow booting guest with CONFIG_RELOCATABLE=y virtio: Add text copy of spec to Documentation/virtual. commit 6f02bfc404decf5b5046f1413ef941e1870912f7 Merge: a0b3447 a01e836 Author: Linus Torvalds Date: Mon Aug 15 08:40:49 2011 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: firewire: ohci: fix DMA unmapping in an error path firewire: cdev: fix 32 bit userland on 64 bit kernel compat corner cases commit a0b3447fb1d8b32071f473c779a482277816867a Merge: 4cb5aa1 1c8007b Author: Linus Torvalds Date: Mon Aug 15 08:40:24 2011 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6: jfs: flush journal completely before releasing metadata inodes commit 4cb5aa1d01c9794623df6a2320dcd6398cbe5e8e Merge: aa2b1cf d5811e8 Author: Linus Torvalds Date: Mon Aug 15 08:39:10 2011 -0700 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/kms: don't try to be smart in the hpd handler drm/radeon: re-POST the asic on Apple hardware when booted via EFI drm/radeon: Allow panel preferred EDID to override BIOS native mode drm/radeon/kms: make some watermark messages debug only drm/radeon/kms: fix regression is handling >2 heads on cedar/caicos drm/radeon/kms: don't enable connectors that are off in the hotplug handler commit aa2b1cf5ca44811ab842c1cd8d32f95b8f51e557 Merge: 259a534 e22906c Author: Linus Torvalds Date: Mon Aug 15 08:36:30 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: cifs: Do not set cifs/ntfs acl using a file handle (try #4) [CIFS] Cleanup use of CONFIG_CIFS_STATS2 ifdef to make transport routines more readable commit 259a53407d9ae0c109902669c6f2f88a389dd163 Merge: 93ee7a9 b33f9cb Author: Linus Torvalds Date: Mon Aug 15 08:35:54 2011 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Specify a module license regmap: Fix bulk reads commit d5811e8731213f80c80d89e980505052f16aca1c Author: Alex Deucher Date: Sat Aug 13 13:36:13 2011 -0400 drm/radeon/kms: don't try to be smart in the hpd handler Attempting to try and turn off disconnected display hw in the hotput handler lead to more problems than it helped. For now just register an event and only attempt the do something interesting with DP. Other connectors are just too problematic: - Some systems have an HPD pin assigned to LVDS, but it's rarely if ever connected properly and we don't really care about hpd events on LVDS anyway since it's always connected. - The HPD pin is wired up correctly for eDP, but we don't really have to do anything since the events since it's always connected. - Some HPD pins fire more than once when you connect/disconnect - etc. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39882 Signed-off-by: Alex Deucher Cc: stable@kernel.org Signed-off-by: Dave Airlie commit e22a539824e8ddb82c87b4f415165ede82e6ab56 Author: Rusty Russell Date: Mon Aug 15 10:15:10 2011 +0930 lguest: allow booting guest with CONFIG_RELOCATABLE=y The CONFIG_RELOCATABLE code tries to align the unpack destination to the value of 'kernel_alignment' in the setup_hdr. If that's 0, it tries to unpack to address 0, which in fact causes the gunzip code to call 'error("Out of memory while allocating output buffer")'. The bootloader (ie. the lguest Launcher in this case) should be doing setting this field; the normal bzImage is 16M, we can use the same. Reported-by: Stefanos Geraggelos Signed-off-by: Rusty Russell Cc: stable@kernel.org commit c3c53a073247ee7522ca80393319540db9f4dc1e Author: Rusty Russell Date: Mon Aug 15 10:15:10 2011 +0930 virtio: Add text copy of spec to Documentation/virtual. As suggested by Christoph Hellwig. Signed-off-by: Rusty Russell commit 17f2ae7f677f023997e02fd2ebabd90ea2a0390d Author: Rafael J. Wysocki Date: Sun Aug 14 13:34:31 2011 +0200 PM / Domains: Fix build for CONFIG_PM_RUNTIME unset Function genpd_queue_power_off_work() is not defined for CONFIG_PM_RUNTIME, so pm_genpd_poweroff_unused() causes a build error to happen in that case. Fix the problem by making pm_genpd_poweroff_unused() depend on CONFIG_PM_RUNTIME too. Signed-off-by: Rafael J. Wysocki commit bdc2209fd246820de2816691ac0e82600885e1a8 Merge: eeca736 3f4460a Author: Ingo Molnar Date: Sun Aug 14 11:48:29 2011 +0200 Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent commit a01e836087881dd9d824417190994c9b2b0f1dbb Author: Stefan Richter Date: Thu Aug 11 20:40:42 2011 +0200 firewire: ohci: fix DMA unmapping in an error path If request_irq failed, we would pass wrong arguments to dma_free_coherent. https://bugzilla.redhat.com/show_bug.cgi?id=728185 Reported-by: Mads Kiilerich Signed-off-by: Stefan Richter commit 9c1176b6a28850703ea6e3a0f0c703f6d6c61cd3 Author: Stefan Richter Date: Thu Aug 11 00:06:04 2011 +0200 firewire: cdev: fix 32 bit userland on 64 bit kernel compat corner cases Clemens points out that we need to use compat_ptr() in order to safely cast from u64 to addresses of a 32-bit usermode client. Before, our conversion went wrong - in practice if the client cast from pointer to integer such that sign-extension happened, (libraw1394 and libdc1394 at least were not doing that, IOW were not affected) or - in theory on s390 (which doesn't have FireWire though) and on the tile architecture, regardless of what the client does. The bug would usually be observed as the initial get_info ioctl failing with "Bad address" (EFAULT). Reported-by: Carl Karsten Reported-by: Clemens Ladisch Signed-off-by: Stefan Richter commit 3f4460a28fb2f73df6c32c3a305797abc01c0f9c Author: Masami Hiramatsu Date: Thu Aug 11 20:03:18 2011 +0900 perf probe: Filter out redundant inline-instances With gcc4.6, some instances of concrete inlined function looks redundant and broken, because it appears inside of a concrete instance and its call_file and call_line are same as the original abstruct's decl_file and decl_line respectively. e.g. [ d1aa] subprogram external (flag) Yes name (strp) "add_timer" decl_file (data1) 2 ;here is original decl_line (data2) 847 ;line and file prototyped (flag) Yes inline (data1) inlined (1) sibling (ref4) [ d1c6] ... [ 11d84] subprogram abstract_origin (ref4) [ d1aa] ; concrete instance low_pc (addr) .text+0x000000000000246f high_pc (addr) .text+0x000000000000248b frame_base (block1) [ 0] call_frame_cfa sibling (ref4) [ 11dd9] [ 11d9f] formal_parameter abstract_origin (ref4) [ d1b9] location (data4) location list [ 701b] [ 11da8] inlined_subroutine abstract_origin (ref4) [ d1aa] ; redundant instance low_pc (addr) .text+0x000000000000247e high_pc (addr) .text+0x0000000000002480 call_file (data1) 2 ; call line and file call_line (data2) 847 ; are same as above Those redundant instances leads unwilling results; e.g. find probe points inside of functions even if we specify a function entry as below; $ perf probe -V add_timer Available variables at add_timer @ struct timer_list* timer @ (No matched variables) So, this filters out those redundant instances based on call-site and decl-site information. Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20110811110317.19900.59525.stgit@fedora15 Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo commit db0d2c6420eeb8fd669bac84d72f1ab828bbaa64 Author: Masami Hiramatsu Date: Thu Aug 11 20:03:11 2011 +0900 perf probe: Search concrete out-of-line instances gcc 4.6 generates a concrete out-of-line instance when there is a function which is implicitly inlined somewhere but also has its own instance. The concrete out-of-line instance means that it has an abstract origin of the function which is referred by not only inlined-subroutines but also a concrete subprogram. Since current dwarf_func_inline_instances() can find only instances of inlined-subroutines, this introduces new die_walk_instances() to find both of subprogram and inlined-subroutines. e.g. without this, Available variables at sched_group_rt_period @ struct task_group* tg perf probe failed to find actual subprogram instance of sched_group_rt_period(). With this, Available variables at sched_group_rt_period @ struct task_group* tg @ struct task_group* tg Now it found the sched_group_rt_period() itself. Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20110811110311.19900.63997.stgit@fedora15 Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo commit f182e3e13ca71b64b40fab1aef31fa6a78271648 Author: Masami Hiramatsu Date: Thu Aug 11 20:03:05 2011 +0900 perf probe: Avoid searching variables in intermediate scopes Fix variable searching logic to search one in inner than local scope or global(CU) scope. In the other words, skip searching in intermediate scopes. e.g., in the following code, int var1; void inline infunc(int i) { i++; <--- [A] } void func(void) { int var1, var2; infunc(var2); } At [A], "var1" should point the global variable "var1", however, if user mis-typed as "var2", variable search should be failed. However, current logic searches variable infunc() scope, global scope, and then func() scope. Thus, it can find "var2" variable in func() scope. This may not be what user expects. So, it would better not search outer scopes except outermost (compile unit) scope which contains only global variables, when it failed to find given variable in local scope. E.g. Without this: $ perf probe -V pre_schedule --externs > without.vars With this: $ perf probe -V pre_schedule --externs > with.vars Check the diff: $ diff without.vars with.vars 88d87 < int cpu 133d131 < long unsigned int* switch_count These vars are actually in the scope of schedule(), the caller of pre_schedule(). Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20110811110305.19900.94374.stgit@fedora15 Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo commit 221d061182b8ff5507d5768aeeecbc74f01c5dfa Author: Masami Hiramatsu Date: Thu Aug 11 20:02:59 2011 +0900 perf probe: Fix to search local variables in appropriate scope Fix perf probe to search local variables in appropriate local inlined function scope. For example, pre_schedule() has only 2 local variables, as below; $ perf probe -L pre_schedule 0 static inline void pre_schedule(struct rq *rq, struct task_struct *prev) { 2 if (prev->sched_class->pre_schedule) 3 prev->sched_class->pre_schedule(rq, prev); } However, current perf probe shows 4 local variables on pre_schedule(), because it searches variables in the caller(schedule()) scope. $ perf probe -V pre_schedule Available variables at pre_schedule @ int cpu long unsigned int* switch_count struct rq* rq struct task_struct* prev This patch fixes this issue by searching variables in the local scope of the instance of inlined function. Here is the result. $ perf probe -V pre_schedule Available variables at pre_schedule @ struct rq* rq struct task_struct* prev Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20110811110259.19900.85664.stgit@fedora15 Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo commit 13e27d7686c457c625242fc2c20be30eef942408 Author: Masami Hiramatsu Date: Thu Aug 11 20:02:53 2011 +0900 perf probe: Warn when more than one line are given Check multiple --lines option and print warning informing that only the first specified --line option is valid. Changes from the 1st post: - Accept only the first option instead of the last. - Fix warning message according to David's comment. - Mark as a bugfix. Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20110811110253.19900.96192.stgit@fedora15 Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo commit 36c0c588b9ea979b619d6ddced410f9551e4c5fa Author: Masami Hiramatsu Date: Thu Aug 11 20:02:47 2011 +0900 perf probe: Fix to walk all inline instances Fix line-range collector to walk all instances of inlined function, because some execution paths can be optimized out depending on the function argument of instances. E.g.) inline_func (arg) { if (arg) do_something; else do_another; } func_A() { inline_func(1) } func_B() { inline_func(0) } In this case, func_A may have only do_something code and func_B may have only do_another. Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20110811110247.19900.93702.stgit@fedora15 Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo commit b0e9cb2802d4bf50955cca8a7d87cf94ebf750a5 Author: Masami Hiramatsu Date: Thu Aug 11 20:02:41 2011 +0900 perf probe: Fix to search nested inlined functions in CU Fix perf probe to walk through the lines of all nested inlined function call sites and declared lines when a whole CU is passed to the line walker. The die_walk_lines() can have two different type of DIEs, subprogram (or inlined-subroutine) DIE and CU DIE. If a caller passes a subprogram DIE, this means that the walker walk on lines of given subprogram. In this case, it just needs to search on direct children of DIE tree for finding call-site information of inlined function which directly called from given subprogram. On the other hand, if a caller passes a CU DIE to the walker, this means that the walker have to walk on all lines in the source files included in given CU DIE. In this case, it has to search whole DIE trees of all subprograms to find the call-site information of all nested inlined functions. Without this patch: $ perf probe --line kernel/cpu.c:151-157 static int cpu_notify(unsigned long val, void *v) { 154 return __cpu_notify(val, v, -1, NULL); } With this: $ perf probe --line kernel/cpu.c:151-157 152 static int cpu_notify(unsigned long val, void *v) { 154 return __cpu_notify(val, v, -1, NULL); } As you can see, --line option with source line range shows the declared lines as probe-able. Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20110811110241.19900.34994.stgit@fedora15 Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo commit a128405c6b40371c59c34b00cc66ed06285b9551 Author: Masami Hiramatsu Date: Thu Aug 11 20:02:35 2011 +0900 perf probe: Fix line walker to check CU correctly Fix line walker to check whether a given DIE is CU or not. Actually this function accepts CU, subprogram and inlined_subroutine DIEs. Without this fix, perf probe always fails to analyze lines on inlined functions; $ perf probe -L pre_schedule Debuginfo analysis failed. (-2) Error: Failed to show lines. (-2) This fixes that bug, as below. $ perf probe -L pre_schedule 0 static inline void pre_schedule(struct rq *rq, struct task_struct *prev { 2 if (prev->sched_class->pre_schedule) 3 prev->sched_class->pre_schedule(rq, prev); } /* rq->lock is NOT held, but preemption is disabled */ Changes from v1: - Update against current tip tree.(Fix dwarf-aux.c) Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Masami Hiramatsu Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20110811110235.19900.20614.stgit@fedora15 Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo commit 8afa2a707d3d1320df5d35966729ac5262da737d Author: Masami Hiramatsu Date: Thu Aug 11 20:02:29 2011 +0900 perf probe: Fix a memory leak for scopes array Fix a memory leak for scopes array when it finds a variable in the global scope. Reviewed-by: Pekka Enberg Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: yrl.pp-manager.tt@hitachi.com Link: http://lkml.kernel.org/r/20110811110229.19900.63019.stgit@fedora15 Signed-off-by: Masami Hiramatsu Signed-off-by: Arnaldo Carvalho de Melo commit e9b52ef2228cd0bed7a4465c693a39489e2c338d Author: Vasiliy Kulikov Date: Fri Aug 12 00:55:37 2011 +0400 perf: fix temporary file ownership check A file in /tmp/ might be a symlink, so lstat() should be used instead of stat(). Acked-by: Pekka Enberg Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Paul Mackerras Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20110811205537.GA22864@albatros Signed-off-by: Vasiliy Kulikov Signed-off-by: Arnaldo Carvalho de Melo commit bcc65fd8e929a9d9d34d814d6efc1d2793546922 Author: Matthew Garrett Date: Mon Aug 8 16:21:16 2011 +0000 drm/radeon: re-POST the asic on Apple hardware when booted via EFI At least some Apples program the GPU into a state that wedges the engine once userspace starts trying to perform accelerated operations. Executing the Atom init scripts gets the hardware back into a working state. The same hardware works fine when booted via BIOS emulation, so let's just execute the init scripts on Apples when we're using EFI. Signed-off-by: Matthew Garrett Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 13bb9430cd6154d1f088549656c4a3ed10eaf35e Author: Matthew Garrett Date: Mon Aug 8 16:21:15 2011 +0000 drm/radeon: Allow panel preferred EDID to override BIOS native mode We have two sources of information about panel capabilities on mobile radeon - the BIOS, which gives us a native mode, and the panel's preferred mode. In theory these two will always match, but there's some corner cases where the BIOS hasn't been fully initialised and so the native mode in it ends up with default values. However, if we get a panel with reasonable EDID, it's probably the case that the panel's preferred mode does actually represent the panel capabilities. This patch handles that case by replacing the native mode with the panel's preferred mode if the resolutions don't match. Systems without a valid internal panel EDID will still use the BIOS native mode. Signed-off-by: Matthew Garrett Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 92bdfd4a35415dd3741b95df60782a32c586d399 Author: Alex Deucher Date: Thu Aug 4 17:28:40 2011 +0000 drm/radeon/kms: make some watermark messages debug only Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit 33ae1827d6c3c79c5957536ec29d5a8780623147 Author: Alex Deucher Date: Thu Aug 11 14:01:03 2011 +0000 drm/radeon/kms: fix regression is handling >2 heads on cedar/caicos Need to add support for 4 crtcs when setting the possible crtcs for the encoders. Signed-off-by: Alex Deucher Cc: stable@kernel.org Signed-off-by: Dave Airlie commit 73104b5cfe3067d68f2c2de3f3d4d4964c55873e Author: Alex Deucher Date: Tue Aug 9 17:09:06 2011 +0000 drm/radeon/kms: don't enable connectors that are off in the hotplug handler If we get a hotplug event on an connector that is off, don't attempt to turn it on or off, it should already be off. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=728228 Signed-off-by: Alex Deucher Cc: stable@kernel.org Signed-off-by: Dave Airlie commit b33f9cbd67ba1a1c46879ec66467269f09cde8e5 Author: Stephen Warren Date: Thu Aug 11 11:59:10 2011 -0600 regmap: Specify a module license CONFIG_REGMAP_I2C/SPI are set to m when selected by a tristate config option that's set to m. The regmap modules don't specify a license, so fail to link to regmap_init at load time, since that is EXPORT_SYMBOL_GPL. Fix this by specifying a license for the regmap modules. Signed-off-by: Stephen Warren Signed-off-by: Mark Brown commit e22906c564c2f9c73ee4621ef3b93fe374539f00 Author: Shirish Pargaonkar Date: Tue Aug 9 14:30:39 2011 -0500 cifs: Do not set cifs/ntfs acl using a file handle (try #4) Set security descriptor using path name instead of a file handle. We can't be sure that the file handle has adequate permission to set a security descriptor (to modify DACL). Function set_cifs_acl_by_fid() has been removed since we can't be sure how a file was opened for writing, a valid request can fail if the file was not opened with two above mentioned permissions. We could have opted to add on WRITE_DAC and WRITE_OWNER permissions to file opens and then use that file handle but adding addtional permissions such as WRITE_DAC and WRITE_OWNER could cause an any open to fail. And it was incorrect to look for read file handle to set a security descriptor anyway. Signed-off-by: Shirish Pargaonkar Signed-off-by: Steve French commit 789e66612367f9975d704c9e4990025cbbbb45ec Author: Steve French Date: Tue Aug 9 18:44:44 2011 +0000 [CIFS] Cleanup use of CONFIG_CIFS_STATS2 ifdef to make transport routines more readable Christoph had requested that the stats related code (in CONFIG_CIFS_STATS2) be moved into helpers to make code flow more readable. This patch should help. For example the following section from transport.c spin_unlock(&GlobalMid_Lock); atomic_inc(&ses->server->num_waiters); wait_event(ses->server->request_q, atomic_read(&ses->server->inFlight) < cifs_max_pending); atomic_dec(&ses->server->num_waiters); spin_lock(&GlobalMid_Lock); becomes simpler (with the patch below): spin_unlock(&GlobalMid_Lock); cifs_num_waiters_inc(server); wait_event(server->request_q, atomic_read(&server->inFlight) < cifs_max_pending); cifs_num_waiters_dec(server); spin_lock(&GlobalMid_Lock); Reviewed-by: Jeff Layton CC: Christoph Hellwig Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit f57b05ed532ccf3b3e22878a5678ca10de50ad29 Author: Jiri Olsa Date: Wed Jun 1 21:43:46 2011 +0200 perf report: Use properly build_id kernel binaries If we bring the recorded perf data together with kernel binary from another machine using: on server A: perf archive on server B: tar xjvf perf.data.tar.bz2 -C ~/.debug the build_id kernel dso is not properly recognized during the "perf report" command on server B. The reason is, that build_id dsos are added during the session initialization, while the kernel maps are created during the sample event processing. The machine__create_kernel_maps functions ends up creating new dso object for kernel, but it does not check if we already have one added by build_id processing. Also the build_id reading ABI quirk added in commit: - commit b25114817a73bbd2b84ce9dba02ee1ef8989a947 perf build-id: Add quirk to deal with perf.data file format breakage populates the "struct build_id_event::pid" with 0, which is later interpreted as DEFAULT_GUEST_KERNEL_ID. This is not always correct, so it's better to guess the pid value based on the "struct build_id_event::header::misc" value. - Tested with data generated on x86 kernel version v2.6.34 and reported back on x86_64 current kernel. - Not tested for guest kernel case. Note the problem stays for PERF_RECORD_MMAP events recorded by perf that does not use proper pid (HOST_KERNEL_ID/DEFAULT_GUEST_KERNEL_ID). They are misinterpreted within the current perf code. Probably there's not much we can do about that. Cc: Avi Kivity Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Yanmin Zhang Link: http://lkml.kernel.org/r/20110601194346.GB1934@jolsa.brq.redhat.com Signed-off-by: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo commit bcf30e75b773b60379338768677a1301ef602ff9 Author: Shaohua Li Date: Thu Aug 11 10:39:04 2011 +0200 block: improve rq_affinity placement This patch reverts commit 35ae66e0a09ab70ed(block: Make rq_affinity = 1 work as expected). The purpose is to avoid an unnecessary IPI. Let's take an example. My test box has cpu 0-7, one socket. Say request is added from CPU 1, blk_complete_request() occurs at CPU 7. Without the reverted patch, softirq will be done at CPU 7. With it, an IPI will be directed to CPU 0, and softirq will be done at CPU 0. In this case, doing softirq at CPU 0 and CPU 7 have no difference from cache sharing point view and we can avoid an ipi if doing it in CPU 7. An immediate concern is this is just like QUEUE_FLAG_SAME_FORCE, but actually not. blk_complete_request() is running in interrupt handler, and currently I/O controller doesn't support multiple interrupts (I checked several LSI cards and AHCI), so only one CPU can run blk_complete_request(). This is still quite different as QUEUE_FLAG_SAME_FORCE. Since only one CPU runs softirq, the only difference with below patch is softirq not always runs at the first CPU of a group. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe commit c09c47caedc9854d59378d6e34c989e51cfdd2b4 Author: Namhyung Kim Date: Thu Aug 11 10:36:05 2011 +0200 blktrace: add FLUSH/FUA support Add FLUSH/FUA support to blktrace. As FLUSH precedes WRITE and/or FUA follows WRITE, use the same 'F' flag for both cases and distinguish them by their (relative) position. The end results look like (other flags might be shown also): - WRITE: W - WRITE_FLUSH: FW - WRITE_FUA: WF - WRITE_FLUSH_FUA: FWF Note that we reuse TC_BARRIER due to lack of bit space of act_mask so that the older versions of blktrace tools will report flush requests as barriers from now on. Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Signed-off-by: Namhyung Kim Reviewed-by: Jeff Moyer Signed-off-by: Jens Axboe commit 8e4bf84474960e832b56293c9b0674c88b5b05ce Author: Matthew Wilcox Date: Thu Aug 11 10:36:03 2011 +0200 Move some REQ flags to the common bio/request area REQ_SECURE, REQ_FLUSH and REQ_FUA may all be set on a bio as well as on a request, so relocate them to the shared part of the enum. Signed-off-by: Matthew Wilcox Signed-off-by: Namhyung Kim Reviewed-by: Jeff Moyer Signed-off-by: Jens Axboe commit fc8ed7be738ffb1b3b0140ed2de6def38b9a7101 Author: Arnaldo Carvalho de Melo Date: Wed Aug 10 12:42:26 2011 -0300 perf top browser: Remove spurious helpline update It will be immediately replaced in perf_top_browser__run. Cc: David Ahern Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-q7e2jzb44elqpkvdllk94x0i@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 88ff98775885d72618cbfc5ed6b865593cb66891 Author: Tony Luck Date: Tue Aug 9 12:36:00 2011 -0700 [IA64] fix "allnoconfig" build Link errors: arch/ia64/kernel/built-in.o: In function `arch_setup_dmar_msi': (.text+0x35972): undefined reference to `dmar_msi_write' ... and more ... because allnoconfig has CONFIG_DMAR=y due to the "select DMAR" in arch/ia64/Kconfig under config IA64_GENERIC. Drop that select, but add CONFIG_DMAR=y to generic_defconfig so we keep testbuilding the DMAR code. Signed-off-by: Tony Luck commit 40bb96ade4ef1549f387625589175def31dc9023 Merge: fa1bf42 ea5e116 Author: Jens Axboe Date: Tue Aug 9 20:43:26 2011 +0200 Merge branch 'stable/for-jens' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus commit fa1bf42ff9296ac4cf211b0a1b450a6071d26a95 Author: Jeff Moyer Date: Tue Aug 9 20:32:09 2011 +0200 allow blk_flush_policy to return REQ_FSEQ_DATA independent of *FLUSH blk_insert_flush has the following check: /* * If there's data but flush is not necessary, the request can be * processed directly without going through flush machinery. Queue * for normal execution. */ if ((policy & REQ_FSEQ_DATA) && !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) { list_add_tail(&rq->queuelist, &q->queue_head); return; } However, blk_flush_policy will not return with policy set to only REQ_FSEQ_DATA: static unsigned int blk_flush_policy(unsigned int fflags, struct request *rq) { unsigned int policy = 0; if (fflags & REQ_FLUSH) { if (rq->cmd_flags & REQ_FLUSH) policy |= REQ_FSEQ_PREFLUSH; if (blk_rq_sectors(rq)) policy |= REQ_FSEQ_DATA; if (!(fflags & REQ_FUA) && (rq->cmd_flags & REQ_FUA)) policy |= REQ_FSEQ_POSTFLUSH; } return policy; } Notice that REQ_FSEQ_DATA is only set if REQ_FLUSH is set. Fix this mismatch by moving the setting of REQ_FSEQ_DATA outside of the REQ_FLUSH check. Tejun notes: Hmmm... yes, this can become a correctness issue if (and only if) blk_queue_flush() is called to change q->flush_flags while requests are in-flight; otherwise, requests wouldn't reach the function at all. Also, I think it would be a generally good idea to always set FSEQ_DATA if the request has data. Cheers, Jeff Signed-off-by: Jeff Moyer Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 13d83a672e9bbd52ae82c2f611dfd845a957e8b4 Author: Jesse Barnes Date: Wed Aug 3 12:59:20 2011 -0700 drm/i915: split out PCH refclk update code We ought to be calling this from our DPMS routines as well as global state may change and we need to enable/disable clocks. So split out the code in preparation for further changes. Signed-off-by: Jesse Barnes Signed-off-by: Keith Packard commit da64c6fc4aba6f02aa800db72411f459a9f86809 Author: Jesse Barnes Date: Tue Aug 9 09:17:46 2011 -0700 drm/i915: show interrupt info on IVB IVB uses the same interrupt reg layout as SNB, so add an IS_GEN7 to the interrupt debugfs file. Signed-off-by: Jesse Barnes Signed-off-by: Keith Packard commit ea5e116162b7e0cf83a2b8a273440514404604de Author: Konrad Rzeszutek Wilk Date: Wed Aug 3 11:12:17 2011 -0400 xen/blkback: Make description more obvious. With the frontend having Xen but the backend not, it just looks odd: <*> Xen virtual block device support <*> Block-device backend driver Fix it to have the 'Xen' in front of it. Reported-by: Sander Eikelenboom Signed-off-by: Konrad Rzeszutek Wilk commit 80e0401e35410a69bfae05b454db8a7187edd6b8 Author: Peter Zijlstra Date: Fri Aug 5 14:26:17 2011 +0200 lockdep: Fix wrong assumption in match_held_lock match_held_lock() was assuming it was being called on a lock class that had already seen usage. This condition was true for bug-free code using lockdep_assert_held(), since you're in fact holding the lock when calling it. However the assumption fails the moment you assume the assertion can fail, which is the whole point of having the assertion in the first place. Anyway, now that there's more lockdep_is_held() users, notably __rcu_dereference_check(), its much easier to trigger this since we test for a number of locks and we only need to hold any one of them to be good. Reported-by: Sergey Senozhatsky Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/r/1312547787.28695.2.camel@twins Signed-off-by: Ingo Molnar commit 4e6343898fe7eed6b3c0c3c809347bc88d5b4a1e Author: Keith Packard Date: Sat Aug 6 10:39:45 2011 -0700 drm/i915: Remove unused 'reg' argument to dp_pipe_enabled Just an extra parameter which isn't actually needed. Signed-off-by: Keith Packard Reviewed-by: Jesse Barnes commit 1519b9956eb4b4180fa3f47c73341463cdcfaa37 Author: Keith Packard Date: Sat Aug 6 10:35:34 2011 -0700 drm/i915: Fix PCH port pipe select in CPT disable paths CPT pipe select is different from previous generations (using two bits instead of one). All of the paths from intel_disable_pch_ports were not making this distinction. Mode setting with pipe A turned off would then also force all outputs on pipe B to get turned off as the disable code would mistakenly decide that all of these outputs were on pipe A and turn them off. This is an extension of the CPT DP disable fix (why didn't I fix this then?) Signed-off-by: Keith Packard Reviewed-by: Jesse Barnes commit ed10fca9c351c83ab89a97f3515089e0d36bdccc Author: Keith Packard Date: Sat Aug 6 10:33:12 2011 -0700 drm/i915: Leave LVDS registers unlocked There's no reason to relock them; it just makes operations more complex. This fixes DPMS where the panel registers were locked making the disable not work. Signed-off-by: Keith Packard Reviewed-by: Jesse Barnes commit de842eff41017721312d2747bcbee89c1beda6d0 Author: Keith Packard Date: Sat Aug 6 10:30:45 2011 -0700 drm/i915: Wait for LVDS panel power sequence During mode setting, check to make sure the panel power sequencing has completed before doing further operations on the device. This uncovered errors with DPMS not turning the device off as it was left locked. Signed-off-by: Keith Packard Reviewed-by: Jesse Barnes commit 2ab1ba68aeaecd41c4b34f0eaf1d70a37367fb1a Author: Chris Mason Date: Thu Aug 4 14:28:36 2011 -0400 Btrfs: force unplugs when switching from high to regular priority bios Btrfs does bio submissions from a worker thread, and each device has a list of high priority bios and regular priority bios. Synchronous writes go to the high priority thread while async writes go to regular list. This commit brings back an explicit unplug any time we switch from high to regular priority, which makes it easier for the block layer to give us low latencies. Signed-off-by: Chris Mason commit 4931402a9dd00b2997e95bfbb89409b2a6dbb383 Author: Vivek Goyal Date: Fri Aug 5 09:42:20 2011 +0200 cfq-iosched: Add documentation about idling There are always questions about why CFQ is idling on various conditions. Recent ones is Christoph asking again why to idle on REQ_NOIDLE. His assertion is that XFS is relying more and more on workqueues and is concerned that CFQ idling on IO from every workqueue will impact XFS badly. So he suggested that I add some more documentation about CFQ idling and that can provide more clarity on the topic and also gives an opprotunity to poke a hole in theory and lead to improvements. So here is my attempt at that. Any comments are welcome. Signed-off-by: Vivek Goyal Signed-off-by: Jens Axboe commit 35ae66e0a09ab70ed588e65f26b4c725cd1656b6 Author: Tao Ma Date: Fri Aug 5 09:37:10 2011 +0200 block: Make rq_affinity = 1 work as expected Commit 5757a6d76c introduced a new rq_affinity = 2 so as to make the request completed in the __make_request cpu. But it makes the old rq_affinity = 1 not work any more. The root cause is that if the 'cpu' and 'req->cpu' is in the same group and cpu != req->cpu, ccpu will be the same as group_cpu, so the completion will be excuted in the 'cpu' not 'group_cpu'. This patch fix problem by simpling removing group_cpu and the codes are more explicit now. If ccpu == cpu, we complete in cpu, otherwise we raise_blk_irq to ccpu. Cc: Christoph Hellwig Cc: Roland Dreier Cc: Dan Williams Cc: Jens Axboe Signed-off-by: Tao Ma Reviewed-by: Shaohua Li Signed-off-by: Jens Axboe commit 910ac68a2b80c7de95bc8488734067b1bb15d583 Author: Trond Myklebust Date: Tue Aug 2 14:46:52 2011 -0400 NFSv4.1: Return NFS4ERR_BADSESSION to callbacks during session resets If the client is in the process of resetting the session when it receives a callback, then returning NFS4ERR_DELAY may cause a deadlock with the DESTROY_SESSION call. Basically, if the client returns NFS4ERR_DELAY in response to the CB_SEQUENCE call, then the server is entitled to believe that the client is busy because it is already processing that call. In that case, the server is perfectly entitled to respond with a NFS4ERR_BACK_CHAN_BUSY to any DESTROY_SESSION call. Fix this by having the client reply with a NFS4ERR_BADSESSION in response to the callback if it is resetting the session. Cc: stable@kernel.org [2.6.38+] Signed-off-by: Trond Myklebust commit 55a673990ec04cf63005318bcf08c2b0046e5778 Author: Trond Myklebust Date: Tue Aug 2 14:46:29 2011 -0400 NFSv4.1: Fix the callback 'highest_used_slotid' behaviour Currently, there is no guarantee that we will call nfs4_cb_take_slot() even though nfs4_callback_compound() will consistently call nfs4_cb_free_slot() provided the cb_process_state has set the 'clp' field. The result is that we can trigger the BUG_ON() upon the next call to nfs4_cb_take_slot(). This patch fixes the above problem by using the slot id that was taken in the CB_SEQUENCE operation as a flag for whether or not we need to call nfs4_cb_free_slot(). It also fixes an atomicity problem: we need to set tbl->highest_used_slotid atomically with the check for NFS4_SESSION_DRAINING, otherwise we end up racing with the various tests in nfs4_begin_drain_session(). Cc: stable@kernel.org [2.6.38+] Signed-off-by: Trond Myklebust commit 9af7db3228acc286c50e3a0f054ec982efdbc6c6 Author: Boaz Harrosh Date: Wed Aug 3 21:52:51 2011 -0700 pnfs-obj: Fix the comp_index != 0 case There were bugs in the case of partial layout where olo_comp_index is not zero. This used to work and was tested but one of the later cleanup SQUASHMEs broke it and was not tested since. Also add a dprint that specify those received layout parameters. Everything else was already printed. [Needed in v3.0] CC: Stable Tree Signed-off-by: Boaz Harrosh Signed-off-by: Trond Myklebust commit 20618b21da0796115e81906d24ff1601552701b7 Author: Boaz Harrosh Date: Wed Aug 3 21:54:33 2011 -0700 pnfs-obj: Bug when we are running out of bio When we have a situation that the number of pages we want to encode is bigger then the size of the bio. (Which can currently happen only when all IO is going to a single device .e.g group_width==1) then the IO is submitted short and we report back only the amount of bytes we actually wrote/read and all is fine. BUT ... There was a bug that the current length counter was advanced before the fail to add the extra page, and we come to a situation that the CDB length was one-page longer then the actual bio size, which is of course rejected by the osd-target. While here also fix the bio size calculation, in the case that we received more then one group of devices. CC: Stable Tree Signed-off-by: Boaz Harrosh Signed-off-by: Trond Myklebust commit 88c9e42196285a7c573e2abda11a4b5037c669bc Author: Heiko Carstens Date: Tue Aug 2 09:57:35 2011 +0200 nfs: add missing prefetch.h include Fix this compile error on s390: CC [M] fs/nfs/blocklayout/blocklayout.o fs/nfs/blocklayout/blocklayout.c: In function 'bl_end_io_read': fs/nfs/blocklayout/blocklayout.c:201:4: error: implicit declaration of function 'prefetchw' Introduced with 9549ec01 "pnfsblock: bl_read_pagelist". Cc: Fred Isaman Signed-off-by: Heiko Carstens Signed-off-by: Trond Myklebust commit 52884b2be5aa9a4a8f7a62525051c095718b014f Merge: ed8f373 798c794 Author: Randy Dunlap Date: Wed Aug 3 14:35:47 2011 -0700 Merge branch 'docs/msi-3' of git://github.com/mfwitten/linux-2.6 into docs-move commit f41c53a569c4cf0556893ec9cfcf697d069799e1 Author: Axel Lin Date: Wed Aug 3 15:02:55 2011 +0200 block: swim3: fix unterminated of_device_id table of_device_id structures need a NULL terminating entry, add it. Signed-off-by: Axel Lin Signed-off-by: Jens Axboe commit 798c794df81e0a1af62c1d7e48b464f4096f3b9a Author: Michael Witten Date: Fri Jul 15 03:29:04 2011 +0000 Docs: MSI-HOWTO: MSI -> MSIs Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit c2b65e181acb9a981c890489c0f9a04d8e1b91f9 Author: Michael Witten Date: Fri Jul 15 03:27:22 2011 +0000 Docs: MSI-HOWTO: Insert a comma Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit 1b8386f61241471c722fbdff48e3d1d97bfca8e6 Author: Michael Witten Date: Fri Jul 15 03:26:37 2011 +0000 Docs: MSI-HOWTO: can -> could Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit e6b85a1f8a56d3c9db0273b7e4aaab802dc07a9b Author: Michael Witten Date: Fri Jul 15 03:25:44 2011 +0000 Docs: MSI-HOWTO: Use `unknown ...' rather than `... know about.' Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit 952df55b5a30913f4a5536b12ad09dd95c66d83f Author: Michael Witten Date: Fri Jul 15 03:15:10 2011 +0000 Docs: MSI-HOWTO: may -> might Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit e14bd7e614b57493e1cbefb8a06d3754bdd04e26 Author: Michael Witten Date: Fri Jul 15 03:12:13 2011 +0000 Docs: MSI-HOWTO: Insert a comma Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit e6ffceb0ded9beeaddd9c246b3fec298c6b1f0c9 Author: Michael Witten Date: Thu Jul 14 23:30:47 2011 +0000 Docs: MSI-HOWTO: API -> function Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit 5a84fc3162e06632ebea42cefe3b964299213d33 Author: Michael Witten Date: Thu Jul 14 21:55:05 2011 +0000 Docs: MSI-HOWTO: , -> ; Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit 6457d9b350b3f4f2098984eee016c6c994b9c096 Author: Michael Witten Date: Thu Jul 14 21:54:18 2011 +0000 Docs: MSI-HOWTO: Move a sentence to another paragraph Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit ed737c1882c652f0b5a888df59895b5dc2d10cd7 Author: Michael Witten Date: Mon Jul 18 16:15:00 2011 +0000 Docs: MSI-HOWTO: Insert `that' ... as per Randy Dunlap's wishes :-P Message-Id: <20110717114023.2b4cce91.rdunlap@xenotime.net> Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit e4439236ef5ac8e51ce97d03df8ef3e6dc5c6d51 Author: Michael Witten Date: Thu Jul 14 21:30:18 2011 +0000 Docs: MSI-HOWTO: Offset modifier with a comma, and insert `yet' for emphasis Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit 263d8d57b3b2e2fbb4e79b7cda7ef3399add4fb7 Author: Michael Witten Date: Thu Jul 14 21:28:00 2011 +0000 Docs: MSI-HOWTO: Put the `because' subordinate clause first Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit 1d15afcc73004028f2870ede7a56d590e1ca8ca8 Author: Michael Witten Date: Thu Jul 14 20:05:01 2011 +0000 Docs: MSI-HOWTO: Streamline some wording Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit a2d4d50128279c67d4cf38061206cddc1fc37e75 Author: Michael Witten Date: Thu Jul 14 20:03:28 2011 +0000 Docs: MSI-HOWTO: `asked for' -> `requested' Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit 4979de6efb5553505a595eadc1cf7c386ca1ddc6 Author: Michael Witten Date: Thu Jul 14 19:52:56 2011 +0000 Docs: MSI-HOWTO: Use present tense and streamline some wording Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit 891f692533c36a17f00d25d24e4ac44ef38c9e5c Author: Michael Witten Date: Thu Jul 14 17:53:54 2011 +0000 Docs: MSI-HOWTO: Use the subjunctive, and change `can' to `may' Signed-off-by: Michael Witten Acked-by: Matthew Wilcox Signed-off-by: Randy Dunlap commit debc3b778508f59696ff188f0feca271dcbfa7d9 Author: Jon Mason Date: Tue Aug 2 00:01:18 2011 -0500 PCI: export pcie_bus_configure_settings symbol pcie_bus_configure_settings needs to be exported if the PCI hotplug driver is being compiled as a module. Reported-by: Stephen Rothwell Signed-off-by: Jon Mason Signed-off-by: Jesse Barnes commit f95fe9cfb49f6e625fbb5888cae2ed6f3a276b89 Author: Herbert Poetzl Date: Tue Aug 2 12:43:50 2011 +0200 block/genhd.c: remove useless cast in diskstats_show() Remove the (unsigned long long) cast in diskstats_show() and adjusts the seq_printf() format string to 'unsigned long' diskstats_show() uses part_stat_read() to get the stats, which either accesses the specified field in the struct disk_stats directly (non SMP) or sums up the per CPU values in a variable of the same type as the field, so in any case the result will have the same type and range as the specified field which for all disk_stats entries is unsigned long Also, for unsigned long ranges the output of %lu should be identical to the one of %llu, so no change in the actual proc entry contents. Signed-off-by: Herbert Poetzl Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit aec9f377e4f235c47e27fd8a429555dfa2dda342 Author: Andrew Morton Date: Tue Aug 2 12:43:50 2011 +0200 drivers/cdrom/cdrom.c: relax check on dvd manufacturer value The report has an ISO which has a very long manufacturer ID. It seems that Linux is wrong, not the ISO maker. Relax the check for the length of this field: emit a warning and truncate the incoming data to 2048 bytes rather than rejecting the entire thing. dvd_manufact.value isn't null-terminated. I'm not even sure if it's a string. The kernel doesn't apepar to use it anyway. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=39062 Reported-by: Tested-by: Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit ddad9ef5826efdfbbdb67b13b46f30e43e46ec3e Author: H Hartley Sweeten Date: Tue Aug 2 12:43:49 2011 +0200 drivers/block/drbd/drbd_nl.c: use bitmap_parse instead of __bitmap_parse The buffer 'sc.cpu_mask' is a kernel buffer. If bitmap_parse is used instead of __bitmap_parse the extra parameter that indicates a kernel buffer is not needed. Signed-off-by: H Hartley Sweeten Cc: Lars Ellenberg Cc: Philipp Reisner Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Jens Axboe commit e2a5429ff7947ad251310376384f449297b7492a Author: Jens Axboe Date: Tue Aug 2 10:43:35 2011 +0200 bsg-lib: add module.h include Due to conflicts with the moduleh tree in linux-next, we run into an include file mess. We really need export.h in that tree, but if we add module.h locally then the issue is easier to resolve. Reported-by: Stephen Rothwell Signed-off-by: Jens Axboe commit a5395b83b78f62ccf5e3af854aacd025c2a6e7b5 Author: Vivek Goyal Date: Tue Aug 2 09:24:09 2011 +0200 cfq-iosched: Reduce linked group count upon group destruction FQ keeps track of number of groups which are linked on blkcg->blkg_list. This is useful to avoid races between queue exit and cgroup exit code paths. So if at the request queue exit time linked group count is not zero, that means there are some group out there which is yet to be deleted under rcu read period and queue exit code should wait for on rcu period. In my previous patch I forgot to decrease the number of group count. So in current form, we nr_blkcg_linked_grps is always non-zero and we will always wait one rcu period (if BLK_CGROUP=y). The side effect of this is that it can increase boot time. I am surprised, nobody complained so far. Signed-off-by: Vivek Goyal Signed-off-by: Jens Axboe commit 9e8bf93a7f416a3fa8fb6d76177d90e67bd45496 Author: Ram Pai Date: Mon Jul 25 13:08:42 2011 -0700 PCI: code and comments cleanup a) adjust_resource_sorted() is now called reassign_resource_sorted() b) nice-to-have is now called optional c) add_list is now called realloc_list. Signed-off-by: Ram Pai Signed-off-by: Jesse Barnes commit 0a2daa1cf35004f5adbf4138555cc5669abf3a3e Author: Ram Pai Date: Mon Jul 25 13:08:41 2011 -0700 PCI: make cardbus-bridge resources optional Allocate resources to cardbus bridge only after all other genuine resources requests are satisfied. Dont retry if resource allocation for cardbus-bridges fail. Signed-off-by: Ram Pai Signed-off-by: Jesse Barnes commit 2aceefcbd5a73059e5f52831817ec277e987440d Author: Yinghai Lu Date: Mon Jul 25 13:08:40 2011 -0700 PCI: make SRIOV resources optional From: Yinghai Lu Allocate resources to SRIOV BARs only after all other required resource-requests are satisfied. Dont retry if resource allocation for SRIOV BARs fail. Signed-off-by: Ram Pai Signed-off-by: Yinghai Lu Signed-off-by: Jesse Barnes commit 2bbc6942273b5b3097bd265d82227bdd84b351b2 Author: Ram Pai Date: Mon Jul 25 13:08:39 2011 -0700 PCI : ability to relocate assigned pci-resources Currently pci-bridges are allocated enough resources to satisfy their immediate requirements. Any additional resource-requests fail if additional free space, contiguous to the one already allocated, is not available. This behavior is not reasonable since sufficient contiguous resources, that can satisfy the request, are available at a different location. This patch provides the ability to expand and relocate a allocated resource. v2: Changelog: Fixed size calculation in pci_reassign_resource() v3: Changelog : Split this patch. The resource.c changes are already upstream. All the pci driver changes are in here. Signed-off-by: Ram Pai Signed-off-by: Jesse Barnes commit be768912a49b10b68e96fbd8fa3cab0adfbd3091 Author: Yinghai Lu Date: Mon Jul 25 13:08:38 2011 -0700 PCI: honor child buses add_size in hot plug configuration git commit c8adf9a3e873eddaaec11ac410a99ef6b9656938 "PCI: pre-allocate additional resources to devices only after successful allocation of essential resources." fails to take into consideration the optional-resources needed by children devices while calculating the optional-resource needed by the bridge. This can be a problem on some setup. For example, if a hotplug bridge has 8 children hotplug bridges, the bridge should have enough resources to accomodate the hotplug requirements for each of its children hotplug bridges. Currently this is not the case. This patch fixes the problem. Signed-off-by: Yinghai Lu Reviewed-by: Ram Pai Signed-off-by: Jesse Barnes commit b03e7495a862b028294f59fc87286d6d78ee7fa1 Author: Jon Mason Date: Wed Jul 20 15:20:54 2011 -0500 PCI: Set PCI-E Max Payload Size on fabric On a given PCI-E fabric, each device, bridge, and root port can have a different PCI-E maximum payload size. There is a sizable performance boost for having the largest possible maximum payload size on each PCI-E device. However, if improperly configured, fatal bus errors can occur. Thus, it is important to ensure that PCI-E payloads sends by a device are never larger than the MPS setting of all devices on the way to the destination. This can be achieved two ways: - A conservative approach is to use the smallest common denominator of the entire tree below a root complex for every device on that fabric. This means for example that having a 128 bytes MPS USB controller on one leg of a switch will dramatically reduce performances of a video card or 10GE adapter on another leg of that same switch. It also means that any hierarchy supporting hotplug slots (including expresscard or thunderbolt I suppose, dbl check that) will have to be entirely clamped to 128 bytes since we cannot predict what will be plugged into those slots, and we cannot change the MPS on a "live" system. - A more optimal way is possible, if it falls within a couple of constraints: * The top-level host bridge will never generate packets larger than the smallest TLP (or if it can be controlled independently from its MPS at least) * The device will never generate packets larger than MPS (which can be configured via MRRS) * No support of direct PCI-E <-> PCI-E transfers between devices without some additional code to specifically deal with that case Then we can use an approach that basically ignores downstream requests and focuses exclusively on upstream requests. In that case, all we need to care about is that a device MPS is no larger than its parent MPS, which allows us to keep all switches/bridges to the max MPS supported by their parent and eventually the PHB. In this case, your USB controller would no longer "starve" your 10GE Ethernet and your hotplug slots won't affect your global MPS. Additionally, the hotplugged devices themselves can be configured to a larger MPS up to the value configured in the hotplug bridge. To choose between the two available options, two PCI kernel boot args have been added to the PCI calls. "pcie_bus_safe" will provide the former behavior, while "pcie_bus_perf" will perform the latter behavior. By default, the latter behavior is used. NOTE: due to the location of the enablement, each arch will need to add calls to this function. This patch only enables x86. This patch includes a number of changes recommended by Benjamin Herrenschmidt. Tested-by: Jordan_Hargrave@dell.com Signed-off-by: Jon Mason Signed-off-by: Jesse Barnes commit 1c8007b0769d37aa5fcb343b383b0af89ade2f71 Author: Dave Kleikamp Date: Mon Aug 1 12:41:00 2011 -0500 jfs: flush journal completely before releasing metadata inodes This fixes a race during unmount. We need to not only make sure that the journal is completely written, but that the metadata changes make it to disk before releasing ipimap and ipbmap. Signed-off-by: Dave Kleikamp commit e5a94f56845bb4b272d82e84b5a1e2080b07ba82 Author: Shaohua Li Date: Mon Aug 1 10:31:06 2011 +0200 blk-throttle: correctly determine sync bio read request is always sync. Using rw_is_sync() to determine if a bio is sync. Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe commit 05eb0f252b04aa94ace0794f73d56c6a02351d80 Author: Kay Sievers Date: Sun Jul 31 22:21:35 2011 +0200 loop: fix deadlock when sysfs and LOOP_CLR_FD race against each other LOOP_CLR_FD takes lo->lo_ctl_mutex and tries to remove the loop sysfs files. Sysfs calls show() and waits for lo->lo_ctl_mutex. LOOP_CLR_FD waits for show() to finish to remove the sysfs file. cat /sys/class/block/loop0/loop/backing_file mutex_lock_nested+0x176/0x350 ? loop_attr_do_show_backing_file+0x2f/0xd0 [loop] ? loop_attr_do_show_backing_file+0x2f/0xd0 [loop] loop_attr_do_show_backing_file+0x2f/0xd0 [loop] dev_attr_show+0x1b/0x60 ? sysfs_read_file+0x86/0x1a0 ? __get_free_pages+0x12/0x50 sysfs_read_file+0xaf/0x1a0 ioctl(LOOP_CLR_FD): wait_for_common+0x12c/0x180 ? try_to_wake_up+0x2a0/0x2a0 wait_for_completion+0x18/0x20 sysfs_deactivate+0x178/0x180 ? sysfs_addrm_finish+0x43/0x70 ? sysfs_addrm_start+0x1d/0x20 sysfs_addrm_finish+0x43/0x70 sysfs_hash_and_remove+0x85/0xa0 sysfs_remove_group+0x59/0x100 loop_clr_fd+0x1dc/0x3f0 [loop] lo_ioctl+0x223/0x7a0 [loop] Instead of taking the lo_ctl_mutex from sysfs code, take the inner lo->lo_lock, to protect the access to the backing_file data. Thanks to Tejun for help debugging and finding a solution. Cc: Milan Broz Cc: Tejun Heo Signed-off-by: Kay Sievers Cc: stable@kernel.org Signed-off-by: Jens Axboe commit d134b00b9acca3fb054d7c88a5f5d562ecbb42d1 Author: Kay Sievers Date: Sun Jul 31 22:08:04 2011 +0200 loop: add BLK_DEV_LOOP_MIN_COUNT=%i to allow distros 0 pre-allocated loop devices Instead of unconditionally creating a fixed number of dead loop devices which need to be investigated by storage handling services, even when they are never used, we allow distros start with 0 loop devices and have losetup(8) and similar switch to the dynamic /dev/loop-control interface instead of searching /dev/loop%i for free devices. Signed-off-by: Kay Sievers Signed-off-by: Jens Axboe commit 770fe30a46a12b6fb6b63fbe1737654d28e84844 Author: Kay Sievers Date: Sun Jul 31 22:08:04 2011 +0200 loop: add management interface for on-demand device allocation Loop devices today have a fixed pre-allocated number of usually 8. The number can only be changed at module init time. To find a free device to use, /dev/loop%i needs to be scanned, and all devices need to be opened until a free one is possibly found. This adds a new /dev/loop-control device node, that allows to dynamically find or allocate a free device, and to add and remove loop devices from the running system: LOOP_CTL_ADD adds a specific device. Arg is the number of the device. It returns the device i or a negative error code. LOOP_CTL_REMOVE removes a specific device, Arg is the number the device. It returns the device i or a negative error code. LOOP_CTL_GET_FREE finds the next unbound device or allocates a new one. No arg is given. It returns the device i or a negative error code. The loop kernel module gets automatically loaded when /dev/loop-control is accessed the first time. The alias specified in the module, instructs udev to create this 'dead' device node, even when the module is not loaded. Example: cfd = open("/dev/loop-control", O_RDWR); # add a new specific loop device err = ioctl(cfd, LOOP_CTL_ADD, devnr); # remove a specific loop device err = ioctl(cfd, LOOP_CTL_REMOVE, devnr); # find or allocate a free loop device to use devnr = ioctl(cfd, LOOP_CTL_GET_FREE); sprintf(loopname, "/dev/loop%i", devnr); ffd = open("backing-file", O_RDWR); lfd = open(loopname, O_RDWR); err = ioctl(lfd, LOOP_SET_FD, ffd); Cc: Tejun Heo Cc: Karel Zak Signed-off-by: Kay Sievers Signed-off-by: Jens Axboe commit 34dd82afd27da2537199d7f71f1542501c6f96e7 Author: Kay Sievers Date: Sun Jul 31 22:08:04 2011 +0200 loop: replace linked list of allocated devices with an idr index Replace the linked list, that keeps track of allocated devices, with an idr index to allow a more efficient lookup of devices. Cc: Tejun Heo Signed-off-by: Kay Sievers Signed-off-by: Jens Axboe commit aa387cc895672b00f807ad7c734a2defaf677712 Author: Mike Christie Date: Sun Jul 31 22:05:09 2011 +0200 block: add bsg helper library This moves the FC classes bsg code to the block layer and makes it a lib so that other classes like iscsi and SAS can use it. It is helpful because working with the request queue, bios, creating scatterlists, etc are a pain that the LLD does not have to worry about with normal IOs and should not have to worry about for bsg requests. Signed-off-by: Mike Christie Signed-off-by: Jens Axboe commit b6873807a7143b7d6d8b06809295e559d07d7deb Author: Sebastian Andrzej Siewior Date: Mon Jul 11 12:17:31 2011 +0200 irq: Track the owner of irq descriptor Interrupt descriptors can be allocated from modules. The interrupts are used by other modules, but we have no refcount on the module which provides the interrupts and there is no way to establish one on the device level as the interrupt using module is agnostic to the fact that the interrupt is provided by a module rather than by some builtin interrupt controller. To prevent removal of the interrupt providing module, we can track the owner of the interrupt descriptor, which also provides the relevant irq chip functions in the irq descriptor. request/setup_irq() can now acquire a refcount on the owner module to prevent unloading. free_irq() drops the refcount. Signed-off-by: Sebastian Andrzej Siewior Link: http://lkml.kernel.org/r/20110711101731.GA13804@Chamillionaire.breakpoint.cc Signed-off-by: Thomas Gleixner commit f3637a5f2e2eb391ff5757bc83fb5de8f9726464 Author: Sebastian Andrzej Siewior Date: Thu Jul 7 22:32:17 2011 +0200 irq: Always set IRQF_ONESHOT if no primary handler is specified If no primary handler is specified then a default one is assigned which always returns IRQ_WAKE_THREAD. This handler requires the IRQF_ONESHOT flag on LEVEL / EIO typed irqs because the source of interrupt is not disabled. Since it is required for those users and there is no difference for others it makes sense to add this flag unconditionally. Signed-off-by: Sebastian Andrzej Siewior Link: http://lkml.kernel.org/r/1310070737-18514-1-git-send-email-bigeasy@linutronix.de Signed-off-by: Thomas Gleixner commit fd079facb3fdd1b0517f0b2087ac05c30ea09cfe Author: Randy Dunlap Date: Mon Jul 25 11:01:09 2011 -0700 KVM: fix TASK_DELAY_ACCT kconfig warning Fix kconfig dependency warning: warning: (KVM) selects TASK_DELAY_ACCT which has unmet direct dependencies (TASKSTATS) Signed-off-by: Randy Dunlap Signed-off-by: Avi Kivity commit 6e7a333eaa522ef73be01caec7a01521490aaf00 Author: Thomas Gleixner Date: Fri Jul 22 09:12:51 2011 +0000 rtc: Limit RTC PIE frequency The RTC pie hrtimer is self rearming. We really need to limit the frequency to something sensible. Thus limit it to the 8192Hz max value from the rtc man documentation Cc: Willy Tarreau Cc: stable@kernel.org Signed-off-by: Thomas Gleixner [jstultz: slightly reworked to use RTC_MAX_FREQ value] Signed-off-by: John Stultz commit 3c8bb90efb6e3105206e4aaa9127395feeda5492 Author: Thomas Gleixner Date: Fri Jul 22 09:12:51 2011 +0000 rtc: Fix hrtimer deadlock Ben reported a lockup related to rtc. The lockup happens due to: CPU0 CPU1 rtc_irq_set_state() __run_hrtimer() spin_lock_irqsave(&rtc->irq_task_lock) rtc_handle_legacy_irq(); spin_lock(&rtc->irq_task_lock); hrtimer_cancel() while (callback_running); So the running callback never finishes as it's blocked on rtc->irq_task_lock. Use hrtimer_try_to_cancel() instead and drop rtc->irq_task_lock while waiting for the callback. Fix this for both rtc_irq_set_state() and rtc_irq_set_freq(). Cc: stable@kernel.org Reported-by: Ben Greear Signed-off-by: Thomas Gleixner Signed-off-by: John Stultz commit 53cc2820acbdbcc768675bfaff321f3a8680a317 Author: Thomas Gleixner Date: Fri Jul 22 09:12:50 2011 +0000 rtc: Handle errors correctly in rtc_irq_set_state() In rtc_irq_set_state, the code checks the correctness of the parameters, but then goes on to unconditionally arms/disarms the hrtimer. Thus a random task might arm/disarm rtc timer and surprise the real owner by either generating events or by stopping them. Cc: stable@kernel.org Signed-off-by: Thomas Gleixner Signed-off-by: John Stultz commit 1dd75f91ae713049eb6baaa640078f3a6549e522 Author: jhbird.choi@samsung.com Date: Thu Jul 21 15:29:14 2011 +0900 genirq: Fix wrong bit operation (!msk & 0x01) should be !(msk & 0x01) Signed-off-by: Jonghwan Choi Link: http://lkml.kernel.org/r/1311229754-6003-1-git-send-email-jhbird.choi@samsung.com Signed-off-by: Thomas Gleixner Cc: stable@kernel.org commit 40c5cc263954444f5a76cbf25d408c42da480122 Author: Mark Brown Date: Sun Jul 24 22:39:12 2011 +0100 regmap: Fix bulk reads We should be reading the number of bytes we were asked for, not the size of a single register. Signed-off-by: Mark Brown commit 89153b5cae9f40c224a5d321665a97bf14220c2c Author: Stefan Bader Date: Thu Jul 14 15:30:37 2011 +0200 xen-blkfront: Fix one off warning about name clash Avoid telling users to use xvde and onwards when using xvde. Acked-by: Stefano Stabellini Signed-off-by: Stefan Bader Signed-off-by: Konrad Rzeszutek Wilk commit 196cfe2ae8fcdc03b3c7d627e7dfe8c0ce7229f9 Author: Stefan Bader Date: Thu Jul 14 15:30:22 2011 +0200 xen-blkfront: Drop name and minor adjustments for emulated scsi devices These were intended to avoid the namespace clash when representing emulated IDE and SCSI devices. However that seems to confuse users more than expected (a disk defined as sda becomes xvde). So for now go back to the scheme which does no adjustments. This will break when mixing IDE and SCSI names in the configuration of guests but should be by now expected. Acked-by: Stefano Stabellini Signed-off-by: Stefan Bader Signed-off-by: Konrad Rzeszutek Wilk